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,4 +1,4 @@
|
|
|
1
|
-
import{d as k}from"./chunk-
|
|
1
|
+
import{d as k}from"./chunk-AUZCENYI.js";import{Ta as j,ma as w,ua as R}from"./chunk-BXDZX3BS.js";import{a as H,c as f,e as G,g as o}from"./chunk-VKWPEFWQ.js";var ee=f((Tt,X)=>{"use strict";o();var m=class e extends Error{constructor(t,s,r){super("[ParserError] "+t,s,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},E=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},A=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new E(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let s;for(;s===!1||this.nextChar();)s=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new m("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,s){s&&this.next(s),this.stack.push(this.state),this.state=new E(t)}callNow(t,s){return this.call(t,s),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new m("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new m("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new m("Must declare a parseStart method")}};A.END=1114112;A.Error=m;X.exports=A});var re=f((Rt,te)=>{"use strict";o();te.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var y=f((xt,se)=>{"use strict";o();se.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var ne=f((Ht,ie)=>{"use strict";o();var C=y(),K=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${C(2,this.getUTCMonth()+1)}-${C(2,this.getUTCDate())}`,s=`${C(2,this.getUTCHours())}:${C(2,this.getUTCMinutes())}:${C(2,this.getUTCSeconds())}.${C(3,this.getUTCMilliseconds())}`;return`${t}T${s}`}};ie.exports=e=>{let t=new K(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var oe=f((yt,ae)=>{"use strict";o();var he=y(),$e=global.Date,v=class extends $e{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${he(2,this.getUTCMonth()+1)}-${he(2,this.getUTCDate())}`}};ae.exports=e=>{let t=new v(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var ce=f((It,le)=>{"use strict";o();var N=y(),W=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${N(2,this.getUTCHours())}:${N(2,this.getUTCMinutes())}:${N(2,this.getUTCSeconds())}.${N(3,this.getUTCMilliseconds())}`}};le.exports=e=>{let t=new W(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var I=f((exports,module)=>{"use strict";o();module.exports=makeParserClass(ee());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=re(),createDateTimeFloat=ne(),createDate=oe(),createTime=ce(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
|
|
2
2
|
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(r){let i=this.ctx,h=r.key.pop();for(let n of r.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,h))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(r.value)||isFloat(r.value)?i[h]=r.value.valueOf():i[h]=r.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(r){return this.state.resultTable?this.state.resultTable.push(r):this.state.resultTable=[r],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(r){return this.returnNow({key:this.state.resultTable,value:r})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(r){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,r)&&(!isTable(this.ctx[r])||this.ctx[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[r]=this.ctx[r]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,r))this.ctx=this.ctx[r]=Table();else if(isTable(this.ctx[r]))this.ctx=this.ctx[r];else if(isList(this.ctx[r]))this.ctx=this.ctx[r][this.ctx[r].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(r){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,r)||(this.ctx[r]=List()),isInlineList(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[r])){let i=Table();this.ctx[r].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,r))this.ctx=this.ctx[r]=Table();else{if(isInlineList(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[r]))this.ctx=this.ctx[r][this.ctx[r].length-1];else if(isTable(this.ctx[r]))this.ctx=this.ctx[r];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(r){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(r){return this.returnNow(r)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(r){return this.state.buf+=r,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let r="\\u00";return this.char<16&&(r+="0"),r+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${r} instead`))}recordMultiEscapeReplacement(r){return this.state.buf+=r,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(r){try{let i=parseInt(r,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(r){if(this.state.resultArr){let i=this.state.resultArr[_contentType],h=tomlType(r);if(i!==h)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${h}`))}else this.state.resultArr=InlineList(tomlType(r));return isFloat(r)||isInteger(r)?this.state.resultArr.push(r.valueOf()):this.state.resultArr.push(r),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(r){let i=this.state.resultTable,h=r.key.pop();for(let n of r.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,h))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(r.value)||isFloat(r.value)?i[h]=r.value.valueOf():i[h]=r.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var L=f((Ot,ue)=>{"use strict";o();ue.exports=Ke;function Ke(e,t){if(e.pos==null||e.line==null)return e;let s=e.message;if(s+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
|
|
3
3
|
`,t&&t.split){let r=t.split(/\n/),i=String(Math.min(r.length,e.line+3)).length,h=" ";for(;h.length<i;)h+=" ";for(let n=Math.max(0,e.line-1);n<Math.min(r.length,e.line+2);++n){let a=String(n+1);if(a.length<i&&(a=" "+a),e.line===n){s+=a+"> "+r[n]+`
|
|
4
4
|
`,s+=h+" ";for(let l=0;l<e.col;++l)s+=" ";s+=`^
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as A}from"./chunk-
|
|
1
|
+
import{n as A}from"./chunk-235JVI2J.js";import{a as P}from"./chunk-LMPD55L6.js";import{c as C}from"./chunk-H3V6Y5JO.js";import{s as T}from"./chunk-7ZIO3X22.js";import{r as w}from"./chunk-JGN7YG5X.js";import{a as D}from"./chunk-V774I3FW.js";import{O as u}from"./chunk-3EQY5B4S.js";import{v as h,x as y}from"./chunk-YYLEWVO6.js";import{Pb as O,va as p}from"./chunk-BXDZX3BS.js";import{d,q as m}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();async function q(e){P({verbose:e.verbose,noColor:e.noColor});let t=w({store:e.store}),o=await u(t,e.password);await R(o,{path:e.path??m(),force:e.force??!1,silent:e.silent??!1})}var E={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",variant:"PRODUCTVARIANT",shop:"SHOP"};async function R(e,t){let{force:o,path:i,silent:n}=t;if(!await A(i)&&(process.env.SHOPIFY_LANGUAGE_SERVER==="1"||!await C(o)))return;let f=[],r=[];for(let[a,s]of Object.entries(E))f.push(T(s,e).catch(c=>(r.push(s),[])).then(c=>({[a]:c})));let b=(await Promise.all(f)).reduce((a,s)=>({...a,...s}));if(r.length===Object.values(E).length){n||y({body:"Failed to fetch metafield definitions.",nextSteps:["Check your network connection and try again.","Ensure you have the permission to fetch metafield definitions."],reference:[{link:{label:"Metafield Definition API",url:"https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinition"}}]});return}await S(i,b),r.length>0&&O(`Failed to fetch metafield definitions for the following owner types: ${r.join(", ")}`),n||h({body:"Metafield definitions have been successfully downloaded."})}async function S(e,t){let o=await D(e),i=d(o,"metafields.json"),n=JSON.stringify(t,null,2);p(i,n)}export{q as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as z,la as j,ma as J,na as k,oa as W,pa as A,qa as q,ra as N,sa as B,ta as L,ua as K,va as R,wa as Q,xa as O,ya as Y}from"./chunk-
|
|
1
|
+
import{$ as z,la as j,ma as J,na as k,oa as W,pa as A,qa as q,ra as N,sa as B,ta as L,ua as K,va as R,wa as Q,xa as O,ya as Y}from"./chunk-KJQAJUDU.js";import{f as v,i as X,p as c}from"./chunk-UEC23KAO.js";import{c as G}from"./chunk-NJLSZS27.js";import{v as U,z as w}from"./chunk-YYLEWVO6.js";import{d as E,f as $}from"./chunk-AUZCENYI.js";import{$ as b,Hb as H,Ta as P,Y as a,qa as I,wa as D,ya as V}from"./chunk-BXDZX3BS.js";import{d as C,j as F}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Z(e){switch(e){case d.Offsite:return k;case d.CreditCard:return R;case d.CustomCreditCard:return L;case d.CustomOnsite:return N;case d.Redeemable:return A;case d.CardPresent:return O}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function ee(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Z(e.type);switch(i){case k:return x(e,t,W);case R:return x(e,t,Q);case L:return x(e,t,K);case N:return x(e,t,B);case A:return x(e,t,q);case O:return x(e,t,Y);default:throw new Error(`Unsupported extension: ${i}`)}}function x(e,t,i){let o=(e.activeVersion??e.draftVersion)?.config;if(!o)throw new Error("No config found for extension");let r=JSON.parse(o),l=i(r,t);l&&delete l.api_version;let p=e.activeVersion?.context??e.draftVersion?.context??Z(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:a(e.title.substring(0,c)),...l,targeting:[{target:`${p}`}]}]}}s();s();var fe=new Map(J.map(e=>[e[1],e[0]])),ue=(e,t)=>{let i=fe.get(e.uiType);if(!i)throw new E(`Field type ${e.uiType} is not supported`);let n={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(n.name=e.label,n.required=e.required),n},me=(e,t)=>{let o={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(o.required=e.required),e.uiType==="marketing-activity-id"&&(o.marketingActivityCreateUrl=e.marketingActivityCreateUrl,o.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),o},te=(e,t)=>t?t.map(n=>n.uiType==="commerce-object-id"||n.uiType==="marketing-activity-id"||j.includes(n.uiType)?me(n,e):ue(n,e)):[];function ie(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,n;if(e.type==="flow_trigger_discovery_webhook"){let o=JSON.parse(t);n={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:a(e.title.substring(0,c)),url:o.url}]}}else{let o=JSON.parse(t),r=te(e.type,o.fields??[]);n={extensions:[{type:e.type.replace("_definition",""),name:o.title,handle:a(e.title.substring(0,c)),description:o.description,runtime_url:o.url??i,config_page_url:o.custom_configuration_page_url,config_page_preview_url:o.custom_configuration_page_preview_url,validation_url:o.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return n}s();s();var ne=e=>{let t=e.split("#");if(t.length!==2||t.some(l=>l===""||l===void 0))throw new Error("Invalid context");let i="admin",n=ge(t[0]??""),o=de(t[1]??""),r="link";return o==="selection"?[i,`${n}-index`,`${o}-action`,r].join("."):[i,`${n}-${o}`,"action",r].join(".")},de=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},ge=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function oe(e,t,i){let n=e.activeVersion?.config??e.draftVersion?.config;if(!n)throw new Error("No config found for extension");let o=e.activeVersion?.context??e.draftVersion?.context;if(!o)throw new Error("No context found for link extension");let r=JSON.parse(n);if(i.embedded)try{let p=new URL(r.url),f=p.pathname.startsWith("/")?p.pathname.substring(1):p.pathname,u=new URL(`app://${f}`);u.search=p.search,u.hash=p.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:a(e.title.substring(0,c)),targeting:[{url:r.url,target:ne(o)}]}]}}s();var _e={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},ye={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function Ce(e){let t=new URL(e);return t.pathname+t.search+t.hash}function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:a(e.title.substring(0,c)),title:i.title,description:i.description,api_path:Ce(i.app_api_url),tactic:i.tactic,marketing_channel:_e[i.platform]??"",referring_domain:ye[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:o,...r})=>r)}]}}s();function se(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:a(e.title.substring(0,c)),pattern:i.pattern}]}}var S=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:ee},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:ie},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:re},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:se},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:oe}];function ae(e){return S.filter(t=>t.extensionTypes.some(i=>e.some(n=>n.type.toLowerCase()===i.toLowerCase())))}async function ut(e){if(e.length===1&&e[0])return e[0];let t=e.map(o=>({label:o.label,value:o.value})),i=await w({message:"Extension type to migrate",choices:t}),n=e.find(o=>o.value===i);if(n===void 0)throw new E("Invalid migration choice");return n}s();var kt=S.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),n=C(t.directory,X.extensions.directoryName,i);if(await P(n)){let o=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await w({message:`Directory "${i}" already exists. What would you like to do?`,choices:o});if(r===g.Cancel)throw new $;return{directory:n,action:r}}return await D(n),await I(C(n,v.lockFile)),{directory:n,action:g.Write}}async function xe(e){let{app:t,remoteApp:i,developerPlatformClient:n,extensionTypes:o,extensions:r,buildExtensionConfig:l,all:p}=e,f=r.filter(m=>o.includes(m.type.toLowerCase()));if(f=we(t,f),f.length===0)throw new E("No extensions to migrate");if(!p){let m=f.map(y=>({label:y.title,value:y.uuid}));f.length>1&&m.push({label:"All",value:"All"});let _=await w({message:"Extensions to migrate",choices:m});_!=="All"&&(f=[f.find(y=>y?.uuid===_)])}let u={},h=f.map(async m=>{let{directory:_,action:y}=await Ee({app:t,name:m.title}),ce=a(m.title.substring(0,c));if(u[ce]=m.uuid,y===g.Write){let M=l(m,r,t.configuration),le=C(_,"shopify.extension.toml");await new G(le,M).replace(M);let pe=C(_,v.lockFile);await V(pe)}return{extension:m,directory:C("extensions",F(_))}}),T=await Promise.all(h);be(T),await z({app:t,identifiers:{extensions:u,app:i.apiKey},command:"import-extensions",developerPlatformClient:n})}function we(e,t){let i=e.dotenv?.variables??{},n=e.allExtensions.map(o=>i[o.idEnvironmentVariableName]);return t.filter(o=>!n.includes(o.uuid))}async function At(e){let t=ae(e.extensions);await Promise.all(t.map(async i=>xe({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function be(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>H`• "${t.extension.title}" at: ${t.directory}`.value).join(`
|
|
2
2
|
`)})}s();async function Rt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:n,onlyDashboardManaged:o=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:l,extensionRegistrations:p}=r.app;return(o?l:p.concat(l)).filter(u=>{let h=n.includes(u.type.toLowerCase()),T=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(T??m)})}export{ae as a,ut as b,kt as c,xe as d,we as e,At as f,Rt as g};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{b as F}from"./chunk-3OE5HXHO.js";import{a as I,b as L,c as x,f as S,j as $,k as N,m as _,t as q}from"./chunk-WU6GIY22.js";import{a as P}from"./chunk-PLHJQQVZ.js";import{a as z}from"./chunk-6V37CHBZ.js";import{R as w,z as E}from"./chunk-3EQY5B4S.js";import{b as B}from"./chunk-S5JJL3BP.js";import{C,u as c,v as T,x as D}from"./chunk-YYLEWVO6.js";import{g as b}from"./chunk-AUZCENYI.js";import{Fb as d,Hb as u,Rb as A,ca as y,ha as g}from"./chunk-BXDZX3BS.js";import{u as f}from"./chunk-A4SBXDZB.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as K,g as m}from"./chunk-VKWPEFWQ.js";m();m();async function M(e){let{organization:o,storeFqdn:t,operationId:r,remoteApp:a}=e;c({headline:"Checking bulk operation status.",body:[{list:{items:F({organization:o,remoteApp:a,storeFqdn:t})}}]});let s=a.apiSecretKeys[0]?.secret;if(!s)throw new b("No API secret keys found for app");let l=await w(t,a.apiKey,s),i=await $({adminSession:l,operationId:r,version:await S({adminSession:l,minimumDefaultVersion:I})});i?V(i):D({headline:"Bulk operation not found.",body:u`ID: ${d.yellow(r)}`.value})}async function R(e){let{organization:o,storeFqdn:t,remoteApp:r}=e;c({headline:"Listing bulk operations.",body:[{list:{items:F({organization:o,remoteApp:r,storeFqdn:t})}}]});let a=r.apiSecretKeys[0]?.secret;if(!a)throw new b("No API secret keys found for app");let s=await w(t,r.apiKey,a),i=(await N({adminSession:s,version:await S({adminSession:s,minimumDefaultVersion:I})})).map(n=>({id:x(n.id),status:H(n.status),count:W(n.objectCount),dateCreated:y(new Date(String(n.createdAt))),dateFinished:n.completedAt?y(new Date(String(n.completedAt))):"",results:Y(n.url??n.partialDataUrl)}));A(),i.length===0?c({body:"No bulk operations found in the last 7 days."}):C({rows:i,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),A()}function V(e){let{id:o,status:t,createdAt:r,completedAt:a,url:s,partialDataUrl:l}=e,i=_(e).value,n=G(r,a),h=u`ID: ${d.yellow(o)}\n${n}`.value;if(t==="COMPLETED"){let k=s?d.link("Download results",s):"";T({headline:i,body:u`${h}\n${k}`.value})}else if(t==="FAILED"){let k=l?d.link("Download partial results",l):"";D({headline:i,body:u`${h}\n${k}`.value})}else c({headline:i,body:h})}function G(e,o){let t=new Date;return o?`Finished ${g(new Date(String(o)),t)}`:`Started ${g(new Date(String(e)),t)}`}function H(e){return e==="COMPLETED"?f.green(e):e==="FAILED"?f.red(e):f.dim(e)}function W(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Y(e){return e?u`${d.link("download",e)}`.value:""}var O=K(U(),1);var v,p=class extends P{async run(){let{flags:o}=await this.parse(v),{appContextResult:t,store:r}=await q(o);return o.id?await M({organization:t.organization,storeFqdn:r.shopDomain,operationId:L(o.id),remoteApp:t.remoteApp}):await R({organization:t.organization,storeFqdn:r.shopDomain,remoteApp:t.remoteApp}),{app:t.app}}};v=p;p.summary="Check the status of bulk operations.";p.descriptionWithMarkdown=`Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
|
|
2
|
+
|
|
3
|
+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
|
|
4
|
+
|
|
5
|
+
Use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.`;p.description=v.descriptionWithoutMarkdown();p.flags={...B,...z,id:O.Flags.string({description:"The bulk operation ID (numeric ID or full GID). If not provided, lists all bulk operations belonging to this app on this store in the last 7 days.",env:"SHOPIFY_FLAG_ID"}),store:O.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async e=>E(e)})};var ce=p;export{ce as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-Z2Y6G2QF.js";import{a as n}from"./chunk-6V37CHBZ.js";import{C as p,F as s,Ga as c}from"./chunk-KJQAJUDU.js";import{b as e}from"./chunk-S5JJL3BP.js";import{r as d}from"./chunk-T6CC5WUU.js";import{e as l,g as r}from"./chunk-VKWPEFWQ.js";r();var m=l(d(),1);var t,{config:b,...u}=n,o=class extends f{async run(){let{flags:a,args:i}=await this.parse(t),{app:g}=await c({directory:a.path,userProvidedConfigName:i.config});return await s(a.path),await p({directory:a.path,configName:i.config,reset:a.reset}),{app:g}}};t=o;o.summary="Activate an app configuration.";o.descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";o.description=t.descriptionWithoutMarkdown();o.usage="app config use [config] [flags]";o.flags={...e,...u};o.args={config:m.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};var v=o;export{v as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-H2JU5BGK.js";import{p as r,q as m,v as a}from"./chunk-JGN7YG5X.js";import{ua as i}from"./chunk-3EQY5B4S.js";import{b as s,c as h}from"./chunk-S5JJL3BP.js";import{r as v}from"./chunk-T6CC5WUU.js";import{e as f,g as n}from"./chunk-VKWPEFWQ.js";n();var e=f(v(),1);var p,t=class extends a{async command(o,d,c,y,u){i("theme-command:push"),await l({...o,allowLive:o["allow-live"],noColor:o["no-color"],developmentContext:o["development-context"]},d,c,u),i("theme-command:push")}storeAuthScopes(){return["read_themes","write_themes"]}};p=t;t.summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";t.usage=["theme push","theme push --unpublished --json"];t.descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
|
|
2
2
|
|
|
3
3
|
If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
1
|
+
import{b as a}from"./chunk-4EYTWWYF.js";import{Fa as i}from"./chunk-3EQY5B4S.js";import{b as s}from"./chunk-74IG3ZE3.js";import{r as m}from"./chunk-T6CC5WUU.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static{this.description="List current notifications configured for the CLI."}static{this.hidden=!0}static{this.flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})}}async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as b}from"./chunk-J3JPJCWP.js";import{a as fe}from"./chunk-N5YIZJ4S.js";import{b as re,c as oe,d as se,e as ne,f as ie,h as ae,i as le,k as ce,l as me,n as de}from"./chunk-235JVI2J.js";import{c as ee,e as te}from"./chunk-H3V6Y5JO.js";import{a as X}from"./chunk-52H2R2FU.js";import{c as Q,e as v,m as Z,n as x}from"./chunk-XZWAX4FI.js";import{k as P,l as V,n as y}from"./chunk-7ZIO3X22.js";import{s as C,u as k}from"./chunk-JGN7YG5X.js";import{a as B,b as N}from"./chunk-BCEWCYZD.js";import{o as K,s as J,t as z,u as Y,w as j}from"./chunk-Q7BOSHWX.js";import{ta as $,xa as L}from"./chunk-3EQY5B4S.js";import{a as O}from"./chunk-5C7HDTHJ.js";import{J as U,s as W,u as I,v as M,w as R,y as q,z as G}from"./chunk-YYLEWVO6.js";import{d as _,e as H}from"./chunk-N5U5Q2MG.js";import{d as g}from"./chunk-AUZCENYI.js";import{Fb as w,Hb as E,Mb as T,Pb as u}from"./chunk-BXDZX3BS.js";import{u as p}from"./chunk-A4SBXDZB.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var he={workPromise:Promise.resolve()};async function ue(e,t,o,r,s){if(o.length===0)return he;u("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l}=Ce(o,r),n=a.length===0&&i.length===0&&l.length===0;if(L(`theme-service:theme-reconciliation:manual:${n}`),n)return u("Local and remote checksums match - no need to reconcile theme assets"),he;let c=await Se({filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l},s);return{workPromise:Ae(e,t,r,c)}}function Ce(e,t){let o=new Set,r=[],s=[];for(let i of e){o.add(i.key);let l=t.files.get(i.key);l?i.checksum!==l.checksum&&s.push(i):r.push(i)}let a=Array.from(t.files.values()).filter(i=>!o.has(i.key));return{filesOnlyPresentOnRemote:A(r,t),filesOnlyPresentLocally:A(a,t),filesWithConflictingChecksums:A(s,t)}}function A(e,t){return t.applyIgnoreFilters(e).filter(r=>r.key.endsWith(".json"))}async function S(e,t,o){if(e.length===0)return;I({body:{list:{title:t,items:e.map(s=>s.key)}}}),await G({message:"Reconciliation Strategy",choices:[{label:o.remote.label,value:D},{label:o.local.label,value:pe}]})===D?o.remote.callback(e):o.local.callback(e)}async function Ae(e,t,o,r){let{localFilesToDelete:s,filesToDownload:a,remoteFilesToDelete:i}=r,l=s.map(m=>o.delete(m.key)),n=b(a,k,async m=>{let f=await P(e.id,m.map(h=>h.key),t);return Promise.all(f.map(h=>{if(h)return o.write(h)}))}),c=V(e.id,i.map(m=>m.key),t);await Promise.all([...l,...n,c])}async function Se(e,t){let{filesOnlyPresentLocally:o,filesOnlyPresentOnRemote:r,filesWithConflictingChecksums:s}=e,a=[],i=[],l=[];return t.noDelete||await S(o,"The files listed below are only present locally. What would you like to do?",{remote:{label:"Delete files from the local directory",callback:n=>{a.push(...n)}},local:{label:"Upload local files to the remote theme",callback:()=>{}}}),await S(r,"The files listed below are only present on the remote theme. What would you like to do?",{remote:{label:"Download remote files to the local directory",callback:n=>{i.push(...n)}},local:{label:"Delete files from the remote theme",callback:n=>{l.push(...n)}}}),await S(s,"The files listed below differ between the local and remote versions. What would you like to do?",{remote:{label:"Keep the remote version",callback:n=>{i.push(...n)}},local:{label:"Keep the local version",callback:()=>{}}}),{localFilesToDelete:a,filesToDownload:i,remoteFilesToDelete:l}}d();var De=3e3,F=class extends Error{};function we(e,t,o,r,s,a){u("Listening for changes in the theme editor");let i=5,l=0,n="",c=o,m=async()=>{await new Promise(f=>setTimeout(f,De)),c=await Fe(e,t,c,r,s).then(f=>(l=0,n="",f)).catch(f=>{if(l++,f.message!==n&&(n=f.message,v("Error while polling for changes.",f)),l>=i){let h=new g("Too many polling errors...","Please check the errors above and ensure you have a stable internet connection.");q(h),a(h)}return c})};setTimeout(async()=>{for(;;)await m()})}async function Fe(e,t,o,r,s){let a=new Set(r.unsyncedFileKeys),i=ye(o,r,a),l=await y(e.id,t).then(m=>ye(m,r,a)),n=$e(i,l),c=Oe(l,i);return await He(r,n),await Le(e,t,r,n),await _e(r,c,s),l}function Oe(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>o.get(s.key)===void 0)}function $e(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>{let a=o.get(s.key);if(!a||a.checksum!==s.checksum)return!0})}async function Le(e,t,o,r){let s=r.filter(i=>o.files.get(i.key)?.checksum!==i.checksum),a=b(s,k,async i=>P(e.id,i.map(l=>l.key),t).then(l=>Promise.all(l.map(async n=>{n&&(await o.write(n),T(E`• ${C.format(new Date)} Synced ${w.raw("\xBB")} ${w.gray(`download ${n.key} from remote theme`)}`))}))));await Promise.all(a)}async function _e(e,t,o){if(!o.noDelete)return Promise.all(t.map(r=>{if(e.files.get(r.key))return e.delete(r.key).then(()=>{T(E`• ${C.format(new Date)} Synced ${w.raw("\xBB")} ${w.gray(`remove ${r.key} from local theme`)}`)})}))}async function He(e,t){let o=new Map(e.files);await Promise.all(t.map(r=>e.read(r.key)));for(let r of t){let s=o.get(r.key)?.checksum,a=e.files.get(r.key)?.checksum;if(s!==a)throw new F(`Detected changes to the file '${r.key}' on both local and remote sources. Aborting...`)}}function ye(e,t,o){return t.applyIgnoreFilters(e).filter(s=>s.key.endsWith(".json")).filter(s=>!o.has(s.key))}var pe="local",D="remote";async function ge(e,t,o,r,s,a){u("Initiating theme asset reconciliation process"),await r.ready();let{workPromise:i}=await ue(e,t,o,r,s);return{updatedRemoteChecksumsPromise:i.then(async()=>{let n=await y(e.id,t);return we(e,t,n,r,s,a),n}),workPromise:i}}d();function ke(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}import{createServer as We}from"node:http";function Pe(e,t){let{promise:o,resolve:r,reject:s}=ke(),a=ae(e,t),i=Ie(e,t,s),l=Promise.all([a,i.workPromise]).then(()=>t.localThemeFileSystem.startWatcher(e.id.toString(),t.session)),n=qe(e,t,l);return{workPromise:l,serverStart:n.start,dispatchEvent:n.dispatch,renderDevSetupProgress:i.renderProgress,backgroundJobPromise:o,resolveBackgroundJob:r}}function Ie(e,t,o){let r=n=>(v("Failed to perform the initial theme synchronization.",n),o(n),new Promise(()=>{})),a=y(e.id,t.session).then(n=>Me(e,t,n,o)),i=a.then(async({updatedRemoteChecksumsPromise:n})=>{let c=await n;return fe(e,t.session,c,t.localThemeFileSystem,{nodelete:t.options.noDelete,deferPartialWork:!0,backgroundWorkCatch:r})});return{workPromise:i.then(n=>n.workPromise).catch(r),renderProgress:async()=>{if(t.options.themeEditorSync){let{workPromise:c}=await a;await te([{title:"Performing file synchronization. This may take a while...",task:async()=>{await c}}])}let{renderThemeSyncProgress:n}=await i;await n()}}}function Me(e,t,o,r){return t.options.themeEditorSync?ge(e,t.session,o,t.localThemeFileSystem,{noDelete:t.options.noDelete,ignore:t.options.ignore,only:t.options.only},r):Promise.resolve({updatedRemoteChecksumsPromise:Promise.resolve(o),workPromise:Promise.resolve()})}function qe(e,t,o){let r=Y(),s=[`http://${t.options.host}:${t.options.port}`,`https://${t.session.storeFqdn}`,"https://online-store-web.shopifyapps.com"];r.use(ne(t.options.host,t.options.port)),r.use(z(async()=>(await o,J(i=>{i.node.req.headers.origin&&K(i,{origin:n=>s.includes(n),credentials:!0,methods:["GET","POST","HEAD","OPTIONS"],preflight:{statusCode:204}})})))),t.options.liveReload!=="off"&&r.use(le(e,t)),r.use(se(e,t)),r.use(re(e,t)),r.use(oe(e,t));let a=We(j(r));return{dispatch:r.handler.bind(r),start:async()=>new Promise(i=>a.listen({port:t.options.port,host:t.options.host},()=>i({close:async()=>{await Promise.all([new Promise(l=>{a.closeAllConnections(),a.close(l)})])}})))}}import Ge from"readline";var Ue="127.0.0.1",Ke=9292,ve=!1;async function xt(e){if(!await de(e.directory)&&!await ee(e.force))return;e.password?.startsWith("shpat_")&&R({headline:"Admin API token missing features:",body:["Directly using an Admin API token will result in some missing features.","We recommend generating a password from the Theme Access app.","Alternatively, you can authenticate normally by not passing the --password flag.",`
|
|
2
|
+
`,{list:{title:"Known limitations:",items:["Hot module reloading","Password protected storefronts"]}}],link:{label:"Theme Access app",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-access"}}),e.listing&&await ce(e.directory,e.listing);let[t,o]=await Promise.all([Z(e.adminSession),Q(e.adminSession)]),r=o?await X(e.storePassword,e.adminSession.storeFqdn,t):void 0,s=ie(),a=me(e.directory,{filters:e,listing:e.listing,noDelete:e.noDelete,notify:e.notify}),i=e.host??Ue,l;if(e.port){if(!await N(e.port))throw new g(`Port ${e.port} is not available. Try a different port or remove the --port flag to use an available port.`);l=e.port}else l=await B(Ke);let n={local:`http://${i}:${l}`,giftCard:`http://${i}:${l}/gift_cards/[store_id]/preview`,themeEditor:`https://${e.store}/admin/themes/${e.theme.id}/editor?hr=${l}`,preview:`https://${e.store}/?preview_theme_id=${e.theme.id}`},m={session:await x(e.theme.id.toString(),e.adminSession,e.password,r,t),localThemeFileSystem:a,localThemeExtensionFileSystem:s,directory:e.directory,type:"theme",lastRequestedPath:"",options:{themeEditorSync:e["theme-editor-sync"],host:i,port:l,open:e.open,liveReload:e["live-reload"],standardEventsDevBundle:!0,standardEventsInspector:e["standard-events-inspector"],noDelete:e.noDelete,ignore:e.ignore,only:e.only,errorOverlay:e["error-overlay"]}},{serverStart:f,renderDevSetupProgress:h,backgroundJobPromise:Re,resolveBackgroundJob:Ee}=Pe(e.theme,m);Ge.emitKeypressEvents(process.stdin);let Te=ze(n,m,Ee);process.stdin.on("keypress",Te),await Promise.all([Re,h().then(f).then(()=>{process.stdin.isTTY&&process.stdin.setRawMode(!0),je(n),e.open&&be(n.local,"development server")})]),await Je(e.commandConfig,e.adminSession),process.exit(0)}async function Je(e,t){if(!ve){ve=!0;try{await _(()=>({store_fqdn_hash:O(t.storeFqdn)})),await H(()=>({store_fqdn:t.storeFqdn})),await $({config:e,exitMode:"ok"})}catch{}}}function ze(e,t,o){let r=W(be,100,{leading:!0,trailing:!1});return(s,a)=>{if(a.ctrl&&a.name==="c"){o();return}switch(a.name){case void 0:break;case"t":r(e.local,"localhost");break;case"p":r(e.preview,"theme preview");break;case"e":r(t.lastRequestedPath==="/"?e.themeEditor:`${e.themeEditor}&previewPath=${encodeURIComponent(t.lastRequestedPath)}`,"theme editor");break;case"g":r(e.giftCard,"gift card preview");break;default:break}}}function be(e,t){U(e).catch(Ye(t))}function Ye(e){return t=>{R({headline:`Failed to open ${e}.`,body:t.stack??t.message})}}function je(e){M({body:[{list:{title:p.bold("Preview your theme ")+p.cyan("(t)"),items:[{link:{url:e.local}}]}}],nextSteps:[[{link:{label:`Share your theme preview ${p.cyan("(p)")}`,url:e.preview}},{subdued:e.preview}],[{link:{label:`Customize your theme at the theme editor ${p.cyan("(e)")}`,url:e.themeEditor}}],[{link:{label:`Preview your gift cards ${p.cyan("(g)")}`,url:e.giftCard}}]]})}export{xt as a,be as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-E64BQS4D.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u}from"./chunk-
|
|
1
|
+
import{c as u}from"./chunk-NJLSZS27.js";import{w as c}from"./chunk-YYLEWVO6.js";import{e as s}from"./chunk-N5U5Q2MG.js";import{$a as d}from"./chunk-BXDZX3BS.js";import{q as m}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.5.0";export{o as a};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{g as h}from"./chunk-VKWPEFWQ.js";h();h();var kt=String.fromCharCode;var Y=/\+/g;var Ce=/%2f/gi;function E(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function L(e){return E(e.replace(Ce,"%252F"))}function Ae(e){return E(e.replace(Y," "))}function Se(e){return E(e.replace(Y," "))}function xe(e=""){let t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(let r of e.split("&")){let n=r.match(/([^=]+)=?(.*)/)||[];if(n.length<2)continue;let o=Ae(n[1]);if(o==="__proto__"||o==="constructor")continue;let s=Se(n[2]||"");t[o]===void 0?t[o]=s:Array.isArray(t[o])?t[o].push(s):t[o]=[t[o],s]}return t}var He=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Pe=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ne=/^([/\\]\s*){2,}[^/\\]/;var Oe=/\/$|\/\?|\/#/,Te=/^\.?\//;function Me(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?He.test(e):Pe.test(e)||(t.acceptRelative?Ne.test(e):!1)}function q(e="",t){return t?Oe.test(e):e.endsWith("/")}function k(e="",t){if(!t)return(q(e)?e.slice(0,-1):e)||"/";if(!q(e,!0))return e||"/";let r=e,n="",o=e.indexOf("#");o!==-1&&(r=e.slice(0,o),n=e.slice(o));let[s,...a]=r.split("?");return((s.endsWith("/")?s.slice(0,-1):s)||"/")+(a.length>0?`?${a.join("?")}`:"")+n}function qe(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(q(e,!0))return e||"/";let r=e,n="",o=e.indexOf("#");if(o!==-1&&(r=e.slice(0,o),n=e.slice(o),!r))return n;let[s,...a]=r.split("?");return s+"/"+(a.length>0?`?${a.join("?")}`:"")+n}function Le(e=""){return e.startsWith("/")}function I(e=""){return Le(e)?e:"/"+e}function X(e){return xe(C(e).search)}function ke(e){return e&&e!=="/"}function Z(e,...t){let r=e||"";for(let n of t.filter(o=>ke(o)))if(r){let o=n.replace(Te,"");r=qe(r)+o}else r=n;return r}var Ie=Symbol.for("ufo:protocolRelative");function C(e="",t){let r=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){let[,d,l=""]=r;return{protocol:d.toLowerCase(),pathname:l,href:d+l,auth:"",host:"",search:"",hash:""}}if(!Me(e,{acceptRelative:!0}))return t?C(t+e):K(e);let[,n="",o,s=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,a="",u=""]=s.match(/([^#/?]*)(.*)?/)||[];n==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:i,search:c,hash:f}=K(u);return{protocol:n.toLowerCase(),auth:o?o.slice(0,Math.max(0,o.length-1)):"",host:a,pathname:i,search:c,hash:f,[Ie]:!n}}function K(e=""){let[t="",r="",n=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:r,hash:n}}h();var je=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function v(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");let r=new je,n=t||{},o=n.decode||De,s=0;for(;s<e.length;){let a=e.indexOf("=",s);if(a===-1)break;let u=e.indexOf(";",s);if(u===-1)u=e.length;else if(u<a){s=e.lastIndexOf(";",a-1)+1;continue}let i=e.slice(s,a).trim();if(n?.filter&&!n?.filter(i)){s=u+1;continue}if(r[i]===void 0){let c=e.slice(a+1,u).trim();c.codePointAt(0)===34&&(c=c.slice(1,-1)),r[i]=Be(c,o)}s=u+1}return r}function De(e){return e.includes("%")?decodeURIComponent(e):e}function Be(e,t){try{return t(e)}catch{return e}}h();var y={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function re(e={}){let t={options:e,rootNode:ne(),staticRoutesMap:{}},r=n=>e.strictTrailingSlash?n:n.replace(/\/$/,"")||"/";if(e.routes)for(let n in e.routes)ee(t,r(n),e.routes[n]);return{ctx:t,lookup:n=>Ue(t,r(n)),insert:(n,o)=>ee(t,r(n),o),remove:n=>Fe(t,r(n))}}function Ue(e,t){let r=e.staticRoutesMap[t];if(r)return r.data;let n=t.split("/"),o={},s=!1,a=null,u=e.rootNode,i=null;for(let c=0;c<n.length;c++){let f=n[c];u.wildcardChildNode!==null&&(a=u.wildcardChildNode,i=n.slice(c).join("/"));let d=u.children.get(f);if(d===void 0){if(u&&u.placeholderChildren.length>1){let l=n.length-c;u=u.placeholderChildren.find(M=>M.maxDepth===l)||null}else u=u.placeholderChildren[0]||null;if(!u)break;u.paramName&&(o[u.paramName]=f),s=!0}else u=d}return(u===null||u.data===null)&&a!==null&&(u=a,o[u.paramName||"_"]=i,s=!0),u?s?{...u.data,params:s?o:void 0}:u.data:null}function ee(e,t,r){let n=!0,o=t.split("/"),s=e.rootNode,a=0,u=[s];for(let i of o){let c;if(c=s.children.get(i))s=c;else{let f=$e(i);c=ne({type:f,parent:s}),s.children.set(i,c),f===y.PLACEHOLDER?(c.paramName=i==="*"?`_${a++}`:i.slice(1),s.placeholderChildren.push(c),n=!1):f===y.WILDCARD&&(s.wildcardChildNode=c,c.paramName=i.slice(3)||"_",n=!1),u.push(c),s=c}}for(let[i,c]of u.entries())c.maxDepth=Math.max(u.length-i,c.maxDepth||0);return s.data=r,n===!0&&(e.staticRoutesMap[t]=s),s}function Fe(e,t){let r=!1,n=t.split("/"),o=e.rootNode;for(let s of n)if(o=o.children.get(s),!o)return r;if(o.data){let s=n.at(-1)||"";o.data=null,Object.keys(o.children).length===0&&o.parent&&(o.parent.children.delete(s),o.parent.wildcardChildNode=null,o.parent.placeholderChildren=[]),r=!0}return r}function ne(e={}){return{type:e.type||y.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function $e(e){return e.startsWith("**")?y.WILDCARD:e[0]===":"||e==="*"?y.PLACEHOLDER:y.NORMAL}function oe(e){let t=ae("",e.ctx.rootNode);return We(t,e.ctx.options.strictTrailingSlash)}function We(e,t){return{ctx:{table:e},matchAll:r=>se(r,e,t)}}function ze(){return{static:new Map,wildcard:new Map,dynamic:new Map}}function se(e,t,r){r!==!0&&e.endsWith("/")&&(e=e.slice(0,-1)||"/");let n=[];for(let[s,a]of te(t.wildcard))(e===s||e.startsWith(s+"/"))&&n.push(a);for(let[s,a]of te(t.dynamic))if(e.startsWith(s+"/")){let u="/"+e.slice(s.length).split("/").splice(2).join("/");n.push(...se(u,a))}let o=t.static.get(e);return o&&n.push(o),n.filter(Boolean)}function te(e){return[...e.entries()].sort((t,r)=>t[0].length-r[0].length)}function ae(e,t){let r=ze();function n(o,s){if(o){if(s.type===y.NORMAL&&!(o.includes("*")||o.includes(":")))s.data&&r.static.set(o,s.data);else if(s.type===y.WILDCARD)r.wildcard.set(o.replace("/**",""),s.data);else if(s.type===y.PLACEHOLDER){let a=ae("",s);s.data&&a.static.set("/",s.data),r.dynamic.set(o.replace(/\/\*|\/:\w+/,""),a);return}}for(let[a,u]of s.children.entries())n(`${o}/${a}`.replace("//","/"),u)}return n(e,t),r}h();function j(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function D(e,t,r=".",n){if(!j(t))return D(e,{},r,n);let o={...t};for(let s of Object.keys(e)){if(s==="__proto__"||s==="constructor")continue;let a=e[s];a!=null&&(n&&n(o,s,a,r)||(Array.isArray(a)&&Array.isArray(o[s])?o[s]=[...a,...o[s]]:j(a)&&j(o[s])?o[s]=D(a,o[s],(r?`${r}.`:"")+s.toString(),n):o[s]=a))}return o}function B(e){return(...t)=>t.reduce((r,n)=>D(r,n,"",e),{})}var ie=B(),$t=B((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),Wt=B((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});h();var Je=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Qe=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Ve=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Ge(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Ke(e);return}return t}function Ke(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function ce(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);let r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Ve.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Je.test(e)||Qe.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Ge)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function b(e,t){try{return t in e}catch{return!1}}var N=class extends Error{static __h3_error__=!0;statusCode=500;fatal=!1;unhandled=!1;statusMessage;data;cause;constructor(t,r={}){super(t,r),r.cause&&!this.cause&&(this.cause=r.cause)}toJSON(){let t={message:this.message,statusCode:_(this.statusCode,500)};return this.statusMessage&&(t.statusMessage=O(this.statusMessage)),this.data!==void 0&&(t.data=this.data),t}};function p(e){if(typeof e=="string")return new N(e);if(Q(e))return e;let t=new N(e.message??e.statusMessage??"",{cause:e.cause||e});if(b(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=_(e.statusCode,t.statusCode):e.status&&(t.statusCode=_(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){let r=t.statusMessage;O(t.statusMessage)!==r&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function Ye(e,t,r){if(e.handled)return;let n=Q(t)?t:p(t),o={statusCode:n.statusCode,statusMessage:n.statusMessage,stack:[],data:n.data};if(r&&(o.stack=(n.stack||"").split(`
|
|
2
|
+
`).map(a=>a.trim())),e.handled)return;let s=Number.parseInt(n.statusCode);x(e,s,n.statusMessage),e.node.res.setHeader("content-type",S.json),e.node.res.end(JSON.stringify(o,void 0,2))}function Q(e){return e?.constructor?.__h3_error__===!0}function rr(e){return X(e.path||"")}function nr(e,t={}){let r=e.context.params||{};if(t.decode){r={...r};for(let n in r)r[n]=E(r[n])}return r}function Xe(e,t,r){if(r&&e.method==="HEAD")return!0;if(typeof t=="string"){if(e.method===t)return!0}else if(t.includes(e.method))return!0;return!1}function Ze(e,t,r){if(!Xe(e,t,r))throw p({statusCode:405,statusMessage:"HTTP method is not allowed."})}function he(e){let t={};for(let r in e.node.req.headers){let n=e.node.req.headers[r];t[r]=Array.isArray(n)?n.filter(Boolean).join(", "):n}return t}function g(e,t){return he(e)[t.toLowerCase()]}var ue=g;function or(e,t={}){if(e.context.clientAddress)return e.context.clientAddress;if(t.xForwardedFor){let r=g(e,"x-forwarded-for")?.split(",").shift()?.trim();if(r)return r}if(e.node.req.socket.remoteAddress)return e.node.req.socket.remoteAddress}var $=Symbol.for("h3RawBody"),U=Symbol.for("h3ParsedBody"),pe=["PATCH","POST","PUT","DELETE"];function me(e,t="utf8"){Ze(e,pe);let r=e._requestBody||e.web?.request?.body||e.node.req[$]||e.node.req.rawBody||e.node.req.body;if(r){let s=Promise.resolve(r).then(a=>Buffer.isBuffer(a)?a:typeof a.pipeTo=="function"?new Promise((u,i)=>{let c=[];a.pipeTo(new WritableStream({write(f){c.push(f)},close(){u(Buffer.concat(c))},abort(f){i(f)}})).catch(i)}):typeof a.pipe=="function"?new Promise((u,i)=>{let c=[];a.on("data",f=>{c.push(f)}).on("end",()=>{u(Buffer.concat(c))}).on("error",i)}):a.constructor===Object?Buffer.from(JSON.stringify(a)):a instanceof URLSearchParams?Buffer.from(a.toString()):a instanceof FormData?new Response(a).bytes().then(u=>Buffer.from(u)):Buffer.from(a));return t?s.then(a=>a.toString(t)):s}if(!Number.parseInt(e.node.req.headers["content-length"]||"")&&!/\bchunked\b/i.test(String(e.node.req.headers["transfer-encoding"]??"")))return Promise.resolve(void 0);let n=e.node.req[$]=new Promise((s,a)=>{let u=[];e.node.req.on("error",i=>{a(i)}).on("data",i=>{u.push(i)}).on("end",()=>{s(Buffer.concat(u))})});return t?n.then(s=>s.toString(t)):n}async function sr(e,t={}){let r=e.node.req;if(b(r,U))return r[U];let n=r.headers["content-type"]||"",o=await me(e),s;return n==="application/json"?s=fe(o,t.strict??!0):n.startsWith("application/x-www-form-urlencoded")?s=ve(o):n.startsWith("text/")?s=o:s=fe(o,t.strict??!1),r[U]=s,s}function ar(e){if(!pe.includes(e.method))return;let t=e.web?.request?.body||e._requestBody;return t||($ in e.node.req||"rawBody"in e.node.req||"body"in e.node.req||"__unenv__"in e.node.req?new ReadableStream({async start(n){let o=await me(e,!1);o&&n.enqueue(o),n.close()}}):new ReadableStream({start:n=>{e.node.req.on("data",o=>{n.enqueue(o)}),e.node.req.on("end",()=>{n.close()}),e.node.req.on("error",o=>{n.error(o)})}}))}function fe(e="",t){if(e)try{return ce(e,{strict:t})}catch{throw p({statusCode:400,statusMessage:"Bad Request",message:"Invalid JSON body"})}}function ve(e){let t=new URLSearchParams(e),r=Object.create(null);for(let[n,o]of t.entries())b(r,n)?(Array.isArray(r[n])||(r[n]=[r[n]]),r[n].push(o)):r[n]=o;return r}var S={html:"text/html",json:"application/json"},et=/[^\u0009\u0020-\u007E]/g;function O(e=""){return e.replace(et,"")}function _(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}function tt(e){return v(e.node.req.headers.cookie||"")}function ir(e,t){return tt(e)[t]}function ye(e){if(Array.isArray(e))return e.flatMap(f=>ye(f));if(typeof e!="string")return[];let t=[],r=0,n,o,s,a,u,i=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},c=()=>(o=e.charAt(r),o!=="="&&o!==";"&&o!==",");for(;r<e.length;){for(n=r,u=!1;i();)if(o=e.charAt(r),o===","){for(s=r,r+=1,i(),a=r;r<e.length&&c();)r+=1;r<e.length&&e.charAt(r)==="="?(u=!0,r=a,t.push(e.slice(n,s)),n=r):r=s+1}else r+=1;(!u||r>=e.length)&&t.push(e.slice(n))}return t}var rt=typeof setImmediate>"u"?e=>e():setImmediate;function m(e,t,r){return r&&nt(e,r),new Promise(n=>{rt(()=>{e.handled||e.node.res.end(t),n()})})}function ge(e,t){if(e.handled)return;!t&&e.node.res.statusCode!==200&&(t=e.node.res.statusCode);let r=_(t,204);r===204&&e.node.res.removeHeader("content-length"),e.node.res.writeHead(r),e.node.res.end()}function x(e,t,r){t&&(e.node.res.statusCode=_(t,e.node.res.statusCode)),r&&(e.node.res.statusMessage=O(r))}function nt(e,t){t&&e.node.res.statusCode!==304&&!e.node.res.getHeader("content-type")&&e.node.res.setHeader("content-type",t)}function cr(e,t,r=302){e.node.res.statusCode=_(r,e.node.res.statusCode),e.node.res.setHeader("location",t);let o=`<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${t.replace(/"/g,"%22")}"></head></html>`;return m(e,o,S.html)}function A(e,t){return e.node.res.getHeader(t)}function ot(e,t){for(let[r,n]of Object.entries(t))e.node.res.setHeader(r,n)}function R(e,t,r){e.node.res.setHeader(t,r)}function st(e,t){for(let[r,n]of Object.entries(t))at(e,r,n)}var w=st;function at(e,t,r){let n=e.node.res.getHeader(t);if(!n){e.node.res.setHeader(t,r);return}Array.isArray(n)||(n=[n.toString()]),e.node.res.setHeader(t,[...n,r])}function we(e){return!e||typeof e!="object"?!1:typeof e.pipe=="function"&&(typeof e._read=="function"||typeof e.abort=="function")||typeof e.pipeTo=="function"}function it(e){return typeof Response<"u"&&e instanceof Response}function T(e,t){if(!t||typeof t!="object")throw new Error("[h3] Invalid stream provided.");if(e.node.res._data=t,!e.node.res.socket)return e._handled=!0,Promise.resolve();if(b(t,"pipeTo")&&typeof t.pipeTo=="function")return t.pipeTo(new WritableStream({write(r){e.node.res.write(r)}})).then(()=>{e.node.res.end()});if(b(t,"pipe")&&typeof t.pipe=="function")return new Promise((r,n)=>{t.pipe(e.node.res),t.on&&(t.on("end",()=>{e.node.res.end(),r()}),t.on("error",o=>{n(o)})),e.node.res.on("close",()=>{t.abort&&t.abort()})});throw new Error("[h3] Invalid or incompatible stream provided.")}function _e(e,t){for(let[r,n]of t.headers)r==="set-cookie"?e.node.res.appendHeader(r,ye(n)):e.node.res.setHeader(r,n);if(t.status&&(e.node.res.statusCode=_(t.status,e.node.res.statusCode)),t.statusText&&(e.node.res.statusMessage=O(t.statusText)),t.redirected&&e.node.res.setHeader("location",t.url),!t.body){e.node.res.end();return}return T(e,t.body)}function ct(e={}){return ie(e,{origin:"*",methods:"*",allowHeaders:"*",exposeHeaders:"*",credentials:!1,maxAge:!1,preflight:{statusCode:204}})}function ut(e){let t=g(e,"origin"),r=g(e,"access-control-request-method");return e.method==="OPTIONS"&&!!t&&!!r}function ft(e,t){let{origin:r}=t;return!e||!r||r==="*"||r==="null"?!0:Array.isArray(r)?r.some(n=>n instanceof RegExp?n.test(e):e===n):r(e)}function Re(e,t){let{origin:r}=t,n=g(e,"origin");return!n||!r||r==="*"?{"access-control-allow-origin":"*"}:typeof r=="string"?{"access-control-allow-origin":r,vary:"origin"}:ft(n,t)?{"access-control-allow-origin":n,vary:"origin"}:{}}function dt(e){let{methods:t}=e;return t?t==="*"?{"access-control-allow-methods":"*"}:t.length>0?{"access-control-allow-methods":t.join(",")}:{}:{}}function be(e){let{credentials:t}=e;return t?{"access-control-allow-credentials":"true"}:{}}function lt(e,t){let{allowHeaders:r}=t;if(!r||r==="*"||r.length===0){let n=g(e,"access-control-request-headers");return n?{"access-control-allow-headers":n,vary:"access-control-request-headers"}:{}}return{"access-control-allow-headers":r.join(","),vary:"access-control-request-headers"}}function Ee(e){let{exposeHeaders:t}=e;return t?t==="*"?{"access-control-expose-headers":t}:{"access-control-expose-headers":t.join(",")}:{}}function ht(e,t){w(e,Re(e,t)),w(e,be(t)),w(e,Ee(t)),w(e,dt(t)),w(e,lt(e,t))}function pt(e,t){w(e,Re(e,t)),w(e,be(t)),w(e,Ee(t))}function ur(e,t){let r=ct(t);return ut(e)?(ht(e,t),ge(e,r.preflight.statusCode),!0):(pt(e,t),!1)}var mt=new Set(["transfer-encoding","accept-encoding","connection","keep-alive","upgrade","expect","host","accept"]);function fr(e,t){let r=Object.create(null),n=he(e);for(let o in n)(!mt.has(o)||o==="host"&&t?.host)&&(r[o]=n[o]);return r}function P(e){let t="";e.id&&(t+=`id: ${de(e.id)}
|
|
3
|
+
`),e.event&&(t+=`event: ${de(e.event)}
|
|
4
|
+
`),typeof e.retry=="number"&&Number.isInteger(e.retry)&&(t+=`retry: ${e.retry}
|
|
5
|
+
`);let r=typeof e.data=="string"?e.data:"";for(let n of r.split(/\r\n|\r|\n/))t+=`data: ${n}
|
|
6
|
+
`;return t+=`
|
|
7
|
+
`,t}function de(e){return e.replace(/[\n\r]/g,"")}function yt(e){let t="";for(let r of e)t+=P(r);return t}function gt(e){let t={"Content-Type":"text/event-stream","Cache-Control":"private, no-cache, no-store, no-transform, must-revalidate, max-age=0","X-Accel-Buffering":"no"};wt(e)||(t.Connection="keep-alive"),ot(e,t)}function wt(e){return ue(e,":path")!==void 0&&ue(e,":method")!==void 0}var W=class{_h3Event;_transformStream=new TransformStream;_writer;_encoder=new TextEncoder;_writerIsClosed=!1;_paused=!1;_unsentData;_disposed=!1;_handled=!1;constructor(t,r={}){this._h3Event=t,this._writer=this._transformStream.writable.getWriter(),this._writer.closed.then(()=>{this._writerIsClosed=!0}),r.autoclose!==!1&&this._h3Event.node.req.on("close",()=>this.close())}async push(t){if(typeof t=="string"){await this._sendEvent({data:t});return}if(Array.isArray(t)){if(t.length===0)return;if(typeof t[0]=="string"){let r=[];for(let n of t)r.push({data:n});await this._sendEvents(r);return}await this._sendEvents(t);return}await this._sendEvent(t)}async _sendEvent(t){if(!this._writerIsClosed){if(this._paused&&!this._unsentData){this._unsentData=P(t);return}if(this._paused){this._unsentData+=P(t);return}await this._writer.write(this._encoder.encode(P(t))).catch()}}async _sendEvents(t){if(this._writerIsClosed)return;let r=yt(t);if(this._paused&&!this._unsentData){this._unsentData=r;return}if(this._paused){this._unsentData+=r;return}await this._writer.write(this._encoder.encode(r)).catch()}pause(){this._paused=!0}get isPaused(){return this._paused}async resume(){this._paused=!1,await this.flush()}async flush(){this._writerIsClosed||this._unsentData?.length&&(await this._writer.write(this._encoder.encode(this._unsentData)),this._unsentData=void 0)}async close(){if(!this._disposed){if(!this._writerIsClosed)try{await this._writer.close()}catch{}this._h3Event._handled&&this._handled&&!this._h3Event.node.res.closed&&this._h3Event.node.res.end(),this._disposed=!0}}onClosed(t){this._writer.closed.then(t)}async send(){gt(this._h3Event),x(this._h3Event,200),this._h3Event._handled=!0,this._handled=!0,await T(this._h3Event,this._transformStream.readable)}};function dr(e,t){return new W(e,t)}async function lr(e,t){if(e.method!=="GET"&&e.method!=="HEAD"){if(!t.fallthrough)throw p({statusMessage:"Method Not Allowed",statusCode:405});return!1}let r=I(k(C(e.path).pathname));if(/(^|[\\/])(\.\.|%2e%2e|%2e\.|\.%2e)($|[\\/])/i.test(r)){if(!t.fallthrough)throw p({statusCode:404});return!1}let n=_t(g(e,"accept-encoding"),t.encodings);n.length>1&&R(e,"vary","accept-encoding");let o=r,s,a=Rt(r,n,t.indexNames||["/index.html"]);for(let c of a){let f=await t.getMeta(c);if(f){s=f,o=c;break}}if(!s){if(!t.fallthrough)throw p({statusCode:404});return!1}if(s.etag&&!A(e,"etag")&&R(e,"etag",s.etag),s.etag&&g(e,"if-none-match")===s.etag)return x(e,304,"Not Modified"),m(e,"");if(s.mtime){let c=new Date(s.mtime),f=g(e,"if-modified-since");if(f&&new Date(f)>=c)return x(e,304,"Not Modified"),m(e,null);A(e,"last-modified")||R(e,"last-modified",c.toUTCString())}if(s.type&&!A(e,"content-type")&&R(e,"content-type",s.type),s.encoding&&!A(e,"content-encoding")&&R(e,"content-encoding",s.encoding),s.size!==void 0&&s.size>0&&!A(e,"content-length")&&R(e,"content-length",s.size),e.method==="HEAD")return m(e,null);let i=await t.getContents(o);return we(i)?T(e,i):m(e,i)}function _t(e,t){return!t||!e?[]:String(e||"").split(",").map(r=>t[r.trim()]).filter(Boolean)}function Rt(e,t,r){let n=[];for(let o of["",...r])for(let s of[...t,""])n.push(`${e}${o}${s}`);return n}var z=class{__is_event__=!0;node;web;context={};_method;_path;_headers;_requestBody;_handled=!1;_onBeforeResponseCalled;_onAfterResponseCalled;constructor(t,r){this.node={req:t,res:r}}get method(){return this._method||(this._method=(this.node.req.method||"GET").toUpperCase()),this._method}get path(){return this._path||this.node.req.url||"/"}get headers(){return this._headers||(this._headers=Et(this.node.req.headers)),this._headers}get handled(){return this._handled||this.node.res.writableEnded||this.node.res.headersSent}respondWith(t){return Promise.resolve(t).then(r=>_e(this,r))}toString(){return`[${this.method}] ${this.path}`}toJSON(){return this.toString()}get req(){return this.node.req}get res(){return this.node.res}};function bt(e,t){return new z(e,t)}function Et(e){let t=new Headers;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let o of n)t.append(r,o);else n&&t.set(r,n);return t}function Ct(e){if(typeof e=="function")return e.__is_handler__=!0,e;let t={onRequest:le(e.onRequest),onBeforeResponse:le(e.onBeforeResponse)},r=n=>At(n,e.handler,t);return r.__is_handler__=!0,r.__resolve__=e.handler.__resolve__,r.__websocket__=e.websocket,r}function le(e){return e?Array.isArray(e)?e:[e]:void 0}async function At(e,t,r){if(r.onRequest){for(let s of r.onRequest)if(await s(e),e.handled)return}let o={body:await t(e)};if(r.onBeforeResponse)for(let s of r.onBeforeResponse)await s(e,o);return o.body}var V=Ct;function St(e){return b(e,"__is_handler__")}function G(e,t,r){return e}function xt(e){let t,r,n=()=>r?Promise.resolve(r):(t||(t=Promise.resolve(e()).then(s=>{let a=s.default||s;if(typeof a!="function")throw new TypeError("Invalid lazy handler result. It should be a function:",a);return r={handler:G(s.default||s)},r})),t),o=V(s=>r?r.handler(s):n().then(a=>a.handler(s)));return o.__resolve__=n,o}var Ht=xt,hr=globalThis.Headers,pr=globalThis.Response;function mr(e={}){let t=[],r=Pt(t,e),n=Nt(t);r.__resolve__=n;let o=Tt(()=>qt(n,e)),s={use:(a,u,i)=>J(s,a,u,i),resolve:n,handler:r,stack:t,options:e,get websocket(){return o()}};return s}function J(e,t,r,n){if(Array.isArray(t))for(let o of t)J(e,o,r,n);else if(Array.isArray(r))for(let o of r)J(e,t,o,n);else typeof t=="string"?e.stack.push(F({...n,route:t,handler:r})):typeof t=="function"?e.stack.push(F({...r,handler:t})):e.stack.push(F({...t}));return e}function Pt(e,t){let r=t.debug?2:void 0;return V(async n=>{n.node.req.originalUrl=n.node.req.originalUrl||n.node.req.url||"/";let o=n.node.req.url||"/",s=Mt(n._path||o);n._path=s;let a=s!==o,u;t.onRequest&&await t.onRequest(n);for(let i of e){if(i.route.length>1){if(!s.startsWith(i.route))continue;u=s.slice(i.route.length)||"/"}else u=s;if(i.match&&!i.match(u,n))continue;n._path=u,n.node.req.url=a?i.route.length>1?o.slice(i.route.length)||"/":o:u;let c=await i.handler(n),f=c===void 0?void 0:await c;if(f!==void 0){let d={body:f};t.onBeforeResponse&&(n._onBeforeResponseCalled=!0,await t.onBeforeResponse(n,d)),await Ot(n,d.body,r),t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,d));return}if(n.handled){t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,void 0));return}}if(!n.handled)throw p({statusCode:404,statusMessage:`Cannot find any path matching ${n.path||"/"}.`});t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,void 0))})}function Nt(e){return async t=>{let r;for(let n of e){if(n.route==="/"&&!n.handler.__resolve__||!t.startsWith(n.route)||(r=t.slice(n.route.length)||"/",n.match&&!n.match(r,void 0)))continue;let o={route:n.route,handler:n.handler};if(o.handler.__resolve__){let s=await o.handler.__resolve__(r);if(!s)continue;o={...o,...s,route:Z(o.route||"/",s.route||"/")}}return o}}}function F(e){let t=e.handler;return t.handler&&(t=t.handler),e.lazy?t=Ht(t):St(t)||(t=G(t,void 0,e.route)),{route:k(e.route),match:e.match,handler:t}}function Ot(e,t,r){if(t===null)return ge(e);if(t){if(it(t))return _e(e,t);if(we(t))return T(e,t);if(t.buffer)return m(e,t);if(t.arrayBuffer&&typeof t.arrayBuffer=="function")return t.arrayBuffer().then(o=>m(e,Buffer.from(o),t.type));if(t instanceof Error)throw p(t);if(typeof t.end=="function")return!0}let n=typeof t;if(n==="string")return m(e,t,S.html);if(n==="object"||n==="boolean"||n==="number")return m(e,JSON.stringify(t,void 0,r),S.json);if(n==="bigint")return m(e,t.toString(),S.json);throw p({statusCode:500,statusMessage:`[h3] Cannot send ${n} as response.`})}function Tt(e){let t;return()=>(t||(t=e()),t)}function Mt(e){let t=e.indexOf("?"),r=t===-1?e:e.slice(0,t),n=t===-1?"":e.slice(t);return(r.includes("%25")?L(r.replace(/%25/g,"%2525")):L(r))+n}function qt(e,t){return{...t.websocket,async resolve(r){let n=r.request?.url||r.url||"/",{pathname:o}=typeof n=="string"?C(n):n;return(await e(o))?.handler?.__websocket__||{}}}}var Lt=["connect","delete","get","head","options","post","put","trace","patch"];function yr(e={}){let t=re({}),r={},n,o={},s=(i,c,f)=>{let d=r[i];if(d||(r[i]=d={path:i,handlers:{}},t.insert(i,d)),Array.isArray(f))for(let l of f)s(i,c,l);else d.handlers[f]=G(c);return o};o.use=o.add=(i,c,f)=>s(i,c,f||"all");for(let i of Lt)o[i]=(c,f)=>o.add(c,f,i);let a=(i="/",c="get")=>{let f=i.indexOf("?");f!==-1&&(i=i.slice(0,Math.max(0,f)));let d=t.lookup(i);if(!d||!d.handlers)return{error:p({statusCode:404,name:"Not Found",statusMessage:`Cannot find any route matching ${i||"/"}.`})};let l=d.handlers[c]||d.handlers.all;if(!l){n||(n=oe(t));let M=n.matchAll(i).reverse();for(let H of M){if(H.handlers[c]){l=H.handlers[c],d.handlers[c]=d.handlers[c]||l;break}if(H.handlers.all){l=H.handlers.all,d.handlers.all=d.handlers.all||l;break}}}return l?{matched:d,handler:l}:{error:p({statusCode:405,name:"Method Not Allowed",statusMessage:`Method ${c} is not allowed on this route.`})}},u=e.preemptive||e.preemtive;return o.handler=V(i=>{let c=a(i.path,i.method.toLowerCase());if("error"in c){if(u)throw c.error;return}i.context.matchedRoute=c.matched;let f=c.matched.params||{};return i.context.params=f,Promise.resolve(c.handler(i)).then(d=>d===void 0&&u?null:d)}),o.handler.__resolve__=async i=>{i=I(i);let c=a(i);if("error"in c)return;let f={route:c.matched.path,handler:c.handler};if(c.handler.__resolve__){let d=await c.handler.__resolve__(i);if(!d)return;f={...f,...d}}return f},o}function gr(e){return async function(r,n){let o=bt(r,n);try{await e.handler(o)}catch(s){let a=p(s);if(Q(s)||(a.unhandled=!0),x(o,a.statusCode,a.statusMessage),e.options.onError&&await e.options.onError(a,o),o.handled)return;(a.unhandled||a.fatal)&&console.error("[h3]",a.fatal?"[fatal]":"[unhandled]",a),e.options.onBeforeResponse&&!o._onBeforeResponseCalled&&await e.options.onBeforeResponse(o,{body:a}),await Ye(o,a,!!e.options.debug),e.options.onAfterResponse&&!o._onAfterResponseCalled&&await e.options.onAfterResponse(o,{body:a})}}}export{p as a,Ye as b,rr as c,nr as d,he as e,g as f,or as g,sr as h,ar as i,ir as j,m as k,x as l,cr as m,R as n,ur as o,fr as p,dr as q,lr as r,Ct as s,xt as t,mr as u,yr as v,gr as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-F447QKVX.js";import{a as _,c as b}from"./chunk-7KHYEIA7.js";import{a as c,b as F}from"./chunk-H3V6Y5JO.js";import{e as y,q as T}from"./chunk-7ZIO3X22.js";import{i as v,p as g,v as w}from"./chunk-JGN7YG5X.js";import{b as u}from"./chunk-S5JJL3BP.js";import{A as p,v as d}from"./chunk-YYLEWVO6.js";import{V as f}from"./chunk-BXDZX3BS.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as Y,g as h}from"./chunk-VKWPEFWQ.js";h();h();async function I(t,e,i){let r=e.themes;e.development&&(r=[(await new D(t).find()).id.toString()]);let n=t.storeFqdn,s=await L(t,{...e,themes:r,development:!1});if(!e.force&&!i&&!await M(s,n))return;await Promise.all(s.map(o=>(y(o)&&v(),T(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
|
|
2
2
|
|
|
3
3
|
`}]:[];d({body:f(s,o=>[...l,`The following themes were deleted from ${n}:`,F(o)],o=>[...l,"The theme",...c(o),`was deleted from ${n}.`])})}async function L(t,e){if(e.selectTheme||e.themes.length>0)return b(t,e);let i=t.storeFqdn;return[await _(t,{header:`Select a theme to delete from ${i}`,filter:{development:e.development}})]}async function M(t,e){let r={message:f(t,n=>[`Delete the following themes from ${e}?`],n=>["Delete",...c(n),`from ${e}?`]),confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return t.length>1&&(r.infoTable={"":t.map(c)}),p(r)}var a=Y(C(),1);var O,m=class extends w{async command(e,i,r){let{environment:n,development:s,force:l,theme:o}=e,E=o??[];await I(i,{selectTheme:e["show-all"],environment:n,development:s,themes:E,force:l},r)}};O=m;m.summary="Delete remote themes from the connected store. This command can't be undone.";m.descriptionWithMarkdown=`Deletes a theme from your store.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as $}from"./chunk-
|
|
1
|
+
import{b as $}from"./chunk-CVRAATZ5.js";import{a as O}from"./chunk-PLHJQQVZ.js";import{a as T}from"./chunk-6V37CHBZ.js";import{Fa as N,i as k}from"./chunk-KJQAJUDU.js";import{f as l}from"./chunk-UEC23KAO.js";import{H as S,I as b}from"./chunk-3EQY5B4S.js";import{a as h}from"./chunk-Q3WOWDUU.js";import{b as P,c as I}from"./chunk-S5JJL3BP.js";import{g as v,u as E}from"./chunk-YYLEWVO6.js";import{Gb as C,Hb as _,Lb as w,N as y,Wb as A}from"./chunk-BXDZX3BS.js";import{g as p,j as g}from"./chunk-773TIA5M.js";import{r as W}from"./chunk-T6CC5WUU.js";import{e as U,g as f}from"./chunk-VKWPEFWQ.js";f();f();async function x(n,e,t,o,i){return i.webEnv?F(n,e,t,i):R(n,e,o,i)}async function F(n,e,t,{format:o}){return $(n,e,t,o)}async function R(n,e,t,o){if(o.format==="json"){let i=j(n.allExtensions.filter(s=>s.isReturnedAsInfo())),r={...n,packageManager:t.packageManager,nodeDependencies:t.nodeDependencies,usesWorkspaces:t.usesWorkspaces,allExtensions:i};return"realExtensions"in r&&(r.realExtensions=j(r.realExtensions)),"specifications"in r&&(r={...r,specifications:r.specifications?.map(s=>D(s))}),_`${JSON.stringify(Object.fromEntries(Object.entries(r).filter(([s])=>s!=="configSchema")),null,2)}`}else return new d(n,e,t,o).output()}function D(n){if("schema"in n){let{schema:e,...t}=n;return t}return n}function j(n){return n.map(e=>{if("specification"in e&&e.specification){let t=e.specification,o=D(t);return{...e,specification:o}}else return e})}var M="unknown",u={subdued:"Not yet configured"},K="NOT LOADED",d=class{constructor(e,t,o,i){this.app=e,this.remoteApp=t,this.project=o,this.options=i}async output(){return[...await this.devConfigsSection(),this.projectSettingsSection(),...await this.appComponentsSection(),await this.systemInfoSection()]}async devConfigsSection(){let e=u;this.app.configuration.build?.automatically_update_urls_on_dev!==void 0&&(e=this.app.configuration.build.automatically_update_urls_on_dev?"Yes":"No");let t=["User","unknown"],o=await this.options.developerPlatformClient.accountInfo();return b(o)?t=["Service account",o.orgName]:S(o)&&(t[1]=o.email),[this.tableSection("Current app configuration",[["Configuration file",{filePath:g(this.app.configPath)||l.app}],["App name",this.remoteApp.title?{userInput:this.remoteApp.title}:u],["Client ID",this.remoteApp.apiKey||u],["Access scopes",k(this.app.configuration)],["Dev store",this.app.configuration.build?.dev_store_url??this.app.hiddenConfig.dev_store_url??u],["Update URLs",e],t],{isFirstItem:!0}),{body:["\u{1F4A1} To change these, run",{command:C(this.project.packageManager,"shopify app config link")}]}]}projectSettingsSection(){return this.tableSection("Your Project",[["Root location",{filePath:this.app.directory}]])}async appComponentsSection(){let e=this.webComponentsSection();return[{title:`
|
|
2
2
|
Directory components`.toUpperCase(),body:""},...e?[e]:[],...this.extensionsSections()]}webComponentsSection(){let e=[],t=[];if(this.app.webs[0])return this.app.webs.forEach(o=>{if(o.configuration)if(o.configuration.name){let{name:i,roles:r}=o.configuration,s=p(this.app.directory,o.directory);t.push([` \u{1F4C2} ${i}`,{filePath:s||"/"}]),r.length>0&&t.push([" roles",r.join(", ")])}else o.configuration.roles.forEach(i=>{t.push([` \u{1F4C2} ${i}`,{filePath:p(this.app.directory,o.directory)}])});else t.push([{subdued:` \u{1F4C2} ${M}`},{filePath:p(this.app.directory,o.directory)}]);if(!this.app.errors.isEmpty()){let i=this.app.errors.getErrors(`${o.directory}/${l.web}`);e.push(...i.map(r=>r.message))}}),this.subtableSection("web",[["\u{1F4C2} web",""],...t,...e.map(o=>[{error:"error"},{error:this.formattedError(o)}])])}extensionsSections(){let e=this.app.allExtensions.filter(o=>o.isReturnedAsInfo());return y(e.map(o=>o.type)).map(o=>{let i=e.filter(r=>r.type===o);if(i[0])return this.subtableSection(i[0].externalType,i.map(r=>this.extensionSubSection(r)).flat())}).filter(o=>o!==void 0)}extensionSubSection(e){let t=e.configuration,o=[[`\u{1F4C2} ${e.handle||K}`,{filePath:p(this.app.directory,e.directory)}],[" config file",{filePath:p(e.directory,e.configurationPath)}]];t&&"metafields"in t&&Array.isArray(t.metafields)&&t.metafields.length>0&&o.push([" metafields",`${t.metafields.length}`]);let i=this.app.errors.getErrors(e.configurationPath);for(let r of i)o.push([{error:" error"},{error:this.formattedError(r.message)}]);return o}formattedError(e){let t=e.trim();if(A())return t;let[o,...i]=t.split(`
|
|
3
3
|
`);return[`! ${o}`,...i.map(r=>` ${r}`)].join(`
|
|
4
4
|
`)}async systemInfoSection(){let{platform:e,arch:t}=v();return this.tableSection("Tooling and System",[["Shopify CLI",h],["Package manager",this.project.packageManager],["OS",`${e}-${t}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}tableSection(e,t,{isFirstItem:o=!1}={}){return{title:`${o?"":`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as _}from"./chunk-7KHYEIA7.js";import{e as R}from"./chunk-H3V6Y5JO.js";import{a as j}from"./chunk-52H2R2FU.js";import{c as O,i as k,o as x}from"./chunk-XZWAX4FI.js";import{p as v,v as A}from"./chunk-JGN7YG5X.js";import{b as F,c as L}from"./chunk-S5JJL3BP.js";import{J as y}from"./chunk-YYLEWVO6.js";import{d as T}from"./chunk-AUZCENYI.js";import{$a as $,Lb as S,Pb as p,la as P,ua as g}from"./chunk-BXDZX3BS.js";import{d as m,i as w}from"./chunk-773TIA5M.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as D,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();import{fileURLToPath as I}from"node:url";async function E(...i){let e=await $("package.json",{cwd:I(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?m(w(e),"assets",...i):m(w(e),"dist","assets",...i)}async function b(i,e,s,t,n,f){let c=await O(i)?await j(f,i.storeFqdn):void 0;if(n)throw new T("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let d=await x(e,i,n,c),o=await k(d,{method:"GET",path:s,query:[],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(o.status!==200){let u=await o.text();throw new Error(`Bad response: ${o.status}: ${u}`)}let a=await o.text();t?S(a):await J(a)}async function J(i){let e=process.env.WSL_DISTRO_NAME,s=e?`//wsl$/${e}`:"",t=await E("speedscope","index.html");p(`[Theme Profile] Resolved URL to open: ${t}`);let n="liquid-profile",f=Buffer.from(i).toString("base64"),c=`speedscope.loadFileFromBase64(${JSON.stringify(n)}, ${JSON.stringify(f)})`,d=`speedscope-${Number(new Date)}-${process.pid}`,o=m(P(),`${d}.js`);p(`[Theme Profile] writing JS file to: ${o}`),await g(o,c),p(`[Theme Profile] JS file created successfully: ${o}`),t=`${s}${t}`,o=`${s}${o}`,t+=`#localProfilePath=${o}`;let a=m(P(),`${d}.html`);p(`[Theme Profile] writing HTML file to: ${a}`),await g(a,`<script>window.location=${JSON.stringify(t)}</script>`),p(`[Theme Profile] HTML file created successfully: ${a}`),a=`${s}${a}`,t=`file://${a}`,p(`[Theme Profile] Opening URL: ${t}`);let u=await y(t);p(`[Theme Profile] URL opened successfully: ${u}`)}var h=D(U(),1);var q,r=class extends A{async command(e,s){let{password:t}=e,n;e.theme?n={filter:{theme:e.theme}}:n={filter:{live:!0}};let f=await _(s,n),c=[{title:`Generating Liquid profile for ${s.storeFqdn} ${e.url}`,task:async()=>{await b(s,f.id.toString(),e.url,e.json,t,e["store-password"])}}];await R(c)}};q=r;r.summary="Profile the Liquid rendering of a theme page.";r.usage=["theme profile","theme profile --url /products/classic-leather-jacket"];r.descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
|
|
2
2
|
|
|
3
3
|
This command will open a web page with the Speedscope profiler detailing the time spent executing Liquid on the given page.`;r.description=q.descriptionWithoutMarkdown();r.flags={...F,...v,theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),url:h.Flags.string({description:"The url to be used as context",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":h.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),...L};r.multiEnvironmentsFlags=null;var le=r;export{le as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as $}from"./chunk-J3JPJCWP.js";import{a as
|
|
1
|
+
import{b as $}from"./chunk-J3JPJCWP.js";import{a as O}from"./chunk-F447QKVX.js";import{a as M}from"./chunk-7KHYEIA7.js";import{a as x,l as H,n as Y}from"./chunk-235JVI2J.js";import{a as R}from"./chunk-LMPD55L6.js";import{a as G,c as y}from"./chunk-H3V6Y5JO.js";import{a as S,b as L}from"./chunk-STJ3LWFL.js";import{k as A,n as I}from"./chunk-7ZIO3X22.js";import{p as D,q as E,r as _,u as P,v as C}from"./chunk-JGN7YG5X.js";import{h as V,k as B}from"./chunk-ICXHUPP5.js";import{O as g,ua as a}from"./chunk-3EQY5B4S.js";import{b}from"./chunk-S5JJL3BP.js";import{D as F,v as k}from"./chunk-YYLEWVO6.js";import{Wa as T}from"./chunk-BXDZX3BS.js";import{q as p}from"./chunk-773TIA5M.js";import{r as Q}from"./chunk-T6CC5WUU.js";import{e as z,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function K(e,t,o,n,r,l){let i=X(o,n,r),c=J(o,e,n,t),s=[...i,...c,{title:"Theme download complete",task:async()=>{}}];s.length>0&&await F(s,{renderOptions:{stdout:l?.stdout??process.stdout},noProgressBar:r.multiEnvironment})}function X(e,t,o){if(o.nodelete)return[];let n=new Set(e.map(i=>i.key));return t.applyIgnoreFilters([...t.files.values()]).map(({key:i})=>i).filter(i=>!n.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>t.delete(i)}))}function J(e,t,o,n){let r=o.applyIgnoreFilters(e);r=r.filter(s=>{let u=s.checksum;return o.files.get(s.key)?.checksum!==u});let l=r.map(s=>s.key),i=s=>s.total===0?"[100%]":`[${Math.round(s.current/s.total*100)}%]`;return $(l,P,(s,u)=>({title:`Downloading files from remote theme ${i({current:u,total:l.length})}`,task:async()=>Z(t,o,s,n)}))}async function Z(e,t,o,n){let r=await A(e.id,o,n);r&&await Promise.all(r.map(l=>t.write(l)))}async function N(e,t,o,n){a("theme-service:pull:setup"),R({verbose:e.verbose,noColor:e.noColor});let r=t??await g(_({store:e.store}),e.password),l=new O(r),i=await(e.development?l.find():l.fetch()),{path:c,nodelete:s,live:u,development:f,only:W,ignore:j,force:w,environment:v}=e;if(!await oe(c??p(),w??!1,v?.[0],o))return;let q=await M(r,{header:"Select a theme to open",filter:{live:u,theme:f?`${i?.id}`:e.theme}});a("theme-service:pull:setup"),await ee(q,r,{environment:v?.[0],force:w??!1,ignore:j??[],multiEnvironment:o,nodelete:s??!1,only:W??[],path:c??p()},n)}async function ee(e,t,o,n){a("theme-service:pull:file-system");let r=H(o.path,{filters:o}),[l]=await Promise.all([I(e.id,t),r.ready()]),i=x(l);a("theme-service:pull:file-system"),await K(e,t,i,r,o,n);let c=o.environment?`Environment: ${o.environment}`:"";k({headline:c,body:["The theme",...G(e),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:S(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:L(e,t)}}]]})}async function te(e){return(await T("*",{cwd:e,deep:1,onlyFiles:!1})).length===0}async function oe(e,t,o,n){return t?!0:!(!await te(e)&&!await Y(e)&&!await y(t,void 0,o,n)||await V(e)&&!await B(e)&&!await y(t,"The current Git directory has uncommitted changes.",o,n))}var h=z(Q(),1);var U,m=class extends C{async command(t,o,n,r,l){a("theme-command:pull"),await N({...t,noColor:t["no-color"]},o,n,l),a("theme-command:pull")}storeAuthScopes(){return["read_themes"]}};U=m;m.summary="Download your remote theme files locally.";m.descriptionWithMarkdown=`Retrieves theme files from Shopify.
|
|
2
2
|
|
|
3
3
|
If no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.`;m.description=U.descriptionWithoutMarkdown();m.flags={...b,...D,...E("download"),theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),development:h.Flags.boolean({char:"d",description:"Pull theme files from your remote development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),live:h.Flags.boolean({char:"l",description:"Pull theme files from your remote live theme.",env:"SHOPIFY_FLAG_LIVE"}),nodelete:h.Flags.boolean({char:"n",description:"Prevent deleting local files that don't exist remotely.",env:"SHOPIFY_FLAG_NODELETE"}),force:h.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};m.multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];var Le=m;export{N as a,Le as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as f}from"./chunk-
|
|
1
|
+
import{o as f}from"./chunk-3EQY5B4S.js";import{b as l}from"./chunk-S5JJL3BP.js";import{b as u}from"./chunk-74IG3ZE3.js";import{d as n}from"./chunk-AUZCENYI.js";import{Lb as m}from"./chunk-BXDZX3BS.js";import{r as g}from"./chunk-T6CC5WUU.js";import{e as v,g as o}from"./chunk-VKWPEFWQ.js";o();o();var S="https://shopify.dev/assistant/search",w="X-Shopify-Surface",A="cli";async function y(s,e,p){let i=new URLSearchParams({query:s});e&&i.append("api_name",e),p&&i.append("api_version",p);let r;try{r=await f(`${S}?${i.toString()}`,{headers:{Accept:"application/json",[w]:A}})}catch{throw new n("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let h=await r.text();if(!r.ok){let d=`${r.status} ${r.statusText}`;try{let t=JSON.parse(h);t?.error&&(d=t.error)}catch(t){if(!(t instanceof SyntaxError))throw t}throw new n(`Search failed: ${d}`)}m(h)}var a=v(g(),1),c=class s extends u{static{this.description="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`."}static{this.examples=[`# search shopify.dev for a topic
|
|
2
2
|
shopify doc search --query "subscribe to webhooks"
|
|
3
3
|
|
|
4
4
|
# narrow the search to a specific API and version
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b}from"./chunk-PK6NOLT5.js";import{a as F}from"./chunk-7KHYEIA7.js";import{j as h,l as u,o as T}from"./chunk-XZWAX4FI.js";import{p as y,v as O}from"./chunk-JGN7YG5X.js";import{o as f,ua as v}from"./chunk-3EQY5B4S.js";import{b as I}from"./chunk-S5JJL3BP.js";import{v as _}from"./chunk-YYLEWVO6.js";import{d as s}from"./chunk-AUZCENYI.js";import{Mb as S,Ua as l,ma as c}from"./chunk-BXDZX3BS.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as A,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function P({session:e,overridesContent:r,themeId:t}){v("theme-preview:create");let w=`${u(e)}/theme_preview.json?preview_theme_id=${t}`,o=await h(e,{headers:{"Content-Type":"application/json"}}),i=await f(w,{method:"POST",body:r,headers:o});if(!i.ok)throw new s(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let a=await J(i);return v("theme-preview:create"),a}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:d}){v("theme-preview:update");let o=`${u(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(d)}`,i=await h(e,{headers:{"Content-Type":"application/json"}}),a=await f(o,{method:"POST",body:r,headers:i});if(!a.ok)throw new s(`Theme preview request failed with status ${a.status}: ${a.statusText}`);let x=await J(a);return v("theme-preview:update"),x}async function J(e){let r=await e.json();if(r.error)throw new s(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new s(`Override file not found: ${e.overrideJson}`);let r=await c(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let a=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${e.overrideJson}`,a)}let d=await T(e.themeId,e.adminSession,e.password),w=JSON.stringify(t),o=e.previewIdentifier?await g({session:d,overridesContent:w,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:d,overridesContent:w,themeId:e.themeId});e.json?S(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):_({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var m=A(U(),1);var E,n=class extends O{async command(r,t){let d=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:d.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};E=n;n.summary="Applies JSON overrides to a theme and returns a preview URL.";n.descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";n.description=E.descriptionWithoutMarkdown();n.flags={...I,...y,theme:m.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:m.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":m.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:m.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:m.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};n.multiEnvironmentsFlags=null;var ee=n;export{ee as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,i as f}from"./chunk-
|
|
1
|
+
import{f as m,i as f}from"./chunk-UEC23KAO.js";import{d as s}from"./chunk-AUZCENYI.js";import{$ as c,Ta as r,qa as h,wa as l}from"./chunk-BXDZX3BS.js";import{d as o}from"./chunk-773TIA5M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function b(t,i){let n=t?.path??"",e=o(i,n);if(!await r(e))throw new s(`
|
|
2
2
|
The extension is not available for ${t?.value}`);return e}async function k({name:t,app:i}){let n=c(t),e=o(i.directory,f.extensions.directoryName,n);if(await r(e))throw new s(`
|
|
3
3
|
A directory with this name (${n}) already exists.
|
|
4
4
|
Choose a new name for your extension.`);return await l(e),await h(o(e,m.lockFile)),e}async function v({localApp:t,developerPlatformClient:i,apiKey:n,organizationId:e}){let{dashboardManagedExtensionRegistrations:x}=(await i.appExtensionRegistrations({id:n,apiKey:n,organizationId:e})).app;return x.length>0||t.allExtensions.filter(u=>u.isThemeExtension).length>0||t.allExtensions.length>0}export{b as a,k as b,v as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,B as r,F as o,G as s,k as n,z as h}from"./chunk-
|
|
1
|
+
import{A as e,B as r,F as o,G as s,k as n,z as h}from"./chunk-YYLEWVO6.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-PLHJQQVZ.js";import{a as k}from"./chunk-6V37CHBZ.js";import{Ba as w,Da as A,Ea as P,Fa as C}from"./chunk-KJQAJUDU.js";import{b as y}from"./chunk-S5JJL3BP.js";import{v as u}from"./chunk-YYLEWVO6.js";import{d as h}from"./chunk-AUZCENYI.js";import{j as p}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();async function f(l){let{directory:o,configName:e,configPath:a,configuration:n,remoteApp:i}=l;if(!n.client_id)throw new h("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,m=await w({developerPlatformClient:c,app:i}),d=i.flags,b={directory:o,configName:e,developerPlatformClient:c,apiKey:n.client_id},g=await A(b,m,d,i.apiKey),x=p(a),F=await P({remoteApp:i,developerPlatformClient:c,specifications:m,flags:d,configFileName:x,appDirectory:g.appDirectory??o,localAppOptions:g});return{configPath:a,configuration:F,remoteApp:i}}var s,t=class extends v{async run(){let{flags:o}=await this.parse(s),{app:e,remoteApp:a}=await C({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),{configuration:n,configPath:i}=await f({directory:o.path,configName:o.config,configPath:e.configPath,configuration:e.configuration,remoteApp:a});return u({headline:`Pulled latest configuration for "${n.name}"`,body:`Updated ${p(i)} with the remote data.`}),{app:e}}};s=t;t.summary="Refresh an already-linked app configuration without prompts.";t.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";t.description=s.descriptionWithoutMarkdown();t.flags={...y,...k};var z=t;export{z as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as o}from"./chunk-GCN4O7HM.js";import{q as i}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-GCN4O7HM.js";import{q as i}from"./chunk-TM534QSE.js";import{b as r}from"./chunk-74IG3ZE3.js";import{u as e}from"./chunk-YYLEWVO6.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
|
|
2
2
|
|
|
3
3
|
When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as E}from"./chunk-FKIVKNOV.js";import{a as S}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-FKIVKNOV.js";import{a as S}from"./chunk-PLHJQQVZ.js";import{a as C}from"./chunk-6V37CHBZ.js";import{Fa as P,I as x,ha as y,i as F}from"./chunk-KJQAJUDU.js";import{b as f}from"./chunk-KUKYAIOR.js";import{b as w}from"./chunk-S5JJL3BP.js";import{Fb as n,Hb as d,Lb as v,Ta as h,ma as g,ua as l}from"./chunk-BXDZX3BS.js";import{f as u}from"./chunk-773TIA5M.js";import{r as $}from"./chunk-T6CC5WUU.js";import{e as k,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function _({app:c,remoteApp:t,organization:o,envFile:e}){await y(t,o.source);let r={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:F(c.configuration)};if(await h(e)){let a=await g(e),s=f(a,r);if(s===a)return d`No changes to ${n.path(e)}`;{await l(e,s);let I=E(a??"",s);return d`Updated ${n.path(e)} to be:
|
|
2
2
|
|
|
3
3
|
${s}
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as c,c as u}from"./chunk-NNOSZ447.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as h,g as i}from"./chunk-VKWPEFWQ.js";i();i();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-BTQDUX72.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-3AICQCNU.js"),t=await import("./lib-QJDPPAWN.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-BOESDKZA.js");return await l(r),d.handle(r)}}var s=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-AXZBGWIQ.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await O(e,n),b(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function O(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-AC34ZJZD.js"),{moduleDirectory:t}=await import("./path-MBXP7ZIC.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var F={"no-color":s.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:s.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},E={json:s.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})},S=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return s.Flags.integer({min:1,max:65535,...e,description:o})};async function j(){let{cacheClear:e}=await import("./conf-store-V6ILVUUO.js");e()}export{_ as a,F as b,E as c,S as d,j as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./chunk-GCN4O7HM.js";import{r as t}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-GCN4O7HM.js";import{r as t}from"./chunk-TM534QSE.js";import{b as r}from"./chunk-74IG3ZE3.js";import{u as i}from"./chunk-YYLEWVO6.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var o=class extends r{static{this.summary="Disable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
|
|
2
2
|
|
|
3
3
|
When auto-upgrade is disabled, Shopify CLI won't automatically update. Run \`shopify upgrade\` to update manually.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-I3Y6XTKN.js";import{b as e}from"./chunk-74IG3ZE3.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static{this.description="View the UI kit components that display static output"}static{this.hidden=!0}async run(){await o()}};export{t as a};
|