@shopify/cli 4.5.1 → 4.5.2
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-CIKTYXZ6.js → analytics-M7ZU437S.js} +1 -1
- package/dist/{analytics-DM7CBV2M.js → analytics-ZRM4FEOE.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-QMSYJIAU.js → chunk-23LZNWB5.js} +1 -1
- package/dist/{chunk-DE3WCNP6.js → chunk-2ACN7JIZ.js} +1 -1
- package/dist/{chunk-OCYPWE2O.js → chunk-2TJ6LOCC.js} +1 -1
- package/dist/{chunk-MQXSMZQZ.js → chunk-34SINZ7L.js} +1 -1
- package/dist/{chunk-ALQKJAHP.js → chunk-35FS2NTM.js} +1 -1
- package/dist/{chunk-GAYQKMOM.js → chunk-3EJGRQTH.js} +1 -1
- package/dist/{chunk-6Y3QXASG.js → chunk-3IFZECSI.js} +1 -1
- package/dist/{chunk-DQE7XRCK.js → chunk-3OCR7P3S.js} +1 -1
- package/dist/{chunk-XWQ72WTQ.js → chunk-42RVM4EZ.js} +1 -1
- package/dist/{chunk-UZ7U322K.js → chunk-4MLEL3VK.js} +1 -1
- package/dist/{chunk-PTIJDS6I.js → chunk-4P54DKG4.js} +1 -1
- package/dist/chunk-4ROX2TCK.js +1 -0
- package/dist/{chunk-P6S5YLOP.js → chunk-4UJNCOE6.js} +1 -1
- package/dist/{chunk-COTYR5RC.js → chunk-4VJ5VBSR.js} +1 -1
- package/dist/{chunk-5UXPTCSD.js → chunk-523SJVNT.js} +1 -1
- package/dist/{chunk-M2AS5BWX.js → chunk-5CV7GFWZ.js} +1 -1
- package/dist/{chunk-MKCXLBQ4.js → chunk-5GVE4ILZ.js} +1 -1
- package/dist/{chunk-U7ZRDNZU.js → chunk-5N7H4PJJ.js} +1 -1
- package/dist/{chunk-YJCJDCVP.js → chunk-5VC4XXYH.js} +1 -1
- package/dist/{chunk-ASOT7VNB.js → chunk-5VRU3BT5.js} +1 -1
- package/dist/{chunk-OVLTFTZW.js → chunk-6AWRW3GS.js} +1 -1
- package/dist/{chunk-CGULQAB5.js → chunk-6K4DVV37.js} +1 -1
- package/dist/{chunk-QDYDB7DY.js → chunk-6VR22Z5R.js} +1 -1
- package/dist/{chunk-7ZLKT2TB.js → chunk-6ZWMXMNM.js} +1 -1
- package/dist/{chunk-VSZS3FAJ.js → chunk-75DBVSVI.js} +1 -1
- package/dist/{chunk-3QVXHF6I.js → chunk-7AY6HLQG.js} +1 -1
- package/dist/{chunk-H7DDRARV.js → chunk-7AYYQUJG.js} +1 -1
- package/dist/{chunk-ZHPXJRHR.js → chunk-7KWBVZPI.js} +1 -1
- package/dist/{chunk-5JCREGSD.js → chunk-7PVNAILK.js} +1 -1
- package/dist/{chunk-3SJHCEQR.js → chunk-7RJPTSL6.js} +1 -1
- package/dist/{chunk-72K36DID.js → chunk-7TQ6HVHN.js} +1 -1
- package/dist/{chunk-MOCD7GFI.js → chunk-AAK3WGD7.js} +1 -1
- package/dist/{chunk-XU6CCL4P.js → chunk-AATUQ2AY.js} +2 -2
- package/dist/{chunk-VHAZBDFE.js → chunk-ADKFAPED.js} +1 -1
- package/dist/{chunk-IIHPONSQ.js → chunk-ANH2V6DJ.js} +1 -1
- package/dist/{chunk-ZVQBSXE4.js → chunk-AUAUAK6P.js} +1 -1
- package/dist/chunk-B5MFFERE.js +1 -0
- package/dist/{chunk-AH2ZJ73H.js → chunk-BLSWUNOK.js} +1 -1
- package/dist/{chunk-E7OLCSAL.js → chunk-BQARKSGG.js} +1 -1
- package/dist/{chunk-BVFIJSD7.js → chunk-BUVP2UUA.js} +1 -1
- package/dist/{chunk-RIRSTGFU.js → chunk-BVWQZKNK.js} +1 -1
- package/dist/{chunk-NGPJXONG.js → chunk-CEBDKIVH.js} +1 -1
- package/dist/{chunk-UHJ65YFN.js → chunk-CX44CQFL.js} +1 -1
- package/dist/{chunk-UB5BVO76.js → chunk-DELISRUH.js} +1 -1
- package/dist/{chunk-6XLVKD6Q.js → chunk-DI5ZPWNA.js} +1 -1
- package/dist/{chunk-JO4ZHVOD.js → chunk-DIPTSBQM.js} +1 -1
- package/dist/{chunk-5NY4HKJF.js → chunk-DN3BB4IO.js} +2 -2
- package/dist/{chunk-RFDT525K.js → chunk-DZMXYETH.js} +1 -1
- package/dist/{chunk-DKKBJ4H5.js → chunk-EAOT5CK5.js} +1 -1
- package/dist/{chunk-E24W34C4.js → chunk-EEEKSYWV.js} +1 -1
- package/dist/{chunk-GXUZ3V7S.js → chunk-EOJNSPIH.js} +1 -1
- package/dist/{chunk-GQG6WELZ.js → chunk-FSVSM57K.js} +1 -1
- package/dist/{chunk-HXYWEKMS.js → chunk-G6BFXMOV.js} +1 -1
- package/dist/{chunk-DA4LHFJQ.js → chunk-GMAZ2BQY.js} +1 -1
- package/dist/{chunk-DDVT2K7E.js → chunk-HOAVZLEG.js} +1 -1
- package/dist/{chunk-EDSKA6UB.js → chunk-HQE5B2CF.js} +1 -1
- package/dist/{chunk-KOB6T6NK.js → chunk-HSVZU7MP.js} +1 -1
- package/dist/{chunk-5PLLJPEW.js → chunk-HYF3VJYS.js} +1 -1
- package/dist/{chunk-5T3OVTF5.js → chunk-I5X3IP6T.js} +1 -1
- package/dist/{chunk-5U6MXSNY.js → chunk-ICRQZAXP.js} +1 -1
- package/dist/{chunk-ELIH6GCC.js → chunk-IIFRDOYG.js} +1 -1
- package/dist/{chunk-GKQ6CSJZ.js → chunk-JADXT2DY.js} +1 -1
- package/dist/{chunk-KC2TN7AR.js → chunk-JOKLZMTP.js} +1 -1
- package/dist/{chunk-BEXQB4RT.js → chunk-K4APB7O3.js} +1 -1
- package/dist/{chunk-SKM44SK5.js → chunk-KB6H5LQJ.js} +1 -1
- package/dist/{chunk-SRAHMYWJ.js → chunk-KFUOVO3X.js} +1 -1
- package/dist/{chunk-Q2X7IXPQ.js → chunk-KIAMA3L2.js} +1 -1
- package/dist/{chunk-KOUKBXOZ.js → chunk-KMQE7WFZ.js} +1 -1
- package/dist/{chunk-WO5YOBQ7.js → chunk-KPNNGJAW.js} +1 -1
- package/dist/{chunk-2WDKXDFM.js → chunk-KQTVJMV6.js} +1 -1
- package/dist/{chunk-QPJQ67GU.js → chunk-L42FYXFW.js} +144 -144
- package/dist/{chunk-PGKP7W5T.js → chunk-LGFOE4XL.js} +1 -1
- package/dist/{chunk-BZAZMLII.js → chunk-LSCDB36D.js} +1 -1
- package/dist/{chunk-ZNWFTUFV.js → chunk-LVLDPYH5.js} +1 -1
- package/dist/{chunk-O2PI2PYG.js → chunk-LXOBFJZO.js} +1 -1
- package/dist/{chunk-PGN5EZTI.js → chunk-MC466GSO.js} +2 -2
- package/dist/{chunk-TXJEP4FB.js → chunk-ML6SILEL.js} +1 -1
- package/dist/{chunk-EAXEV45I.js → chunk-MYQTAM77.js} +1 -1
- package/dist/{chunk-YBFCDINU.js → chunk-N6IFIMC6.js} +1 -1
- package/dist/{chunk-Q6LCSRIW.js → chunk-NGCPVRDM.js} +1 -1
- package/dist/{chunk-YYHCPLBX.js → chunk-NIVGP4LB.js} +1 -1
- package/dist/{chunk-IHUCBI6L.js → chunk-NSADN5S2.js} +1 -1
- package/dist/{chunk-FO6FNY6P.js → chunk-NVA2354A.js} +1 -1
- package/dist/{chunk-AI756VJI.js → chunk-NWH3TAHK.js} +1 -1
- package/dist/{chunk-MMKBIMMC.js → chunk-NYG2VQFQ.js} +1 -1
- package/dist/{chunk-JNEGEJH6.js → chunk-OC5PD4ID.js} +1 -1
- package/dist/{chunk-G7QLHXVA.js → chunk-OCBGHOH2.js} +1 -1
- package/dist/{chunk-3YCTWCHH.js → chunk-ODSMT2ZC.js} +1 -1
- package/dist/{chunk-T5DF2GGD.js → chunk-OJZT3NA2.js} +1 -1
- package/dist/{chunk-DCUAVLTM.js → chunk-OMXKQY2L.js} +1 -1
- package/dist/{chunk-O7MONSF7.js → chunk-P2SBE77Z.js} +1 -1
- package/dist/{chunk-APYASWBA.js → chunk-P6LVSNTT.js} +1 -1
- package/dist/{chunk-CNOL26GA.js → chunk-P7OSUECN.js} +1 -1
- package/dist/chunk-P7U6BWKN.js +1 -0
- package/dist/{chunk-3GMW7IEC.js → chunk-PEYYIWP6.js} +2 -2
- package/dist/{chunk-MCATVWHC.js → chunk-Q7DSLGTN.js} +1 -1
- package/dist/{chunk-4TC4M4RC.js → chunk-QEVGRNUE.js} +1 -1
- package/dist/{chunk-HHSUBF73.js → chunk-QFXJNFMI.js} +1 -1
- package/dist/{chunk-IBBFRL3Y.js → chunk-R6A754UW.js} +1 -1
- package/dist/{chunk-IRH6IGFT.js → chunk-R7QYSC6T.js} +1 -1
- package/dist/{chunk-JOYM7AEQ.js → chunk-RE652L3G.js} +1 -1
- package/dist/{chunk-6ZMNEURG.js → chunk-RFOALCVH.js} +1 -1
- package/dist/{chunk-5K4DONQJ.js → chunk-RLB5QHWG.js} +1 -1
- package/dist/{chunk-UYNCJGMC.js → chunk-RTINXD5Z.js} +1 -1
- package/dist/{chunk-XH5FCMS5.js → chunk-SG5TRPJ7.js} +1 -1
- package/dist/{chunk-NV5IDANV.js → chunk-SH6Q5CLM.js} +1 -1
- package/dist/{chunk-VRRDIXFQ.js → chunk-SSDEWKDZ.js} +1 -1
- package/dist/{chunk-JCNRQYRP.js → chunk-SZM6ANMN.js} +1 -1
- package/dist/{chunk-Q2UHGP2Z.js → chunk-T35C6NC7.js} +1 -1
- package/dist/{chunk-EYDNSYYE.js → chunk-TB7HFPBB.js} +2 -2
- package/dist/{chunk-SFMXFH33.js → chunk-TH6CLNGO.js} +1 -1
- package/dist/{chunk-2HZMOK4U.js → chunk-TIU7MMRT.js} +2 -2
- package/dist/{chunk-OASPW2P2.js → chunk-TM44Z7U7.js} +1 -1
- package/dist/{chunk-ICFFBMFB.js → chunk-TNUY66EE.js} +1 -1
- package/dist/{chunk-2GDACKZF.js → chunk-TPGREOWO.js} +1 -1
- package/dist/{chunk-2MNOWKMI.js → chunk-TSEPNC3O.js} +1 -1
- package/dist/{chunk-IRTCLR3F.js → chunk-TTEY5PLR.js} +1 -1
- package/dist/{chunk-EXQXGSGY.js → chunk-U3MSTPZP.js} +1 -1
- package/dist/{chunk-N5HGT3TE.js → chunk-U4HLIXRH.js} +1 -1
- package/dist/{chunk-IDKUJQIG.js → chunk-UAYIFFYJ.js} +3 -3
- package/dist/chunk-UHIP5CFI.js +1 -0
- package/dist/{chunk-MYQQOOGA.js → chunk-UHMRDG6J.js} +1 -1
- package/dist/{chunk-TDCY3BRI.js → chunk-UMB4BWCK.js} +1 -1
- package/dist/{chunk-2FIDORHT.js → chunk-UMFVRG33.js} +1 -1
- package/dist/{chunk-FPCPFECH.js → chunk-UVIGXZMV.js} +1 -1
- package/dist/{chunk-QPY6WJTT.js → chunk-UW6YEKST.js} +1 -1
- package/dist/{chunk-U2LQBJJL.js → chunk-V6QZF5YS.js} +1 -1
- package/dist/{chunk-TDSR2X7X.js → chunk-VCWESQBC.js} +1 -1
- package/dist/{chunk-QVYZZNAS.js → chunk-VGSH33QU.js} +1 -1
- package/dist/{chunk-7XQDZF73.js → chunk-VJQJ5PTQ.js} +1 -1
- package/dist/{chunk-AVMNXIXF.js → chunk-WDSBR7KX.js} +1 -1
- package/dist/{chunk-H7PNMMDO.js → chunk-WN5VTUWJ.js} +1 -1
- package/dist/{chunk-7USHLXEN.js → chunk-WTRKTFVE.js} +1 -1
- package/dist/{chunk-OHASEW7T.js → chunk-X3VG75LO.js} +1 -1
- package/dist/{chunk-YZY4M6IH.js → chunk-XCGV3IJ5.js} +1 -1
- package/dist/{chunk-XDEAZP2I.js → chunk-XDV4PRFT.js} +1 -1
- package/dist/{chunk-KHXDP3SF.js → chunk-XHTICMA7.js} +1 -1
- package/dist/{chunk-WIXW233Y.js → chunk-XS7WK4YK.js} +1 -1
- package/dist/{chunk-ZDQNCYRH.js → chunk-XSUZPWYV.js} +1 -1
- package/dist/{chunk-T3AJL2M5.js → chunk-XUAAQI5N.js} +1 -1
- package/dist/{chunk-ODH2U44N.js → chunk-XXLGM6OZ.js} +1 -1
- package/dist/{chunk-TVU4YD2H.js → chunk-YKNMNGV7.js} +1 -1
- package/dist/{chunk-FOPGI6GO.js → chunk-YNX4DT2O.js} +1 -1
- package/dist/{chunk-WMDYHUPS.js → chunk-YWQPSMRZ.js} +1 -1
- package/dist/{chunk-C5U4NLNU.js → chunk-YXNKDX56.js} +1 -1
- package/dist/{chunk-4E354M4H.js → chunk-Z33MWGCG.js} +1 -1
- package/dist/{chunk-JVMYTC3J.js → chunk-Z6VNPAY7.js} +1 -1
- package/dist/{chunk-IQYZAALJ.js → chunk-ZAN7AZTX.js} +1 -1
- package/dist/{chunk-IOU6EKTT.js → chunk-ZIM2G3EP.js} +1 -1
- package/dist/{chunk-H3QZN45D.js → chunk-ZSYMRT3S.js} +1 -1
- package/dist/{chunk-LUG2BZJP.js → chunk-ZT4PUH7L.js} +1 -1
- package/dist/{chunk-DU5LZYQX.js → chunk-ZUWEGJA7.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -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/command-registry.js +1 -1
- package/dist/{conf-store-OC4XCP45.js → conf-store-HOA62HKK.js} +1 -1
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -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-M5JGGK47.js → deprecations-2FTB7JEW.js} +1 -1
- package/dist/{dist-Z4H2OM7V.js → dist-63JMGNUL.js} +1 -1
- package/dist/dist-6TY6L7OW.js +1 -0
- package/dist/{environments-ZLSO534C.js → environments-XVYTKHRZ.js} +1 -1
- package/dist/{error-ZBG2MA5U.js → error-SDU6RPQQ.js} +1 -1
- package/dist/{error-handler-MCUV4RZV.js → error-handler-4YEBBCUH.js} +1 -1
- package/dist/{fs-7LCRIUF3.js → fs-B4UJTUCD.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/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{is-global-RURDJZDU.js → is-global-5LFZDDNH.js} +1 -1
- package/dist/{local-5AKD7T5X.js → local-VTYGIJVD.js} +1 -1
- package/dist/{local-storage-TJU77VRQ.js → local-storage-A6NBLBB2.js} +1 -1
- package/dist/{metadata-D5GLZOLV.js → metadata-FREAI3KR.js} +1 -1
- package/dist/{node-package-manager-FA3Y6DPG.js → node-package-manager-N5SUT2WN.js} +1 -1
- package/dist/notifications-system-P3SUTD25.js +1 -0
- package/dist/{output-FYS764MJ.js → output-VUR2QZPW.js} +1 -1
- package/dist/{system-KDM2BB7R.js → system-OXF2P5CT.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-QIHGXICT.js → ui-N2C5FC3G.js} +1 -1
- package/dist/upgrade-AJ36IT7H.js +1 -0
- package/dist/{version-LULWCT5R.js → version-DSFP332V.js} +1 -1
- package/dist/version-HUOO3XOE.js +1 -0
- package/dist/{workerd-N25GY5MX.js → workerd-KPQTFQD4.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/chunk-6ZRHK4ON.js +0 -1
- package/dist/chunk-J3KRY2SD.js +0 -1
- package/dist/chunk-PGODIZ64.js +0 -1
- package/dist/chunk-YB3SGPFF.js +0 -1
- package/dist/dist-3SP7TISC.js +0 -1
- package/dist/notifications-system-76GJJAJP.js +0 -1
- package/dist/upgrade-DY4L43H4.js +0 -1
- package/dist/version-WIERCO5R.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as z,la as j,ma as J,na as k,oa as W,pa as A,qa as q,ra as N,sa as B,ta as L,ua as K,va as R,wa as Q,xa as O,ya as Y}from"./chunk-
|
|
1
|
+
import{$ as z,la as j,ma as J,na as k,oa as W,pa as A,qa as q,ra as N,sa as B,ta as L,ua as K,va as R,wa as Q,xa as O,ya as Y}from"./chunk-4MLEL3VK.js";import{f as v,i as X,p as c}from"./chunk-R7QYSC6T.js";import{c as G}from"./chunk-5VRU3BT5.js";import{v as U,z as w}from"./chunk-EEEKSYWV.js";import{d as E,f as $}from"./chunk-IIFRDOYG.js";import{$ as b,Hb as H,Ta as P,Y as a,qa as I,wa as D,ya as V}from"./chunk-TB7HFPBB.js";import{d as C,j as F}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Z(e){switch(e){case d.Offsite:return k;case d.CreditCard:return R;case d.CustomCreditCard:return L;case d.CustomOnsite:return N;case d.Redeemable:return A;case d.CardPresent:return O}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function ee(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Z(e.type);switch(i){case k:return x(e,t,W);case R:return x(e,t,Q);case L:return x(e,t,K);case N:return x(e,t,B);case A:return x(e,t,q);case O:return x(e,t,Y);default:throw new Error(`Unsupported extension: ${i}`)}}function x(e,t,i){let o=(e.activeVersion??e.draftVersion)?.config;if(!o)throw new Error("No config found for extension");let r=JSON.parse(o),l=i(r,t);l&&delete l.api_version;let p=e.activeVersion?.context??e.draftVersion?.context??Z(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:a(e.title.substring(0,c)),...l,targeting:[{target:`${p}`}]}]}}s();s();var fe=new Map(J.map(e=>[e[1],e[0]])),ue=(e,t)=>{let i=fe.get(e.uiType);if(!i)throw new E(`Field type ${e.uiType} is not supported`);let n={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(n.name=e.label,n.required=e.required),n},me=(e,t)=>{let o={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(o.required=e.required),e.uiType==="marketing-activity-id"&&(o.marketingActivityCreateUrl=e.marketingActivityCreateUrl,o.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),o},te=(e,t)=>t?t.map(n=>n.uiType==="commerce-object-id"||n.uiType==="marketing-activity-id"||j.includes(n.uiType)?me(n,e):ue(n,e)):[];function ie(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,n;if(e.type==="flow_trigger_discovery_webhook"){let o=JSON.parse(t);n={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:a(e.title.substring(0,c)),url:o.url}]}}else{let o=JSON.parse(t),r=te(e.type,o.fields??[]);n={extensions:[{type:e.type.replace("_definition",""),name:o.title,handle:a(e.title.substring(0,c)),description:o.description,runtime_url:o.url??i,config_page_url:o.custom_configuration_page_url,config_page_preview_url:o.custom_configuration_page_preview_url,validation_url:o.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return n}s();s();var ne=e=>{let t=e.split("#");if(t.length!==2||t.some(l=>l===""||l===void 0))throw new Error("Invalid context");let i="admin",n=ge(t[0]??""),o=de(t[1]??""),r="link";return o==="selection"?[i,`${n}-index`,`${o}-action`,r].join("."):[i,`${n}-${o}`,"action",r].join(".")},de=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},ge=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function oe(e,t,i){let n=e.activeVersion?.config??e.draftVersion?.config;if(!n)throw new Error("No config found for extension");let o=e.activeVersion?.context??e.draftVersion?.context;if(!o)throw new Error("No context found for link extension");let r=JSON.parse(n);if(i.embedded)try{let p=new URL(r.url),f=p.pathname.startsWith("/")?p.pathname.substring(1):p.pathname,u=new URL(`app://${f}`);u.search=p.search,u.hash=p.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:a(e.title.substring(0,c)),targeting:[{url:r.url,target:ne(o)}]}]}}s();var _e={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},ye={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function Ce(e){let t=new URL(e);return t.pathname+t.search+t.hash}function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:a(e.title.substring(0,c)),title:i.title,description:i.description,api_path:Ce(i.app_api_url),tactic:i.tactic,marketing_channel:_e[i.platform]??"",referring_domain:ye[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:o,...r})=>r)}]}}s();function se(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:a(e.title.substring(0,c)),pattern:i.pattern}]}}var S=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:ee},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:ie},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:re},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:se},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:oe}];function ae(e){return S.filter(t=>t.extensionTypes.some(i=>e.some(n=>n.type.toLowerCase()===i.toLowerCase())))}async function ut(e){if(e.length===1&&e[0])return e[0];let t=e.map(o=>({label:o.label,value:o.value})),i=await w({message:"Extension type to migrate",choices:t}),n=e.find(o=>o.value===i);if(n===void 0)throw new E("Invalid migration choice");return n}s();var kt=S.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),n=C(t.directory,X.extensions.directoryName,i);if(await P(n)){let o=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await w({message:`Directory "${i}" already exists. What would you like to do?`,choices:o});if(r===g.Cancel)throw new $;return{directory:n,action:r}}return await D(n),await I(C(n,v.lockFile)),{directory:n,action:g.Write}}async function xe(e){let{app:t,remoteApp:i,developerPlatformClient:n,extensionTypes:o,extensions:r,buildExtensionConfig:l,all:p}=e,f=r.filter(m=>o.includes(m.type.toLowerCase()));if(f=we(t,f),f.length===0)throw new E("No extensions to migrate");if(!p){let m=f.map(y=>({label:y.title,value:y.uuid}));f.length>1&&m.push({label:"All",value:"All"});let _=await w({message:"Extensions to migrate",choices:m});_!=="All"&&(f=[f.find(y=>y?.uuid===_)])}let u={},h=f.map(async m=>{let{directory:_,action:y}=await Ee({app:t,name:m.title}),ce=a(m.title.substring(0,c));if(u[ce]=m.uuid,y===g.Write){let M=l(m,r,t.configuration),le=C(_,"shopify.extension.toml");await new G(le,M).replace(M);let pe=C(_,v.lockFile);await V(pe)}return{extension:m,directory:C("extensions",F(_))}}),T=await Promise.all(h);be(T),await z({app:t,identifiers:{extensions:u,app:i.apiKey},command:"import-extensions",developerPlatformClient:n})}function we(e,t){let i=e.dotenv?.variables??{},n=e.allExtensions.map(o=>i[o.idEnvironmentVariableName]);return t.filter(o=>!n.includes(o.uuid))}async function At(e){let t=ae(e.extensions);await Promise.all(t.map(async i=>xe({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function be(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>H`• "${t.extension.title}" at: ${t.directory}`.value).join(`
|
|
2
2
|
`)})}s();async function Rt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:n,onlyDashboardManaged:o=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:l,extensionRegistrations:p}=r.app;return(o?l:p.concat(l)).filter(u=>{let h=n.includes(u.type.toLowerCase()),T=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(T??m)})}export{ae as a,ut as b,kt as c,xe as d,we as e,At as f,Rt as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ea,b as Sa}from"./chunk-EJDWYASP.js";import{a as bn}from"./chunk-RJ5VF3QY.js";import{a as ya}from"./chunk-7UNQOKZW.js";import{a as wa}from"./chunk-GB3YC4TI.js";import{a as wt}from"./chunk-7USHLXEN.js";import{f as Ne}from"./chunk-3QVXHF6I.js";import{d as qe,e as Et,f as wn,g as En,k as Sn}from"./chunk-ELIH6GCC.js";import{C as ca,Db as yn,E as ua,F as fa,Fb as Tn,H as ma,Hb as St,J as da,Pb as Ie,U as un,Vb as Ge,Wb as ke,a as ea,eb as N,f as ra,fb as g,gb as y,hb as sr,ib as mn,jb as xt,kb as fe,l as na,lb as dn,m as oa,mb as De,nb as yt,ob as pn,pb as ar,rb as ha,sb as ga,t as ir,tb as hn,u as ia,ub as Be,vb as $e,wb as gn,xb as V,y as aa,z as la}from"./chunk-EYDNSYYE.js";import{e as ta,g as sa,j as pa,l as fn,u as Ue}from"./chunk-A4SBXDZB.js";import{f as nt,o as vn}from"./chunk-JCNRQYRP.js";import{a as or}from"./chunk-NNOSZ447.js";import{b as an,i as ln,q as cn}from"./chunk-773TIA5M.js";import{a as xn}from"./chunk-636CTEW7.js";import{j as ba}from"./chunk-T6CC5WUU.js";import{a as xa}from"./chunk-TOLPNBZK.js";import{a as ue,c as k,e as D,g as u}from"./chunk-VKWPEFWQ.js";var Dn=k((Gu,Ln)=>{u();Ln.exports=Rn;Rn.sync=Ta;var Cn=ue("fs");function va(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function An(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:va(t,r)}function Rn(e,t,r){Cn.stat(e,function(n,o){r(n,n?!1:An(o,e,t))})}function Ta(e,t){return An(Cn.statSync(e),e,t)}});var In=k((ju,Bn)=>{u();Bn.exports=Mn;Mn.sync=Ca;var kn=ue("fs");function Mn(e,t,r){kn.stat(e,function(n,o){r(n,n?!1:_n(o,t))})}function Ca(e,t){return _n(kn.statSync(e),t)}function _n(e,t){return e.isFile()&&Aa(e,t)}function Aa(e,t){var r=e.mode,n=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),f=parseInt("100",8),m=parseInt("010",8),d=parseInt("001",8),p=f|m,b=r&d||r&m&&o===s||r&f&&n===i||r&p&&i===0;return b}});var On=k((Vu,Pn)=>{u();var zu=ue("fs"),vt;process.platform==="win32"||global.TESTING_WINDOWS?vt=Dn():vt=In();Pn.exports=lr;lr.sync=Ra;function lr(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){lr(e,t||{},function(i,s){i?o(i):n(s)})})}vt(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function Ra(e,t){try{return vt.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Hn=k((Ku,Gn)=>{u();var He=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Fn=ue("path"),La=He?";":":",Un=On(),$n=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Nn=(e,t)=>{let r=t.colon||La,n=e.match(/\//)||He&&e.match(/\\/)?[""]:[...He?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=He?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=He?o.split(r):[""];return He&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},qn=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:i}=Nn(e,t),s=[],f=d=>new Promise((p,b)=>{if(d===n.length)return t.all&&s.length?p(s):b($n(e));let S=n[d],v=/^".*"$/.test(S)?S.slice(1,-1):S,w=Fn.join(v,e),A=!v&&/^\.[\\\/]/.test(e)?e.slice(0,2)+w:w;p(m(A,d,0))}),m=(d,p,b)=>new Promise((S,v)=>{if(b===o.length)return S(f(p+1));let w=o[b];Un(d+w,{pathExt:i},(A,C)=>{if(!A&&C)if(t.all)s.push(d+w);else return S(d+w);return S(m(d,p,b+1))})});return r?f(0).then(d=>r(null,d),r):f(0)},Da=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=Nn(e,t),i=[];for(let s=0;s<r.length;s++){let f=r[s],m=/^".*"$/.test(f)?f.slice(1,-1):f,d=Fn.join(m,e),p=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let b=0;b<n.length;b++){let S=p+n[b];try{if(Un.sync(S,{pathExt:o}))if(t.all)i.push(S);else return S}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw $n(e)};Gn.exports=qn;qn.sync=Da});var Wn=k((Zu,cr)=>{"use strict";u();var jn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};cr.exports=jn;cr.exports.default=jn});var Kn=k((Ju,Xn)=>{"use strict";u();var zn=ue("path"),ka=Hn(),Ma=Wn();function Vn(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=ka.sync(e.command,{path:r[Ma({env:r})],pathExt:t?zn.delimiter:void 0})}catch{}finally{i&&process.chdir(n)}return s&&(s=zn.resolve(o?e.options.cwd:"",s)),s}function _a(e){return Vn(e)||Vn(e,!0)}Xn.exports=_a});var Yn=k((tf,fr)=>{"use strict";u();var ur=/([()\][%!^"`<>&|;, *?])/g;function Ba(e){return e=e.replace(ur,"^$1"),e}function Ia(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(ur,"^$1"),t&&(e=e.replace(ur,"^$1")),e}fr.exports.command=Ba;fr.exports.argument=Ia});var Qn=k((nf,Zn)=>{"use strict";u();Zn.exports=/^#!(.*)/});var eo=k((sf,Jn)=>{"use strict";u();var Pa=Qn();Jn.exports=(e="")=>{let t=e.match(Pa);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var ro=k((lf,to)=>{"use strict";u();var mr=ue("fs"),Oa=eo();function Fa(e){let r=Buffer.alloc(150),n;try{n=mr.openSync(e,"r"),mr.readSync(n,r,0,150,0),mr.closeSync(n)}catch{}return Oa(r.toString())}to.exports=Fa});var so=k((uf,io)=>{"use strict";u();var Ua=ue("path"),no=Kn(),oo=Yn(),$a=ro(),Na=process.platform==="win32",qa=/\.(?:com|exe)$/i,Ga=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Ha(e){e.file=no(e);let t=e.file&&$a(e.file);return t?(e.args.unshift(e.file),e.command=t,no(e)):e.file}function ja(e){if(!Na)return e;let t=Ha(e),r=!qa.test(t);if(e.options.forceShell||r){let n=Ga.test(t);e.command=Ua.normalize(e.command),e.command=oo.command(e.command),e.args=e.args.map(i=>oo.argument(i,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Wa(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:ja(n)}io.exports=Wa});var co=k((mf,lo)=>{"use strict";u();var dr=process.platform==="win32";function pr(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function za(e,t){if(!dr)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let i=ao(o,t);if(i)return r.call(e,"error",i)}return r.apply(e,arguments)}}function ao(e,t){return dr&&e===1&&!t.file?pr(t.original,"spawn"):null}function Va(e,t){return dr&&e===1&&!t.file?pr(t.original,"spawnSync"):null}lo.exports={hookChildProcess:za,verifyENOENT:ao,verifyENOENTSync:Va,notFoundError:pr}});var mo=k((pf,je)=>{"use strict";u();var uo=ue("child_process"),hr=so(),gr=co();function fo(e,t,r){let n=hr(e,t,r),o=uo.spawn(n.command,n.args,n.options);return gr.hookChildProcess(o,n),o}function Xa(e,t,r){let n=hr(e,t,r),o=uo.spawnSync(n.command,n.args,n.options);return o.error=o.error||gr.verifyENOENTSync(o.status,n),o}je.exports=fo;je.exports.spawn=fo;je.exports.sync=Xa;je.exports._parse=hr;je.exports._enoent=gr});var ko=k((Zf,Do)=>{"use strict";u();var{PassThrough:bl}=ue("stream");Do.exports=function(){var e=[],t=new bl({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=n,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(r),t;function r(i){return Array.isArray(i)?(i.forEach(r),this):(e.push(i),i.once("end",o.bind(null,i)),i.once("error",t.emit.bind(t,"error")),i.pipe(t,{end:!1}),this)}function n(){return e.length==0}function o(i){e=e.filter(function(s){return s!==i}),!e.length&&t.readable&&t.end()}}});var Jo=k((ad,Qo)=>{u();var{EventEmitter:Zl}=ue("events"),Dt=class{constructor(){this.eventEmitter=new Zl,this.onabort=null,this.aborted=!1,this.reason=void 0}toString(){return"[object AbortSignal]"}get[Symbol.toStringTag](){return"AbortSignal"}removeEventListener(t,r){this.eventEmitter.removeListener(t,r)}addEventListener(t,r){this.eventEmitter.on(t,r)}dispatchEvent(t){let r={type:t,target:this},n=`on${t}`;typeof this[n]=="function"&&this[n](r),this.eventEmitter.emit(t,r)}throwIfAborted(){if(this.aborted)throw this.reason}static abort(t){let r=new st;return r.abort(),r.signal}static timeout(t){let r=new st;return setTimeout(()=>r.abort(new Error("TimeoutError")),t),r.signal}},st=class{constructor(){this.signal=new Dt}abort(t){this.signal.aborted||(this.signal.aborted=!0,t?this.signal.reason=t:this.signal.reason=new Error("AbortError"),this.signal.dispatchEvent("abort"))}toString(){return"[object AbortController]"}get[Symbol.toStringTag](){return"AbortController"}};Qo.exports={AbortController:st,AbortSignal:Dt}});var ui=k((cp,ci)=>{"use strict";u();ci.exports=class ye{constructor(t){try{t(r=>{this.setValue(r,!1)},r=>{this.setValue(r,!0)})}catch(r){this.setValue(r,!0)}}setValue(t,r){this.val=t instanceof ye?t.val:t,this.rejected=r||(t instanceof ye?t.rejected:!1)}static valueFrom(t){if(t instanceof ye){if(t.rejected)throw t.val;return t.val}else return t}then(t){try{if(!this.rejected)return ye.resolve(t(this.val))}catch(r){return ye.reject(r)}return this}catch(t){try{if(this.rejected)return ye.resolve(t(this.val))}catch(r){return ye.reject(r)}return this}static resolve(t){return new ye(r=>{r(t)})}static reject(t){return new ye((r,n)=>{n(t)})}}});var di=k((fp,mi)=>{"use strict";u();var fi=typeof window<"u"&&window.window===window&&window.navigator,pc=fi?window.location.href:process.cwd(),hc=new RegExp("^((https|http)://)?[a-z0-9A-Z]{3}.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z].com|net|cn|cc (:s[0-9]{1-4})?/$"),Ce=mi.exports={concat(e,t){let r=e[e.length-1]==="/",n=t[0]==="/";return e+(r||n?"":"/")+(r&&n?t.substring(1):t)},resolve(e){return Ce.isAbsolute(e)?Ce.normalize(e):Ce.normalize(Ce.concat(pc,e))},normalize(e){let t=[],r=0;e.split("/").reverse().filter(o=>o!==".").forEach(o=>{o===".."?r++:r===0?t.push(o):r--});let n=t.reverse().join("/");return(fi&&n[0]==="/"?n[1]==="/"?window.location.protocol:window.location.origin:"")+n},isData:e=>e.indexOf("data:")===0,isURL:e=>hc.test(e),isAbsolute:e=>e[0]==="/"||/^[^\/]*:/.test(e),relativeToFile(e,t){return Ce.isData(e)||Ce.isAbsolute(t)?Ce.normalize(t):Ce.normalize(Ce.concat(e.split("/").slice(0,-1).join("/"),t))}}});var hi=k((dp,pi)=>{"use strict";u();pi.exports=gc;function gc(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var t=e.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");for(var r=e.substring(5,t).split(";"),n=r[0]||"text/plain",o=n,i=!1,s="",f=1;f<r.length;f++)r[f]=="base64"?i=!0:(o+=";"+r[f],r[f].indexOf("charset=")==0&&(s=r[f].substring(8)));!r[0]&&!s.length&&(o+=";charset=US-ASCII",s="US-ASCII");var m=unescape(e.substring(t+1)),d=i?"base64":"ascii",p=Buffer.from?Buffer.from(m,d):new Buffer(m,d);return p.type=n,p.typeFull=o,p.charset=s,p}});var yi=k((hp,$t)=>{"use strict";u();var{assign:We}=Object,Pr=typeof window<"u"&&window.window===window&&window.navigator,bc=xa().SourceMapConsumer,Ut=ui(),Ir=di(),xc=hi(),bi=Pr?null:$t.require,gi=e=>{let t=r=>r in t.cache?t.cache[r]:t.cache[r]=e(r);return t.forgetEverything=()=>{t.cache=Object.create(null)},t.cache=Object.create(null),t};function xi(e,t){let r=t?Ut:Promise,n=gi(f=>o(f,e(f)));function o(f,m){return m===void 0?n(Ir.resolve(f)):r.resolve(m).then(d=>{let p,b,S,v=w=>(S=S||i(p))(w);return p={path:f,text:d,get lines(){return b=b||d.split(`
|
|
1
|
+
import{a as Ea,b as Sa}from"./chunk-EJDWYASP.js";import{a as bn}from"./chunk-RJ5VF3QY.js";import{a as ya}from"./chunk-7UNQOKZW.js";import{a as wa}from"./chunk-GB3YC4TI.js";import{a as wt}from"./chunk-WTRKTFVE.js";import{f as Ne}from"./chunk-7AY6HLQG.js";import{d as qe,e as Et,f as wn,g as En,k as Sn}from"./chunk-IIFRDOYG.js";import{C as ca,Db as yn,E as ua,F as fa,Fb as Tn,H as ma,Hb as St,J as da,Pb as Ie,U as un,Vb as Ge,Wb as ke,a as ea,eb as N,f as ra,fb as g,gb as y,hb as sr,ib as mn,jb as xt,kb as fe,l as na,lb as dn,m as oa,mb as De,nb as yt,ob as pn,pb as ar,rb as ha,sb as ga,t as ir,tb as hn,u as ia,ub as Be,vb as $e,wb as gn,xb as V,y as aa,z as la}from"./chunk-TB7HFPBB.js";import{e as ta,g as sa,j as pa,l as fn,u as Ue}from"./chunk-A4SBXDZB.js";import{f as nt,o as vn}from"./chunk-SZM6ANMN.js";import{a as or}from"./chunk-NNOSZ447.js";import{b as an,i as ln,q as cn}from"./chunk-773TIA5M.js";import{a as xn}from"./chunk-636CTEW7.js";import{j as ba}from"./chunk-T6CC5WUU.js";import{a as xa}from"./chunk-TOLPNBZK.js";import{a as ue,c as k,e as D,g as u}from"./chunk-VKWPEFWQ.js";var Dn=k((Gu,Ln)=>{u();Ln.exports=Rn;Rn.sync=Ta;var Cn=ue("fs");function va(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function An(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:va(t,r)}function Rn(e,t,r){Cn.stat(e,function(n,o){r(n,n?!1:An(o,e,t))})}function Ta(e,t){return An(Cn.statSync(e),e,t)}});var In=k((ju,Bn)=>{u();Bn.exports=Mn;Mn.sync=Ca;var kn=ue("fs");function Mn(e,t,r){kn.stat(e,function(n,o){r(n,n?!1:_n(o,t))})}function Ca(e,t){return _n(kn.statSync(e),t)}function _n(e,t){return e.isFile()&&Aa(e,t)}function Aa(e,t){var r=e.mode,n=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),f=parseInt("100",8),m=parseInt("010",8),d=parseInt("001",8),p=f|m,b=r&d||r&m&&o===s||r&f&&n===i||r&p&&i===0;return b}});var On=k((Vu,Pn)=>{u();var zu=ue("fs"),vt;process.platform==="win32"||global.TESTING_WINDOWS?vt=Dn():vt=In();Pn.exports=lr;lr.sync=Ra;function lr(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){lr(e,t||{},function(i,s){i?o(i):n(s)})})}vt(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function Ra(e,t){try{return vt.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Hn=k((Ku,Gn)=>{u();var He=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Fn=ue("path"),La=He?";":":",Un=On(),$n=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Nn=(e,t)=>{let r=t.colon||La,n=e.match(/\//)||He&&e.match(/\\/)?[""]:[...He?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=He?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=He?o.split(r):[""];return He&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},qn=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:i}=Nn(e,t),s=[],f=d=>new Promise((p,b)=>{if(d===n.length)return t.all&&s.length?p(s):b($n(e));let S=n[d],v=/^".*"$/.test(S)?S.slice(1,-1):S,w=Fn.join(v,e),A=!v&&/^\.[\\\/]/.test(e)?e.slice(0,2)+w:w;p(m(A,d,0))}),m=(d,p,b)=>new Promise((S,v)=>{if(b===o.length)return S(f(p+1));let w=o[b];Un(d+w,{pathExt:i},(A,C)=>{if(!A&&C)if(t.all)s.push(d+w);else return S(d+w);return S(m(d,p,b+1))})});return r?f(0).then(d=>r(null,d),r):f(0)},Da=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=Nn(e,t),i=[];for(let s=0;s<r.length;s++){let f=r[s],m=/^".*"$/.test(f)?f.slice(1,-1):f,d=Fn.join(m,e),p=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let b=0;b<n.length;b++){let S=p+n[b];try{if(Un.sync(S,{pathExt:o}))if(t.all)i.push(S);else return S}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw $n(e)};Gn.exports=qn;qn.sync=Da});var Wn=k((Zu,cr)=>{"use strict";u();var jn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};cr.exports=jn;cr.exports.default=jn});var Kn=k((Ju,Xn)=>{"use strict";u();var zn=ue("path"),ka=Hn(),Ma=Wn();function Vn(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=ka.sync(e.command,{path:r[Ma({env:r})],pathExt:t?zn.delimiter:void 0})}catch{}finally{i&&process.chdir(n)}return s&&(s=zn.resolve(o?e.options.cwd:"",s)),s}function _a(e){return Vn(e)||Vn(e,!0)}Xn.exports=_a});var Yn=k((tf,fr)=>{"use strict";u();var ur=/([()\][%!^"`<>&|;, *?])/g;function Ba(e){return e=e.replace(ur,"^$1"),e}function Ia(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(ur,"^$1"),t&&(e=e.replace(ur,"^$1")),e}fr.exports.command=Ba;fr.exports.argument=Ia});var Qn=k((nf,Zn)=>{"use strict";u();Zn.exports=/^#!(.*)/});var eo=k((sf,Jn)=>{"use strict";u();var Pa=Qn();Jn.exports=(e="")=>{let t=e.match(Pa);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var ro=k((lf,to)=>{"use strict";u();var mr=ue("fs"),Oa=eo();function Fa(e){let r=Buffer.alloc(150),n;try{n=mr.openSync(e,"r"),mr.readSync(n,r,0,150,0),mr.closeSync(n)}catch{}return Oa(r.toString())}to.exports=Fa});var so=k((uf,io)=>{"use strict";u();var Ua=ue("path"),no=Kn(),oo=Yn(),$a=ro(),Na=process.platform==="win32",qa=/\.(?:com|exe)$/i,Ga=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Ha(e){e.file=no(e);let t=e.file&&$a(e.file);return t?(e.args.unshift(e.file),e.command=t,no(e)):e.file}function ja(e){if(!Na)return e;let t=Ha(e),r=!qa.test(t);if(e.options.forceShell||r){let n=Ga.test(t);e.command=Ua.normalize(e.command),e.command=oo.command(e.command),e.args=e.args.map(i=>oo.argument(i,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Wa(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:ja(n)}io.exports=Wa});var co=k((mf,lo)=>{"use strict";u();var dr=process.platform==="win32";function pr(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function za(e,t){if(!dr)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let i=ao(o,t);if(i)return r.call(e,"error",i)}return r.apply(e,arguments)}}function ao(e,t){return dr&&e===1&&!t.file?pr(t.original,"spawn"):null}function Va(e,t){return dr&&e===1&&!t.file?pr(t.original,"spawnSync"):null}lo.exports={hookChildProcess:za,verifyENOENT:ao,verifyENOENTSync:Va,notFoundError:pr}});var mo=k((pf,je)=>{"use strict";u();var uo=ue("child_process"),hr=so(),gr=co();function fo(e,t,r){let n=hr(e,t,r),o=uo.spawn(n.command,n.args,n.options);return gr.hookChildProcess(o,n),o}function Xa(e,t,r){let n=hr(e,t,r),o=uo.spawnSync(n.command,n.args,n.options);return o.error=o.error||gr.verifyENOENTSync(o.status,n),o}je.exports=fo;je.exports.spawn=fo;je.exports.sync=Xa;je.exports._parse=hr;je.exports._enoent=gr});var ko=k((Zf,Do)=>{"use strict";u();var{PassThrough:bl}=ue("stream");Do.exports=function(){var e=[],t=new bl({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=n,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(r),t;function r(i){return Array.isArray(i)?(i.forEach(r),this):(e.push(i),i.once("end",o.bind(null,i)),i.once("error",t.emit.bind(t,"error")),i.pipe(t,{end:!1}),this)}function n(){return e.length==0}function o(i){e=e.filter(function(s){return s!==i}),!e.length&&t.readable&&t.end()}}});var Jo=k((ad,Qo)=>{u();var{EventEmitter:Zl}=ue("events"),Dt=class{constructor(){this.eventEmitter=new Zl,this.onabort=null,this.aborted=!1,this.reason=void 0}toString(){return"[object AbortSignal]"}get[Symbol.toStringTag](){return"AbortSignal"}removeEventListener(t,r){this.eventEmitter.removeListener(t,r)}addEventListener(t,r){this.eventEmitter.on(t,r)}dispatchEvent(t){let r={type:t,target:this},n=`on${t}`;typeof this[n]=="function"&&this[n](r),this.eventEmitter.emit(t,r)}throwIfAborted(){if(this.aborted)throw this.reason}static abort(t){let r=new st;return r.abort(),r.signal}static timeout(t){let r=new st;return setTimeout(()=>r.abort(new Error("TimeoutError")),t),r.signal}},st=class{constructor(){this.signal=new Dt}abort(t){this.signal.aborted||(this.signal.aborted=!0,t?this.signal.reason=t:this.signal.reason=new Error("AbortError"),this.signal.dispatchEvent("abort"))}toString(){return"[object AbortController]"}get[Symbol.toStringTag](){return"AbortController"}};Qo.exports={AbortController:st,AbortSignal:Dt}});var ui=k((cp,ci)=>{"use strict";u();ci.exports=class ye{constructor(t){try{t(r=>{this.setValue(r,!1)},r=>{this.setValue(r,!0)})}catch(r){this.setValue(r,!0)}}setValue(t,r){this.val=t instanceof ye?t.val:t,this.rejected=r||(t instanceof ye?t.rejected:!1)}static valueFrom(t){if(t instanceof ye){if(t.rejected)throw t.val;return t.val}else return t}then(t){try{if(!this.rejected)return ye.resolve(t(this.val))}catch(r){return ye.reject(r)}return this}catch(t){try{if(this.rejected)return ye.resolve(t(this.val))}catch(r){return ye.reject(r)}return this}static resolve(t){return new ye(r=>{r(t)})}static reject(t){return new ye((r,n)=>{n(t)})}}});var di=k((fp,mi)=>{"use strict";u();var fi=typeof window<"u"&&window.window===window&&window.navigator,pc=fi?window.location.href:process.cwd(),hc=new RegExp("^((https|http)://)?[a-z0-9A-Z]{3}.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z].com|net|cn|cc (:s[0-9]{1-4})?/$"),Ce=mi.exports={concat(e,t){let r=e[e.length-1]==="/",n=t[0]==="/";return e+(r||n?"":"/")+(r&&n?t.substring(1):t)},resolve(e){return Ce.isAbsolute(e)?Ce.normalize(e):Ce.normalize(Ce.concat(pc,e))},normalize(e){let t=[],r=0;e.split("/").reverse().filter(o=>o!==".").forEach(o=>{o===".."?r++:r===0?t.push(o):r--});let n=t.reverse().join("/");return(fi&&n[0]==="/"?n[1]==="/"?window.location.protocol:window.location.origin:"")+n},isData:e=>e.indexOf("data:")===0,isURL:e=>hc.test(e),isAbsolute:e=>e[0]==="/"||/^[^\/]*:/.test(e),relativeToFile(e,t){return Ce.isData(e)||Ce.isAbsolute(t)?Ce.normalize(t):Ce.normalize(Ce.concat(e.split("/").slice(0,-1).join("/"),t))}}});var hi=k((dp,pi)=>{"use strict";u();pi.exports=gc;function gc(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var t=e.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");for(var r=e.substring(5,t).split(";"),n=r[0]||"text/plain",o=n,i=!1,s="",f=1;f<r.length;f++)r[f]=="base64"?i=!0:(o+=";"+r[f],r[f].indexOf("charset=")==0&&(s=r[f].substring(8)));!r[0]&&!s.length&&(o+=";charset=US-ASCII",s="US-ASCII");var m=unescape(e.substring(t+1)),d=i?"base64":"ascii",p=Buffer.from?Buffer.from(m,d):new Buffer(m,d);return p.type=n,p.typeFull=o,p.charset=s,p}});var yi=k((hp,$t)=>{"use strict";u();var{assign:We}=Object,Pr=typeof window<"u"&&window.window===window&&window.navigator,bc=xa().SourceMapConsumer,Ut=ui(),Ir=di(),xc=hi(),bi=Pr?null:$t.require,gi=e=>{let t=r=>r in t.cache?t.cache[r]:t.cache[r]=e(r);return t.forgetEverything=()=>{t.cache=Object.create(null)},t.cache=Object.create(null),t};function xi(e,t){let r=t?Ut:Promise,n=gi(f=>o(f,e(f)));function o(f,m){return m===void 0?n(Ir.resolve(f)):r.resolve(m).then(d=>{let p,b,S,v=w=>(S=S||i(p))(w);return p={path:f,text:d,get lines(){return b=b||d.split(`
|
|
2
2
|
`)},resolve(w){let A=v(w);if(t)try{return Ut.valueFrom(A)}catch(C){return We({},w,{error:C})}else return Promise.resolve(A)},_resolve:v}})}function i(f){let m=/\u0023 sourceMappingURL=(.+)\n?/g,d;for(;;){let S=m.exec(f.text);if(S)d=S;else break}let p=d&&d[1],b=S=>We({},S,{sourceFile:f,sourceLine:f.lines[S.line-1]||""});return p?s(f.path,p,b):b}function s(f,m,d){let p=m.startsWith("data:")?o(f,xc(m).toString()):o(Ir.relativeToFile(f,m)),b=p.then(v=>bc(JSON.parse(v.text))),S=gi(function(w){return p.then(A=>{let C=Ir.relativeToFile(A.path,w);return b.then(I=>o(C,I.sourceContentFor(w,!0)||void 0))})});return v=>b.then(w=>{let A=w.originalPositionFor(v);return A.source?S(A.source).then(C=>C._resolve(We({},v,{line:A.line,column:A.column+1,name:A.name}))):d(v)}).catch(w=>We(d(v),{sourceMapError:w}))}return We(function(m){let d=o(m);if(t)try{return Ut.valueFrom(d)}catch(p){let b={path:m,text:"",lines:[],error:p,resolve(S){return We({},S,{error:p,sourceLine:"",sourceFile:b})}};return b}return d},{resetCache:()=>n.forgetEverything(),getCache:()=>n.cache})}$t.exports=xi(function(t){return new Ut(r=>{if(Pr){let n=new XMLHttpRequest;n.open("GET",t,!1),n.send(null),r(n.responseText)}else r(bi("fs").readFileSync(t,{encoding:"utf8"}))})},!0);$t.exports.async=xi(function(t){return new Promise((r,n)=>{if(Pr){let o=new XMLHttpRequest;o.open("GET",t),o.onreadystatechange=i=>{o.readyState===4&&(o.status===200?r(o.responseText):n(new Error(o.statusText)))},o.send(null)}else bi("fs").readFile(t,{encoding:"utf8"},(o,i)=>{o?n(o):r(i)})})})});var Ei=k((bp,wi)=>{"use strict";u();wi.exports=(e,t)=>{let r=e||[],n=[],o={label:void 0,items:[r.first]};return r.forEach(i=>{let s=t(i);o.label!==s&&o.items.length?n.push(o={label:s,items:[i]}):o.items.push(i)}),n}});var vi=k((yp,$r)=>{"use strict";u();var yc=(function(){function e(t,r){var n=[],o=!0,i=!1,s=void 0;try{for(var f=t[Symbol.iterator](),m;!(o=(m=f.next()).done)&&(n.push(m.value),!(r&&n.length===r));o=!0);}catch(d){i=!0,s=d}finally{try{!o&&f.return&&f.return()}finally{if(i)throw s}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),Nt="[\x1B\x9B][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]",Si="\0-\b\v-\x1B\x9B\xAD\u200B\u2028\u2029\uFEFF\uFE00-\uFE0F",Ur=`
|
|
3
3
|
`+Si,wc=new RegExp("(?:"+Nt+")|["+Si+"]","g"),Or=new RegExp("(?:"+Nt+")|["+Ur+"]","g"),Fr=new RegExp("((?:"+Nt+")|[ "+Ur+"])?([^ "+Ur+"]*)","g");$r.exports={zeroWidthCharacters:Or,ansiEscapeCodes:new RegExp(Nt,"g"),strlen:e=>Array.from(e.replace(Or,"")).length,isBlank:e=>e.replace(Or,"").replace(/\s/g,"").length===0,blank:e=>Array.from(e.replace(wc,"")).map(t=>t===" "||t===`
|
|
4
4
|
`?t:" ").join(""),partition(e){for(var t,r=[];Fr.lastIndex!==e.length&&(t=Fr.exec(e));)r.push([t[1]||"",t[2]]);return Fr.lastIndex=0,r},first(e,t){let r="",n=0;for(let i of $r.exports.partition(e)){var o=yc(i,2);let s=o[0],f=o[1],m=Array.from(f).slice(0,t-n);r+=s+m.join(""),n+=m.length}return r}}});var Li=k((Ep,Ri)=>{"use strict";u();function ze(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else return Array.from(e)}var qt=Object,Ci=vi(),Ec=Ci.first,Gt=Ci.strlen,Sc=(e,t)=>Ec(e,t-1)+"\u2026",Ti=(e,t)=>{let r=(w,A)=>w.reduce((C,I)=>I.map((R,T)=>[].concat(ze(C[T]||[]),[R])),[]).map(C=>A.apply(void 0,ze(C))),n=e.map(w=>w.map(A=>A.replace(/\n/g,"\\n"))),o=n.map(w=>w.map(Gt)),i=r(o,Math.max),s=qt.assign({delimiter:" ",minColumnWidths:i.map(w=>0),maxTotalWidth:0},t),f=Gt(s.delimiter),m=i.reduce((w,A)=>w+A,0),d=i.map(w=>w/m),p=s.maxTotalWidth-f*(i.length-1),b=Math.max(0,m-p),S=r([s.minColumnWidths,i,d],(w,A,C)=>Math.max(w,Math.floor(A-b*C))),v=o.map(w=>r([S,w],(A,C)=>A-C));return r([n,v],(w,A)=>r([w,A],(C,I)=>I>=0?s.right?" ".repeat(I)+C:C+" ".repeat(I):Sc(C,Gt(C)+I)).join(s.delimiter))},Ai=e=>qt.assign(t=>{var r;if(t[0]&&Array.isArray(t[0]))return Ti(t.map(s=>s.map((f,m)=>f===void 0?"":e.print(f,m))),e).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as B,j as C,m as P}from"./chunk-
|
|
1
|
+
import{a as B,j as C,m as P}from"./chunk-DN3BB4IO.js";import{e as g}from"./chunk-N6IFIMC6.js";import{e as U,f as _}from"./chunk-HSVZU7MP.js";import{l as v,m as w}from"./chunk-I5X3IP6T.js";import{xa as E}from"./chunk-TIU7MMRT.js";import{Pb as m}from"./chunk-TB7HFPBB.js";import{g as T}from"./chunk-VKWPEFWQ.js";T();var $=20,J=1024*1024,A=2;function oe(t,e,r,s,o={},l){let n=B(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=R(t,e,n),h=Promise.all([s.ready(),u]).then(()=>q(n,s,t,e,i)),p=h.then(a=>a.promise).then(()=>j(n,s,t,e,o,i)),k=o?.deferPartialWork?u:p.then(a=>a.promise);return o?.backgroundWorkCatch&&Promise.all([u,h.then(a=>a.promise),p.then(a=>a.promise)]).catch(o.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(o?.deferPartialWork)return;let{progress:a,promise:d}=await h,f=o.multiEnvironment?4e3:1e3;await g(b({promise:d,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment);let{progress:y,promise:F}=await p;await g(b({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(y)}`,updateInterval:f}),l?.stderr,o?.multiEnvironment),await g([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,o?.multiEnvironment),H(i,o?.environment)}}}function b({promise:t,titleGetter:e,updateInterval:r}){let s=[],o=()=>{s.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&o()}})};return o(),s}function j(t,e,r,s,o,l){if(o.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=L(t,e),i=x(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let p=0;p<i.length;p+=$){let k=i.slice(p,p+$),a=v(r.id,k.map(d=>d.key),s).then(d=>{d.forEach(f=>{if(l.set(f.key,f),!f.success){let y=f.errors?.asset?.map(F=>`-${F}`).join(`
|
|
2
2
|
`);_(f.key,"delete")(new Error(`Failed to delete ${f.key}: ${y}`))}}),c.current+=k.length});u.push(a)}let h=Promise.all(u).then(()=>{c.current=c.total});return{progress:c,promise:h}}function L(t,e){let s=e.applyIgnoreFilters(t).filter(o=>!e.files.has(o.key));return m(`Files to be deleted:
|
|
3
3
|
${s.map(o=>`-${o.key}`).join(`
|
|
4
4
|
`)}`),s}function x(t){let e=P(t);return[...e.contextualizedJsonFiles,...e.templateJsonFiles,...e.sectionJsonFiles,...e.otherJsonFiles,...e.sectionLiquidFiles,...e.blockLiquidFiles,...e.layoutFiles,...e.otherLiquidFiles,...e.configDataFile,...e.configSchemaFile,...e.staticAssetFiles]}var D=[{key:"config/settings_schema.json",value:"[]"},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"}];async function R(t,e,r){let s=new Set(r.map(l=>l.key)),o=D.filter(({key:l})=>!s.has(l));o.length>0&&await w(t.id,o,e)}function q(t,e,r,s,o){let l=I(e,t);e.unsyncedFileKeys.clear(),l.forEach(a=>e.unsyncedFileKeys.add(a.key));let{independentFiles:n,dependentFiles:i}=z(l),c={current:0,total:l.length},u=a=>a.length===0?Promise.resolve():Promise.all(S(a).map(d=>N(d,e,s,r.id,o).then(()=>{c.current+=d.length,d.forEach(f=>e.unsyncedFileKeys.delete(f.key))}))).then(()=>{}),h=i.reduce((a,d)=>a.then(()=>u(d)),Promise.resolve()),p=Promise.resolve().then(()=>u(n.flat())),k=Promise.all([h,p]).then(()=>{c.current=c.total});return{progress:c,promise:k}}function I(t,e){let r=K(t),s=t.applyIgnoreFilters(r),o=new Map(e.map(n=>[n.key,n])),l=s.filter(n=>{let i=o.get(n.key);return!i||i.checksum!==n.checksum});return m(`Files to be uploaded:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k,b as i,c as F,d as L,e as _,f as M,g as H}from"./chunk-
|
|
1
|
+
import{a as k,b as i,c as F,d as L,e as _,f as M,g as H}from"./chunk-QFXJNFMI.js";import{a as E}from"./chunk-UHIP5CFI.js";import{a as P}from"./chunk-VJQJ5PTQ.js";import{Fa as I,ga as S}from"./chunk-4MLEL3VK.js";import{O as b,P as T,Q as A}from"./chunk-R7QYSC6T.js";import{B as g,F as v,z as p}from"./chunk-EEEKSYWV.js";import{Nb as h,Qb as m,Sb as w}from"./chunk-TB7HFPBB.js";import{j as y}from"./chunk-773TIA5M.js";import{r as q}from"./chunk-T6CC5WUU.js";import{e as G,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!F(o,e))return`Invalid address.
|
|
2
2
|
${c(e)}`}})).trim()}function U(e){return e===i.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:e===i.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:e===i.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function c(e){return U(e).map(t=>` \xB7 ${w(t)}`).join(`
|
|
3
3
|
`)}async function O(e,t){let{clientSecret:r,clientId:o,remoteApp:s,app:l}=e;return r&&(o||t!==i.EVENTBRIDGE)?{clientSecret:r,apiKey:o}:(S({appName:s.title,configFile:y(l.configPath)}),{clientSecret:s.apiSecretKeys.find(f=>f.secret).secret,apiKey:s.apiKey})}async function x(e,t,r){let o=await T(e,r);return t?_(t,o):C(o)}async function B(e,t,r,o){let s=await A(e,t,o);return r?M(r,t,s):V(s)}async function Y(e,t){let r=e??H(t)??await R(),o=t??await D(r);return L(o,r)}async function N(e){let t=await W(e);await z(t)}async function W(e){let t=await x(e.developerPlatformClient,e.apiVersion,e.organizationId),r=await B(e.developerPlatformClient,t,e.topic,e.organizationId),[o,s]=await Y(e.deliveryMethod,e.address),l=await O(e,s);return{topic:r,apiVersion:t,deliveryMethod:s,address:o,apiKey:l.apiKey,clientSecret:l.clientSecret,developerPlatformClient:e.developerPlatformClient,organizationId:e.organizationId}}async function z(e){let t={topic:e.topic,api_version:e.apiVersion,address:e.address,delivery_method:e.deliveryMethod,shared_secret:e.clientSecret,api_key:e.apiKey},r=await b(e.developerPlatformClient,t,e.organizationId);if(!r.success){m(`Request errors:
|
|
4
4
|
${K(r.userErrors)}`);return}if(e.deliveryMethod===i.LOCALHOST){if(await k(e.address,r.samplePayload,r.headers)){h("Localhost delivery sucessful");return}m("Localhost delivery failed");return}r.samplePayload===JSON.stringify({})&&h("Webhook has been enqueued for delivery")}function K(e){try{return e.map(t=>JSON.parse(t.message).map(r=>` \xB7 ${r}`).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b}from"./chunk-J3JPJCWP.js";import{a as fe}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-J3JPJCWP.js";import{a as fe}from"./chunk-EOJNSPIH.js";import{b as re,c as oe,d as se,e as ne,f as ie,h as ae,i as le,k as ce,l as me,n as de}from"./chunk-DN3BB4IO.js";import{c as ee,e as te}from"./chunk-N6IFIMC6.js";import{a as X}from"./chunk-KQTVJMV6.js";import{c as Q,e as v,m as Z,n as x}from"./chunk-HSVZU7MP.js";import{k as P,l as V,n as y}from"./chunk-I5X3IP6T.js";import{s as C,u as k}from"./chunk-4P54DKG4.js";import{a as B,b as N}from"./chunk-KFUOVO3X.js";import{o as K,s as J,t as z,u as Y,w as j}from"./chunk-Q7BOSHWX.js";import{ta as $,xa as L}from"./chunk-TIU7MMRT.js";import{a as O}from"./chunk-5C7HDTHJ.js";import{J as U,s as W,u as I,v as M,w as R,y as q,z as G}from"./chunk-EEEKSYWV.js";import{d as _,e as H}from"./chunk-7AY6HLQG.js";import{d as g}from"./chunk-IIFRDOYG.js";import{Fb as w,Hb as E,Mb as T,Pb as u}from"./chunk-TB7HFPBB.js";import{u as p}from"./chunk-A4SBXDZB.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var he={workPromise:Promise.resolve()};async function ue(e,t,o,r,s){if(o.length===0)return he;u("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l}=Ce(o,r),n=a.length===0&&i.length===0&&l.length===0;if(L(`theme-service:theme-reconciliation:manual:${n}`),n)return u("Local and remote checksums match - no need to reconcile theme assets"),he;let c=await Se({filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l},s);return{workPromise:Ae(e,t,r,c)}}function Ce(e,t){let o=new Set,r=[],s=[];for(let i of e){o.add(i.key);let l=t.files.get(i.key);l?i.checksum!==l.checksum&&s.push(i):r.push(i)}let a=Array.from(t.files.values()).filter(i=>!o.has(i.key));return{filesOnlyPresentOnRemote:A(r,t),filesOnlyPresentLocally:A(a,t),filesWithConflictingChecksums:A(s,t)}}function A(e,t){return t.applyIgnoreFilters(e).filter(r=>r.key.endsWith(".json"))}async function S(e,t,o){if(e.length===0)return;I({body:{list:{title:t,items:e.map(s=>s.key)}}}),await G({message:"Reconciliation Strategy",choices:[{label:o.remote.label,value:D},{label:o.local.label,value:pe}]})===D?o.remote.callback(e):o.local.callback(e)}async function Ae(e,t,o,r){let{localFilesToDelete:s,filesToDownload:a,remoteFilesToDelete:i}=r,l=s.map(m=>o.delete(m.key)),n=b(a,k,async m=>{let f=await P(e.id,m.map(h=>h.key),t);return Promise.all(f.map(h=>{if(h)return o.write(h)}))}),c=V(e.id,i.map(m=>m.key),t);await Promise.all([...l,...n,c])}async function Se(e,t){let{filesOnlyPresentLocally:o,filesOnlyPresentOnRemote:r,filesWithConflictingChecksums:s}=e,a=[],i=[],l=[];return t.noDelete||await S(o,"The files listed below are only present locally. What would you like to do?",{remote:{label:"Delete files from the local directory",callback:n=>{a.push(...n)}},local:{label:"Upload local files to the remote theme",callback:()=>{}}}),await S(r,"The files listed below are only present on the remote theme. What would you like to do?",{remote:{label:"Download remote files to the local directory",callback:n=>{i.push(...n)}},local:{label:"Delete files from the remote theme",callback:n=>{l.push(...n)}}}),await S(s,"The files listed below differ between the local and remote versions. What would you like to do?",{remote:{label:"Keep the remote version",callback:n=>{i.push(...n)}},local:{label:"Keep the local version",callback:()=>{}}}),{localFilesToDelete:a,filesToDownload:i,remoteFilesToDelete:l}}d();var De=3e3,F=class extends Error{};function we(e,t,o,r,s,a){u("Listening for changes in the theme editor");let i=5,l=0,n="",c=o,m=async()=>{await new Promise(f=>setTimeout(f,De)),c=await Fe(e,t,c,r,s).then(f=>(l=0,n="",f)).catch(f=>{if(l++,f.message!==n&&(n=f.message,v("Error while polling for changes.",f)),l>=i){let h=new g("Too many polling errors...","Please check the errors above and ensure you have a stable internet connection.");q(h),a(h)}return c})};setTimeout(async()=>{for(;;)await m()})}async function Fe(e,t,o,r,s){let a=new Set(r.unsyncedFileKeys),i=ye(o,r,a),l=await y(e.id,t).then(m=>ye(m,r,a)),n=$e(i,l),c=Oe(l,i);return await He(r,n),await Le(e,t,r,n),await _e(r,c,s),l}function Oe(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>o.get(s.key)===void 0)}function $e(e,t){let o=new Map(e.map(s=>[s.key,s]));return t.filter(s=>{let a=o.get(s.key);if(!a||a.checksum!==s.checksum)return!0})}async function Le(e,t,o,r){let s=r.filter(i=>o.files.get(i.key)?.checksum!==i.checksum),a=b(s,k,async i=>P(e.id,i.map(l=>l.key),t).then(l=>Promise.all(l.map(async n=>{n&&(await o.write(n),T(E`• ${C.format(new Date)} Synced ${w.raw("\xBB")} ${w.gray(`download ${n.key} from remote theme`)}`))}))));await Promise.all(a)}async function _e(e,t,o){if(!o.noDelete)return Promise.all(t.map(r=>{if(e.files.get(r.key))return e.delete(r.key).then(()=>{T(E`• ${C.format(new Date)} Synced ${w.raw("\xBB")} ${w.gray(`remove ${r.key} from local theme`)}`)})}))}async function He(e,t){let o=new Map(e.files);await Promise.all(t.map(r=>e.read(r.key)));for(let r of t){let s=o.get(r.key)?.checksum,a=e.files.get(r.key)?.checksum;if(s!==a)throw new F(`Detected changes to the file '${r.key}' on both local and remote sources. Aborting...`)}}function ye(e,t,o){return t.applyIgnoreFilters(e).filter(s=>s.key.endsWith(".json")).filter(s=>!o.has(s.key))}var pe="local",D="remote";async function ge(e,t,o,r,s,a){u("Initiating theme asset reconciliation process"),await r.ready();let{workPromise:i}=await ue(e,t,o,r,s);return{updatedRemoteChecksumsPromise:i.then(async()=>{let n=await y(e.id,t);return we(e,t,n,r,s,a),n}),workPromise:i}}d();function ke(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}import{createServer as We}from"node:http";function Pe(e,t){let{promise:o,resolve:r,reject:s}=ke(),a=ae(e,t),i=Ie(e,t,s),l=Promise.all([a,i.workPromise]).then(()=>t.localThemeFileSystem.startWatcher(e.id.toString(),t.session)),n=qe(e,t,l);return{workPromise:l,serverStart:n.start,dispatchEvent:n.dispatch,renderDevSetupProgress:i.renderProgress,backgroundJobPromise:o,resolveBackgroundJob:r}}function Ie(e,t,o){let r=n=>(v("Failed to perform the initial theme synchronization.",n),o(n),new Promise(()=>{})),a=y(e.id,t.session).then(n=>Me(e,t,n,o)),i=a.then(async({updatedRemoteChecksumsPromise:n})=>{let c=await n;return fe(e,t.session,c,t.localThemeFileSystem,{nodelete:t.options.noDelete,deferPartialWork:!0,backgroundWorkCatch:r})});return{workPromise:i.then(n=>n.workPromise).catch(r),renderProgress:async()=>{if(t.options.themeEditorSync){let{workPromise:c}=await a;await te([{title:"Performing file synchronization. This may take a while...",task:async()=>{await c}}])}let{renderThemeSyncProgress:n}=await i;await n()}}}function Me(e,t,o,r){return t.options.themeEditorSync?ge(e,t.session,o,t.localThemeFileSystem,{noDelete:t.options.noDelete,ignore:t.options.ignore,only:t.options.only},r):Promise.resolve({updatedRemoteChecksumsPromise:Promise.resolve(o),workPromise:Promise.resolve()})}function qe(e,t,o){let r=Y(),s=[`http://${t.options.host}:${t.options.port}`,`https://${t.session.storeFqdn}`,"https://online-store-web.shopifyapps.com"];r.use(ne(t.options.host,t.options.port)),r.use(z(async()=>(await o,J(i=>{i.node.req.headers.origin&&K(i,{origin:n=>s.includes(n),credentials:!0,methods:["GET","POST","HEAD","OPTIONS"],preflight:{statusCode:204}})})))),t.options.liveReload!=="off"&&r.use(le(e,t)),r.use(se(e,t)),r.use(re(e,t)),r.use(oe(e,t));let a=We(j(r));return{dispatch:r.handler.bind(r),start:async()=>new Promise(i=>a.listen({port:t.options.port,host:t.options.host},()=>i({close:async()=>{await Promise.all([new Promise(l=>{a.closeAllConnections(),a.close(l)})])}})))}}import Ge from"readline";var Ue="127.0.0.1",Ke=9292,ve=!1;async function xt(e){if(!await de(e.directory)&&!await ee(e.force))return;e.password?.startsWith("shpat_")&&R({headline:"Admin API token missing features:",body:["Directly using an Admin API token will result in some missing features.","We recommend generating a password from the Theme Access app.","Alternatively, you can authenticate normally by not passing the --password flag.",`
|
|
2
2
|
`,{list:{title:"Known limitations:",items:["Hot module reloading","Password protected storefronts"]}}],link:{label:"Theme Access app",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-access"}}),e.listing&&await ce(e.directory,e.listing);let[t,o]=await Promise.all([Z(e.adminSession),Q(e.adminSession)]),r=o?await X(e.storePassword,e.adminSession.storeFqdn,t):void 0,s=ie(),a=me(e.directory,{filters:e,listing:e.listing,noDelete:e.noDelete,notify:e.notify}),i=e.host??Ue,l;if(e.port){if(!await N(e.port))throw new g(`Port ${e.port} is not available. Try a different port or remove the --port flag to use an available port.`);l=e.port}else l=await B(Ke);let n={local:`http://${i}:${l}`,giftCard:`http://${i}:${l}/gift_cards/[store_id]/preview`,themeEditor:`https://${e.store}/admin/themes/${e.theme.id}/editor?hr=${l}`,preview:`https://${e.store}/?preview_theme_id=${e.theme.id}`},m={session:await x(e.theme.id.toString(),e.adminSession,e.password,r,t),localThemeFileSystem:a,localThemeExtensionFileSystem:s,directory:e.directory,type:"theme",lastRequestedPath:"",options:{themeEditorSync:e["theme-editor-sync"],host:i,port:l,open:e.open,liveReload:e["live-reload"],standardEventsDevBundle:!0,standardEventsInspector:e["standard-events-inspector"],noDelete:e.noDelete,ignore:e.ignore,only:e.only,errorOverlay:e["error-overlay"]}},{serverStart:f,renderDevSetupProgress:h,backgroundJobPromise:Re,resolveBackgroundJob:Ee}=Pe(e.theme,m);Ge.emitKeypressEvents(process.stdin);let Te=ze(n,m,Ee);process.stdin.on("keypress",Te),await Promise.all([Re,h().then(f).then(()=>{process.stdin.isTTY&&process.stdin.setRawMode(!0),je(n),e.open&&be(n.local,"development server")})]),await Je(e.commandConfig,e.adminSession),process.exit(0)}async function Je(e,t){if(!ve){ve=!0;try{await _(()=>({store_fqdn_hash:O(t.storeFqdn)})),await H(()=>({store_fqdn:t.storeFqdn})),await $({config:e,exitMode:"ok"})}catch{}}}function ze(e,t,o){let r=W(be,100,{leading:!0,trailing:!1});return(s,a)=>{if(a.ctrl&&a.name==="c"){o();return}switch(a.name){case void 0:break;case"t":r(e.local,"localhost");break;case"p":r(e.preview,"theme preview");break;case"e":r(t.lastRequestedPath==="/"?e.themeEditor:`${e.themeEditor}&previewPath=${encodeURIComponent(t.lastRequestedPath)}`,"theme editor");break;case"g":r(e.giftCard,"gift card preview");break;default:break}}}function be(e,t){U(e).catch(Ye(t))}function Ye(e){return t=>{R({headline:`Failed to open ${e}.`,body:t.stack??t.message})}}function je(e){M({body:[{list:{title:p.bold("Preview your theme ")+p.cyan("(t)"),items:[{link:{url:e.local}}]}}],nextSteps:[[{link:{label:`Share your theme preview ${p.cyan("(p)")}`,url:e.preview}},{subdued:e.preview}],[{link:{label:`Customize your theme at the theme editor ${p.cyan("(e)")}`,url:e.themeEditor}}],[{link:{label:`Preview your gift cards ${p.cyan("(g)")}`,url:e.giftCard}}]]})}export{xt as a,be as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-G6BFXMOV.js";import{a as c}from"./chunk-5VC4XXYH.js";import{a as u}from"./chunk-TM44Z7U7.js";import{a as y}from"./chunk-ZAN7AZTX.js";import{d as f}from"./chunk-N6IFIMC6.js";import{p,v as m}from"./chunk-4P54DKG4.js";import{xa as h}from"./chunk-TIU7MMRT.js";import{b as l,d}from"./chunk-NGCPVRDM.js";import{r as O}from"./chunk-T6CC5WUU.js";import{e as F,g as a}from"./chunk-VKWPEFWQ.js";a();var t=F(O(),1);var w,o=class extends m{async command(r,n){let{ignore:g=[],only:_=[]}=r;h("theme-command:dev:single-env:authenticated");let i,e;if(r.theme){let s={filter:{theme:r.theme}};i=await u(n,s),e={...r,theme:i.id.toString(),store:n.storeFqdn}}else{i=await new c(n).findOrCreate();let s=r["theme-editor-sync"]&&i.createdAtRuntime;e={...r,theme:i.id.toString(),store:n.storeFqdn,"overwrite-json":s}}await f(i,"start development mode",r["allow-live"])&&(await v({adminSession:n,commandConfig:this.config,directory:e.path,store:e.store,password:e.password,storePassword:e["store-password"],theme:i,listing:e.listing,host:e.host,port:e.port,"live-reload":e["live-reload"],"error-overlay":e["error-overlay"],force:e.force,open:e.open,"theme-editor-sync":e["theme-editor-sync"],"standard-events-inspector":e["standard-events-inspector"],noDelete:e.nodelete,ignore:g,only:_,notify:e.notify}),await y({path:e.path,password:e.password,store:e.store,force:e.force,verbose:e.verbose,noColor:e["no-color"],silent:!0}))}};w=o;o.summary="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";o.descriptionWithMarkdown=`
|
|
2
2
|
Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.
|
|
3
3
|
|
|
4
4
|
This command returns the following information:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-5VC4XXYH.js";import{a as _,c as b}from"./chunk-TM44Z7U7.js";import{a as c,b as F}from"./chunk-N6IFIMC6.js";import{e as y,q as T}from"./chunk-I5X3IP6T.js";import{i as v,p as g,v as w}from"./chunk-4P54DKG4.js";import{b as u}from"./chunk-NGCPVRDM.js";import{A as p,v as d}from"./chunk-EEEKSYWV.js";import{V as f}from"./chunk-TB7HFPBB.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as Y,g as h}from"./chunk-VKWPEFWQ.js";h();h();async function I(t,e,i){let r=e.themes;e.development&&(r=[(await new D(t).find()).id.toString()]);let n=t.storeFqdn,s=await L(t,{...e,themes:r,development:!1});if(!e.force&&!i&&!await M(s,n))return;await Promise.all(s.map(o=>(y(o)&&v(),T(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
|
|
2
2
|
|
|
3
3
|
`}]:[];d({body:f(s,o=>[...l,`The following themes were deleted from ${n}:`,F(o)],o=>[...l,"The theme",...c(o),`was deleted from ${n}.`])})}async function L(t,e){if(e.selectTheme||e.themes.length>0)return b(t,e);let i=t.storeFqdn;return[await _(t,{header:`Select a theme to delete from ${i}`,filter:{development:e.development}})]}async function M(t,e){let r={message:f(t,n=>[`Delete the following themes from ${e}?`],n=>["Delete",...c(n),`from ${e}?`]),confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return t.length>1&&(r.infoTable={"":t.map(c)}),p(r)}var a=Y(C(),1);var O,m=class extends w{async command(e,i,r){let{environment:n,development:s,force:l,theme:o}=e,E=o??[];await I(i,{selectTheme:e["show-all"],environment:n,development:s,themes:E,force:l},r)}};O=m;m.summary="Delete remote themes from the connected store. This command can't be undone.";m.descriptionWithMarkdown=`Deletes a theme from your store.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-7PVNAILK.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as P,t as F}from"./chunk-
|
|
1
|
+
import{k as P,t as F}from"./chunk-I5X3IP6T.js";import{a as N}from"./chunk-Q7BOSHWX.js";import{a as T}from"./chunk-WN5VTUWJ.js";import{M as H,O as q,o as $,va as d,xa as h}from"./chunk-TIU7MMRT.js";import{a as x}from"./chunk-B5MFFERE.js";import{P as v,x as I,y as L}from"./chunk-EEEKSYWV.js";import{d as l}from"./chunk-IIFRDOYG.js";import{Fb as C,Hb as U,Pb as c}from"./chunk-TB7HFPBB.js";import{u as O}from"./chunk-SZM6ANMN.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function D(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,o);for(let[r,o]of Object.entries(e.replaceExtensionTemplates??[])){let n=r.split("/")[0];t.append(`replace_extension_templates[${n}][${r}]`,o)}return t.append("_method",e.method),t}function w(){return{"User-Agent":`Shopify CLI; v=${x}`}}function k(e){return delete e.cookie,delete e.authorization,e}p();function S(e){let t={};return e.split(";").forEach(r=>{let o=r.match(/(.*?)=(.*)$/)??[],n=o[1]?.trim(),s=o[2]?.trim()??"";n&&(t[n]=s)}),t}function E(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var y=class extends l{};async function Re(e){return F(e)}async function be(e,t,r){let o=M(t),n=new URLSearchParams;n.append("form_type","storefront_password"),n.append("utf8","\u2713"),n.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let s={"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded",...r},a=await $(`${o}/password`,{headers:s,body:n.toString(),method:"POST",redirect:"manual"});if(a.status===429)throw d(new l(`Too many incorrect password attempts. Please try again after ${a.headers.get("retry-after")} seconds.`));return B(a,o)}async function j(e,t,r,o,n={}){let s={},a=await G(e,r,n),i=M(t);if(s._shopify_essential=a,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return s;let u=await ee(a,e,i,o,n);return{...s,...u}}async function G(e,t,r,o=1){let n=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),s=`${e}?${n}`;h("theme-service:storefront-session:get-session-essential-cookie");let a={...r,...w()},i=await $(s,{method:"HEAD",redirect:"manual",headers:a}),u=i.headers.raw()["set-cookie"]??[],f=_(u,"_shopify_essential");if(!f){if(c(`Failed to obtain _shopify_essential cookie.
|
|
2
2
|
|
|
3
3
|
-Request ID: ${i.headers.get("x-request-id")??"unknown"}
|
|
4
4
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-UHIP5CFI.js";import{a as S}from"./chunk-VJQJ5PTQ.js";import{A as b,B as A,D as C,E as x,Fa as V}from"./chunk-4MLEL3VK.js";import{a as c}from"./chunk-7PVNAILK.js";import{b as j,c as E}from"./chunk-NGCPVRDM.js";import{v as y,x as u}from"./chunk-EEEKSYWV.js";import{d as g,f as o}from"./chunk-IIFRDOYG.js";import{Lb as s,Sb as w,Vb as h}from"./chunk-TB7HFPBB.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function N(f,t){let i=new Set(t.map(n=>n.file)).size;await c.addPublicMetadata(()=>({cmd_app_validate_valid:f,cmd_app_validate_issue_count:t.length,cmd_app_validate_file_count:i}))}async function J(f,t={json:!1}){let i=f.errors;if(!i||i.isEmpty()){if(await N(!0,[]),t.json){s(JSON.stringify({valid:!0,issues:[]},null,2));return}y({headline:"App configuration is valid."});return}let n=i.getErrors();if(await N(!1,n),t.json){let d=n.map(({file:p,message:a,path:r,code:e})=>({file:p,message:a,path:r,code:e}));throw s(JSON.stringify({valid:!1,issues:d},null,2)),new o}throw u({headline:"Validation errors found.",body:n.map(d=>`\u2022 ${x(d)}`).join(`
|
|
2
2
|
`)}),new o}var v;async function _(f,t){await c.addPublicMetadata(()=>({cmd_app_validate_valid:!1,cmd_app_validate_issue_count:f,cmd_app_validate_file_count:t}))}var l=class extends M{async run(){let{flags:t}=await this.parse(v);await c.addPublicMetadata(()=>({cmd_app_validate_json:t.json}));let i;try{i=await b.load(t.path)}catch(a){if(a instanceof g&&t.json){await _(1,1);let r=h(w(a.message)).trim();throw s(JSON.stringify({valid:!1,issues:[{message:r}]},null,2)),new o}throw a}let n;try{n=await C(i,t.config)}catch(a){if(a instanceof g&&t.json){await _(1,1);let r=h(w(a.message)).trim();throw s(JSON.stringify({valid:!1,issues:[{message:r}]},null,2)),new o}throw a}let d=A(i,n.file);if(d.length>0){let a=d.map(e=>({file:e.path,message:e.message})),r=new Set(d.map(e=>e.path)).size;throw await _(a.length,r),t.json?(s(JSON.stringify({valid:!1,issues:a},null,2)),new o):(u({headline:"Validation errors found.",body:a.map(e=>`\u2022 ${e.message}`).join(`
|
|
3
3
|
`)}),new o)}let p;try{p=(await V({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config,unsafeTolerateErrors:!0})).app}catch(a){let r=a instanceof g?h(w(a.message)).trim():"";throw r.startsWith("Validation errors in ")&&t.json?(await _(1,1),s(JSON.stringify({valid:!1,issues:[{message:r}]},null,2)),new o):a}return await J(p,{json:t.json}),{app:p}}};v=l;l.summary="Validate your app configuration and extensions.";l.descriptionWithMarkdown="Validates the selected app configuration file and all extension configurations against their schemas and reports any errors found.";l.description=v.descriptionWithoutMarkdown();l.flags={...j,...S,...E};var X=l;export{X as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c}from"./chunk-H7PNMMDO.js";import{h as E,ua as T,va as u,xa as s}from"./chunk-2HZMOK4U.js";import{F as w}from"./chunk-E24W34C4.js";import{d as N}from"./chunk-ELIH6GCC.js";import{Pb as V,T as _}from"./chunk-EYDNSYYE.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ne="live",ie="unpublished";function ae(e){return e.role===g}async function te(e){let n=await _("creative");return w({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function f(e){let n=j.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??(e.processing=!1),e.createdAtRuntime??(e.createdAtRuntime=!1);let{id:n,name:a,role:i,processing:t,createdAtRuntime:d}=e;return{id:n,name:a,processing:t,createdAtRuntime:d,role:i==="main"?"live":i}}function re(e){if(!e)return;let{key:n,checksum:a,attachment:i,value:t}=e,d={size:(t||i||"").length,mtime:Date.now()};return{key:n,checksum:a,attachment:i,value:t,stats:d}}l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Q="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",p={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function rn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await c({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),u(i),V(`Error fetching theme with ID: ${e}`)}}async function sn(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await b({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});i.themes||r("Failed to fetch themes");let{nodes:t,pageInfo:d}=i.themes;if(t.forEach(m=>{let o=y({id:f(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&n.push(o)}),!d.hasNextPage)return n;a=d.endCursor}}async function kn(e,n){s("theme-api:find-development-theme-by-name");let{themes:a}=await b({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw u(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:i,processing:t,role:d,name:m}=a.nodes[0];return y({id:f(i),processing:t,role:d.toLowerCase(),name:m})}}async function un(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await c({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:p});i||r("Failed to create theme");let{theme:t,userErrors:d}=i;if(d.length){let m=i.userErrors.map(o=>o.message).join(", ");throw u(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function cn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await b({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let k=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${k}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async k=>{let{attachment:h,value:v}=await Z(k.body);return{attachment:h,key:k.filename,checksum:k.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function pn(e,n,a){let t=[];s("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:o}=await c({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:p});o||r("Failed to delete theme assets");let{deletedThemeFiles:k,userErrors:h}=o;k&&k.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(u(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return t}async function vn(e,n,a){let i=[];s("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=X(d);T("theme-api:upload-files");let o=await K(e,m,a);T("theme-api:upload-files"),i.push(...W(o))}return i}function X(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function K(e,n,a){return c({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:p})}function W(e){let{themeFilesUpsert:n}=e;n||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:i}=n,t=[];return a?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),i.forEach(d=>{d.filename||r(`Error uploading theme files: ${d.message}`),u(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function Nn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await b({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(k=>k.filename).join(", ");throw u(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(a.push(...d.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;i=m.endCursor}}async function hn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await c({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:p});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let k=d.userErrors.map(h=>h.message).join(", ");throw u(new N(k))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function fn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await c({query:O,session:n,variables:{id:S(e)},preferredBehaviour:p});a||r("Failed to update theme");let{theme:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw u(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function yn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await c({query:x,session:n,variables:{id:S(e)},preferredBehaviour:p});a||r("Failed to update theme");let{deletedThemeId:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw u(new N(d))}return i||r("Failed to update theme"),!0}async function Sn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await c({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:p,responseOptions:{onResponse:k=>{i=k.headers.get("x-request-id")??void 0}}});if(!t)return u("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:i}:d?{theme:y({id:f(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:i}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i}}async function Fn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await c({query:L,session:n,variables:{ownerType:e}});return a.nodes.map(i=>({key:i.key,namespace:i.namespace,name:i.name,description:i.description,type:{name:i.type.name,category:i.type.category}}))}async function bn(e){s("theme-api:check-password-protection");let{onlineStore:n}=await c({query:$,session:e});n||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=n;return a.enabled}function r(e){throw u(new N(e))}async function b(e){try{return await c(e)}catch(n){throw H(n),n}}function H(e){if(!(e instanceof E))return;let n=Y(e);if(!n)return;let a=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},"and",{command:"theme dev"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw u(new N(`The authenticated account or access token is missing ${n}.`,void 0,a))}function Y(e){let n=e.response.errors;if(!Array.isArray(n))return;let a=n.find(t=>t.extensions?.code==="ACCESS_DENIED");if(!a)return;let i=a.extensions?.requiredAccess;return typeof i!="string"?z:i.trim().replace(/\.$/,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function Z(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw u(new N(`Error downloading content from URL: ${e.url}`))}}}export{re as a,g as b,ne as c,ie as d,ae as e,te as f,rn as g,sn as h,kn as i,un as j,cn as k,pn as l,vn as m,Nn as n,hn as o,fn as p,yn as q,Sn as r,Fn as s,bn as t};
|
|
1
|
+
import{b as c}from"./chunk-WN5VTUWJ.js";import{h as E,ua as T,va as u,xa as s}from"./chunk-TIU7MMRT.js";import{F as w}from"./chunk-EEEKSYWV.js";import{d as N}from"./chunk-IIFRDOYG.js";import{Pb as V,T as _}from"./chunk-TB7HFPBB.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ne="live",ie="unpublished";function ae(e){return e.role===g}async function te(e){let n=await _("creative");return w({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function f(e){let n=j.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??(e.processing=!1),e.createdAtRuntime??(e.createdAtRuntime=!1);let{id:n,name:a,role:i,processing:t,createdAtRuntime:d}=e;return{id:n,name:a,processing:t,createdAtRuntime:d,role:i==="main"?"live":i}}function re(e){if(!e)return;let{key:n,checksum:a,attachment:i,value:t}=e,d={size:(t||i||"").length,mtime:Date.now()};return{key:n,checksum:a,attachment:i,value:t,stats:d}}l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Q="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",p={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function rn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await c({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),u(i),V(`Error fetching theme with ID: ${e}`)}}async function sn(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await b({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});i.themes||r("Failed to fetch themes");let{nodes:t,pageInfo:d}=i.themes;if(t.forEach(m=>{let o=y({id:f(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&n.push(o)}),!d.hasNextPage)return n;a=d.endCursor}}async function kn(e,n){s("theme-api:find-development-theme-by-name");let{themes:a}=await b({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw u(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:i,processing:t,role:d,name:m}=a.nodes[0];return y({id:f(i),processing:t,role:d.toLowerCase(),name:m})}}async function un(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await c({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:p});i||r("Failed to create theme");let{theme:t,userErrors:d}=i;if(d.length){let m=i.userErrors.map(o=>o.message).join(", ");throw u(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function cn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await b({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let k=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${k}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async k=>{let{attachment:h,value:v}=await Z(k.body);return{attachment:h,key:k.filename,checksum:k.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function pn(e,n,a){let t=[];s("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:o}=await c({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:p});o||r("Failed to delete theme assets");let{deletedThemeFiles:k,userErrors:h}=o;k&&k.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(u(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return t}async function vn(e,n,a){let i=[];s("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=X(d);T("theme-api:upload-files");let o=await K(e,m,a);T("theme-api:upload-files"),i.push(...W(o))}return i}function X(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function K(e,n,a){return c({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:p})}function W(e){let{themeFilesUpsert:n}=e;n||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:i}=n,t=[];return a?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),i.forEach(d=>{d.filename||r(`Error uploading theme files: ${d.message}`),u(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function Nn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await b({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(k=>k.filename).join(", ");throw u(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(a.push(...d.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;i=m.endCursor}}async function hn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await c({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:p});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let k=d.userErrors.map(h=>h.message).join(", ");throw u(new N(k))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function fn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await c({query:O,session:n,variables:{id:S(e)},preferredBehaviour:p});a||r("Failed to update theme");let{theme:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw u(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function yn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await c({query:x,session:n,variables:{id:S(e)},preferredBehaviour:p});a||r("Failed to update theme");let{deletedThemeId:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw u(new N(d))}return i||r("Failed to update theme"),!0}async function Sn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await c({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:p,responseOptions:{onResponse:k=>{i=k.headers.get("x-request-id")??void 0}}});if(!t)return u("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:i}:d?{theme:y({id:f(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:i}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i}}async function Fn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await c({query:L,session:n,variables:{ownerType:e}});return a.nodes.map(i=>({key:i.key,namespace:i.namespace,name:i.name,description:i.description,type:{name:i.type.name,category:i.type.category}}))}async function bn(e){s("theme-api:check-password-protection");let{onlineStore:n}=await c({query:$,session:e});n||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=n;return a.enabled}function r(e){throw u(new N(e))}async function b(e){try{return await c(e)}catch(n){throw H(n),n}}function H(e){if(!(e instanceof E))return;let n=Y(e);if(!n)return;let a=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},"and",{command:"theme dev"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw u(new N(`The authenticated account or access token is missing ${n}.`,void 0,a))}function Y(e){let n=e.response.errors;if(!Array.isArray(n))return;let a=n.find(t=>t.extensions?.code==="ACCESS_DENIED");if(!a)return;let i=a.extensions?.requiredAccess;return typeof i!="string"?z:i.trim().replace(/\.$/,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function Z(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw u(new N(`Error downloading content from URL: ${e.url}`))}}}export{re as a,g as b,ne as c,ie as d,ae as e,te as f,rn as g,sn as h,kn as i,un as j,cn as k,pn as l,vn as m,Nn as n,hn as o,fn as p,yn as q,Sn as r,Fn as s,bn as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as w}from"./chunk-
|
|
1
|
+
import{a as h,b as w}from"./chunk-6VR22Z5R.js";import{n as f}from"./chunk-TIU7MMRT.js";import{P as d}from"./chunk-EEEKSYWV.js";import{d as i}from"./chunk-IIFRDOYG.js";import{Ga as m,na as p}from"./chunk-TB7HFPBB.js";import{d as u}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Eb as x,Sb as P,vb as w}from"./chunk-
|
|
1
|
+
import{Eb as x,Sb as P,vb as w}from"./chunk-TB7HFPBB.js";import{e as g}from"./chunk-773TIA5M.js";import{r as T}from"./chunk-T6CC5WUU.js";import{c as h,e as O,g as u}from"./chunk-VKWPEFWQ.js";var M=h(a=>{"use strict";u();a.__esModule=void 0;a.__esModule=!0;var B=typeof Object.setPrototypeOf=="function",R=typeof Object.getPrototypeOf=="function",U=typeof Object.defineProperty=="function",q=typeof Object.create=="function",z=typeof Object.prototype.hasOwnProperty=="function",H=function(e,r){B?Object.setPrototypeOf(e,r):e.__proto__=r};a.setPrototypeOf=H;var L=function(e){return R?Object.getPrototypeOf(e):e.__proto__||e.prototype};a.getPrototypeOf=L;var j=!1,Y=function t(e,r,n){if(U&&!j)try{Object.defineProperty(e,r,n)}catch{j=!0,t(e,r,n)}else e[r]=n.value};a.defineProperty=Y;var k=function(e,r){return z?e.hasOwnProperty(e,r):e[r]===void 0};a.hasOwnProperty=k;var D=function(e,r){if(q)return Object.create(e,r);var n=function(){};n.prototype=e;var s=new n;if(typeof r>"u")return s;if(typeof r=="null")throw new Error("PropertyDescriptors must not be null.");if(typeof r=="object")for(var o in r)k(r,o)&&(s[o]=r[o].value);return s};a.objectCreate=D});var S=h(f=>{"use strict";u();f.__esModule=void 0;f.__esModule=!0;var b=M(),G=b.setPrototypeOf,Z=b.getPrototypeOf,v=b.defineProperty,J=b.objectCreate,K=new Error().toString()==="[object Error]",m="";function p(t){var e=this.constructor,r=e.name||(function(){var y=e.toString().match(/^function\s*([^\s(]+)/);return y===null?m||"Error":y[1]})(),n=r==="Error",s=n?m:r,o=Error.apply(this,arguments);if(G(o,Z(this)),!(o instanceof e)||!(o instanceof p)){var o=this;Error.apply(this,arguments),v(o,"message",{configurable:!0,enumerable:!1,value:t,writable:!0})}if(v(o,"name",{configurable:!0,enumerable:!1,value:s,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(o,n?p:e),o.stack===void 0){var c=new Error(t);c.name=o.name,o.stack=c.stack}return K&&v(o,"toString",{configurable:!0,enumerable:!1,value:function(){return(this.name||"Error")+(typeof this.message>"u"?"":": "+this.message)},writable:!0}),o}m=p.name||"ExtendableError";p.prototype=J(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}});f.ExtendableError=p;f.default=f.ExtendableError});u();var A=O(T()),V=O(S()),i;(function(t){t[t.Abort=0]="Abort",t[t.AbortSilent=1]="AbortSilent",t[t.Bug=2]="Bug"})(i||(i={}));var _=class extends Error{},l=class extends Error{constructor(e,r,n=null,s,o){let c=typeof e=="string"||"value"in e;super(c?P(e):w(e)),n?n instanceof x?this.tryMessage=P(n):this.tryMessage=n:this.tryMessage=null,this.type=r,this.nextSteps=s,this.customSections=o,this.skipOclifErrorHandling=!0,c||(this.formattedMessage=e)}},E=class extends l{constructor(e,r=null,n,s){super(e,i.Abort,r,n,s)}},I=class extends l{constructor(e,r,n,s=null){super(e,i.Abort,s),this.command=r,this.args=n}},C=class extends l{constructor(){super("",i.AbortSilent)}},d=class extends l{constructor(e,r=null){super(e,i.Bug,r)}};async function ne(t){let e;if(N(t))e=t;else if(typeof t=="string")e=new d(t);else if(t instanceof Error)e=new d(t.message),e.stack=t.stack;else{let n=t;e=new d(n?.message??"Unknown error"),n?.stack&&(e.stack=n?.stack)}let{renderFatalError:r}=await import("./ui-N2C5FC3G.js");return r(e),Promise.resolve(t)}function oe(t){if(t instanceof A.Errors.CLIError){let e=new E(t.message);return e.stack=t.stack,Promise.resolve(e)}else return Promise.resolve(t)}function N(t){try{return Object.prototype.hasOwnProperty.call(t,"type")}catch{return!1}}function se(t){if(!N(t)){if(t instanceof Error){let e=t.message;return!Q(e)}return!0}return t.type===i.Bug}function ae(t){return g(t).replace("file:/","/").replace(/^\/?[A-Z]:/,"")}function Q(t){return["EPERM: operation not permitted, scandir","EPERM: operation not permitted, rename","EACCES: permission denied","EPERM: operation not permitted, symlink","This version of npm supports the following node versions","EBUSY: resource busy or locked","ENOTEMPTY: directory not empty","getaddrinfo ENOTFOUND","Client network socket disconnected before secure TLS connection was established","spawn EPERM","socket hang up","The user aborted a request.","write EPIPE","Unsupported platform"].some(n=>t.includes(n))}export{i as a,_ as b,l as c,E as d,I as e,C as f,d as g,ne as h,oe as i,se as j,ae as k,V as l};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as X,b as H,c as K}from"./chunk-
|
|
1
|
+
import{a as X,b as H,c as K}from"./chunk-35FS2NTM.js";import{a as M,c as P,e as h,f as T,h as q,i as V,m as U,p as _,q as F,r as j,s as z,u as Q}from"./chunk-523SJVNT.js";import{a as W}from"./chunk-UHIP5CFI.js";import{a as G,b as J}from"./chunk-VJQJ5PTQ.js";import{b as L}from"./chunk-NGCPVRDM.js";import{E as R,a as D,u as v,v as d,w as E,x as A}from"./chunk-EEEKSYWV.js";import{d as f,g as x}from"./chunk-IIFRDOYG.js";import{Fb as r,Hb as s,Lb as N,Ta as $,ma as S,ua as I}from"./chunk-TB7HFPBB.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function oe(t,e){if(t)return t.join(`
|
|
2
2
|
`);if(e){if(!await $(e))throw new f(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return S(e,{encoding:"utf8"})}else return}async function Z(t){let{organization:e,remoteApp:i,store:n,query:a,variables:p,variableFile:k,outputFile:B,watch:ee=!1,version:te}=t,{adminSession:c,version:w}=await R({title:s`Authenticating`,task:async()=>{let o=await X(i,n.shopDomain),u=await T({adminSession:o,userSpecifiedVersion:te,minimumDefaultVersion:M});return{adminSession:o,version:u}},renderOptions:{stdout:process.stderr}}),C=await oe(p,k);ae(a,C),K(a,n),v({headline:"Starting bulk operation.",body:[{list:{items:H({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:w})}}]});let y=h(a)?await V({adminSession:c,query:a,variablesJsonl:C,version:w}):await q({adminSession:c,query:a,version:w});if(y?.userErrors?.length){A({headline:"Error creating bulk operation.",body:{list:{items:y.userErrors.map(o=>o.field?`${o.field.join(".")}: ${o.message}`:o.message)}}});return}let g=y?.bulkOperation;if(g)if(ee){let o=new D,u=await F(c,g.id,o.signal,()=>o.abort());o.signal.aborted?v({headline:`Bulk operation ${u.id} is still running in the background.`,body:b(u.id)}):await Y(u,B)}else{let o=await _(c,g.id);["FAILED","CANCELED","EXPIRED"].includes(o.status)?await Y(o,B):d({headline:"Bulk operation is running.",body:b(o.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(o.id)}`.value]}}]}]})}else throw E({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new x("Bulk operation response returned null with no error message.")}async function Y(t,e){let i=U(t).value,a=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":d({headline:"Bulk operation started.",body:b(t.id),customSections:a});break;case"RUNNING":d({headline:"Bulk operation is running.",body:b(t.id),customSections:a});break;case"COMPLETED":if(t.url){let p=await j(t.url),k=z(p);e?await I(e,p):N(p),k?E({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:a}):d({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:a})}else d({headline:i,customSections:a});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":A({headline:i,customSections:a});break}}function ae(t,e){if(h(t)&&!e)throw new f(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!h(t)&&e)throw new f(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function b(t){return[`Monitor its progress with:
|
|
3
3
|
`,{command:`shopify app bulk status --id=${P(t)}`}]}var O,l=class extends W{async run(){let{flags:e}=await this.parse(O),{query:i,appContextResult:n,store:a}=await Q(e);return await Z({organization:n.organization,remoteApp:n.remoteApp,store:a,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:n.app}}};O=l;l.summary="Execute bulk operations.";l.descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-AUAUAK6P.js";import{a as e}from"./chunk-RTINXD5Z.js";import{a as o}from"./chunk-7RJPTSL6.js";import{b as i}from"./chunk-UAYIFFYJ.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static{this.description="View all the available UI kit components"}static{this.hiddenAliases=["kitchen-sink all"]}static{this.hidden=!0}async run(){await o(),await e(),await s()}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o}from"./chunk-
|
|
1
|
+
import{e as o}from"./chunk-NGCPVRDM.js";import{b as s}from"./chunk-UAYIFFYJ.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static{this.description="Clear the CLI cache, used to store some API responses and handle notifications status"}static{this.hidden=!0}async run(){await o()}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,i as f}from"./chunk-
|
|
1
|
+
import{f as m,i as f}from"./chunk-R7QYSC6T.js";import{d as s}from"./chunk-IIFRDOYG.js";import{$ as c,Ta as r,qa as h,wa as l}from"./chunk-TB7HFPBB.js";import{d as o}from"./chunk-773TIA5M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function b(t,i){let n=t?.path??"",e=o(i,n);if(!await r(e))throw new s(`
|
|
2
2
|
The extension is not available for ${t?.value}`);return e}async function k({name:t,app:i}){let n=c(t),e=o(i.directory,f.extensions.directoryName,n);if(await r(e))throw new s(`
|
|
3
3
|
A directory with this name (${n}) already exists.
|
|
4
4
|
Choose a new name for your extension.`);return await l(e),await h(o(e,m.lockFile)),e}async function v({localApp:t,developerPlatformClient:i,apiKey:n,organizationId:e}){let{dashboardManagedExtensionRegistrations:x}=(await i.appExtensionRegistrations({id:n,apiKey:n,organizationId:e})).app;return x.length>0||t.allExtensions.filter(u=>u.isThemeExtension).length>0||t.allExtensions.length>0}export{b as a,k as b,v as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as m}from"./chunk-
|
|
1
|
+
import{P as m}from"./chunk-EEEKSYWV.js";import{d as c}from"./chunk-IIFRDOYG.js";import{Fb as l,Hb as n,Pb as a}from"./chunk-TB7HFPBB.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();import{createServer as d}from"net";var u=new Set;async function P(o,t){if(o&&await g(o))return a(n`Port ${o.toString()} is free`),o;a(n`Getting a random port...`);let r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);for(let e=0;e<(t?.maxTries??5)&&u.has(r);e++)r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${r}`)}`),u.add(r),r}async function g(o){return new Promise(t=>{let r=d();r.unref(),r.once("error",()=>t(!1));try{r.listen(o,"localhost",()=>{r.close(()=>t(!0))})}catch(e){if(!(e instanceof RangeError))throw e;t(!1)}})}function f(){return new Promise((o,t)=>{let r=d();r.unref(),r.once("error",t),r.listen(0,"localhost",()=>{let e=r.address();if(e&&typeof e=="object"){let i=e.port;r.close(()=>o(i))}else r.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(o,t=5,r=1){let e=1;for(;;)try{return await o()}catch(i){if(e++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(r);else throw new c(i.message)}}export{P as a,g as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u,c as d}from"./chunk-
|
|
1
|
+
import{b as u,c as d}from"./chunk-TSEPNC3O.js";import{a as m}from"./chunk-P7U6BWKN.js";import{a}from"./chunk-VJQJ5PTQ.js";import{Ga as c,q as p}from"./chunk-4MLEL3VK.js";import{b as e}from"./chunk-NGCPVRDM.js";import{v as n}from"./chunk-EEEKSYWV.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s,o=class extends m{async run(){let{flags:t}=await this.parse(s),{app:r}=await c({directory:t.path,userProvidedConfigName:t.config}),l=await d(r,t.path);return await p(l,{app:r,stdout:process.stdout,stderr:process.stderr,useTasks:!0,environment:"production"}),n({headline:"Function built successfully."}),{app:r}}};s=o;o.summary="Compile a function to wasm.";o.descriptionWithMarkdown="Compiles the function in your current directory to WebAssembly (Wasm) for testing purposes.";o.description=s.descriptionWithoutMarkdown();o.flags={...e,...a,...u};var k=o;export{k as a};
|