@shopify/cli 4.5.1 → 4.6.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-6S5JVSRO.js +1 -0
- package/dist/analytics-E252SR3P.js +1 -0
- package/dist/assets/hydrogen/starter/package.json +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chokidar-VDIVGBZH.js → chokidar-5RWEYTNQ.js} +1 -1
- package/dist/{chunk-XU6CCL4P.js → chunk-2I62GKIH.js} +80 -80
- package/dist/{chunk-PGN5EZTI.js → chunk-2JFZ6GZC.js} +2 -2
- package/dist/{chunk-UQWFDL3F.js → chunk-2KD4LHRT.js} +1 -1
- package/dist/chunk-2MCH43SL.js +11 -0
- package/dist/{chunk-BEXQB4RT.js → chunk-2SNT7U7B.js} +1 -1
- package/dist/{chunk-U2LQBJJL.js → chunk-2VIUGNYO.js} +1 -1
- package/dist/chunk-2Y6CYLKF.js +1 -0
- package/dist/{chunk-KHXDP3SF.js → chunk-3EHRA4LA.js} +1 -1
- package/dist/{chunk-GQG6WELZ.js → chunk-3EPQ6UOK.js} +6 -6
- package/dist/{chunk-ZHPXJRHR.js → chunk-3NO6PWNL.js} +1 -1
- package/dist/chunk-3TFUSDHY.js +370 -0
- package/dist/{chunk-SFMXFH33.js → chunk-46NA23I7.js} +1 -1
- package/dist/{chunk-C5U4NLNU.js → chunk-47URTBZF.js} +1 -1
- package/dist/chunk-4FEBSLSU.js +1 -0
- package/dist/{chunk-DCUAVLTM.js → chunk-4HB4VZJQ.js} +1 -1
- package/dist/{chunk-DU5LZYQX.js → chunk-4JARSKED.js} +1 -1
- package/dist/{chunk-IHUCBI6L.js → chunk-4KZRP2JP.js} +141 -141
- package/dist/{chunk-2GDACKZF.js → chunk-4P7PWLUN.js} +1 -1
- package/dist/{chunk-MYQQOOGA.js → chunk-4YCMEC5R.js} +1 -1
- package/dist/{chunk-Q2X7IXPQ.js → chunk-53ZA2HD3.js} +1 -1
- package/dist/{chunk-DE3WCNP6.js → chunk-57YF2UNT.js} +1 -1
- package/dist/{chunk-MOCD7GFI.js → chunk-5EFQILLF.js} +1 -1
- package/dist/chunk-5JPV3HPJ.js +1 -0
- package/dist/{chunk-OCYPWE2O.js → chunk-5LJ5H4TD.js} +1 -1
- package/dist/{chunk-JVMYTC3J.js → chunk-5Y2VD4I3.js} +1 -1
- package/dist/{chunk-YBFCDINU.js → chunk-6BX62FFE.js} +1 -1
- package/dist/{chunk-6ZMNEURG.js → chunk-6FJBCRVK.js} +1 -1
- package/dist/{chunk-2WDKXDFM.js → chunk-6Q5VRSRN.js} +1 -1
- package/dist/{chunk-GDHD3TGC.js → chunk-6QDOCBD4.js} +1 -1
- package/dist/{chunk-BVFIJSD7.js → chunk-6SXB44CE.js} +1 -1
- package/dist/chunk-6UTUJKKC.js +16 -0
- package/dist/{chunk-E24W34C4.js → chunk-6YCGMS7X.js} +15 -15
- package/dist/chunk-72GN655L.js +1 -0
- package/dist/chunk-7CPECP5P.js +1 -0
- package/dist/{chunk-XH5FCMS5.js → chunk-7HAFBCL3.js} +1 -1
- package/dist/chunk-7XPFLQEM.js +1 -0
- package/dist/{chunk-DDVT2K7E.js → chunk-A3JE5LX3.js} +1 -1
- package/dist/{chunk-ASOT7VNB.js → chunk-AJ6VOBXU.js} +1 -1
- package/dist/{chunk-XWQ72WTQ.js → chunk-B2WK53GH.js} +1 -1
- package/dist/chunk-B34VYVGV.js +1 -0
- package/dist/chunk-B6SY4BIK.js +2 -0
- package/dist/{chunk-H7DDRARV.js → chunk-BBEHNPKK.js} +1 -1
- package/dist/{chunk-GKQ6CSJZ.js → chunk-BCTMBKAU.js} +1 -1
- package/dist/chunk-BGUHH7AW.js +10 -0
- package/dist/chunk-BOAGJ6P5.js +1 -0
- package/dist/chunk-C256W7D2.js +26 -0
- package/dist/chunk-CTNBSUVU.js +83 -0
- package/dist/{chunk-MQXSMZQZ.js → chunk-CXWLHQKA.js} +1 -1
- package/dist/chunk-DHU767C3.js +1 -0
- package/dist/{chunk-NGPJXONG.js → chunk-DKHMLETG.js} +1 -1
- package/dist/{chunk-QPJQ67GU.js → chunk-DODCPRXT.js} +144 -144
- package/dist/{chunk-QDYDB7DY.js → chunk-E3RDAVJT.js} +3 -3
- package/dist/chunk-E3RQCWSC.js +6 -0
- package/dist/{chunk-EDSKA6UB.js → chunk-EBZ6MDEM.js} +1 -1
- package/dist/chunk-ELJ7SKMH.js +1 -0
- package/dist/{chunk-FOPGI6GO.js → chunk-EQTULRM7.js} +1 -1
- package/dist/{chunk-SRAHMYWJ.js → chunk-ERCJPRN3.js} +1 -1
- package/dist/{chunk-M2AS5BWX.js → chunk-ESZS7L6O.js} +1 -1
- package/dist/{chunk-IBBFRL3Y.js → chunk-ET2O5DAS.js} +1 -1
- package/dist/chunk-EZ7EBYDT.js +684 -0
- package/dist/{chunk-AVMNXIXF.js → chunk-EZNJDFFK.js} +1 -1
- package/dist/chunk-F34LB7M4.js +20 -0
- package/dist/{chunk-QVYZZNAS.js → chunk-FE24P4UQ.js} +1 -1
- package/dist/chunk-FFSDGRAN.js +1 -0
- package/dist/{chunk-ALQKJAHP.js → chunk-FMTPUYSH.js} +1 -1
- package/dist/{chunk-IQYZAALJ.js → chunk-FPWLEGKZ.js} +1 -1
- package/dist/{chunk-APYASWBA.js → chunk-FT4HLDK7.js} +1 -1
- package/dist/{chunk-E7OLCSAL.js → chunk-G3YYMKWG.js} +1 -1
- package/dist/chunk-G7QW5OSQ.js +6 -0
- package/dist/{chunk-JO4ZHVOD.js → chunk-GCDEDRY7.js} +1 -1
- package/dist/{chunk-GAYQKMOM.js → chunk-GEE5MXHT.js} +1 -1
- package/dist/{chunk-IIHPONSQ.js → chunk-H4MYBJ6C.js} +1 -1
- package/dist/chunk-HDXBZLHH.js +8 -0
- package/dist/chunk-HSKB5OTM.js +1 -0
- package/dist/{chunk-5T3OVTF5.js → chunk-HT6MOPLW.js} +1 -1
- package/dist/chunk-HZXY7RWJ.js +19 -0
- package/dist/{chunk-WIXW233Y.js → chunk-IDAWPBJM.js} +1 -1
- package/dist/{chunk-UHJ65YFN.js → chunk-IDLDQ2JB.js} +1 -1
- package/dist/{chunk-KOB6T6NK.js → chunk-IKYZ5L3F.js} +1 -1
- package/dist/{chunk-O2PI2PYG.js → chunk-ILQXBASM.js} +1 -1
- package/dist/{chunk-O7MONSF7.js → chunk-IYU72M55.js} +1 -1
- package/dist/{chunk-JCNRQYRP.js → chunk-J3IHP46B.js} +2 -2
- package/dist/{chunk-UB5BVO76.js → chunk-J4KJQHNS.js} +1 -1
- package/dist/{chunk-3GMW7IEC.js → chunk-JHRZCUBE.js} +1 -1
- package/dist/chunk-JIBLEZ57.js +18 -0
- package/dist/{chunk-TXJEP4FB.js → chunk-JIKIYMCT.js} +1 -1
- package/dist/{chunk-MKCXLBQ4.js → chunk-JJTGHARS.js} +1 -1
- package/dist/chunk-JJZNUFPD.js +44 -0
- package/dist/{chunk-U7ZRDNZU.js → chunk-JQP3ZCAG.js} +1 -1
- package/dist/{chunk-5UXPTCSD.js → chunk-JS3X6BDT.js} +1 -1
- package/dist/{chunk-YZY4M6IH.js → chunk-K7IZMKBR.js} +1 -1
- package/dist/{chunk-5JCREGSD.js → chunk-KGZH4RFA.js} +1 -1
- package/dist/{chunk-JNEGEJH6.js → chunk-KO4FB4QU.js} +1 -1
- package/dist/chunk-KPRKIZ5M.js +3 -0
- package/dist/chunk-KUN74JD4.js +4 -0
- package/dist/chunk-KURWC4A5.js +16 -0
- package/dist/{chunk-XDEAZP2I.js → chunk-L3D2CASO.js} +1 -1
- package/dist/{chunk-P6S5YLOP.js → chunk-L7DZTIHJ.js} +1 -1
- package/dist/{chunk-QPY6WJTT.js → chunk-LBDAYBIF.js} +1 -1
- package/dist/{chunk-ZG7BVVT2.js → chunk-LD6ZCTZ3.js} +1 -1
- package/dist/{chunk-TDCY3BRI.js → chunk-LH3RIIOB.js} +1 -1
- package/dist/{chunk-BZAZMLII.js → chunk-LWRDNTAD.js} +1 -1
- package/dist/{chunk-MMKBIMMC.js → chunk-LWWBU7ET.js} +1 -1
- package/dist/chunk-M4BEPPA3.js +1 -0
- package/dist/chunk-M4YPMHIM.js +1 -0
- package/dist/{chunk-VSZS3FAJ.js → chunk-M5KKLAM6.js} +1 -1
- package/dist/{chunk-Q2UHGP2Z.js → chunk-MBLHXPGK.js} +1 -1
- package/dist/{chunk-3YCTWCHH.js → chunk-MDHJJVXA.js} +1 -1
- package/dist/{chunk-5U6MXSNY.js → chunk-MDXSLAIC.js} +1 -1
- package/dist/{chunk-NV5IDANV.js → chunk-NA2ERJIJ.js} +1 -1
- package/dist/chunk-NOKCVDYD.js +317 -0
- package/dist/chunk-O6XSWAP2.js +4 -0
- package/dist/{chunk-OVLTFTZW.js → chunk-OB62WVZ5.js} +1 -1
- package/dist/{chunk-UYNCJGMC.js → chunk-OT52JOML.js} +1 -1
- package/dist/chunk-OTT73YUA.js +5 -0
- package/dist/{chunk-ZVQBSXE4.js → chunk-OUUOML3D.js} +1 -1
- package/dist/{chunk-7ZLKT2TB.js → chunk-P7XC5HS2.js} +1 -1
- package/dist/{chunk-KC2TN7AR.js → chunk-PALG4SNB.js} +1 -1
- package/dist/{chunk-T5DF2GGD.js → chunk-PB37BTPE.js} +1 -1
- package/dist/{chunk-WO5YOBQ7.js → chunk-PWYRKTJ4.js} +1 -1
- package/dist/{chunk-H7PNMMDO.js → chunk-PXSX63RF.js} +1 -1
- package/dist/{chunk-QMSYJIAU.js → chunk-QDPDB5EP.js} +1 -1
- package/dist/{chunk-7XQDZF73.js → chunk-QG7TELFC.js} +1 -1
- package/dist/{chunk-OASPW2P2.js → chunk-QU5NL2QT.js} +1 -1
- package/dist/{chunk-DQE7XRCK.js → chunk-QV53BSQP.js} +1 -1
- package/dist/{chunk-CNOL26GA.js → chunk-QXXA2EQY.js} +1 -1
- package/dist/{chunk-T3AJL2M5.js → chunk-QZ5FMWZS.js} +1 -1
- package/dist/chunk-R26GJEH3.js +1 -0
- package/dist/{chunk-TDSR2X7X.js → chunk-RTW4RZWH.js} +2 -2
- package/dist/{chunk-FPCPFECH.js → chunk-SEV3S3WH.js} +1 -1
- package/dist/{chunk-YYHCPLBX.js → chunk-TAFOSPBW.js} +1 -1
- package/dist/{chunk-MCATVWHC.js → chunk-TAV2ENJY.js} +1 -1
- package/dist/{chunk-ZNWFTUFV.js → chunk-TQNALMQH.js} +1 -1
- package/dist/chunk-TR4OWSEX.js +77 -0
- package/dist/{chunk-RFDT525K.js → chunk-TUJNCWHZ.js} +1 -1
- package/dist/{chunk-2MNOWKMI.js → chunk-U564K7SX.js} +1 -1
- package/dist/chunk-UKQ7NE5V.js +1 -0
- package/dist/{chunk-ICFFBMFB.js → chunk-UM3OHLCX.js} +1 -1
- package/dist/{chunk-4TC4M4RC.js → chunk-V65P572N.js} +3 -3
- package/dist/chunk-VFIVXK53.js +2 -0
- package/dist/chunk-VVFPW4ZQ.js +2 -0
- package/dist/{chunk-TVU4YD2H.js → chunk-VYITPC34.js} +1 -1
- package/dist/{chunk-3QVXHF6I.js → chunk-VZKR2YFM.js} +1 -1
- package/dist/{chunk-WMDYHUPS.js → chunk-W2GMKXM7.js} +1 -1
- package/dist/{chunk-72K36DID.js → chunk-W4X3635B.js} +1 -1
- package/dist/chunk-W6ST525S.js +99 -0
- package/dist/{chunk-RIRSTGFU.js → chunk-WEEYQX3M.js} +1 -1
- package/dist/{chunk-KOUKBXOZ.js → chunk-WO7LKJCJ.js} +1 -1
- package/dist/{chunk-6XLVKD6Q.js → chunk-WPRAJ25Z.js} +1 -1
- package/dist/{chunk-LUG2BZJP.js → chunk-WR2ZQGUR.js} +1 -1
- package/dist/{chunk-5K4DONQJ.js → chunk-WWX265PC.js} +1 -1
- package/dist/chunk-XERJY4IG.js +103 -0
- package/dist/{chunk-GXUZ3V7S.js → chunk-XGCJWCC4.js} +1 -1
- package/dist/{chunk-PGKP7W5T.js → chunk-XGMPC7KK.js} +1 -1
- package/dist/chunk-XGRVAPLR.js +7 -0
- package/dist/{chunk-TC3JOEMA.js → chunk-Y2PC2BBJ.js} +60 -60
- package/dist/{chunk-ODH2U44N.js → chunk-Y4QC2YVE.js} +1 -1
- package/dist/chunk-YNJZ2VXV.js +5 -0
- package/dist/chunk-Z5DDPQ26.js +3 -0
- package/dist/{chunk-EXQXGSGY.js → chunk-ZK7VJZ6V.js} +1 -1
- package/dist/{chunk-COTYR5RC.js → chunk-ZLT4DPHN.js} +1 -1
- package/dist/{chunk-CGULQAB5.js → chunk-ZOBQKNGK.js} +1 -1
- package/dist/chunk-ZTE46E4Z.js +153 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-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.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-N5P2ZEAD.js +1 -0
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/custom-oclif-loader-4ZAXX5MR.js +1 -0
- package/dist/data/filters.json +1 -1
- package/dist/data/objects.json +30 -3
- package/dist/data/shopify_system_translations.json +48 -4
- package/dist/deprecations-4TY4DNME.js +1 -0
- package/dist/dist-6ZJS4I57.js +1 -0
- package/dist/dist-7W2KJOYN.js +1 -0
- package/dist/environments-TR5WW2MD.js +1 -0
- package/dist/error-VJQM4MFE.js +1 -0
- package/dist/error-handler-IYGE3Z72.js +1 -0
- package/dist/{fs-7LCRIUF3.js → fs-EOQL26C3.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/{http-proxy-node16-X2WAMUT5.js → http-proxy-node16-A6AKKRQH.js} +1 -1
- package/dist/index.js +15 -15
- package/dist/is-global-RQCPBQA3.js +1 -0
- package/dist/{latest-version-32HXMWJ7.js → latest-version-LDWU5F7A.js} +7 -7
- package/dist/lib-2BR2WN7L.js +1 -0
- package/dist/lib-JKLF33A7.js +1 -0
- package/dist/{lib-NOROGV6N.js → lib-P3APEIHY.js} +1 -1
- package/dist/local-TW3HCZ2S.js +1 -0
- package/dist/local-storage-T6FKS53K.js +1 -0
- package/dist/{metadata-D5GLZOLV.js → metadata-TYZDEER5.js} +1 -1
- package/dist/{morph-QZGREMO2.js → morph-ABSWZEVT.js} +4 -4
- package/dist/node-package-manager-6SWUZILX.js +1 -0
- package/dist/notifications-system-SMHMV2UW.js +1 -0
- package/dist/out-53ABAVL7.js +1 -0
- package/dist/{output-FYS764MJ.js → output-JG5I2TEL.js} +1 -1
- package/dist/system-D4Z32GDS.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-6M3XZ6MR.js +1 -0
- package/dist/upgrade-EKAG4IV7.js +1 -0
- package/dist/version-6UBWZCNS.js +1 -0
- package/dist/version-XRU7TEAI.js +1 -0
- package/dist/{workerd-N25GY5MX.js → workerd-LXBSJULF.js} +1 -1
- package/oclif.manifest.json +612 -2
- package/package.json +11 -11
- package/dist/analytics-CIKTYXZ6.js +0 -1
- package/dist/analytics-DM7CBV2M.js +0 -1
- package/dist/assets/dev-console/extensions/dev-console/assets/apple-touch-icon-BXMqQaSW.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-16x16-B6uL8SrV.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-32x32-CGwlpz_y.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-ByUl89Ab.ico +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/index-Bm_GpKQW.js +0 -51
- package/dist/assets/dev-console/extensions/dev-console/assets/index-DISeE29z.css +0 -1
- package/dist/assets/dev-console/extensions/dev-console/assets/site-B9Ae890R.webmanifest +0 -19
- package/dist/assets/dev-console/index.html +0 -21
- package/dist/chunk-2FIDORHT.js +0 -5
- package/dist/chunk-2HZMOK4U.js +0 -836
- package/dist/chunk-2O22LZKV.js +0 -44
- package/dist/chunk-3SJHCEQR.js +0 -7
- package/dist/chunk-4E354M4H.js +0 -1
- package/dist/chunk-5C7HDTHJ.js +0 -1
- package/dist/chunk-5NY4HKJF.js +0 -103
- package/dist/chunk-5PLLJPEW.js +0 -3
- package/dist/chunk-6Y3QXASG.js +0 -22
- package/dist/chunk-6ZRHK4ON.js +0 -1
- package/dist/chunk-7USHLXEN.js +0 -2
- package/dist/chunk-AH2ZJ73H.js +0 -16
- package/dist/chunk-AI756VJI.js +0 -1
- package/dist/chunk-DA4LHFJQ.js +0 -26
- package/dist/chunk-DKKBJ4H5.js +0 -2
- package/dist/chunk-EAXEV45I.js +0 -2
- package/dist/chunk-ELIH6GCC.js +0 -1
- package/dist/chunk-EYDNSYYE.js +0 -370
- package/dist/chunk-FO6FNY6P.js +0 -5
- package/dist/chunk-G7QLHXVA.js +0 -19
- package/dist/chunk-H3QZN45D.js +0 -4
- package/dist/chunk-HHSUBF73.js +0 -1
- package/dist/chunk-HXYWEKMS.js +0 -2
- package/dist/chunk-IDKUJQIG.js +0 -11
- package/dist/chunk-IOU6EKTT.js +0 -1
- package/dist/chunk-IRH6IGFT.js +0 -567
- package/dist/chunk-IRTCLR3F.js +0 -10
- package/dist/chunk-J3KRY2SD.js +0 -1
- package/dist/chunk-JOYM7AEQ.js +0 -1
- package/dist/chunk-LKZ7ARYS.js +0 -18
- package/dist/chunk-N5HGT3TE.js +0 -4
- package/dist/chunk-NJOO5XJV.js +0 -1
- package/dist/chunk-NNOSZ447.js +0 -1
- package/dist/chunk-OHASEW7T.js +0 -1
- package/dist/chunk-PGODIZ64.js +0 -1
- package/dist/chunk-PTIJDS6I.js +0 -3
- package/dist/chunk-Q6LCSRIW.js +0 -1
- package/dist/chunk-SKM44SK5.js +0 -4
- package/dist/chunk-T6CC5WUU.js +0 -159
- package/dist/chunk-UZ7U322K.js +0 -283
- package/dist/chunk-VHAZBDFE.js +0 -21
- package/dist/chunk-VRRDIXFQ.js +0 -6
- package/dist/chunk-YB3SGPFF.js +0 -1
- package/dist/chunk-YJCJDCVP.js +0 -1
- package/dist/chunk-ZDQNCYRH.js +0 -5
- package/dist/conf-store-OC4XCP45.js +0 -1
- package/dist/custom-oclif-loader-3AICQCNU.js +0 -1
- package/dist/deprecations-M5JGGK47.js +0 -1
- package/dist/dist-3SP7TISC.js +0 -1
- package/dist/dist-Z4H2OM7V.js +0 -1
- package/dist/environments-ZLSO534C.js +0 -1
- package/dist/error-ZBG2MA5U.js +0 -1
- package/dist/error-handler-MCUV4RZV.js +0 -1
- package/dist/is-global-RURDJZDU.js +0 -1
- package/dist/lib-QJDPPAWN.js +0 -1
- package/dist/lib-UCG2DNMS.js +0 -1
- package/dist/local-5AKD7T5X.js +0 -1
- package/dist/local-storage-TJU77VRQ.js +0 -1
- package/dist/node-package-manager-FA3Y6DPG.js +0 -1
- package/dist/notifications-system-76GJJAJP.js +0 -1
- package/dist/out-CDCY25QC.js +0 -1
- package/dist/system-KDM2BB7R.js +0 -1
- package/dist/ui-QIHGXICT.js +0 -1
- package/dist/upgrade-DY4L43H4.js +0 -1
- package/dist/version-LULWCT5R.js +0 -1
- package/dist/version-WIERCO5R.js +0 -1
package/dist/chunk-VHAZBDFE.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{a as qr}from"./chunk-O7MONSF7.js";import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ir}from"./chunk-FPCPFECH.js";import{a as Lr}from"./chunk-OCYPWE2O.js";import{a as Mr}from"./chunk-XDEAZP2I.js";import{a as kr}from"./chunk-JO4ZHVOD.js";import{a as Dr}from"./chunk-H7DDRARV.js";import{b as Fr}from"./chunk-E7OLCSAL.js";import{a as Or}from"./chunk-AVMNXIXF.js";import{a as Nr}from"./chunk-T5DF2GGD.js";import{a as Pr}from"./chunk-DDVT2K7E.js";import{a as Er}from"./chunk-DA4LHFJQ.js";import{a as br}from"./chunk-DU5LZYQX.js";import{a as Sr}from"./chunk-WO5YOBQ7.js";import{a as Ur}from"./chunk-TDCY3BRI.js";import{a as Rr}from"./chunk-PGN5EZTI.js";import{a as Tr,b as Ar,c as _r,d as Cr}from"./chunk-7ZLKT2TB.js";import{a as $r}from"./chunk-MKCXLBQ4.js";import{g as xr}from"./chunk-5NY4HKJF.js";import{a as Lo,b as ko}from"./chunk-HHSUBF73.js";import{a as gr}from"./chunk-G7QLHXVA.js";import{a as vr}from"./chunk-CNOL26GA.js";import{a as gt}from"./chunk-2WDKXDFM.js";import{a as yr}from"./chunk-RFDT525K.js";import{c as ht,m as wt}from"./chunk-KOB6T6NK.js";import{b as wr,g as je,j as ft}from"./chunk-5T3OVTF5.js";import{c as Yo}from"./chunk-SKM44SK5.js";import{a as fr,b as hr,c as Ye,d as Co,e as Pt,f as Io,g as Do}from"./chunk-WMDYHUPS.js";import{a as O,b as mt}from"./chunk-SRAHMYWJ.js";import{a as cr,b as lr,d as Ee,f as pr,m as Ge,n as ee,s as W,u as ur,v as dr,w as mr}from"./chunk-Q7BOSHWX.js";import{c as Wr}from"./chunk-6XLVKD6Q.js";import{a as ir}from"./chunk-3GMW7IEC.js";import{a as bo,b as vt,c as te,d as So}from"./chunk-TDSR2X7X.js";import{a as $o,f as Mo,g as Fo,h as xt,i as Oo,j as No,k as qo,l as Wo,m as Ho,n as Bo,o as Go,p as jo,q as Ko,v as zo,x as Vo,z as Et}from"./chunk-YZY4M6IH.js";import{a as Uo,b as Ro,c as To,d as Ao,e as _o}from"./chunk-5U6MXSNY.js";import{a as Br}from"./chunk-MOCD7GFI.js";import{a as Eo}from"./chunk-JOYM7AEQ.js";import{a as xo}from"./chunk-6ZRHK4ON.js";import{a as Hr}from"./chunk-7XQDZF73.js";import{a as Qe}from"./chunk-NV5IDANV.js";import{Aa as Ve,F as no,Fa as Po,H as so,J as fe,R as ao,U as uo,V as mo,Z as fo,aa as ho,fa as go,g as Gr,i as Kr,ia as wo,j as zr,ja as yo,k as J,ka as vo,l as Vr,n as Yr,o as Qr,r as yt,s as Jr,u as Xr,v as Zr,w as eo,x as to,y as ro,z as oo,za as ze}from"./chunk-UZ7U322K.js";import{O as io,P as co,Z as lo,ca as po,e as Ke,j as be,p as jr}from"./chunk-IRH6IGFT.js";import{c as sr}from"./chunk-ASOT7VNB.js";import{a as H}from"./chunk-5JCREGSD.js";import{$ as Yt,N as Vt,Z as de,a as Wt,c as Ht,h as Bt,l as Gt,n as jt,q as Kt,t as zt,ta as Qt,u as ke,z as De}from"./chunk-2HZMOK4U.js";import{b as ar,d as Be}from"./chunk-Q6LCSRIW.js";import{a as lt,c as qt}from"./chunk-5C7HDTHJ.js";import{D as Ne,H as Zt,J as Z,O as qe,P as xe,Q as dt,R as tr,T as rr,a as Nt,i as pt,j as $e,k as M,l as F,m as Me,n as ut,o as Xt,p as Fe,u as Oe,w as ne}from"./chunk-E24W34C4.js";import{a as Zn}from"./chunk-7UNQOKZW.js";import{d as Jt}from"./chunk-3QVXHF6I.js";import{d as _,g as me,l as er}from"./chunk-ELIH6GCC.js";import{$a as ve,Ea as Dt,Fb as U,Gb as nr,Hb as R,Mb as Q,Na as Ie,Pb as y,Q as ct,Qb as k,Ta as X,Wa as Le,cb as $t,eb as Pe,fb as L,gb as S,jb as le,kb as pe,ma as I,mb as Ft,nb as Ot,tb as ue,ua as _e,wa as Ce}from"./chunk-EYDNSYYE.js";import{d as or,f as We,j as He}from"./chunk-JCNRQYRP.js";import{a as Re}from"./chunk-NNOSZ447.js";import{d as T,f as it,g as Te,i as ce,j as Lt,k as Ae,o as kt,p as ye}from"./chunk-773TIA5M.js";import{r as Xn}from"./chunk-T6CC5WUU.js";import{e as oe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var es=300*1e3,ts='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Qo(t,e,r=Date.now()){for(;await rs(t,e,r););}async function rs(t,e,r){let o=await je(t,e);if(!o||os(o,r))throw new _(ts);return await xe(3),o.processing}function os(t,e){return t.processing&&Date.now()-e>=es}var ns="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",ss="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",bt=3,Je=class extends yr{constructor(e,r={devPreview:!1}){super(e),this.context="App Ext. Host",this.themeId=Tr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??(e=this.devPreview?await this.createHostTheme():await this.create()),e}setTheme(e){Ar(this.adminSession.storeFqdn,e)}removeTheme(){_r(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:wr,name:this.generateThemeName(this.context),src:ns};for(let o=0;o<bt;o++){y(`Attempt ${o}/${bt}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await ft(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),y(`Waiting for theme with id "${n.id}" to be processed`),await Qo(n.id,this.adminSession),n;throw new Error}catch{y(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}y(`Theme creation failed after ${bt} retries. Creating theme using fallback theme zip`);let r=await ft({...e,src:ss},this.adminSession);if(!r)throw y("Theme creation failed. Exiting process."),new me(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var as={"theme:init":Ur,"theme:check":gr,"theme:console":vr,"theme:delete":Pr,"theme:dev":Er,"theme:duplicate":br,"theme:info":Sr,"theme:language-server":Rr,"theme:list":Cr,"theme:metafields:pull":$r,"theme:open":Ir,"theme:package":Lr,"theme:profile":kr,"theme:publish":Dr,"theme:preview":Mr,"theme:pull":Fr,"theme:push":Or,"theme:rename":Nr,"theme:share":qr},oi=as;async function Jo(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(v=>v.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[l,u]=await Promise.all([Vt(t.storeFqdn),ls(e)]),c=l.storeFqdn,[m,h]=await Promise.all([wt(l),ht(l)]),g=h?await gt(void 0,c,m):void 0,d=await cs(l,t.theme),f=d.id.toString();return Oe({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:u}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${c}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:is,options:{theme:d,adminSession:l,storefrontPassword:g,crawlerSignatureHeaders:m,themeExtensionDirectory:a,themeExtensionPort:i}}}var is=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await xr(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function cs(t,e){let r;if(e)y(`Fetching theme with provided id ${e}`),r=await je(parseInt(e,10),t);else{let o=new Je(t,{devPreview:!0});await Ne([{title:"Configuring host theme for theme app extension",task:async()=>{y("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new _("Could not find or create a host theme for theme app extensions");return r}async function ls(t){return t.developerPlatformClient?.clientName===lo.AppManagement?`https://${await ke()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await zt()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function ps(t){let e=T(t.directory,"locales");return Le([T(e,"*.json")])}async function Xo(t,e){let r=await ps(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),us(a,s,o,t,e)})),o.lastUpdated=Date.now(),y(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function us(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw k(i,n.stderr),new er.ExtendableError(i)}}p();function Xe(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}async function he(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Xo(t,r),l=await Vr(t),u=t.outputRelativePath?ce(n):n,c=await ds(t,s,u,o),m=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(m=t.configuration.metafields),{assets:{main:Se(c)&&c[0]?.assets?.main?c[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await Ie(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:Xe(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:c,localization:a??null,metafields:m,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:l?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function ds(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),Se(s)){let a=await ms(r);return Promise.all(s.map(async i=>{let{target:l,resource:u}=i,c={...i,surface:Ve(l),root:{url:`${e}/${l}`},resource:u||{url:""}},m=a?.[l];if(!m)return c;let g=await ys(m,{target:l,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...c,...g}}))}return s}async function ms(t){try{let e=T(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function fs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,l=e[s];if(typeof l=="string"){let g=await Ze(s,i,typeof a=="string"?a:l,r,o,n,typeof a=="string"?l:void 0);return{assets:{[g.name]:g}}}let c=e.build_manifest?.assets?.[s];if(c?.filepath){let m=await Ze(s,i,c.filepath,r,o,n,c.module);return{assets:{[m.name]:m}}}return{}}async function hs({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await Ie(T(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function gs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,l)=>{let u=i.schema,c=s[l]?.schema,m=typeof c=="string"?c:u,h=typeof c=="string"?u:void 0;return{...i,schema:await Ze("schema",`${t}/intents/${l}/schema`,m,r,o,n,h)}}))}:{}}async function ws({target:t,url:e,extension:r,resolver:o},n,s){let a=await Ze(n,`${t}/${n}`,s,e,r,o);return{assets:{[a.name]:a}}}async function ys(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return vs(o,n)?gs(e,n):Ps(o,n)?ws(e,o,n):xs(o,n)?hs(e,o,n):fs(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Se(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Ze(t,e,r,o,n,s,a){let i=`${e}${Ae(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await Ie(T(n.directory,a??r))??0}}function vs(t,e){return t==="intents"&&Array.isArray(e)}function Ps(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function xs(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as Es}from"events";var Ue;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(Ue||(Ue={}));async function Zo(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:Ye(t.storeFqdn,t.apiKey),mobileUrl:Io(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>he(n,e,t,r&&St(r,n.devUUID))))}}function St(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var et=class extends Es{constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=de(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(Se(n.extensionPoints)&&Se(o.extensionPoints)){let s=n.extensionPoints.reduce((l,u)=>({...l,[u.target]:u}),{});o.extensionPoints=de(o.extensionPoints,n.extensionPoints,l=>l.map(u=>{let c=s[u.target];return c?de(u,c,(m,h)=>h):u}));let{extensionPoints:a,...i}=n;return de(o,i)}return de(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){y(R`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await he(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},St(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await he(e,r,this.options,St(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(Ue.Update,e)}};p();p();var se;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(se||(se={}));function en(t,e){return(r,o,n)=>{r.url==="/extensions"&&(y("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,bs(t,e)))}}function bs(t,e){return r=>{y("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};y(R`Sending connected payload: ${U.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",As(t,e))}}function Ss(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?U.json(o).output():String(o)).join(" ");return R`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var Us={debug:t=>U.gray(t),warn:t=>U.yellow(t),error:t=>U.errorText(t)};function Rs({type:t,message:e}){let r=Ss(e);switch(t){case"debug":case"warn":case"error":return R`${Us[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function Ts(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(Rs(t))})}function As(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(y(R`Received websocket message with event type ${n} and data:
|
|
2
|
-
${U.json(s)}
|
|
3
|
-
`,e.stdout),n===se.Update){let a=e.payloadStore.getRawPayload().app.apiKey,i=s.app?.apiKey;if(s.app){if(a!==i)return;e.payloadStore.updateApp(s.app)}s.extensions&&e.payloadStore.updateExtensions(s.extensions)}else if(n===se.Dispatch){let a=_s(o,e);rn(t,a,e)}else n===se.Log&&Ts(s,e)}}function tn(t,e){return r=>{let o={event:se.Update,version:e.manifestVersion,data:{...e.payloadStore.getRawPayloadFilteredByExtensionIds(r)}};y(R`Sending websocket update event to the websocket clients:
|
|
4
|
-
${U.json(o)}
|
|
5
|
-
`,e.stdout),rn(t,o,e)}}function rn(t,e,r){y(R`Sending websocket with event type ${e.event} and data:
|
|
6
|
-
${U.json(e.data)}
|
|
7
|
-
`,r.stdout);let o=JSON.stringify(e);t.clients.forEach(n=>n.send(o))}function _s(t,e){let r=e.payloadStore.getRawPayload();return{...t,version:e.manifestVersion,data:{...t.data,extensions:[],store:r.store,app:r.app}}}var Cs=10;function on(t){let e=new Mt.default({noServer:!0,clientTracking:!0}),r=Is(e);return t.httpServer.on("upgrade",en(e,t)),t.payloadStore.on(Ue.Update,tn(e,t)),{close:()=>{e.close(),clearInterval(r)}}}function Is(t){return setInterval(()=>{t.clients.forEach(e=>{e.readyState<2&&e.ping()})},Cs*1e3)}p();p();p();function nn(t,e){let{url:r}=Xe(t.type,e);if(t.surface==="checkout"&&r){let o=new URL(`https://${e.storeFqdn}/`);return o.pathname=r,o.searchParams.append("dev",`${e.url}/extensions`),o.toString()}else{let o=new URL(`https://${e.storeFqdn}/`);return o.pathname="admin/extensions-dev",o.searchParams.append("url",tt(t,e)),o.toString()}}function sn(t,e,r){let o=Ve(t),n=new URL(`https://${r.storeFqdn}/`);switch(o){case"checkout":n.pathname=r.checkoutCartUrl,n.searchParams.append("dev",`${r.url}/extensions`);break;case"post_purchase":if(n.pathname=r.checkoutCartUrl,n.searchParams.set("script_url",`${r.url}/extensions/${e.devUUID}/assets/${e.localIdentifier}.js`),n.searchParams.set("post_purchase_dev_api_key",r.apiKey),e.devUUID&&r.websocketURL&&(n.searchParams.set("uuid",e.devUUID),n.searchParams.set("socket_url",r.websocketURL)),"metafields"in e.configuration){let s={config:{metafields:e.configuration.metafields}};n.searchParams.set("config",JSON.stringify(s))}break;case"admin":n.pathname="admin/extensions-dev",n.searchParams.append("url",tt(e,r)),n.searchParams.append("target",t);break;case"customer-accounts":n=Ls(e,r,t);break;default:return}return n.toString()}function Ls(t,e,r=""){let o=`${e.url}/extensions`,n=e.storeId,s="shopify.com",a=new URL(`https://${s}/${n}/account/extensions-development`);return a.searchParams.append("origin",o),a.searchParams.append("extensionId",t.devUUID),a.searchParams.append("source","CUSTOMER_ACCOUNT_EXTENSION"),a.searchParams.append("appId",e.id??""),r!==""&&a.searchParams.append("target",r),a}function tt(t,e){let r=new URL(e.url);return r.pathname=`/extensions/${t.devUUID}`,r.toString()}function B(t,e){lr(t,cr(e))}p();var Ut=class extends me{constructor(e){super(`Couldn't find template ${e.template} for extension surface ${e.extensionSurface}`)}};async function an(t){let e=await ks(t),r=await I(e);return ir(r,t.data)}async function ks(t){let e=await Ds(),r=[];t.extensionSurface&&r.push(T(e,`${t.extensionSurface}/${t.template}.html.liquid`)),r.push(T(e,`${t.template}.html.liquid`));let o=await Le(r);if(o.length===0)throw new Ut(t);return o[0]}async function Ds(){return await ve("templates/ui-extensions/html",{type:"directory",cwd:ye(import.meta.url)})}var cn=W(t=>{ee(t,"Access-Control-Allow-Origin","*"),ee(t,"Access-Control-Allow-Methods","GET, OPTIONS"),ee(t,"Access-Control-Allow-Headers","Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, ngrok-skip-browser-warning")}),ln=W(t=>{ee(t,"Cache-Control","no-cache")}),pn=W(async t=>Ge(t,"/extensions/dev-console",307));async function Rt(t,e){let{filePath:r}=e;if(!await X(r))return B(t,{statusCode:404,statusMessage:`Not Found: ${r}`});if(await Dt(r)&&(r+=r.endsWith("/")?"index.html":"/index.html",!await X(r)))return B(t,{statusCode:404,statusMessage:`Not Found: ${r}`});let o=await I(r,{}),n={".ico":"image/x-icon",".html":"text/html",".js":"text/javascript",".json":"application/json",".wasm":"application/wasm",".css":"text/css",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".wav":"audio/wav",".mp3":"audio/mpeg",".svg":"image/svg+xml",".pdf":"application/pdf",".doc":"application/msword"},s=Ae(r),a=n[s]||"text/plain";return ee(t,"Content-Type",a),o}function un({getExtensions:t,payloadStore:e}){return W(async r=>{let{extensionId:o,assetPath:n=""}=Ee(r),s=t().find(c=>c.devUUID===o);if(!s)return B(r,{statusCode:404,statusMessage:`Extension with id ${o} not found`});let i=e.getAssetResolver(s.devUUID)?.get(n)??n,l=it(Yr(s.outputPath)),u=it(T(l,i));return kt(l,u)?Rt(r,{filePath:u}):B(r,{statusCode:404,statusMessage:"Not Found"})})}function Tt({payloadStore:t}){return W(e=>(ee(e,"content-type","application/json"),t.getRawPayload()))}var dn=W(async t=>{let e=await ve(T("assets","dev-console"),{type:"directory",cwd:ye(import.meta.url)});return e?Rt(t,{filePath:e}):B(t,{statusCode:404,statusMessage:"Could not find root directory for dev console"})}),mn=W(async t=>{let{assetPath:e=""}=Ee(t),r=await ve(T("assets","dev-console","extensions","dev-console","assets"),{type:"directory",cwd:ye(import.meta.url)});return r?Rt(t,{filePath:T(r,e)}):B(t,{statusCode:404,statusMessage:"Could not find root directory for dev console asset"})});function fn({devOptions:t}){return W(e=>{y(`UI extensions server received a ${e.method} request to URL ${e.path}`,t.stdout)})}function At({devOptions:t,getExtensions:e}){return W(async r=>{let{extensionId:o}=Ee(r),n=e().find(i=>i.devUUID===o);if(!n)return B(r,{statusCode:404,statusMessage:`Extension with id ${o} not found`});if(pr(r,"accept")?.startsWith("text/html")){if(n.type==="checkout_post_purchase")return an({data:{url:tt(n,t)},template:"index",extensionSurface:"post_purchase"});{let i=nn(n,t);return Ge(r,i,307)}}let a=t.appWatcher.buildOutputPath;return ee(r,"content-type","application/json"),{app:{apiKey:t.apiKey},version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:ge(t.url)},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extension:await he(n,a,t)}})}function hn({devOptions:t,getExtensions:e}){return W(async r=>{let{extensionId:o,extensionPointTarget:n=""}=Ee(r),s=e().find(i=>i.devUUID===o);if(!s)return B(r,{statusCode:404,statusMessage:`Extension with id ${o} not found`});if(s.configuration.type!=="checkout_post_purchase"&&!s.hasExtensionPointTarget(n))return B(r,{statusCode:404,statusMessage:`Extension with id ${o} has not configured the "${n}" extension target`});let a=sn(n,s,t);return a?Ge(r,a,307):B(r,{statusCode:404,statusMessage:`Redirect url can't be constructed for extension with id ${o} and extension target "${n}"`})})}import{createServer as $s}from"http";function gn(t){let e=ur(),r=dr();e.use(fn(t)),e.use(cn),e.use(ln),r.use("/extensions/dev-console",dn),r.use("/extensions/dev-console/assets/**:assetPath",mn),r.use("/extensions/:extensionId",At(t)),r.use("/extensions/:extensionId/",At(t)),r.use("/extensions/:extensionId/:extensionPointTarget",hn(t)),r.use("/extensions/:extensionId/assets/**:assetPath",un(t)),r.use("/extensions",Tt(t)),r.use("/extensions/",Tt(t)),r.use("/",pn),e.use(r);let o=$s(mr(e));return o.listen(t.devOptions.port,"localhost"),o}async function wn(t){let e={...t,websocketURL:ge(t.url)},r=e.appWatcher.buildOutputPath,o=new Map,n=await Zo(e,r,o),s=new et(n,e,o),a=e.extensions.filter(m=>m.isPreviewable),i=()=>a;y("Setting up the UI extensions HTTP server...",e.stdout);let l=gn({devOptions:e,payloadStore:s,getExtensions:i});y("Setting up the UI extensions Websocket server...",e.stdout);let u=on({...e,httpServer:l,payloadStore:s});y("Setting up the UI extensions bundler and file watching...",e.stdout);let c=async({appWasReloaded:m,app:h,extensionEvents:g})=>{m&&(a=h.allExtensions.filter(d=>d.isPreviewable));for(let d of g){if(!d.extension.isPreviewable)continue;let f=d.buildResult?.status==="ok"?"success":"error",v=d.buildResult?.status==="error"?{message:d.buildResult.error,file:d.buildResult.file}:void 0;switch(d.type){case te.Created:if(e.extensions.push(d.extension),!e.checkoutCartUrl){let E=await ze(e.extensions,e.storeFqdn);e.checkoutCartUrl=E}await s.addExtension(d.extension,r);break;case te.Updated:await s.updateExtension(d.extension,e,r,{status:f,error:v});break;case te.Deleted:e.extensions=e.extensions.filter(E=>E.devUUID!==d.extension.devUUID),await s.deleteExtension(d.extension);break}}};e.appWatcher.onEvent(c).onStart(c),e.signal.addEventListener("abort",()=>{y("Closing the UI extensions dev server..."),u.close(),l.close()})}function ge(t){let e=new URL("/extensions",t);return e.protocol="wss:",e.toString()}var Ms="3",Fs=async({stderr:t,stdout:e,abortSignal:r},{apiKey:o,storeFqdn:n,storeId:s,subscriptionProductUrl:a,port:i,cartUrl:l,proxyUrl:u,appName:c,appDotEnvFile:m,appId:h,grantedScopes:g,allExtensions:d,appDirectory:f,appWatcher:v})=>{await wn({appName:c,appDotEnvFile:m,appDirectory:f,id:h,extensions:d,stdout:e,stderr:t,signal:r,url:u,port:i,storeFqdn:De(n),storeId:s,apiKey:o,grantedScopes:g,checkoutCartUrl:l,subscriptionProductUrl:a,manifestVersion:Ms,appWatcher:v})};async function yn({allExtensions:t,storeFqdn:e,checkoutCartUrl:r,...o}){let n=t.filter(a=>a.isPreviewable),s=await ze(n,e,r);return{prefix:"extensions",type:"previewable-extension",function:Fs,options:{pathPrefix:"/extensions",port:-1,storeFqdn:e,allExtensions:t,cartUrl:s,...o}}}p();p();p();async function vn(t){let e={},r=await Qr(t);return await Promise.all(r.map(async o=>{let n=Te(t.directory,o),a=ce(n)==="assets"?"binary":"utf8",i=await I(o,{encoding:a});e[n]=Buffer.from(i,a).toString("base64")})),{theme_extension:{files:e}}}async function Pn({extension:t,developerPlatformClient:e,apiKey:r,registrationId:o,stdout:n,stderr:s,appConfiguration:a,bundlePath:i}){let l,u=t.getOutputPathForDirectory(i);if(t.features.includes("esbuild")){let v=await I(u);if(!v)return;l=Buffer.from(v).toString("base64")}let c;t.isThemeExtension?c=await vn(t):c=await t.deployConfig({apiKey:r,appConfiguration:a})??{};let m={...c,serialized_script:l};if(t.isFunctionExtension){let v=await I(t.outputPath,{encoding:"base64"});m.uploaded_files={"dist/index.wasm":v}}let h={apiKey:r,config:JSON.stringify(m),handle:t.handle,context:t.contextValue,registrationId:o},g,d=[];try{g=await e.updateExtension(h)}catch(v){if(d=[{message:"Unknown error"}],v&&typeof v=="object"){let E=v;E.errors?.length?d=E.errors:E.message&&(d=[{message:E.message}])}else typeof v=="string"&&(d=[{message:v}])}let f=g?.extensionUpdateDraft?.userErrors;if(f?.length&&d.push(...f),d.length>0){let v=d.map(E=>E.message).join(", ");s.write(`${t.draftMessages.errorMessage}: ${v}`)}else{let v=t.draftMessages.successMessage;v&&Q(v,n)}}var Os=async({stderr:t,stdout:e},{developerPlatformClient:r,apiKey:o,remoteExtensionIds:n,localApp:s,appWatcher:a})=>{await Gr(s);let i=s.draftableExtensions.map(u=>u.handle),l=async u=>{let m=u.extensionEvents.filter(h=>h.type===te.Updated).filter(h=>h.buildResult?.status==="ok").filter(h=>i.includes(h.extension.handle)).map(async h=>{let g=h.extension,d=n[g.localIdentifier];if(!d)throw new _(`Extension ${g.localIdentifier} not found on remote app.`);await F({outputPrefix:g.outputPrefix},async()=>{await Pn({extension:g,developerPlatformClient:r,apiKey:o,registrationId:d,stdout:e,stderr:t,appConfiguration:s.configuration,bundlePath:a.buildOutputPath})})});await Promise.all(m)};a.onEvent(l).onStart(l)};async function xn({localApp:t,apiKey:e,developerPlatformClient:r,remoteApp:o,...n}){let s=t.draftableExtensions;if(s.length===0)return;let a=ho({app:t}),{extensionIds:i,extensions:l}=await fo({app:t,remoteApp:o,appId:e,appName:o.title,force:!0,release:!0,developerPlatformClient:r,envIdentifiers:a,includeDraftExtensions:!0});return t.updateExtensionUUIDS(l),{type:"draftable-extension",prefix:"extensions",function:Os,options:{localApp:t,apiKey:e,developerPlatformClient:r,...n,extensions:s,remoteExtensionIds:i}}}p();p();function ae(t){let e=t.find(o=>fe(o,J.Frontend)),r=t.find(o=>fe(o,J.Backend));return{frontendConfig:e,backendConfig:r}}p();async function En(t){let r={topic:"app/uninstalled",api_version:(await co(t.developerPlatformClient,t.organizationId))[1],address:t.address,delivery_method:ko.LOCALHOST,shared_secret:t.sharedSecret},o=await io(t.developerPlatformClient,r,t.organizationId);t.stdout.write("Sending APP_UNINSTALLED webhook to app server"),await xe(3);let n=await Ns(t,o);return t.stdout.write(n?"APP_UNINSTALLED webhook delivered":"APP_UNINSTALLED webhook delivery failed"),n}async function Ns(t,e){let r=0;for(;r<3;){try{return await Lo(t.address,e.samplePayload,JSON.stringify({...JSON.parse(e.headers),"X-Shopify-Shop-Domain":t.storeFqdn}))}catch(o){if(o instanceof Gt&&o.code==="ECONNREFUSED")r<3&&(t.stdout.write("App isn't responding yet, retrying in 5 seconds"),await xe(5));else throw o}r++}return t.stdout.write("App hasn't started in time, giving up"),!1}var qs=async({stdout:t},e)=>{await En({stdout:t,developerPlatformClient:e.developerPlatformClient,address:`http://localhost:${e.deliveryPort}${e.webhooksPath}`,sharedSecret:e.apiSecret,storeFqdn:e.storeFqdn,organizationId:e.organizationId})};function bn({webs:t,remoteAppUpdated:e,backendPort:r,frontendPort:o,organizationId:n,...s}){let{backendConfig:a,frontendConfig:i}=ae(t),l=t.map(({configuration:c})=>c.webhooks_path).find(c=>c)??"/api/webhooks";if(l&&e&&(i??a))return{type:"send-webhook",prefix:"webhooks",function:qs,options:{deliveryPort:a?r:o,webhooksPath:l,organizationId:n,...s}}}p();async function Sn(t){return{type:"graphiql",prefix:"graphiql",options:t,function:Ws}}var Ws=async({stdout:t,abortSignal:e},r)=>{let o=Do({apiKey:r.apiKey,apiSecret:r.apiSecret,storeFqdn:r.storeFqdn}),n=hr({stdout:t,port:r.port,storeFqdn:r.storeFqdn,key:r.key,tokenProvider:o,appContext:{appName:r.appName,appUrl:r.appUrl,apiSecret:r.apiSecret}});e.addEventListener("abort",async()=>{n.close()})};p();async function Rn({webs:t,proxyUrl:e,frontendPort:r,backendPort:o,apiKey:n,apiSecret:s,scopes:a}){let{frontendConfig:i}=ae(t),l=i?.configuration.hmr_server?await O():void 0,u=void 0,c=t.map(async m=>{let h=await Hs({web:m,frontendPort:r,backendPort:o}),g=l&&m.configuration.roles.includes(J.Frontend)?{port:l,httpPaths:m.configuration.hmr_server.http_paths}:void 0;return{type:"web",prefix:m.configuration.name??["web",...m.configuration.roles].join("-"),function:Bs,options:{port:h,portFromConfig:m.configuration.port,apiKey:n,apiSecret:s,hostname:e,backendPort:o,frontendServerPort:r,directory:m.directory,devCommand:m.configuration.commands.dev,preDevCommand:m.configuration.commands.predev,scopes:a,shopCustomDomain:u,hmrServerOptions:g,roles:m.configuration.roles}}});return Promise.all(c)}async function Hs({web:t,frontendPort:e,backendPort:r}){return fe(t,J.Frontend)?e:fe(t,J.Backend)?r:O()}async function Bs({stdout:t,stderr:e,abortSignal:r},{port:o,apiKey:n,apiSecret:s,hostname:a,backendPort:i,frontendServerPort:l,directory:u,devCommand:c,preDevCommand:m,scopes:h,shopCustomDomain:g,hmrServerOptions:d}){let f=d?.port,v={SHOPIFY_API_KEY:n,SHOPIFY_API_SECRET:s,HOST:a,SCOPES:h,NODE_ENV:"development",...g&&{SHOP_CUSTOM_DOMAIN:g},BACKEND_PORT:`${i}`,FRONTEND_PORT:`${l}`,...f&&{HMR_SERVER_PORT:`${f}`},APP_URL:a,APP_ENV:"development",REMIX_DEV_ORIGIN:a},E={signal:r,directory:u,port:o,env:v,stdout:t,stderr:e};m&&(t.write(`Running pre-dev command: "${m}"`),await Un({...E,command:m,showOutput:or()})),await Un({...E,command:c,showOutput:!0})}async function Un({command:t,signal:e,directory:r,port:o,env:n,showOutput:s,stdout:a,stderr:i}){let l=t.split("&&").map(u=>u.trim())??[];for(let u of l){let[c,...m]=u.split(" ");c?.length!==0&&await qe(c,m,{cwd:r,stdout:s?a:void 0,stderr:i,signal:e,env:{...n,PORT:`${o}`,SERVER_PORT:`${o}`}})}}p();p();p();var rt=class{constructor(e){this.stdout=e}async info(e){await this.log(e)}async warning(e){await this.log(R`${U.yellow(e)}`.value)}async success(e){await this.log(R`${U.green(e)}`.value)}async debug(e){y(e,this.stdout)}async error(e,r){let o=U.errorText("\u274C Error"),n=U.errorText(`\u2514 ${e}`);await this.log(R`${o}`.value,r),await this.log(R`${n}`.value,r)}async logUserErrors(e,r){if(typeof e=="string")await this.error(e);else if(e instanceof Error)await this.error(e.message);else{let o=e.map(n=>{let s=n.on?n.on[0]:void 0,a=r.find(i=>i.uid===s?.user_identifier);return{error:n.message,prefix:a?.handle??"app-preview"}});await this.logMultipleErrors(o)}}async logExtensionEvents(e){let r=e.extensionEvents.filter(n=>n.extension.isAppConfigExtension),o=e.extensionEvents.filter(n=>!n.extension.isAppConfigExtension);r.length&&await this.log("App config updated","app-config"),o.forEach(async n=>{let s=n.extension.handle,a=`Extension ${n.type}`;await this.log(a,s)})}async logExtensionUpdateMessages(e){if(!e)return;let r=e.extensionEvents??[],n=(await Promise.all(r.map(async a=>a.type===te.Deleted?[]:(await a.extension.getDevSessionUpdateMessages())?.map(l=>({message:l,prefix:a.extension.handle}))??[]))).flat(),s=n.map((a,i)=>{let l=R`${U.gray(i===n.length-1?"\u2514 ":"\u2502 ")}${a.message}`.value;return this.log(l,a.prefix)});await Promise.all(s)}async logMultipleErrors(e){let r=U.errorText("\u274C Error");await this.log(R`${r}`.value,"app-preview");let o=e.map(n=>{let s=U.errorText(`\u2514 ${n.error}`);return this.log(R`${s}`.value,n.prefix)});await Promise.all(o)}async log(e,r){await F({outputPrefix:r??"app-preview",stripAnsi:!1},()=>{this.stdout.write(e)})}};p();var ot=class{constructor(e){this.processBatch=e,this.queue=[],this.processingPromise=void 0}enqueue(e){this.queue.push(e),this.processingPromise??(this.processingPromise=this.startProcessing())}async waitForCompletion(){if(this.processingPromise)return this.processingPromise}async startProcessing(){try{for(;this.queue.length>0;){let e=[...this.queue];this.queue=[],await this.processBatch(e)}}finally{this.processingPromise=void 0}}};var nt=class t{static async start(e,r){let o=new t(e,r);return await o.start(),o}constructor(e,r){this.failedEvents=[],this.currentSessionState=null,this.statusManager=e.devSessionStatusManager,this.logger=new rt(r),this.options=e,this.appWatcher=e.appWatcher,this.bundlePath=e.appWatcher.buildOutputPath,this.appEventsProcessor=new ot(o=>this.processEvents(o))}async start(){await this.logger.info(`Preparing dev preview on ${this.options.storeFqdn}`),this.statusManager.setMessage("LOADING"),this.appWatcher.onEvent(async e=>this.onEvent(e)).onStart(async e=>this.onStart(e)).onError(async e=>this.handleDevSessionResult({status:"unknown-error",error:e}))}async onEvent(e){await this.validateAppEvent(e)&&this.appEventsProcessor.enqueue(e)}async processEvents(e){let r=[...this.failedEvents,...e],o=this.consolidateAppEvents(r);if(this.failedEvents=[],!o)return;this.statusManager.setMessage("CHANGE_DETECTED"),this.updatePreviewURL(o),await this.logger.logExtensionEvents(o);let n=bo(),s=await this.bundleExtensionsAndUpload(o);await this.handleDevSessionResult(s,o),await this.logger.debug(`\u2705 Event handled [Network: ${vt(n)}ms - Total: ${vt(o.startTime)}ms]`)}consolidateAppEvents(e){if(e.length===0)return;if(e.length===1)return e[0];let r=e[0],o=e[e.length-1];if(!r||!o)return;let n=new Map;for(let a of e)for(let i of a.extensionEvents)n.set(i.extension.uid,i);return{app:o.app,path:o.path,extensionEvents:Array.from(n.values()),startTime:r.startTime,appWasReloaded:e.some(a=>a.appWasReloaded)}}async onStart(e){let r=this.parseBuildErrors(e);if(r.length)await this.logger.logMultipleErrors(r),await setImmediate(()=>{let o=r.map(n=>n.prefix);throw new _(`Dev preview aborted, build errors detected in extensions: ${o}`)});else{let o=await this.bundleExtensionsAndUpload(e);await this.handleDevSessionResult(o,e)}}async validateAppEvent(e){if(!this.statusManager.status.isReady)return await this.logger.warning("Change detected, but dev preview is not ready yet."),!1;let r=this.parseBuildErrors(e);return r.length?(await this.logger.logMultipleErrors(r),this.statusManager.setMessage("BUILD_ERROR"),!1):e.extensionEvents.length===0?(this.statusManager.setMessage("READY"),!1):!0}parseBuildErrors(e){return e.extensionEvents.filter(o=>o.buildResult?.status==="error").map(o=>({error:"Build error. Please review your code and try again.",prefix:o.extension.handle}))}async handleDevSessionResult(e,r){e.status==="updated"?(await this.logger.success(`\u2705 Updated dev preview on ${this.options.storeFqdn}`),await this.logger.logExtensionUpdateMessages(r),await this.setUpdatedStatusMessage()):e.status==="created"?(this.statusManager.updateStatus({isReady:!0}),await this.logger.success("\u2705 Ready, watching for changes in your app "),await this.logger.logExtensionUpdateMessages(r),this.statusManager.setMessage("READY")):e.status==="aborted"?await this.logger.debug("\u274C Dev preview update aborted (new change detected or error during update)"):(e.status==="remote-error"||e.status==="unknown-error")&&(await this.logger.logUserErrors(e.error,r?.app.allExtensions??[]),e.error instanceof Error&&e.error.cause==="validation-error"?this.statusManager.setMessage("VALIDATION_ERROR"):(r&&this.failedEvents.push(r),this.statusManager.setMessage("REMOTE_ERROR"))),!this.statusManager.status.isReady&&!We()&&setImmediate(()=>{throw new _("Failed to start dev preview.")})}updatePreviewURL(e){let r=e.app.allExtensions.filter(a=>a.isPreviewable).length>0,n=He()&&r?this.options.appLocalProxyURL:this.options.appPreviewURL,s=e.app.nonConfigExtensions.length>0;this.statusManager.updateStatus({previewURL:n,appEmbedded:e.app.configuration.embedded,hasExtensions:s})}async setUpdatedStatusMessage(){this.statusManager.setMessage("UPDATED"),setTimeout(async()=>{this.statusManager.status.statusMessage?.message==="Updated"&&this.statusManager.setMessage("READY")},2e3)}async bundleExtensionsAndUpload(e){try{let{manifest:r,inheritedModuleUids:o,assets:n}=await this.createManifest(e),s=await this.uploadAssetsIfNeeded(n,!this.statusManager.status.isReady),a=ge(this.options.url);if(this.statusManager.status.isReady){let i={shopFqdn:this.options.storeFqdn,appId:this.options.appId,assetsUrl:s,manifest:r,inheritedModuleUids:o};return this.devSessionUpdateWithRetry(i)}else{let i={shopFqdn:this.options.storeFqdn,appId:this.options.appId,assetsUrl:s,websocketUrl:a};return this.devSessionCreateWithRetry(i)}}catch(r){if(r.statusCode===401)throw new Error("Unauthorized");if(r instanceof Bt)throw r.response.status===401||r.response.status===403?new _("Auth session expired. Please run `shopify app dev` again."):(await this.logger.debug(JSON.stringify(r.response,null,2)),new _("Unknown error"));return r.code==="ETIMEDOUT"?{status:"unknown-error",error:new Error("Request timed out, please check your internet connection and try again.")}:{status:"unknown-error",error:r}}}async createManifest(e){let r=e.extensionEvents.filter(i=>i.type!=="deleted").map(i=>i.extension.uid);e.app.allExtensions.some(i=>i.type==="admin")&&!r.includes("admin")&&r.push("admin");let o=e.app.allExtensions.filter(i=>!r.includes(i.uid)).map(i=>i.uid),n=await e.app.manifest(void 0);await Uo(n,this.bundlePath),this.statusManager.status.isReady&&(n.modules=n.modules.filter(i=>r.includes(i.uid)));let s=await $t(this.bundlePath),a=n.modules.map(i=>i.assets).filter(i=>s.includes(i));return{manifest:n,inheritedModuleUids:o,assets:a}}async uploadAssetsIfNeeded(e,r){if(!e.length&&!r)return;let o=T(ce(this.bundlePath),`dev-bundle.${this.options.developerPlatformClient.bundleFormat}`),n=[...e.map(a=>`${a}/**`),...Ro];r&&n.push("manifest.json"),await To(this.bundlePath,o,n);let s=await this.getSignedURLWithRetry();return await Ao(s,o),s}async getSignedURLWithRetry(){return _o(this.options.developerPlatformClient,{apiKey:this.options.appId,organizationId:this.options.organizationId,id:this.options.appId})}async devSessionUpdateWithRetry(e){let r=await this.options.developerPlatformClient.devSessionUpdate(e),o=r.devSessionUpdate?.userErrors??[],n=r.devSessionUpdate?.devSession;if(n&&this.currentSessionState){let s=ge(this.options.url),a=this.currentSessionState?.userId;if(n.websocketUrl!==s||n.user?.id!==a){let i=n.user?.email;await this.logger.error(`Another developer ${i?`(${i}) `:""}has taken ownership of this dev preview.`);let l=`Another user${i?` (${i})`:""} has taken ownership of this dev preview. Your preview is no longer active.`,u=["You can restart by running",{command:"shopify app dev"},"again."];throw new _(l,u)}this.currentSessionState={websocketUrl:n.websocketUrl,userId:n.user?.id??null,userEmail:n.user?.email??null}}return o.length?{status:"remote-error",error:o}:{status:"updated"}}async devSessionCreateWithRetry(e){let r=await this.options.developerPlatformClient.devSessionCreate(e),o=r.devSessionCreate?.userErrors??[],n=r.devSessionCreate?.warnings??[],s=r.devSessionCreate?.devSession;return s&&(this.currentSessionState={websocketUrl:s.websocketUrl,userId:s.user?.id??null,userEmail:s.user?.email??null}),n.length>0&&await Promise.all(n.map(a=>{let i=a.code==="SESSION_TAKEOVER"?`\u26A0\uFE0F ${a.message}`:a.message;return this.logger.warning(i)})),o.length?{status:"remote-error",error:o}:{status:"created"}}};async function Tn({app:t,apiKey:e,developerPlatformClient:r,...o}){return{type:"dev-session",prefix:"app-preview",function:Gs,options:{app:t,apiKey:e,developerPlatformClient:r,...o}}}var Gs=async({stdout:t},e)=>{await nt.start(e,t)};p();p();p();var An=async({appLog:t,appLogPayload:e,stdout:r,storeName:o,logsDir:n})=>{let s=qt().substring(0,6),i=`${js(t.log_timestamp)}_${t.source_namespace}_${t.source}_${s}.json`,l=Vo({appLog:t,appLogPayload:e,prettyPrint:!0,storeName:o}),u=T(n,i);try{return await Ce(n),await _e(u,l),{fullOutputPath:u,identifier:s}}catch(c){throw r.write(`Error while writing log to file: ${c}
|
|
8
|
-
`),c}};function js(t){let e=new Date(t),r=e.getUTCFullYear(),o=(e.getUTCMonth()+1).toString().padStart(2,"0"),n=e.getUTCDate().toString().padStart(2,"0"),s=e.getUTCHours().toString().padStart(2,"0"),a=e.getUTCMinutes().toString().padStart(2,"0"),i=e.getUTCSeconds().toString().padStart(2,"0"),l=e.getUTCMilliseconds().toString().padStart(3,"0");return`${r}${o}${n}_${s}${a}${i}_${l}Z`}var st=async({stdout:t,appLogsFetchInput:{jwtToken:e,cursor:r},developerPlatformClient:o,resubscribeCallback:n,storeName:s,organizationId:a,abortSignal:i,logsDir:l,consecutiveResubscribeFailures:u=0})=>{if(!i?.aborted)try{let c=e,m=Fo,h=u,g=await o.appLogs({jwtToken:e,cursor:r},a),{errors:d,status:f}=g;if(f===200){h=0;let{app_logs:E}=g;for(let A of E){let P=JSON.parse(A.payload);await F({outputPrefix:A.source,stripAnsi:!1},async()=>{A.log_type===qo?(Ks(A,P,t),P=new $o(Mo(P))):A.log_type.startsWith(Wo)?zs(A,P,t):t.write(JSON.stringify(P));let D=await An({appLog:A,appLogPayload:P,stdout:t,storeName:s,logsDir:l});t.write(R`${U.gray("\u2514 ")}${U.link("Open log file",`file://${D.fullOutputPath}`,`Log: ${D.fullOutputPath}`)} ${U.gray(`(${D.identifier})`)}\n`.value)})}}else{let E={errors:d.map(P=>({message:P,status:f}))},A=await zo({response:E,onThrottle:P=>{k("Request throttled while polling app logs.",t),k(`Retrying in ${P/1e3} seconds.`,t)},onUnknownError:P=>{k("Error while polling app logs.",t),k(`Retrying in ${P/1e3} seconds.`,t)},onResubscribe:()=>n()});if(A.resubscribeResult==="failed"){if(h+=1,h>=Oo){k("App log streaming session has expired. Please restart your dev session.",t);return}}else A.resubscribeResult==="succeeded"&&(h=0);A.nextJwtToken&&(c=A.nextJwtToken),m=A.retryIntervalMs}let{cursor:v}=g;setTimeout(()=>{st({stdout:t,appLogsFetchInput:{jwtToken:c,cursor:v??r},developerPlatformClient:o,resubscribeCallback:n,storeName:s,organizationId:a,abortSignal:i,logsDir:l,consecutiveResubscribeFailures:h}).catch(E=>{y(`Unexpected error during polling: ${E}}
|
|
9
|
-
`)})},m)}catch(c){k("Error while polling app logs.",t),k(`Retrying in ${xt/1e3} seconds.`,t),y(`${c}}
|
|
10
|
-
`),setTimeout(()=>{st({stdout:t,appLogsFetchInput:{jwtToken:e,cursor:void 0},developerPlatformClient:o,resubscribeCallback:n,storeName:s,organizationId:a,abortSignal:i,logsDir:l}).catch(m=>{y(`Unexpected error during polling: ${m}}
|
|
11
|
-
`)})},xt)}};function Ks(t,e,r){let o=(e.fuel_consumed/No).toFixed(4);t.status==="success"?r.write(`Function export "${e.export}" executed successfully using ${o}M instructions.`):t.status==="failure"&&r.write(`\u274C Function export "${e.export}" failed to execute with error: ${e.error_type}`);let n=e.logs;n.length>0&&r.write(n.split(`
|
|
12
|
-
`).filter(Boolean).map(s=>R`${U.gray("\u2502 ")}${s}`.value).join(`
|
|
13
|
-
`))}function zs(t,e,r){t.log_type===Ho?r.write("Function network access response retrieved from cache."):t.log_type===Bo?e.reason===jo?r.write("Function network access request executing in background because there is no cached response."):e.reason===Ko&&r.write("Function network access request executing in background because the cached response is about to expire."):t.log_type===Go&&(t.status==="success"?r.write("Function network access request executed successfully."):t.status==="failure"&&r.write(`\u274C Function network access request failed to execute with error: ${e.error}.`))}function Vs(t){return t.allExtensions.some(e=>e.isFunctionExtension)}async function _n({developerPlatformClient:t,subscription:{shopIds:e,apiKey:r},storeName:o,organizationId:n,appWatcher:s,localApp:a}){return{type:"app-logs-subscribe",prefix:"app-logs",function:Ys,options:{developerPlatformClient:t,appLogsSubscribeVariables:{shopIds:e,apiKey:r},storeName:o,organizationId:n,appWatcher:s,localApp:a}}}var Ys=async({stdout:t,stderr:e,abortSignal:r},{developerPlatformClient:o,appLogsSubscribeVariables:n,storeName:s,organizationId:a,appWatcher:i,localApp:l})=>{async function u(c){let m=await Et(o,n,a,t),h=l.getLogsDir();await Ce(h),await st({stdout:t,appLogsFetchInput:{jwtToken:m},resubscribeCallback:()=>Et(o,n,a),developerPlatformClient:o,storeName:s,organizationId:a,abortSignal:c,logsDir:h})}try{let c=!1,m,h=async g=>{let d=Vs(g.app);if(d&&!c){y("Function extensions detected, starting logs polling"),c=!0,m=new AbortController;try{await u(m.signal)}catch(f){y(`Failed to start function logs: ${f}`,e)}}else!d&&c&&(y("No function extensions detected, stopping logs polling"),c=!1,m?.abort(),m=void 0)};i.onStart(h).onEvent(h)}catch{}};p();async function Cn(t){return{type:"app-watcher",prefix:"app-preview",options:t,function:Qs}}var Qs=async({stdout:t,stderr:e,abortSignal:r},o)=>{let{appWatcher:n}=o;await n.start({stdout:t,stderr:e,signal:r})};p();import{EventEmitter as Js}from"events";var Xs={BUILD_ERROR:{message:"Build error. Please review your code and try again",type:"error"},READY:{message:"Ready, watching for changes in your app",type:"success"},LOADING:{message:"Preparing dev preview",type:"loading"},UPDATED:{message:"Updated",type:"success"},VALIDATION_ERROR:{message:"Validation error in your app configuration",type:"error"},REMOTE_ERROR:{message:"Error updating dev preview",type:"error"},CHANGE_DETECTED:{message:"Change detected, updating dev preview",type:"loading"}},at=class extends Js{constructor(e){super(),this.currentStatus={isReady:!1,previewURL:void 0,graphiqlURL:void 0,statusMessage:void 0},e&&(this.currentStatus=e)}updateStatus(e){let r={...this.currentStatus,...e};Yt(this.currentStatus,r)||(this.currentStatus=r,this.emit("dev-session-update",r))}setMessage(e){this.updateStatus({statusMessage:Xs[e]})}get status(){return this.currentStatus}reset(){this.currentStatus={isReady:!1,previewURL:void 0,graphiqlURL:void 0,statusMessage:void 0}}};p();import*as In from"http";import*as Ln from"https";function kn(t){return"errors"in t&&Array.isArray(t.errors)}async function Dn(t,e,r,o){let s=(await import("./http-proxy-node16-X2WAMUT5.js")).default.createProxyServer(),a=ea(t,s,o),i=r?Ln.createServer(r,a):In.createServer(a);return i.on("upgrade",Zs(t,s,o)),e.addEventListener("abort",()=>{y("Closing reverse HTTP proxy"),i.close()}),{server:i}}function Zs(t,e,r){return function(o,n,s){let a=$n(t,o,!0);if(a)return e.ws(o,n,s,{target:a},i=>{F({outputPrefix:"proxy",stripAnsi:!1},()=>{let u=(kn(i)?i.errors[i.errors.length-1]:void 0)??i;k(`Error forwarding websocket request: ${u.message}`,r),k(`\u2514 Unreachable target "${a}" for path: "${o.url}"`,r)})});n.destroy()}}function ea(t,e,r){return function(o,n){let s=$n(t,o);if(s)return o.method==="OPTIONS"?(n.writeHead(204,{"Access-Control-Allow-Origin":o.headers.origin??"*","Access-Control-Allow-Methods":o.headers["access-control-request-method"]??"GET, POST, PUT, DELETE, PATCH, OPTIONS","Access-Control-Allow-Headers":o.headers["access-control-request-headers"]??"Content-Type, Authorization","Access-Control-Max-Age":"86400"}),n.end()):e.web(o,n,{target:s},a=>{F({outputPrefix:"proxy",stripAnsi:!1},()=>{let l=(kn(a)?a.errors[a.errors.length-1]:void 0)??a;k(`Error forwarding web request: ${l.message}`,r),k(`\u2514 Unreachable target "${s}" for path: "${o.url}"`,r)})});y(R`
|
|
14
|
-
Reverse HTTP proxy error - Invalid path: ${o.url??""}
|
|
15
|
-
These are the allowed paths:
|
|
16
|
-
${U.json(JSON.stringify(t))}
|
|
17
|
-
`),n.statusCode=500,n.end(`Invalid path ${o.url}`)}}function $n(t,e,r=!1){let o=e.url??"/";for(let n in t)if(o.startsWith(n))return t[n];return r&&t.websocket?t.websocket:t.default}async function Mn({localApp:t,remoteAppUpdated:e,developerPlatformClient:r,remoteApp:o,storeFqdn:n,storeId:s,commandOptions:a,network:i,graphiqlPort:l,graphiqlKey:u}){let c=o.apiKey,m=o.apiSecretKeys[0]?.secret??"",h=Wt(),g=!Re(h[Ke.disableGraphiQLExplorer]),d=await so(t),f=new So(d,i.proxyUrl),v=d.allExtensions.some(Y=>Y.isPreviewable),E=`${i.proxyUrl}/extensions/dev-console`,A=He(),P;if(A)P=Ye(n,c);else{let Y=await ke();P=Co(n,c,Y)}let z=A&&v?E:P,j=fr(u,m,n),q=g?`http://localhost:${l}/graphiql?key=${encodeURIComponent(j)}`:void 0,V=d.configuration.embedded,w=d.nonConfigExtensions.length>0,$=new at({isReady:!1,previewURL:z,graphiqlURL:q,appEmbedded:V,hasExtensions:w}),N=[...await Rn({webs:d.webs,proxyUrl:i.proxyUrl,frontendPort:i.frontendPort,backendPort:i.backendPort,apiKey:c,apiSecret:m,scopes:Kr(d.configuration)}),g?await Sn({appName:o.title,appUrl:P,port:l,apiKey:c,apiSecret:m,key:j,storeFqdn:n}):void 0,await yn({allExtensions:d.realExtensions,storeFqdn:n,storeId:s,apiKey:c,subscriptionProductUrl:a.subscriptionProductUrl,checkoutCartUrl:a.checkoutCartUrl,proxyUrl:i.proxyUrl,appName:d.name,appDotEnvFile:d.dotenv,grantedScopes:o.grantedScopes,appId:o.id,appDirectory:d.directory,appWatcher:f}),r.supportsDevSessions?await Tn({app:d,apiKey:c,developerPlatformClient:r,url:i.proxyUrl,appId:o.id,organizationId:o.organizationId,storeFqdn:n,appWatcher:f,appPreviewURL:P,appLocalProxyURL:E,devSessionStatusManager:$}):await xn({localApp:d,remoteApp:o,apiKey:c,developerPlatformClient:r,proxyUrl:i.proxyUrl,appWatcher:f}),await Jo({remoteApp:o,localApp:d,storeFqdn:n,theme:a.theme,themeExtensionPort:a.themeExtensionPort}),bn({webs:d.webs,backendPort:i.backendPort,frontendPort:i.frontendPort,organizationId:o.organizationId,developerPlatformClient:r,storeFqdn:n,apiSecret:m,remoteAppUpdated:e}),await _n({developerPlatformClient:r,subscription:{shopIds:[Number(s)],apiKey:c},storeName:n,organizationId:o.organizationId,localApp:t,appWatcher:f}),await Cn({appWatcher:f})].filter(ta);return{processes:await ra(N,i.proxyPort,i.reverseProxyCert),previewUrl:z,graphiqlUrl:q,devSessionStatusManager:$}}var ta=t=>t!==void 0&&t!==!1;async function ra(t,e,r){let o=await Promise.all(t.map(async a=>{let i={};if(a.type==="web"&&a.options.roles.includes(J.Frontend)){let l=a.options.portFromConfig??a.options.port;i.default=`http://localhost:${l}`;let u=a.options.hmrServerOptions;u&&(i.websocket=`http://localhost:${u.port}`,u.httpPaths.forEach(c=>i[c]=`http://localhost:${u.port}`)),a.options.port=l}else if(a.type==="previewable-extension"){let l=await O();i[a.options.pathPrefix]=`http://localhost:${l}`,a.options.port=l}return{process:a,rules:i}})),n=o.map(({process:a})=>a),s=o.map(({rules:a})=>a).reduce((a,i)=>({...a,...i}),{});return Object.keys(s).length>0&&n.push({type:"proxy-server",prefix:"proxy",function:oa,options:{port:e,rules:s,localhostCert:r}}),n}var oa=async({abortSignal:t,stdout:e},{port:r,rules:o,localhostCert:n})=>{let{server:s}=await Dn(o,t,n,e);Q(`Proxy server started on port ${r} ${n?`with certificate ${n.certPath}`:""}`,e),await s.listen(r,"localhost")};p();p();var b=oe(Pe(),1);var na=(t,e)=>Math.max(...t.map(r=>r.prefix.length),...e.map(r=>r.handle.length)),Fn=({abortController:t,processes:e,previewUrl:r,graphiqlUrl:o="",graphiqlPort:n,app:s,pollingTime:a=5e3,developerPreview:i,isEditionWeek:l})=>{let{canEnablePreviewMode:u,developmentStorePreviewEnabled:c}=s,{isRawModeSupported:m}=le(),h=(0,b.useRef)(),g=`http://localhost:${n}/graphiql`,[d,f]=(0,b.useState)(void 0),[v,E]=(0,b.useState)(!0),[A,P]=(0,b.useState)(void 0),{isAborted:D}=Fe(t.signal,async w=>{w?f("Shutting down dev because of an error ..."):(f("Shutting down dev ..."),Qe()),clearInterval(h.current),await i.disable()}),z=(0,b.useMemo)(()=>e.map(w=>({...w,action:async($,N,K)=>{try{return await w.action($,N,K)}catch(Y){t.abort(Y)}}})),[e,t]);(0,b.useEffect)(()=>{let w=async()=>{try{let N=await i.fetchMode();E(N??!1),P("")}catch{P("Failed to fetch the latest status of the development store preview, trying again in 5 seconds.")}},$=async()=>{try{await i.enable(),P("")}catch{P("Failed to turn on development store preview automatically.\nTry turning it on manually by pressing `d`."),E(!!c)}};if(u){$();let N=()=>setInterval(()=>w(),a);h.current=N()}return()=>{clearInterval(h.current)}},[u]),pe((w,$)=>{$e(w,$,()=>t.abort()),(async()=>{try{if(P(""),w==="p"&&r)await H.addPublicMetadata(()=>({cmd_dev_preview_url_opened:!0})),await Z(r);else if(w==="g"&&o)await H.addPublicMetadata(()=>({cmd_dev_graphiql_opened:!0})),await Z(g);else if(w==="q")t.abort();else if(w==="e"&&l)await Z("https://shopify.link/yQmk");else if(w==="d"&&u){await H.addPublicMetadata(()=>({cmd_dev_dev_preview_toggle_used:!0}));let K=!v;E(K);try{if(!await i.update(K))throw new Error(`Failed to turn ${K?"on":"off"} development store preview.`)}catch{E(v),P(`Failed to turn ${K?"on":"off"} development store preview.`)}}}catch{P("Failed to handle your input.")}})()},{isActive:!!m});let j=new Date,q=j.getMonth()>3?"Summer":"Winter",V=j.getFullYear();return b.default.createElement(b.default.Fragment,null,b.default.createElement(Me,{processes:z,prefixColumnSize:na(z,s.extensions),abortSignal:t.signal,keepRunningAfterProcessesResolve:!0,useAlternativeColorPalette:!1}),D?null:b.default.createElement(L,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},m?b.default.createElement(L,{flexDirection:"column"},l?b.default.createElement(S,null,M.pointerSmall," Press ",b.default.createElement(S,{bold:!0},"e")," ",M.lineVertical," check out ",q," Edition",` ${V}`,", live NOW with 100+ product announcements!"):null,u?b.default.createElement(S,null,M.pointerSmall," Press ",b.default.createElement(S,{bold:!0},"d")," ",M.lineVertical," toggle development store preview: ",v?b.default.createElement(S,{color:"green"},"\u2714 on"):b.default.createElement(S,{color:"red"},"\u2716 off")):null,o?b.default.createElement(S,null,M.pointerSmall," Press ",b.default.createElement(S,{bold:!0},"g")," ",M.lineVertical," open GraphiQL (Admin API) in your browser"):null,b.default.createElement(S,null,M.pointerSmall," Press ",b.default.createElement(S,{bold:!0},"p")," ",M.lineVertical," preview in your browser"),b.default.createElement(S,null,M.pointerSmall," Press ",b.default.createElement(S,{bold:!0},"q")," ",M.lineVertical," quit")):null,b.default.createElement(L,{marginTop:m?1:0,flexDirection:"column"},d?b.default.createElement(S,null,d):b.default.createElement(b.default.Fragment,null,b.default.createElement(S,null,"Preview URL: ",b.default.createElement(ue,{url:r})),o?b.default.createElement(S,null,"GraphiQL URL: ",b.default.createElement(ue,{url:g})):null)),A?b.default.createElement(S,{color:"red"},A):null))};p();p();var we=oe(Pe(),1);var On=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function Nn(){let[t,e]=(0,we.useState)(0);return(0,we.useEffect)(()=>{let r=setInterval(()=>{e(o=>(o+1)%On.length)},70);return()=>clearInterval(r)},[]),we.default.createElement(S,null,On[t])}p();var C=oe(Pe(),1);var qn=.9,Wn=({tabs:t,initialActiveTab:e})=>{let{stdout:r}=Ft(),{isRawModeSupported:o}=le(),[n,s]=(0,C.useState)(e),[a,i]=(0,C.useState)(Math.floor(r.columns*qn)),[l,u]=(0,C.useState)(!0),c=(0,C.useRef)(null);if(!n)throw new Error("No tabs provided");pe((d,f)=>{(async()=>{if(f?.leftArrow||f?.rightArrow||f?.tab){let P=Object.entries(t).filter(([V,w])=>w.content),D=P.findIndex(([V])=>V===n);if(D===-1)return;let z=f?.leftArrow?-1:1,j=(D+z+P.length)%P.length,q=P[j];q&&s(q[0])}let E=t[d];if(E){E.action?await E.action():s(d);return}let A=t[n];if(A?.shortcuts){let P=A.shortcuts.find(D=>D.key===d);P&&(!P.condition||P.condition())&&await P.action()}})()},{isActive:!!o}),(0,C.useLayoutEffect)(()=>{let d=()=>{if(i(Math.floor(r.columns*qn)),!c.current)return;let f=Ot(c.current);u(f.width<r.columns)};return r.on("resize",d),()=>{r.off("resize",d)}},[r]);let m=Object.entries(t).map(([d,f])=>({...f,inputKey:d,header:` (${d}) ${f.label} `})),h=m.filter(d=>!d.action),g=m.filter(d=>d.action);return C.default.createElement(C.default.Fragment,null,C.default.createElement(L,{paddingTop:0,width:a,flexDirection:"row",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},C.default.createElement(L,{ref:c,flexDirection:"row",flexWrap:"nowrap",flexShrink:0,marginRight:3},C.default.createElement(S,{wrap:"truncate-end"},"\u2502",h.map(d=>C.default.createElement(C.default.Fragment,{key:d.inputKey},C.default.createElement(S,{bold:n===d.inputKey,inverse:n===d.inputKey,wrap:"truncate"},d.header),"\u2502")))),l&&C.default.createElement(L,{flexGrow:1,justifyContent:"flex-end"},g.map((d,f)=>C.default.createElement(S,{wrap:"truncate",key:d.inputKey},"(",d.inputKey,") ",d.label,f<g.length-1&&" \u2502 ")))),C.default.createElement(L,{flexDirection:"column",marginLeft:1,marginRight:1,marginTop:1},t[n]?.content))};var x=oe(Pe(),1);var Hn=({abortController:t,processes:e,devSessionStatusManager:r,shopFqdn:o,appURL:n,appName:s,organizationName:a,configPath:i,localURL:l,onAbort:u})=>{let{isRawModeSupported:c}=le(),[m,h]=(0,x.useState)(void 0),[g,d]=(0,x.useState)(void 0),[f,v]=(0,x.useState)(r.status),[E,A]=(0,x.useState)(!1),{isAborted:P}=Fe(t.signal,async w=>{w&&d(typeof w=="string"?w:w.message),r.status.isReady?A(!0):(h("Shutting down dev ..."),await u()),Qe()}),D=(0,x.useMemo)(()=>e.map(w=>({...w,action:async($,N,K)=>{try{return await w.action($,N,K)}catch(Y){t.abort(Y)}}})),[e,t]);(0,x.useEffect)(()=>(r.on("dev-session-update",v),()=>{r.off("dev-session-update",v)}),[]),pe((w,$)=>{$e(w,$,()=>t.abort())},{isActive:!!c});let z=w=>{switch(w){case"loading":return x.default.createElement(Nn,null);case"success":return"\u2705";case"error":return"\u274C"}},j=[{key:"p",shortcutLabel:"Open app preview",linkLabel:"Preview",url:f.previewURL,condition:()=>!!(f.isReady&&f.previewURL),action:async()=>{await H.addPublicMetadata(()=>({cmd_dev_preview_url_opened:!0})),f.previewURL&&await Z(f.previewURL)}},{key:"c",shortcutLabel:"Open Dev Console for extension previews",linkLabel:"Dev Console",url:Pt(o),condition:()=>!!(f.isReady&&f.appEmbedded===!1&&f.hasExtensions),action:async()=>{await H.addPublicMetadata(()=>({cmd_dev_preview_url_opened:!0})),await Z(Pt(o))}},{key:"g",shortcutLabel:"Open GraphiQL (Admin API)",linkLabel:"GraphiQL",url:f.graphiqlURL,condition:()=>!!(f.isReady&&f.graphiqlURL),action:async()=>{await H.addPublicMetadata(()=>({cmd_dev_graphiql_opened:!0})),f.graphiqlURL&&await Z(f.graphiqlURL)}}],q=j.filter(w=>w.condition?.()??!0),V={d:{label:"Dev status",shortcuts:j,content:x.default.createElement(x.default.Fragment,null,f.statusMessage&&x.default.createElement(S,null,z(f.statusMessage.type)," ",f.statusMessage.message),c&&q.length>0&&x.default.createElement(L,{marginTop:1,flexDirection:"column"},q.map(w=>x.default.createElement(S,{key:w.key},M.pointerSmall," ",x.default.createElement(S,{bold:!0},"(",w.key,")")," ",dt()&&w.url?x.default.createElement(ue,{url:w.url,label:w.shortcutLabel}):w.shortcutLabel))),x.default.createElement(L,{marginTop:c?1:0,flexDirection:"column"},m?x.default.createElement(S,null,m):x.default.createElement(x.default.Fragment,null,f.isReady&&!(c&&dt())&&x.default.createElement(x.default.Fragment,null,q.filter(w=>w.url).map(w=>x.default.createElement(S,{key:w.key},w.linkLabel," URL: ",x.default.createElement(ue,{url:w.url})))))))},a:{label:"App info",content:x.default.createElement(L,{flexDirection:"column"},x.default.createElement(ut,{tabularData:[["App:",s??""],["App URL:",n??""],["Local URL:",n?"":l??""],["Config:",i?.split("/").pop()??""],["Org:",a??""]].filter(([,w])=>w)}))},s:{label:"Store info",content:x.default.createElement(L,{flexDirection:"column"},x.default.createElement(ut,{tabularData:[["Dev store:",{link:{url:`https://${o}`}}],["Dev store admin:",{link:{url:`https://${o}/admin`}}],["Org:",a??""]].filter(([,w])=>w)}))},q:{label:"Quit",action:async()=>{t.abort()}}};return x.default.createElement(x.default.Fragment,null,x.default.createElement(Me,{processes:D,prefixColumnSize:jr,abortSignal:t.signal,keepRunningAfterProcessesResolve:!0,useAlternativeColorPalette:!0}),E&&x.default.createElement(L,{marginTop:1,flexDirection:"column"},x.default.createElement(Xt,{type:"info",headline:`A preview of your development changes is still available on ${o}.`,body:["Run",{command:"shopify app dev clean"},"to restore the latest released version of your app."],link:{label:"Learn more about dev previews",url:"https://shopify.dev/beta/developer-dashboard/shopify-app-dev"}})),P?null:x.default.createElement(L,{paddingTop:1,flexDirection:"column",flexGrow:1},c?x.default.createElement(Wn,{tabs:V,initialActiveTab:"d"}):x.default.createElement(L,{marginY:1,paddingTop:0,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},V.d?.content)),g?x.default.createElement(L,{marginTop:1,flexDirection:"column"},x.default.createElement(S,{color:"red"},g)):null)};var _t=oe(Pe(),1);async function Bn({processes:t,previewUrl:e,app:r,abortController:o,graphiqlUrl:n,graphiqlPort:s,developerPreview:a,shopFqdn:i,devSessionStatusManager:l,appURL:u,appName:c,organizationName:m,configPath:h,localURL:g}){if(!tr())await sa({processes:t,previewUrl:e,graphiqlUrl:n,app:r,abortController:o,developerPreview:a,shopFqdn:i});else return r.developerPlatformClient.supportsDevSessions?pt(_t.default.createElement(Hn,{processes:t,abortController:o,devSessionStatusManager:l,shopFqdn:i,appURL:u,appName:c,organizationName:m,configPath:h,localURL:g,onAbort:async()=>{await r.developerPlatformClient.devSessionDelete({appId:r.id,shopFqdn:i})}}),{exitOnCtrlC:!1}):pt(_t.default.createElement(Fn,{processes:t,abortController:o,previewUrl:e,app:r,graphiqlUrl:n,graphiqlPort:s,developerPreview:a,isEditionWeek:aa(),shopFqdn:i}),{exitOnCtrlC:!1})}async function sa({processes:t,previewUrl:e,graphiqlUrl:r,app:{canEnablePreviewMode:o},abortController:n,developerPreview:s}){return o&&(await s.enable(),n?.signal.addEventListener("abort",async()=>{await s.disable()})),process.stdout.write(`
|
|
18
|
-
Preview URL: ${e}
|
|
19
|
-
`),r&&process.stdout.write(`GraphiQL URL (Admin API): ${r}
|
|
20
|
-
`),Promise.all(t.map(async a=>{await a.action(process.stdout,process.stderr,n.signal)}))}function aa(){if(Re(process.env.IS_EDITION_WEEK))return!0;if(We())return!1;let t=new Date("2024-01-31T17:00:00.000Z"),e=new Date("2024-02-07T17:00:00.000Z"),r=new Date;return r>=t&&r<=e}p();function Gn(t){if(!t.length)return;let e=t.filter(n=>n.requested!==n.actual);if(e.length===0)return;if(e.length===1&&e[0]){let n=e[0];ne({headline:[`A random port will be used for ${n.for} because ${n?.requested} is not available.`],body:["If you want to use a specific port, you can choose a different one by setting the ",{command:n?.flagToRemedy}," flag."]});return}let r=ct(e.map(n=>n.for)).join(" "),o=ct(e.map(n=>({command:n.flagToRemedy})));ne({headline:[`Random ports will be used for ${r} because the requested ports are not available.`],body:["If you want to use specific ports, you can choose different ports using the",...o,"flags."]})}p();async function jn(t,e){return e?e.includes("localhost")?"localhost":(await Kt(t)).plugins.find(o=>e?.includes(o))??"custom":void 0}p();var Kn=oe(Zn(),1);var ie="v1.4.4",zn="FiloSottile/mkcert",Ct=U.genericShellCommand("mkcert");async function ia(t,e,r,o){let n=e[Ke.mkcertBinaryPath];if(n)return n;let a=T(t,r==="win32"?"mkcert.exe":"mkcert");if(await X(a))return a;let i=await(0,Kn.default)("mkcert",{nothrow:!0});return i?(y(R`Found ${Ct} at ${U.path(i)}`),i):(await ca(a,r,o),a)}async function ca(t,e,r){let o;switch(e){case"darwin":o=r==="arm64"?`mkcert-${ie}-darwin-arm64`:`mkcert-${ie}-darwin-amd64`;break;case"linux":o=r==="arm64"?`mkcert-${ie}-linux-arm64`:`mkcert-${ie}-linux-amd64`;break;case"win32":o=`mkcert-${ie}-windows-amd64.exe`;break;default:throw new me(`Unsupported platform: ${e}`)}await Wr(zn,ie,o,t),y(R`${Ct} saved to ${U.path(t)}`)}async function la(t){let e=T(t,"mkcert-LICENSE");if(await X(e))return;let r=`https://raw.githubusercontent.com/${zn}/refs/tags/${ie}/LICENSE`,o={headline:"Failed to download mkcert license.",body:["We tried to download the license for mkcert, but the request failed. You can ",{link:{url:r,label:"view the license here"}}]},n;try{if(n=await jt(r),!n.ok)return o}catch{return o}let s=await n.text();await _e(e,s)}async function Vn({appDirectory:t,env:e=process.env,platform:r=process.platform,arch:o=process.arch}){let n=T(".shopify","localhost-key.pem"),s=T(".shopify","localhost.pem"),a=T(t,n),i=T(t,s);if(await X(a)&&await X(i))return{keyContent:await I(a),certContent:await I(i),certPath:s};if(!await ao())throw new _(`Localhost certificate and key are required at ${s} and ${n}`);let u="",c;return await Ne([{title:"Finding or downloading mkcert binary",task:async()=>{let h=T(t,".shopify");u=await ia(h,e,r,o),c=await la(h),y(R`${Ct} found at: ${U.path(u)}`)}}]),c&&Oe(c),Q(R`Generating self-signed certificate for localhost. You may be prompted for your password.`),await qe(u,["-install","-key-file",a,"-cert-file",i,"localhost"]),Q(R`${U.successIcon()} Certificate generated at ${s}\n`),await rr()&&(ne({headline:"It looks like you're using WSL.",body:["Additional steps are required to configure certificate trust in Windows."],link:{label:"See Shopify CLI documentation",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options#localhost-based-development-with-windows-subsystem-for-linux-wsl"}}),Q("\u{1F449} Press any key to continue"),await Zt(),Q("")),{keyContent:await I(a),certContent:await I(i),certPath:Te(t,i)}}async function Qn(t){let e=await pa(t);await ua(e);let{processes:r,graphiqlUrl:o,previewUrl:n,devSessionStatusManager:s}=await Mn(e);await fa(e),await wa({processes:r,previewUrl:n,graphiqlUrl:o,config:e,devSessionStatusManager:s})}async function pa(t){let{app:e,remoteApp:r,developerPlatformClient:o,store:n,specifications:s,tunnel:a}=t,i;if(a.mode==="auto"){let E=await O();i=await oo(t.commandConfig,E,"cloudflare")}let l=await uo(r,o,s,r.flags);r.configuration=l,go({app:e,remoteApp:r,selectedStore:n,cachedInfo:yt(t.directory),organization:t.organization,tunnelMode:a.mode}),e.configuration.build?.dev_store_url&&(e.configuration.build={...e.configuration.build,dev_store_url:n.shopDomain},await(await sr.read(e.configPath)).patch({build:{dev_store_url:n.shopDomain}})),!t.skipDependenciesInstallation&&!t.project.usesWorkspaces&&await Br(t.project);let u=t.graphiqlPort??await O(be.graphiql),c=[{for:"GraphiQL",flagToRemedy:"--graphiql-port",requested:t.graphiqlPort??be.graphiql,actual:u}];a.mode==="use-localhost"&&c.push({for:"localhost",flagToRemedy:"--localhost-port",requested:a.requestedPort,actual:a.actualPort}),Gn(c);let{webs:m,...h}=await ga(e.directory,e.webs,u,a,i,r.configuration);e.webs=m;let g=e.configuration.build?.automatically_update_urls_on_dev,d=yt(t.directory)?.previousAppId,f=r.apiKey,v=await ha(m,t.update,h,e,g,r,f,o);return{storeFqdn:n.shopDomain,storeId:n.shopId,remoteApp:r,remoteAppUpdated:r.apiKey!==d,localApp:e,developerPlatformClient:o,commandOptions:t,network:h,partnerUrlsUpdated:v,graphiqlPort:u,graphiqlKey:t.graphiqlKey}}async function ua(t){await da(t),await ma(t)}async function da({localApp:t,remoteApp:e,developerPlatformClient:r,commandOptions:o}){if(r.supportsDevSessions)return;let n=t.configuration.access_scopes,s=e.configuration?.access_scopes,a=u=>u&&u.split(",").map(c=>c.trim()).sort().join(","),i=a(n?.scopes),l=a(s?.scopes);if(!n?.use_legacy_install_flow&&i!==l){let u=[["Run",{command:nr(o.project.packageManager,"shopify app deploy")},"to push your scopes to the Partner Dashboard"]];ne({headline:["The scopes in your TOML don't match the scopes in your Partner Dashboard"],body:[`Scopes in ${Lt(t.configPath)}:`,Yn(zr(t.configuration)),`
|
|
21
|
-
`,"Scopes in Partner Dashboard:",Yn(s?.scopes?.split(",")??[])],nextSteps:u})}}async function ma(t){let{developerPlatformClient:e,remoteApp:r}=t;if(!e.supportsDevSessions)return;(await e.appExtensionRegistrations(r)).app.extensionRegistrations.filter(n=>n.type.toLowerCase()!=="webhook_subscription").every(n=>n.id)||mo()}async function fa(t){Jr({directory:t.commandOptions.directory,previousAppId:t.remoteApp.apiKey}),await va({devOptions:t.commandOptions,tunnelUrl:t.network.proxyUrl,shouldUpdateURLs:t.partnerUrlsUpdated,storeFqdn:t.storeFqdn}),await Qt({config:t.commandOptions.commandConfig,exitMode:"ok"})}async function ha(t,e,r,o,n,s,a,i){let{backendConfig:l,frontendConfig:u}=ae(t),c=!1;if((u??l)&&e){let m=Zr(r.proxyUrl,t.map(({configuration:h})=>h.auth_callback_path).find(h=>h),o.configuration.app_proxy);c=await ro({currentURLs:r.currentUrls,appDirectory:o.directory,cachedUpdateURLs:n,newApp:s.newApp,localApp:o,apiKey:a,newURLs:m,developerPlatformClient:i}),c&&(i.supportsDevSessions?o.setDevApplicationURLs(m):await eo(m,a,i,o))}return c}async function ga(t,e,r,o,n,s){let{backendConfig:a,frontendConfig:i}=ae(e);await Pa(e,r);let l=o.mode==="use-localhost"?{noTunnelUseLocalhost:!0,port:o.actualPort}:{noTunnelUseLocalhost:!1,tunnelUrl:o.mode==="custom"?o.url:void 0,tunnelClient:n},[{frontendUrl:u,frontendPort:c,usingLocalhost:m},h,g]=await Promise.all([Xr(l),Ht()??a?.configuration.port??O(),to(s)]),d=m?`${u}:${c}`:u,f=i?.configuration.port;i&&(f??(f=i===a?h:await O()),i.configuration.port=f),f=f??await O();let v;if(o.mode==="use-localhost"){let{keyContent:E,certContent:A,certPath:P}=await Vn({appDirectory:t});v={key:E,cert:A,certPath:P,port:o.actualPort}}return{proxyUrl:d,proxyPort:c,frontendPort:f,backendPort:h,currentUrls:g,webs:e,reverseProxyCert:v}}async function wa({processes:t,previewUrl:e,graphiqlUrl:r,config:o,devSessionStatusManager:n}){let s=new Nt,a=t.map(c=>({prefix:c.prefix,action:async(h,g,d)=>{let f=c.function;return f({stdout:h,stderr:g,abortSignal:d},c.options)}})),i=o.remoteApp.apiKey,l=o.developerPlatformClient,u={canEnablePreviewMode:l.supportsDevSessions?!1:await Yo({localApp:o.localApp,developerPlatformClient:l,apiKey:i,organizationId:o.remoteApp.organizationId}),developmentStorePreviewEnabled:o.remoteApp.developmentStorePreviewEnabled,apiKey:i,id:o.remoteApp.id,developerPlatformClient:l,extensions:o.localApp.allExtensions};return Bn({processes:a,previewUrl:e,graphiqlUrl:r,graphiqlPort:o.graphiqlPort,app:u,abortController:s,developerPreview:ya(i,l),shopFqdn:o.storeFqdn,devSessionStatusManager:n,appURL:o.localApp.devApplicationURLs?.applicationUrl,appName:o.remoteApp.title,organizationName:o.commandOptions.organization.businessName,configPath:o.localApp.configPath,localURL:o.network.proxyUrl})}function ya(t,e){return e.supportsDevSessions?{fetchMode:()=>Promise.resolve(!1),enable:()=>Promise.resolve(!1),disable:()=>Promise.resolve(),update:()=>Promise.resolve(!1)}:{fetchMode:async()=>!!await po(t,e),enable:async()=>wo({apiKey:t,developerPlatformClient:e}),disable:async()=>yo({apiKey:t,developerPlatformClient:e}),update:async r=>vo({apiKey:t,developerPlatformClient:e,enabled:r})}}async function va(t){let e=await jn(t.devOptions.commandConfig,t.tunnelUrl);await H.addPublicMetadata(()=>({cmd_dev_tunnel_type:e,cmd_dev_tunnel_custom_hash:e==="custom"?lt(t.tunnelUrl):void 0,cmd_dev_urls_updated:t.shouldUpdateURLs,store_fqdn_hash:lt(t.storeFqdn),store_domain:t.storeFqdn,cmd_app_dependency_installation_skipped:t.devOptions.skipDependenciesInstallation})),await H.addSensitiveMetadata(()=>({store_fqdn:t.storeFqdn,cmd_dev_tunnel_custom:e==="custom"?t.tunnelUrl:void 0}))}function Yn(t){return{list:{items:t.length===0?["No scopes"]:t}}}async function Pa(t,e){let r=t.map(n=>n.configuration.port).filter(n=>n),o=r.find((n,s)=>r.indexOf(n)!==s);if(o)throw new _(`Found port ${o} for multiple webs.`,"Please define a unique port for each web.");await Promise.all([...r.map(async n=>{if(!await mt(n))throw new _(`Hard-coded port ${n} is not available, please choose a different one.`)}),(async()=>{if(!await mt(e)){let s=`Port ${e} is not available for serving GraphiQL.`,a=["Choose a different port for the",{command:"--graphiql-port"},"flag."];throw new _(s,a)}})()])}p();async function Jn({useLocalhost:t,localhostPort:e,tunnelUrl:r}){if(r)return{mode:"custom",url:r};if(!t&&!e)return{mode:"auto"};let o=e??be.localhost,n=await O(o);if(e&&n!==o){let s=`Port ${e} is not available.`,a=["Choose a different port for the",{command:"--localhost-port"},"flag."];throw new _(s,a)}return{mode:"use-localhost",requestedPort:o,actualPort:n}}var G=oe(Xn(),1);var It,re=class extends xo{static analyticsStopCommand(){return"app dev stop"}async run(){let{flags:e}=await this.parse(It),r=await Jn({useLocalhost:e["use-localhost"],tunnelUrl:e["tunnel-url"],localhostPort:e["localhost-port"]});await Jt(()=>({cmd_app_dependency_installation_skipped:e["skip-dependencies-installation"],cmd_app_reset_used:e.reset,cmd_dev_tunnel_type:r.mode})),await no(e.path);let o=await Po({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),n=await Eo({appContextResult:o,storeFqdn:e.store,forceReselectStore:e.reset}),s={...o,store:n,directory:e.path,update:!e["no-update"],skipDependenciesInstallation:e["skip-dependencies-installation"],commandConfig:this.config,subscriptionProductUrl:e["subscription-product-url"],checkoutCartUrl:e["checkout-cart-url"],theme:e.theme,themeExtensionPort:e["theme-app-extension-port"],notify:e.notify,graphiqlPort:e["graphiql-port"],graphiqlKey:e["graphiql-key"],tunnel:r};return await Qn(s),{app:o.app}}};It=re;re.summary="Run the app.";re.descriptionWithMarkdown="Builds and previews your app on a dev store, and watches for changes. [Read more about testing apps locally](https://shopify.dev/docs/apps/build/cli-for-apps/test-apps-locally).";re.description=It.descriptionWithoutMarkdown();re.flags={...ar,...Hr,store:G.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",parse:async t=>De(t)}),"skip-dependencies-installation":G.Flags.boolean({description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1}),"no-update":G.Flags.boolean({description:"Uses the app URL from the toml file instead an autogenerated URL for dev.",env:"SHOPIFY_FLAG_NO_UPDATE",default:!1}),"subscription-product-url":G.Flags.string({description:'Resource URL for subscription UI extension. Format: "/products/{productId}"',env:"SHOPIFY_FLAG_SUBSCRIPTION_PRODUCT_URL"}),"checkout-cart-url":G.Flags.string({description:'Resource URL for checkout UI extension. Format: "/cart/{productVariantID}:{productQuantity}"',env:"SHOPIFY_FLAG_CHECKOUT_CART_URL"}),"tunnel-url":G.Flags.string({description:'Use a custom tunnel, it must be running before executing dev. Format: "https://my-tunnel-url:port".',env:"SHOPIFY_FLAG_TUNNEL_URL",exclusive:["tunnel"]}),"use-localhost":G.Flags.boolean({description:"Service entry point will listen to localhost. A tunnel won't be used. Will work for testing many app features, but not those that directly invoke your app (E.g: Webhooks)",env:"SHOPIFY_FLAG_USE_LOCALHOST",default:!1,exclusive:["tunnel-url"]}),"localhost-port":Be({description:"Port to use for localhost.",env:"SHOPIFY_FLAG_LOCALHOST_PORT"}),theme:G.Flags.string({char:"t",description:"Theme ID or name of the theme app extension host theme.",env:"SHOPIFY_FLAG_THEME"}),"theme-app-extension-port":Be({description:"Local port of the theme app extension development server.",env:"SHOPIFY_FLAG_THEME_APP_EXTENSION_PORT"}),notify:G.Flags.string({description:"The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.",env:"SHOPIFY_FLAG_NOTIFY"}),"graphiql-port":Be({hidden:!0,description:"Local port of the GraphiQL development server.",env:"SHOPIFY_FLAG_GRAPHIQL_PORT"}),"graphiql-key":G.Flags.string({hidden:!0,description:"Key used to authenticate GraphiQL requests. By default, a key is automatically derived from the app secret. Use this flag to override with a custom key.",env:"SHOPIFY_FLAG_GRAPHIQL_KEY"})};var tm=re;export{oi as a,tm as b};
|
package/dist/chunk-VRRDIXFQ.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{j as W,l as B}from"./chunk-LUG2BZJP.js";import{O as v,a as O}from"./chunk-E24W34C4.js";import{f as h}from"./chunk-3QVXHF6I.js";import{d as u,g as T}from"./chunk-ELIH6GCC.js";import{$a as S,Bb as L,Fb as o,Hb as s,Pb as d,Ta as w,Ua as i,Wa as D,ma as x,ua as b}from"./chunk-EYDNSYYE.js";import{d as c,i as k}from"./chunk-773TIA5M.js";import{a as I}from"./chunk-CX5CC6P5.js";import{e as R,g}from"./chunk-VKWPEFWQ.js";g();g();function M(e,n){try{return JSON.parse(e)}catch(a){let r=a instanceof Error?a.message:String(a),t=n?` from ${n}`:"";throw new u(`Failed to parse JSON${t}.
|
|
2
|
-
${r}`)}}var l=R(I(),1),N="yarn.lock",j="package-lock.json",J="pnpm-lock.yaml",$="bun.lockb",C="bun.lock",V="pnpm-workspace.yaml",ke=[N,J,j,$,C],we={yarn:[N],npm:[j],pnpm:[J],bun:[$,C],homebrew:[],unknown:[]},E=["yarn","npm","pnpm","bun","homebrew","unknown"],_=class extends u{constructor(){super("Unknown package manager")}},y=class extends u{constructor(n){super(s`The directory ${o.path(n)} doesn't have a package.json.`)}},P=class extends T{constructor(n){super(s`Couldn't find a a package.json traversing directories from ${o.path(n)}`)}};function A(e=process.env){return e.npm_config_user_agent?.includes("yarn")?"yarn":e.npm_config_user_agent?.includes("pnpm")?"pnpm":e.npm_config_user_agent?.includes("bun")?"bun":e.npm_config_user_agent?.includes("npm")?"npm":"unknown"}function U(e){return i(c(e,$))||i(c(e,C))}function G(e){switch(e){case"yarn":case"npm":case"pnpm":case"bun":return e;case"homebrew":case"unknown":return"npm"}}function K(e,n,...a){switch(e){case"npm":return{command:"npm",args:["exec","--",n,...a]};case"pnpm":return{command:"pnpm",args:["exec",n,...a]};case"yarn":return{command:"yarn",args:["run",n,...a]};case"bun":return{command:"bun",args:["x",n,...a]}}}async function F(e){let n=e;for(d(s`Looking for a lockfile in ${o.path(n)}...`);;){if(i(c(n,N)))return"yarn";if(i(c(n,J))||i(c(n,V)))return"pnpm";if(U(n))return"bun";if(i(c(n,j)))return"npm";let r=k(n);if(r===n)break;n=r}let a=A();return a!=="unknown"?a:"npm"}async function he(e,n,...a){let r=G(await F(e));return K(r,n,...a)}async function ye(e){let n=await D(c(e.directory,"**/package.json"),{ignore:[c(e.directory,"node_modules/**/package.json")],cwd:e.directory,onlyFiles:!0,deep:e.deep}),a=new O;try{await Promise.all(n.map(async r=>{let t=k(r);await z({directory:t,packageManager:e.packageManager,stdout:void 0,stderr:void 0,signal:a.signal,args:[]})}))}catch(r){throw a.abort(),r}}async function z(e){let n={cwd:e.directory,stdin:void 0,stdout:e.stdout,stderr:e.stderr,signal:e.signal},a=["install"];e.args&&(a=a.concat(e.args)),await h("cmd_all_timing_network_ms")(async()=>{await v(e.packageManager,a,n)})}async function xe(e){return(await f(e)).name}async function be(e){return(await f(e)).version}async function H(e){let n=await f(e),a=n.dependencies??{},r=n.devDependencies??{};return{...a,...r}}async function ve(e){let n=c(e,"package.json"),a=await f(n),r=c(e,V);return!!a.workspaces||w(r)}async function Me(e,n,{cacheExpiryInHours:a=0}={}){let r=async()=>(d(s`Checking if there's a version of ${e} newer than ${n}`),ne(e)),t=`npm-package-${e}`,p;try{p=await W(t,r,a*3600*1e3)}catch{return}if(p&&new l.SemVer(n).compare(p)<0)return p}function _e(e,n){let a=`npm-package-${e}`,r=B(a)?.value;if(r&&new l.SemVer(n).compare(r)<0)return r}function Pe(e,n){return(0,l.satisfies)(e,n)}async function f(e){if(!await w(e))throw new y(k(e));return M(await x(e),e)}async function Y(e,n){d(s`Adding the following dependencies if needed:
|
|
3
|
-
${o.json(e)}
|
|
4
|
-
With options:
|
|
5
|
-
${o.json(n)}
|
|
6
|
-
`);let a=c(n.directory,"package.json");if(!await w(a))throw new y(n.directory);let r=Object.keys(await H(a)),t=e.filter(p=>!r.includes(p.name));t.length!==0&&await q(t,n)}async function q(e,n){let a=e.map(r=>r.version?`${r.name}@${r.version}`:r.name);switch(n.stdout?.write(`Installing ${a.join(" ")} with ${n.packageManager}`),n.packageManager){case"npm":for(let r of a)await m(n,Q(r,n.type));break;case"yarn":await m(n,X(a,n.type,!!n.addToRootDirectory));break;case"pnpm":await m(n,Z(a,n.type,!!n.addToRootDirectory));break;case"bun":await m(n,ee(a,n.type)),await m(n,["install"]);break;case"homebrew":throw new u("Homebrew can't be used to install project dependencies. Use npm, yarn, pnpm, or bun.");case"unknown":throw new _}}async function m(e,n){return h("cmd_all_timing_network_ms")(async()=>v(e.packageManager,n,{cwd:e.directory,stdout:e.stdout,stderr:e.stderr,signal:e.signal}))}async function Ne(e,n){await Y(e.map(a=>({name:a,version:void 0})),n)}function Q(e,n){let a=["install"];switch(a=a.concat(e),n){case"dev":a.push("--save-dev");break;case"peer":a.push("--save-peer");break;case"prod":a.push("--save-prod");break}return e.match(/@\d/g)&&a.push("--save-exact"),a}function X(e,n,a=!1){let r=["add"];switch(a&&r.push("-W"),r=r.concat(e),n){case"dev":r.push("--dev");break;case"peer":r.push("--peer");break;case"prod":r.push("--prod");break}return r}function Z(e,n,a=!1){let r=["add"];switch(a&&r.push("-w"),r=r.concat(e),n){case"dev":r.push("--save-dev");break;case"peer":r.push("--save-peer");break;case"prod":r.push("--save-prod");break}return r}function ee(e,n){let a=["add"];switch(a=a.concat(e),n){case"dev":a.push("--development");break;case"peer":a.push("--optional");break;case"prod":break}return a}async function je(e){let n=await S("package.json",{cwd:e,type:"file"});if(n){let a=M(await x(n),n);return{path:n,content:a}}else throw new P(e)}async function Je(e,n){let a=await F(e),r=c(e,"package.json"),t=await f(r);a==="yarn"&&(t.resolutions=t.resolutions?{...t.resolutions,...n}:n),(a==="npm"||a==="pnpm"||a==="bun")&&(t.overrides=t.overrides?{...t.overrides,...n}:n),await b(r,JSON.stringify(t,null,2))}async function ne(e){return d(s`Getting the latest version of NPM package: ${o.raw(e)}`),h("cmd_all_timing_network_ms")(async()=>{let{default:n}=await import("./latest-version-32HXMWJ7.js");return n(e)})}async function $e(e,n){d(s`JSON-encoding and writing content to package.json at ${o.path(e)}...`);let a=c(e,"package.json");await b(a,JSON.stringify(n,null,2))}function Ce(e,n=process.env){if(e&&E.includes(e))return e;let a=A(n);if(a!=="unknown")return a;let r=L();return r!=="unknown"?r:"npm"}export{N as a,j as b,J as c,$ as d,V as e,ke as f,we as g,E as h,_ as i,y as j,P as k,A as l,F as m,he as n,ye as o,z as p,xe as q,be as r,H as s,ve as t,Me as u,_e as v,Pe as w,f as x,Y as y,q as z,Ne as A,je as B,Je as C,$e as D,Ce as E};
|
package/dist/chunk-YB3SGPFF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-PGODIZ64.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
|
package/dist/chunk-YJCJDCVP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-RFDT525K.js";import{g as r,h,i as n}from"./chunk-PTIJDS6I.js";import{d as m}from"./chunk-ELIH6GCC.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var c=t=>`Development theme #${t} could not be found. Please create a new development theme.`,i="No development theme ID has been set. Please create a development theme first.",p=class extends s{constructor(e){super(e),this.context="Development",this.themeId=r()}async find(){let e=await this.fetch();if(!e)throw new m(this.themeId?c(this.themeId):i);return e}setTheme(e){h(e)}removeTheme(){n()}};export{p as a};
|
package/dist/chunk-ZDQNCYRH.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-JOYM7AEQ.js";import{a as v}from"./chunk-6ZRHK4ON.js";import{a as m}from"./chunk-7XQDZF73.js";import{Fa as c}from"./chunk-UZ7U322K.js";import{z as n}from"./chunk-2HZMOK4U.js";import{b as l}from"./chunk-Q6LCSRIW.js";import{v as d}from"./chunk-E24W34C4.js";import{d as a}from"./chunk-ELIH6GCC.js";import{r as x}from"./chunk-T6CC5WUU.js";import{e as S,g as p}from"./chunk-VKWPEFWQ.js";p();p();async function f(o){let e=o.appContextResult.developerPlatformClient,r=o.appContextResult.remoteApp;if(!e.supportsDevSessions)throw new a("Dev preview is not supported for this app. It's valid only for apps created on the Next-Gen Dev Platform.");let s=await e.devSessionDelete({shopFqdn:o.store.shopDomain,appId:r.id});if(s.devSessionDelete?.userErrors.length){let u=s.devSessionDelete.userErrors.map(g=>g.message).join(`
|
|
2
|
-
`);throw new a(`Failed to stop the dev preview: ${u}`)}d({headline:"Dev preview stopped.",body:[`The dev preview has been stopped on ${o.store.shopDomain} and the app's active version has been restored.`,"You can start it again with",{command:"shopify app dev"}]})}var w=S(x(),1);var i,t=class extends v{async run(){let{flags:e}=await this.parse(i),r=await c({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),s=await h({appContextResult:r,storeFqdn:e.store,forceReselectStore:e.reset});return await f({appContextResult:r,store:s}),{app:r.app}}};i=t;t.summary="Cleans up the dev preview from the selected store.";t.descriptionWithMarkdown=`Stop the dev preview that was started with \`shopify app dev\`.
|
|
3
|
-
|
|
4
|
-
It restores the app's active version to the selected development store.
|
|
5
|
-
`;t.description=i.descriptionWithoutMarkdown();t.flags={...l,...m,store:w.Flags.string({hidden:!1,char:"s",description:"Store URL. Must be an existing development store.",env:"SHOPIFY_FLAG_STORE",parse:async o=>n(o)})};var q=t;export{q as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r}from"./chunk-LUG2BZJP.js";import"./chunk-4TC4M4RC.js";import"./chunk-RJ5VF3QY.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{j as cacheClear,i as cacheRetrieve,g as cacheRetrieveOrRepopulate,h as cacheStore,n as getAutoUpgradeEnabled,q as getCachedPartnerAccountStatus,p as getConfigStoreForPartnerStatus,d as getCurrentSessionId,a as getSessions,f as removeCurrentSessionId,c as removeSessions,l as runAtMinimumInterval,m as runWithRateLimit,o as setAutoUpgradeEnabled,r as setCachedPartnerAccountStatus,e as setCurrentSessionId,b as setSessions,k as timeIntervalToMilliseconds};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import{e as d,g as r}from"./chunk-VKWPEFWQ.js";r();var u=d(e(),1),i=class extends u.Config{setLazyCommandLoader(n){this.lazyCommandLoader=n}async runCommand(n,a=[],t=null){if(this.lazyCommandLoader){let m=t??this.findCommand(n);if(m){let o=await this.lazyCommandLoader(n);if(o){o.id=n,o.plugin=m.plugin??this.rootPlugin,await this.runHook("prerun",{argv:a,Command:o});let s=await o.run(a,this);return await this.runHook("postrun",{argv:a,Command:o,result:s}),s}}}return super.runCommand(n,a,t)}};export{i as ShopifyConfig};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-ZDF5N422.js";import{w as a}from"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();var f=t=>{let e=r();if(e){let o=t.id.includes("theme");s(e,o)}};function s(t,e){let i=`Upgrade to the latest CLI version by ${new Intl.DateTimeFormat("default",{year:"numeric",month:"long",day:"numeric"}).format(t)}.`;a({headline:i,body:"This command requires an upgrade to continue working as intended.",nextSteps:[["Run",{command:"upgrade"},"to",{link:{label:"upgrade Shopify CLI",url:e?"https://shopify.dev/docs/themes/tools/cli#upgrade-shopify-cli":"https://shopify.dev/docs/apps/tools/cli#upgrade-shopify-cli"}}]]})}export{f as postrun};
|
package/dist/dist-3SP7TISC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-XU6CCL4P.js";import"./chunk-IHUCBI6L.js";import"./chunk-XWPPBOGF.js";import"./chunk-FKIVKNOV.js";import"./chunk-KRZABRYT.js";import"./chunk-6XLVKD6Q.js";import"./chunk-VSZS3FAJ.js";import"./chunk-JVMYTC3J.js";import"./chunk-MQXSMZQZ.js";import"./chunk-VDN6MEYI.js";import"./chunk-VJEKDBGZ.js";import"./chunk-F3TMLDLC.js";import"./chunk-2HZMOK4U.js";import"./chunk-ZDF5N422.js";import"./chunk-MPW2YJWU.js";import"./chunk-VRRDIXFQ.js";import"./chunk-LUG2BZJP.js";import"./chunk-J3KRY2SD.js";import"./chunk-ODH2U44N.js";import"./chunk-T7KHS6RF.js";import"./chunk-4TC4M4RC.js";import"./chunk-IDKUJQIG.js";import"./chunk-WW7TENNA.js";import"./chunk-5C7HDTHJ.js";import"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{a as COMMANDS,b as HOOKS};
|
package/dist/dist-Z4H2OM7V.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-AH2ZJ73H.js";import"./chunk-4TC4M4RC.js";import"./chunk-IDKUJQIG.js";import"./chunk-WW7TENNA.js";import"./chunk-5C7HDTHJ.js";import"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{c as DidYouMeanCommands,d as DidYouMeanHook,a as findAlternativeCommand,b as shouldRunCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-O2PI2PYG.js";import"./chunk-ASOT7VNB.js";import"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{b as environmentFilePath,a as loadEnvironment};
|
package/dist/error-ZBG2MA5U.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";var export_ExtendableError=l.ExtendableError;export{d as AbortError,f as AbortSilentError,g as BugError,b as CancelExecution,export_ExtendableError as ExtendableError,e as ExternalError,c as FatalError,a as FatalErrorType,k as cleanSingleStackTracePath,i as errorMapper,h as handler,j as shouldReportErrorAsUnexpected};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ea as a,Fa as b,Ga as c,Ha as d,Ia as e}from"./chunk-2HZMOK4U.js";import"./chunk-ZDF5N422.js";import"./chunk-MPW2YJWU.js";import"./chunk-VRRDIXFQ.js";import"./chunk-LUG2BZJP.js";import"./chunk-J3KRY2SD.js";import"./chunk-ODH2U44N.js";import"./chunk-T7KHS6RF.js";import"./chunk-4TC4M4RC.js";import"./chunk-5C7HDTHJ.js";import"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{e as addBugsnagMetadata,c as cleanStackFrameFilePath,a as errorHandler,d as registerCleanBugsnagErrorsFromWithinPlugins,b as sendErrorToBugsnag};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ab as c,Bb as d,Cb as e,yb as a,zb as b}from"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{a as currentProcessIsGlobal,e as getProjectDir,d as inferPackageManagerForGlobalCLI,c as installGlobalCLIPrompt,b as installGlobalShopifyCLI};
|
package/dist/lib-QJDPPAWN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a}from"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export default a();
|
package/dist/lib-UCG2DNMS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-TC3JOEMA.js";import"./chunk-XWPPBOGF.js";import"./chunk-IWOTLFOY.js";import"./chunk-EJDWYASP.js";import"./chunk-A4SBXDZB.js";import"./chunk-AAK376RT.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{a as commands};
|
package/dist/local-5AKD7T5X.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v}from"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-VKWPEFWQ.js";export{h as alwaysLogAnalytics,i as alwaysLogMetrics,g as analyticsDisabled,k as canRunDoctorRelease,s as ciPlatform,q as cloudEnvironment,n as codespacePortForwardingDomain,m as codespaceURL,j as firstPartyDev,u as getThemeKitAccessDomain,l as gitpodURL,r as hasGit,b as homeDirectory,o as isCloudEnvironment,c as isDevelopment,e as isShopify,a as isTerminalInteractive,f as isUnitTest,d as isVerbose,t as macAddress,v as opentelemetryDomain,p as themeToken};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a}from"./chunk-4TC4M4RC.js";import"./chunk-RJ5VF3QY.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{a as LocalStorage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A,B,C,D,E,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-VRRDIXFQ.js";import"./chunk-LUG2BZJP.js";import"./chunk-4TC4M4RC.js";import"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{k as FindUpAndReadPackageJsonNotFoundError,j as PackageJsonNotFoundError,i as UnknownPackageManagerError,z as addNPMDependencies,y as addNPMDependenciesIfNeeded,A as addNPMDependenciesWithoutVersionIfNeeded,C as addResolutionOrOverride,d as bunLockfile,v as checkForCachedNewVersion,u as checkForNewVersion,B as findUpAndReadPackageJson,s as getDependencies,m as getPackageManager,q as getPackageName,r as getPackageVersion,E as inferPackageManager,o as installNPMDependenciesRecursively,p as installNodeModules,f as lockfiles,g as lockfilesByManager,b as npmLockfile,h as packageManager,n as packageManagerBinaryCommandForDirectory,l as packageManagerFromUserAgent,c as pnpmLockfile,e as pnpmWorkspaceFile,x as readAndParsePackageJson,t as usesWorkspaces,w as versionSatisfies,D as writePackageJSON,a as yarnLockfile};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk-ZNWFTUFV.js";import"./chunk-2HZMOK4U.js";import"./chunk-ZDF5N422.js";import"./chunk-MPW2YJWU.js";import"./chunk-VRRDIXFQ.js";import"./chunk-LUG2BZJP.js";import"./chunk-J3KRY2SD.js";import"./chunk-ODH2U44N.js";import"./chunk-T7KHS6RF.js";import"./chunk-4TC4M4RC.js";import"./chunk-WW7TENNA.js";import"./chunk-5C7HDTHJ.js";import"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{c as fetchNotifications,d as fetchNotificationsInBackground,e as filterNotifications,b as getNotifications,a as showNotificationsIfNeeded,f as stringifyFilters};
|
package/dist/out-CDCY25QC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a}from"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-VKWPEFWQ.js";export default a();
|
package/dist/system-KDM2BB7R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as a,K as b,L as c,M as d,N as e,O as f,P as g,Q as h,R as i,S as j,T as k,U as l,V as m}from"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{d as captureCommandWithExitCode,b as captureOutput,c as captureOutputWithExitCode,f as exec,e as execCommand,j as isCI,l as isStdinPiped,k as isWsl,a as openURL,m as readStdinString,g as sleep,h as terminalSupportsHyperlinks,i as terminalSupportsPrompting};
|
package/dist/ui-QIHGXICT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as j,B as k,C as l,D as m,E as n,F as o,G as p,H as q,I as r,i as a,j as b,t as c,u as d,v as e,w as f,x as g,y as h,z as i}from"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{b as handleCtrlC,r as isTTY,q as keypress,a as render,k as renderAutocompletePrompt,c as renderConcurrent,j as renderConfirmationPrompt,p as renderDangerousConfirmationPrompt,g as renderError,h as renderFatalError,d as renderInfo,i as renderSelectPrompt,n as renderSingleTask,e as renderSuccess,l as renderTable,m as renderTasks,o as renderTextPrompt,f as renderWarning};
|
package/dist/upgrade-DY4L43H4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,b as d,c as e,d as f,e as g,f as h}from"./chunk-ZHPXJRHR.js";import"./chunk-ICFFBMFB.js";import"./chunk-ZNWFTUFV.js";import"./chunk-2HZMOK4U.js";import"./chunk-ZDF5N422.js";import"./chunk-MPW2YJWU.js";import"./chunk-VRRDIXFQ.js";import{q as a,r as b}from"./chunk-LUG2BZJP.js";import"./chunk-J3KRY2SD.js";import"./chunk-ODH2U44N.js";import"./chunk-T7KHS6RF.js";import"./chunk-4TC4M4RC.js";import"./chunk-WW7TENNA.js";import"./chunk-5C7HDTHJ.js";import"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{c as cliInstallCommand,a as getAutoUpgradeEnabled,h as getOutputUpdateCLIReminder,f as hasBlockingAutoUpgradeNotification,d as runCLIUpgrade,b as setAutoUpgradeEnabled,e as versionToAutoUpgrade,g as warnIfUpgradeAvailable};
|
package/dist/version-LULWCT5R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-ICFFBMFB.js";import"./chunk-E24W34C4.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7USHLXEN.js";import"./chunk-3QVXHF6I.js";import"./chunk-ELIH6GCC.js";import"./chunk-EYDNSYYE.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-JCNRQYRP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{b as globalCLIVersion,d as isMajorVersionChange,c as isPreReleaseVersion,a as localCLIVersion};
|
package/dist/version-WIERCO5R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-J3KRY2SD.js";import"./chunk-VKWPEFWQ.js";export{a as CLI_KIT_VERSION};
|