@shopify/cli 4.6.1 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-6LI5GLWS.js +1 -0
- package/dist/analytics-UNRIIG4Y.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-LURVEPYP.js → chunk-2CYVZUYT.js} +1 -1
- package/dist/{chunk-BDDROQGK.js → chunk-2HK4MFWP.js} +3 -3
- package/dist/chunk-2JDCVEFK.js +1 -0
- package/dist/chunk-2SZOPJYI.js +1 -0
- package/dist/chunk-2U4P6UFZ.js +6 -0
- package/dist/{chunk-EVIO6OWW.js → chunk-2WJAAJVX.js} +1 -1
- package/dist/chunk-37TEEITE.js +2 -0
- package/dist/chunk-3K6VHXC2.js +4 -0
- package/dist/chunk-4HV6A6UH.js +8 -0
- package/dist/chunk-4JY2P2A5.js +1 -0
- package/dist/chunk-4LRG5YBS.js +3 -0
- package/dist/chunk-4W3UE2ZI.js +1 -0
- package/dist/chunk-5CADTCJE.js +25 -0
- package/dist/chunk-5CR5YJTU.js +11 -0
- package/dist/chunk-5CYJG63I.js +1 -0
- package/dist/chunk-5HBIIYSK.js +1 -0
- package/dist/chunk-5HPBQ6U5.js +1 -0
- package/dist/chunk-5NO5OXYP.js +15 -0
- package/dist/chunk-63CIFL36.js +6 -0
- package/dist/chunk-6EBLULOC.js +1 -0
- package/dist/{chunk-5QDM4XIK.js → chunk-6ENBE43F.js} +1 -1
- package/dist/chunk-6OFGSZD6.js +1 -0
- package/dist/chunk-6PDR2IUL.js +11 -0
- package/dist/chunk-6VGJVXZI.js +3 -0
- package/dist/{chunk-YHH3JA36.js → chunk-6VRXGEIW.js} +1 -1
- package/dist/chunk-6WZYX5RO.js +1 -0
- package/dist/chunk-7AALWJAO.js +7 -0
- package/dist/chunk-7DOWT5JZ.js +20 -0
- package/dist/chunk-7JIQXGDE.js +9 -0
- package/dist/chunk-7MHANY34.js +1 -0
- package/dist/chunk-7WTNEG2F.js +3 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/chunk-ACTDYTAV.js +317 -0
- package/dist/{chunk-Y2PC2BBJ.js → chunk-AEUCDGTB.js} +4 -4
- package/dist/chunk-AGOEROAI.js +10 -0
- package/dist/{chunk-DC7TXY4K.js → chunk-AH2ZGMDM.js} +1 -1
- package/dist/chunk-AMLWPYNA.js +4 -0
- package/dist/chunk-B4OMIONW.js +5 -0
- package/dist/chunk-BR6DBMQA.js +5 -0
- package/dist/chunk-CFWHR74L.js +1 -0
- package/dist/chunk-CHMEDVDZ.js +15 -0
- package/dist/chunk-CIH6LPTG.js +6 -0
- package/dist/chunk-CMYQXGLO.js +1 -0
- package/dist/chunk-CTRXLZAJ.js +1 -0
- package/dist/{chunk-NVQOAHID.js → chunk-CYOFLJ3Z.js} +1 -1
- package/dist/{chunk-P2P2MAZQ.js → chunk-CZJZCJRX.js} +1 -1
- package/dist/chunk-CZPGC2E7.js +1 -0
- package/dist/{chunk-UTK6V2NE.js → chunk-D2K2ZBKH.js} +8 -8
- package/dist/chunk-DHU57LKD.js +1 -0
- package/dist/chunk-DKL6N3L2.js +1 -0
- package/dist/chunk-DMXQLI35.js +1 -0
- package/dist/chunk-DPNZWBT5.js +1 -0
- package/dist/{chunk-LDWMX3KZ.js → chunk-DQCIORGH.js} +1 -1
- package/dist/chunk-DQFSKPKL.js +6 -0
- package/dist/{chunk-RMF3YNWE.js → chunk-E2W5OYYM.js} +1 -1
- package/dist/chunk-E5T4YRGW.js +1 -0
- package/dist/chunk-EOMCXBCS.js +5 -0
- package/dist/{chunk-GD5IRJBE.js → chunk-EW55WWT7.js} +1 -1
- package/dist/{chunk-7EE7YOCR.js → chunk-F5HCSUXC.js} +5 -5
- package/dist/{chunk-WOYI6SDK.js → chunk-FCGKO2KY.js} +1 -1
- package/dist/{chunk-J3D4KQOQ.js → chunk-FULWTZS6.js} +1 -1
- package/dist/chunk-FWPJEL6Q.js +3 -0
- package/dist/chunk-GKOBFX4A.js +1 -0
- package/dist/chunk-GLWQMLUC.js +1 -0
- package/dist/chunk-GMTNOCMS.js +375 -0
- package/dist/chunk-GSCWZR22.js +1 -0
- package/dist/chunk-GZ64KWHX.js +8 -0
- package/dist/{chunk-EZBB2ULE.js → chunk-H5KWM27L.js} +1 -1
- package/dist/chunk-HHVHVGRT.js +1 -0
- package/dist/{chunk-LXOBW4AW.js → chunk-HLNJL4B6.js} +1 -1
- package/dist/{chunk-U3P5TIIR.js → chunk-HZIX3DIT.js} +1 -1
- package/dist/chunk-I3N6NPHF.js +2 -0
- package/dist/chunk-JD5P5RAJ.js +1 -0
- package/dist/chunk-JJJTPEMD.js +1 -0
- package/dist/{chunk-KRZABRYT.js → chunk-JLGA3B7P.js} +1 -1
- package/dist/chunk-JQ2B3VHR.js +7 -0
- package/dist/{chunk-STCLJWHD.js → chunk-JQISGC7D.js} +1 -1
- package/dist/chunk-JQVXH26X.js +6 -0
- package/dist/{chunk-PCTVUTV3.js → chunk-JUKAWTYY.js} +1 -1
- package/dist/{chunk-XZ2KUBFJ.js → chunk-JZMRBJH3.js} +2 -2
- package/dist/chunk-JZXA3H5K.js +1 -0
- package/dist/chunk-K4KTNINH.js +1 -0
- package/dist/chunk-KCS75ZM4.js +1 -0
- package/dist/{chunk-WE3VLC2S.js → chunk-KIYHEMHD.js} +7 -7
- package/dist/chunk-KK24VGVE.js +6 -0
- package/dist/{chunk-7TXWKLPY.js → chunk-KOVAFUYN.js} +1 -1
- package/dist/{chunk-NENUUNWB.js → chunk-KUNDCAQN.js} +1 -1
- package/dist/{chunk-NKBSS7YL.js → chunk-L67BU25M.js} +1 -1
- package/dist/{chunk-6HQMZ324.js → chunk-LDF4PQ3B.js} +18 -18
- package/dist/chunk-LFOBYEWG.js +1 -0
- package/dist/chunk-LJM2DUXN.js +1 -0
- package/dist/{chunk-XWPPBOGF.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-LQCR4TGH.js +3 -0
- package/dist/{chunk-QARALFHD.js → chunk-LRQYUWWB.js} +1 -1
- package/dist/{chunk-YR7K4NQT.js → chunk-LWJA2DQG.js} +1 -1
- package/dist/{chunk-NKT5U6IJ.js → chunk-LZ3GZ7NS.js} +1 -1
- package/dist/chunk-MB7E5GEY.js +2 -0
- package/dist/{chunk-7MD5MIGN.js → chunk-MLZLDL6B.js} +8 -8
- package/dist/chunk-MRCWOOSF.js +8 -0
- package/dist/chunk-N6YTJXIS.js +18 -0
- package/dist/chunk-NEMPLS7C.js +1 -0
- package/dist/chunk-OE3F7XXU.js +4 -0
- package/dist/chunk-OORWOTAP.js +3 -0
- package/dist/chunk-OUZGGWFN.js +1 -0
- package/dist/chunk-P5MNNBSO.js +1 -0
- package/dist/chunk-PAAKBWSF.js +1 -0
- package/dist/{chunk-M5YGJYNI.js → chunk-PANGX7SA.js} +1 -1
- package/dist/{chunk-7L5AIZOP.js → chunk-PIFW2R3S.js} +1 -1
- package/dist/chunk-PWSI275S.js +7 -0
- package/dist/chunk-Q5DQGV3M.js +1 -0
- package/dist/chunk-QBIVQXUJ.js +6 -0
- package/dist/chunk-QEB3HUQE.js +19 -0
- package/dist/{chunk-C7LFLIRT.js → chunk-QKGZWOOY.js} +1 -1
- package/dist/chunk-QPWMD2VR.js +1 -0
- package/dist/chunk-QRT4A2RV.js +3 -0
- package/dist/chunk-QXHENYJH.js +2 -0
- package/dist/{chunk-GJEG7VGX.js → chunk-QZBSCOJV.js} +1 -1
- package/dist/chunk-R2R6JDNH.js +1 -0
- package/dist/chunk-RUFQCXBX.js +16 -0
- package/dist/chunk-RY2SJVWM.js +12 -0
- package/dist/chunk-RZFBGBNA.js +1 -0
- package/dist/chunk-S3P5WWJD.js +1 -0
- package/dist/chunk-SEVSMWNX.js +1 -0
- package/dist/chunk-SJMTETSU.js +32 -0
- package/dist/chunk-SSJGWLCW.js +28 -0
- package/dist/chunk-SYADOUBB.js +7 -0
- package/dist/chunk-T5JXQ7KO.js +1 -0
- package/dist/chunk-TCTVI6PK.js +1 -0
- package/dist/chunk-TSLQZTXR.js +1 -0
- package/dist/chunk-TTAPXLI5.js +1 -0
- package/dist/{chunk-MMP3F6LO.js → chunk-TY4W7AYX.js} +1 -1
- package/dist/chunk-TYIGOVRQ.js +3 -0
- package/dist/{chunk-W2357IN2.js → chunk-U2Z5NMXV.js} +1 -1
- package/dist/{chunk-X5RH4ALT.js → chunk-U6HYEGAE.js} +1 -1
- package/dist/chunk-U7R6LYPJ.js +5 -0
- package/dist/chunk-UPJLZHHR.js +4 -0
- package/dist/chunk-UVQL7RUY.js +1 -0
- package/dist/chunk-V2HCVJYF.js +1 -0
- package/dist/chunk-V5SC2RYQ.js +2 -0
- package/dist/chunk-VKSR6MJG.js +2 -0
- package/dist/chunk-VRVP2GQL.js +5 -0
- package/dist/{chunk-MY2H5XPY.js → chunk-WCRZJY3P.js} +1 -1
- package/dist/{chunk-LJZIIURR.js → chunk-WHLGNDRE.js} +1 -1
- package/dist/{chunk-HVMEBH24.js → chunk-WKUGSFTB.js} +3 -3
- package/dist/chunk-X4XP2RQJ.js +1 -0
- package/dist/chunk-XAOYKECS.js +1 -0
- package/dist/chunk-XCBEYRQI.js +3 -0
- package/dist/chunk-XHZ5BWXL.js +5 -0
- package/dist/{chunk-H5I7BSNG.js → chunk-XLURZ6GL.js} +52 -52
- package/dist/chunk-XRT2W5Y2.js +10 -0
- package/dist/chunk-XUEMMLXK.js +1 -0
- package/dist/chunk-Y34LWI3S.js +19 -0
- package/dist/chunk-YHPBDS52.js +16 -0
- package/dist/{chunk-5INBKZRD.js → chunk-YIZZ5LZN.js} +1 -1
- package/dist/chunk-YN6A26QL.js +836 -0
- package/dist/chunk-YOO7DLOT.js +1 -0
- package/dist/chunk-YUVE2I3C.js +1 -0
- package/dist/chunk-YY6TFARF.js +1 -0
- package/dist/chunk-Z5K4J7HQ.js +1 -0
- package/dist/chunk-ZCNIR6YU.js +1 -0
- package/dist/{chunk-K4M32VKU.js → chunk-ZO74GSWC.js} +1 -1
- package/dist/{chunk-FBVNXRVB.js → chunk-ZRLEAF7M.js} +1 -1
- package/dist/chunk-ZSFAURIH.js +3 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.d.ts +5 -0
- package/dist/cli/commands/send-analytics.js +1 -0
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/services/doctor-release/theme/tests/init.js +4 -8
- package/dist/cli/services/doctor-release/theme/tests/push.js +3 -4
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-OAGJBITE.js +1 -0
- package/dist/custom-oclif-loader-BWAMUFQ4.js +1 -0
- package/dist/deprecations-K3NPRKBF.js +1 -0
- package/dist/dist-EXJEE23W.js +1 -0
- package/dist/dist-S62Z6IFV.js +1 -0
- package/dist/environments-ALH2N36U.js +1 -0
- package/dist/error-YX56C43A.js +1 -0
- package/dist/error-handler-FDCH72NH.js +1 -0
- package/dist/fs-SKHQZZTQ.js +1 -0
- 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 +2 -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.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/is-global-V5VORI3F.js +1 -0
- package/dist/lib-M72BVWQ3.js +1 -0
- package/dist/local-GX5AN6ZS.js +1 -0
- package/dist/metadata-XUJUTBTB.js +1 -0
- package/dist/{morph-ABSWZEVT.js → morph-77RHJICZ.js} +1 -1
- package/dist/node-package-manager-3WIYU7Y3.js +1 -0
- package/dist/notifications-system-RHULO564.js +1 -0
- package/dist/os-M6X7KOR4.js +1 -0
- package/dist/output-X47P6ICP.js +1 -0
- package/dist/{prettier-6ZMB2MMO.js → prettier-RVUAAWC7.js} +1 -1
- package/dist/system-SR5G7WEW.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-VYWSLAQ6.js +1 -0
- package/dist/upgrade-PFQ7JMXG.js +1 -0
- package/dist/version-FK4ETQ22.js +1 -0
- package/dist/version-U4GM2LNG.js +1 -0
- package/dist/workerd-NAPS5TA7.js +18 -0
- package/oclif.manifest.json +146 -120
- package/package.json +7 -8
- package/dist/analytics-3ICKUTK2.js +0 -1
- package/dist/analytics-73NVZI4Z.js +0 -1
- package/dist/chunk-25Z36VJG.js +0 -1
- package/dist/chunk-2AVFG5KT.js +0 -1
- package/dist/chunk-2DMTEIS3.js +0 -2
- package/dist/chunk-2GB3EAD3.js +0 -153
- package/dist/chunk-2NB4P6BB.js +0 -5
- package/dist/chunk-2OYQHHKC.js +0 -3
- package/dist/chunk-2VJKXWLG.js +0 -4
- package/dist/chunk-3Q5ESVIY.js +0 -1
- package/dist/chunk-3XCIUG5P.js +0 -1
- package/dist/chunk-445NFHXL.js +0 -3
- package/dist/chunk-4BPFJDH3.js +0 -1
- package/dist/chunk-4E5RGEJO.js +0 -1
- package/dist/chunk-4IHSAT76.js +0 -2
- package/dist/chunk-4TANJ4JK.js +0 -1
- package/dist/chunk-534U3DKZ.js +0 -6
- package/dist/chunk-56T6YCU2.js +0 -1
- package/dist/chunk-5HJTCBBV.js +0 -317
- package/dist/chunk-5Q4WAGQL.js +0 -3
- package/dist/chunk-65CEF3SM.js +0 -8
- package/dist/chunk-6KAWCN3I.js +0 -10
- package/dist/chunk-6ZPHB5U2.js +0 -3
- package/dist/chunk-7AWKXTNS.js +0 -4
- package/dist/chunk-7US4TVO2.js +0 -32
- package/dist/chunk-A4SBXDZB.js +0 -14
- package/dist/chunk-A7IDVXF7.js +0 -1
- package/dist/chunk-AFM3UZQO.js +0 -684
- package/dist/chunk-AHLNB45E.js +0 -3
- package/dist/chunk-ARCAYYRW.js +0 -1
- package/dist/chunk-B3U6GDHL.js +0 -7
- package/dist/chunk-BCZMDFI2.js +0 -370
- package/dist/chunk-BKJMVAI7.js +0 -1
- package/dist/chunk-BPDUBZMU.js +0 -1
- package/dist/chunk-BQOKTPUU.js +0 -1
- package/dist/chunk-CELVG4AL.js +0 -6
- package/dist/chunk-CNI7ZUST.js +0 -3
- package/dist/chunk-CONJQV7M.js +0 -11
- package/dist/chunk-CV5ELBVU.js +0 -1
- package/dist/chunk-DXUISRMZ.js +0 -2
- package/dist/chunk-EHV7EKB3.js +0 -2
- package/dist/chunk-EJDWYASP.js +0 -1
- package/dist/chunk-EQNJ2NQD.js +0 -3
- package/dist/chunk-FG5QXIQH.js +0 -9
- package/dist/chunk-FGG6HXIZ.js +0 -1
- package/dist/chunk-FJCZ4F6J.js +0 -5
- package/dist/chunk-FKH5ZF2C.js +0 -1
- package/dist/chunk-GT6BJ2GK.js +0 -1
- package/dist/chunk-GWNV44NZ.js +0 -18
- package/dist/chunk-GXO2RRV2.js +0 -1
- package/dist/chunk-H5YC3EP6.js +0 -16
- package/dist/chunk-HY3INWPI.js +0 -1
- package/dist/chunk-I6ST5X56.js +0 -1
- package/dist/chunk-ID6ASBGV.js +0 -15
- package/dist/chunk-IDQT2UY7.js +0 -1
- package/dist/chunk-IIOFR25P.js +0 -3
- package/dist/chunk-IJEDTDSJ.js +0 -25
- package/dist/chunk-ILICQWUF.js +0 -1
- package/dist/chunk-IMWEC6NF.js +0 -16
- package/dist/chunk-ITNFDLZ4.js +0 -1
- package/dist/chunk-IU5U6KKO.js +0 -4
- package/dist/chunk-IXCDFXMB.js +0 -2
- package/dist/chunk-JRTJZAFJ.js +0 -19
- package/dist/chunk-JT7YTXJ7.js +0 -1
- package/dist/chunk-JX4HSDDG.js +0 -28
- package/dist/chunk-K5GJNXDK.js +0 -1
- package/dist/chunk-KCNOFNS5.js +0 -11
- package/dist/chunk-KM2R6O7V.js +0 -6
- package/dist/chunk-KNFDN3AP.js +0 -1
- package/dist/chunk-LEDVV6XK.js +0 -1
- package/dist/chunk-LEEVJH4B.js +0 -1
- package/dist/chunk-MDQHEW7V.js +0 -8
- package/dist/chunk-MPYCIVRA.js +0 -7
- package/dist/chunk-N4RYVOXT.js +0 -2
- package/dist/chunk-NB6HHZ36.js +0 -1
- package/dist/chunk-NEK2KNKR.js +0 -8
- package/dist/chunk-NJONAV7V.js +0 -1
- package/dist/chunk-OHQTOHUX.js +0 -15
- package/dist/chunk-PKR6HS4T.js +0 -6
- package/dist/chunk-PKRDBS7O.js +0 -5
- package/dist/chunk-PMD6S7YG.js +0 -1
- package/dist/chunk-PUOCHFFI.js +0 -1
- package/dist/chunk-Q2DPBMV4.js +0 -1
- package/dist/chunk-Q6XT3YKV.js +0 -3
- package/dist/chunk-QEL3F2NY.js +0 -5
- package/dist/chunk-R2W5B7YI.js +0 -3
- package/dist/chunk-REABQXMP.js +0 -1
- package/dist/chunk-RTPVI7LE.js +0 -3
- package/dist/chunk-SFZQFEZB.js +0 -6
- package/dist/chunk-STJ3LWFL.js +0 -1
- package/dist/chunk-STJWHL36.js +0 -7
- package/dist/chunk-SZJHOXS6.js +0 -6
- package/dist/chunk-TEPMNVJN.js +0 -1
- package/dist/chunk-TNSMROUR.js +0 -1
- package/dist/chunk-UDDJQ34Y.js +0 -1
- package/dist/chunk-UKQ7NE5V.js +0 -1
- package/dist/chunk-UOQBCBKY.js +0 -1
- package/dist/chunk-UQWT2PFO.js +0 -1
- package/dist/chunk-V26QBVCN.js +0 -1
- package/dist/chunk-VVEQ4IHW.js +0 -1
- package/dist/chunk-VXBHTSMX.js +0 -20
- package/dist/chunk-WDCCITSG.js +0 -1
- package/dist/chunk-WGMYSPR2.js +0 -10
- package/dist/chunk-WHT2RCAD.js +0 -11
- package/dist/chunk-WW7TENNA.js +0 -1
- package/dist/chunk-WXJGZGQS.js +0 -1
- package/dist/chunk-X4AZV5A2.js +0 -1
- package/dist/chunk-XBBP5BWC.js +0 -7
- package/dist/chunk-XH32NPYG.js +0 -1
- package/dist/chunk-Y7A7Z2V3.js +0 -1
- package/dist/chunk-YE7XCF44.js +0 -1
- package/dist/chunk-YIFT67BD.js +0 -4
- package/dist/chunk-Z36JS7OX.js +0 -6
- package/dist/chunk-ZHPPBTNE.js +0 -28
- package/dist/chunk-ZMSE5SQB.js +0 -1
- package/dist/conf-store-YW3NWYCN.js +0 -1
- package/dist/custom-oclif-loader-4ZAXX5MR.js +0 -1
- package/dist/deprecations-VW7UIMZX.js +0 -1
- package/dist/dist-I3VCRVOE.js +0 -1
- package/dist/dist-MP4AU5F4.js +0 -1
- package/dist/environments-5P57CTOG.js +0 -1
- package/dist/error-U7DOQOWG.js +0 -1
- package/dist/error-handler-AOEXPYI7.js +0 -1
- package/dist/fs-K5NT4W2Q.js +0 -1
- package/dist/hooks/app-init.d.ts +0 -9
- package/dist/hooks/app-init.js +0 -1
- package/dist/is-global-CFYYUAIJ.js +0 -1
- package/dist/is-wsl-UEMXYJPN.js +0 -1
- package/dist/lib-JKLF33A7.js +0 -1
- package/dist/local-BRRQOCGY.js +0 -1
- package/dist/local-storage-FVSI2IBZ.js +0 -1
- package/dist/metadata-HVSGVFUQ.js +0 -1
- package/dist/node-package-manager-6JURLQKU.js +0 -1
- package/dist/notifications-system-BTEFKXCS.js +0 -1
- package/dist/output-EXMTVS2V.js +0 -1
- package/dist/system-DUJDILSL.js +0 -1
- package/dist/ui-AX6ZMY6P.js +0 -1
- package/dist/upgrade-5TEVQNLY.js +0 -1
- package/dist/version-7LKOAVDW.js +0 -1
- package/dist/version-PRFBZAWQ.js +0 -1
- package/dist/workerd-MFV7EBVM.js +0 -18
- /package/dist/{chunk-VDN6MEYI.js → chunk-NJPL5BTN.js} +0 -0
package/dist/chunk-RTPVI7LE.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as g,b as A,d as w,g as k}from"./chunk-WOYI6SDK.js";import{a as S}from"./chunk-PCTVUTV3.js";import{t as P}from"./chunk-5INBKZRD.js";import{a as F}from"./chunk-WDCCITSG.js";import{a as G}from"./chunk-NENUUNWB.js";import{b,e as L}from"./chunk-4TANJ4JK.js";import{t as d,y as u}from"./chunk-AFM3UZQO.js";import{J as f,a as c}from"./chunk-JX4HSDDG.js";import{Fb as h,Hb as y,Mb as n,Qb as v}from"./chunk-BCZMDFI2.js";import{a as x}from"./chunk-CTNBSUVU.js";import{e as q,g as i}from"./chunk-VKWPEFWQ.js";i();i();i();import{randomBytes as C}from"crypto";function M(){return C(32).toString("hex")}function T(r){let e=new URL(`http://localhost:${r.port}/graphiql`);return e.searchParams.set("key",r.key),r.query&&e.searchParams.set("query",r.query),r.variables&&e.searchParams.set("variables",r.variables),r.apiVersion&&e.searchParams.set("api_version",r.apiVersion),e.toString()}async function I(r){let e=await S(r.port),t=A({stdout:r.stdout??process.stdout,port:e,storeFqdn:r.storeFqdn,tokenProvider:r.tokenProvider,key:r.key,appContext:r.appContext,protectMutations:r.protectMutations}),a=T({port:e,key:r.key,query:r.query,variables:r.variables,apiVersion:r.apiVersion});try{n(y`GraphiQL is running at ${h.link(a)}`),r.additionalReadyMessages?.forEach(p=>n(p)),n("Press Ctrl+C to stop."),await f(a)||v("Browser did not open automatically. Open the URL above manually."),await O(r.abortSignal)}finally{t.close()}}async function O(r){let e=new c,t=()=>e.abort();process.once("SIGINT",t);try{await new Promise(a=>{if(e.signal.aborted||r?.aborted){a();return}e.signal.addEventListener("abort",()=>a(),{once:!0}),r?.addEventListener("abort",()=>e.abort(),{once:!0})})}finally{process.removeListener("SIGINT",t)}}async function Q(r){let e=r.remoteApp.apiSecretKeys[0]?.secret??"",t=g(void 0,e,r.store),a=k({apiKey:r.remoteApp.apiKey,apiSecret:e,storeFqdn:r.store}),l=await d(),p=w(r.store,r.remoteApp.apiKey,l);await I({port:r.port,storeFqdn:r.store,tokenProvider:a,key:t,appContext:{appName:r.remoteApp.title,appUrl:p,apiSecret:e},variables:r.variables,apiVersion:r.apiVersion,abortSignal:r.abortSignal})}var s=q(x(),1),m,o=class extends F{async run(){let{flags:e}=await this.parse(m),{appContextResult:t,store:a}=await P(e);return await Q({remoteApp:t.remoteApp,store:a.shopDomain,port:e.port,variables:e.variables,apiVersion:e.version}),{app:t.app}}};m=o;o.summary="Open a local GraphiQL UI for your app and store.";o.descriptionWithMarkdown=`Opens an authenticated Admin API GraphiQL UI for your app and selected store.
|
|
2
|
-
|
|
3
|
-
The app must be installed on the store.`;o.description=m.descriptionWithoutMarkdown();o.examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --port 9123"];o.flags={...b,...G,store:s.Flags.string({char:"s",description:"The myshopify.com domain of the store to open GraphiQL against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async r=>u(r)}),port:L({description:"Local port for the GraphiQL server.",env:"SHOPIFY_FLAG_PORT"}),variables:s.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES"}),version:s.Flags.string({description:"The API version to use in GraphiQL. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})};var ar=o;export{M as a,I as b,ar as c};
|
package/dist/chunk-SFZQFEZB.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-GCN4O7HM.js";import{b as r}from"./chunk-WHT2RCAD.js";import{q as i}from"./chunk-GXO2RRV2.js";import{u as e}from"./chunk-JX4HSDDG.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
|
|
2
|
-
|
|
3
|
-
When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
|
|
4
|
-
|
|
5
|
-
Run \`shopify config autoupgrade on\` or \`shopify config autoupgrade off\` to configure it.
|
|
6
|
-
`}static{this.description=this.descriptionWithoutMarkdown()}async run(){i()?e({body:o.on}):e({body:o.off})}};export{t as a};
|
package/dist/chunk-STJ3LWFL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as o}from"./chunk-VKWPEFWQ.js";o();function n(t,e){let r=e.storeFqdn;return t.role==="live"?`https://${r}`:`https://${r}?preview_theme_id=${t.id}`}function s(t,e){return`https://${e.storeFqdn}/admin/themes/${t.id}/editor`}function i(t){return`https://${t}/admin/online_store/preferences`}export{n as a,s as b,i as c};
|
package/dist/chunk-STJWHL36.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-LDWMX3KZ.js";import{a as d}from"./chunk-7TXWKLPY.js";import{a as p}from"./chunk-STJ3LWFL.js";import{p as u}from"./chunk-Y7A7Z2V3.js";import{p as c,v as f}from"./chunk-445NFHXL.js";import{b as l}from"./chunk-4TANJ4JK.js";import{A as s,v as h}from"./chunk-JX4HSDDG.js";import{a as g}from"./chunk-CTNBSUVU.js";import{e as b,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function v(r,o,m){let t=await y(r,{header:"Select a theme to publish",filter:{development:!1,live:!1,theme:o.theme}}),a=p({...t,role:"live"},r);!o.force&&!m&&!await s({message:`Do you want to make '${t.name}' the new live theme on ${r.storeFqdn}?`,confirmationMessage:`Yes, make '${t.name}' the new live theme`,cancellationMessage:"No, cancel publish"})||(await u(t.id,r),h({headline:o.environment?`Environment: ${o.environment}`:void 0,body:["The theme",...d(t),"is now live at",{link:{label:a,url:a}},{char:"."}]}))}var n=b(g(),1);var w,e=class extends f{async command(o,m,t){await v(m,o,t)}};w=e;e.summary="Set a remote theme as the live theme.";e.descriptionWithMarkdown=`Publishes an unpublished theme from your theme library.
|
|
2
|
-
|
|
3
|
-
If no theme ID is specified, then you're prompted to select the theme that you want to publish from the list of themes in your store.
|
|
4
|
-
|
|
5
|
-
You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).
|
|
6
|
-
|
|
7
|
-
If you want to publish your local theme, then you need to run \`shopify theme push\` first. You're asked to confirm that you want to publish the specified theme. You can skip this confirmation using the \`--force\` flag.`;e.description=w.descriptionWithoutMarkdown();e.flags={...l,...c,force:n.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE"}),theme:n.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};e.multiEnvironmentsFlags=["store","password","theme"];var O=e;export{O as a};
|
package/dist/chunk-SZJHOXS6.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{b as l}from"./chunk-4TANJ4JK.js";import{b as u}from"./chunk-WHT2RCAD.js";import{n as f}from"./chunk-AFM3UZQO.js";import{m as n}from"./chunk-2GB3EAD3.js";import{Lb as m}from"./chunk-BCZMDFI2.js";import{a as g}from"./chunk-CTNBSUVU.js";import{e as v,g as o}from"./chunk-VKWPEFWQ.js";o();o();var S="https://shopify.dev/assistant/search",w="X-Shopify-Surface",A="cli";async function y(s,e,p){let i=new URLSearchParams({query:s});e&&i.append("api_name",e),p&&i.append("api_version",p);let r;try{r=await f(`${S}?${i.toString()}`,{headers:{Accept:"application/json",[w]:A}})}catch{throw new n("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let h=await r.text();if(!r.ok){let d=`${r.status} ${r.statusText}`;try{let t=JSON.parse(h);t?.error&&(d=t.error)}catch(t){if(!(t instanceof SyntaxError))throw t}throw new n(`Search failed: ${d}`)}m(h)}var a=v(g(),1),c=class s extends u{static{this.description="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`."}static{this.examples=[`# search shopify.dev for a topic
|
|
2
|
-
shopify doc search --query "subscribe to webhooks"
|
|
3
|
-
|
|
4
|
-
# narrow the search to a specific API and version
|
|
5
|
-
shopify doc search --query "create a product" --api-name admin --api-version latest
|
|
6
|
-
`]}static{this.flags={...l,query:a.Flags.string({description:"The search query.",env:"SHOPIFY_FLAG_QUERY",required:!0}),"api-name":a.Flags.string({description:"Limit results to a specific API (for example: admin, storefront, hydrogen, functions). Unrecognized values are ignored.",env:"SHOPIFY_FLAG_API_NAME"}),"api-version":a.Flags.string({description:"Limit results to a specific API version (for example: 2025-10, latest, current).",env:"SHOPIFY_FLAG_API_VERSION"})}}async run(){let{flags:e}=await this.parse(s);await y(e.query,e["api-name"],e["api-version"])}};export{c as a};
|
package/dist/chunk-TEPMNVJN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a,g as c,i as p,j as f}from"./chunk-Y7A7Z2V3.js";import{p as h}from"./chunk-2GB3EAD3.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
|
package/dist/chunk-TNSMROUR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,b as f,c as g,d as x,g as C}from"./chunk-EHV7EKB3.js";import{a as d}from"./chunk-WDCCITSG.js";import{a as l}from"./chunk-NENUUNWB.js";import{ta as m}from"./chunk-5HJTCBBV.js";import{b as p}from"./chunk-4TANJ4JK.js";import{v as s}from"./chunk-JX4HSDDG.js";import{a as I}from"./chunk-CTNBSUVU.js";import{e as y,g as a}from"./chunk-VKWPEFWQ.js";a();var h=y(I(),1);var i=class u extends d{async run(){let{flags:o}=await this.parse(u),e=await m({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),t=await C({developerPlatformClient:e.developerPlatformClient,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId,extensionTypes:g}),n=c(t);if(n.length===0)s({headline:["No extensions to migrate."]});else{let r=await f(n);await x({...e,extensions:t,extensionTypes:r.extensionTypes,buildExtensionConfig:r.buildExtensionConfig})}return{app:e.app}}};i.description="Import dashboard-managed extensions into your app.";i.flags={...p,...l,"client-id":h.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]})};var k=i;export{k as a};
|
package/dist/chunk-UDDJQ34Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T}from"./chunk-3XCIUG5P.js";import{b as P,c as w,d as v}from"./chunk-BPDUBZMU.js";import{a as F}from"./chunk-LEEVJH4B.js";import{a as x}from"./chunk-NENUUNWB.js";import{ua as y}from"./chunk-5HJTCBBV.js";import{b as h,c as m}from"./chunk-4TANJ4JK.js";import{B as d,I as l}from"./chunk-JX4HSDDG.js";import{Pb as r}from"./chunk-BCZMDFI2.js";import{a as N}from"./chunk-CTNBSUVU.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};
|
package/dist/chunk-UKQ7NE5V.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as _}from"./chunk-773TIA5M.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();function L(o){return o?["1","true","TRUE","yes","YES"].includes(o):!1}i();i();import e from"node:path";import p from"node:os";import c from"node:process";var n=p.homedir(),a=p.tmpdir(),{env:r}=c,O=o=>{let t=e.join(n,"Library");return{data:e.join(t,"Application Support",o),config:e.join(t,"Preferences",o),cache:e.join(t,"Caches",o),log:e.join(t,"Logs",o),temp:e.join(a,o)}},A=o=>{let t=r.APPDATA||e.join(n,"AppData","Roaming"),s=r.LOCALAPPDATA||e.join(n,"AppData","Local");return{data:e.join(s,o,"Data"),config:e.join(t,o,"Config"),cache:e.join(s,o,"Cache"),log:e.join(s,o,"Log"),temp:e.join(a,o)}},S=o=>{let t=e.basename(n);return{data:e.join(r.XDG_DATA_HOME||e.join(n,".local","share"),o),config:e.join(r.XDG_CONFIG_HOME||e.join(n,".config"),o),cache:e.join(r.XDG_CACHE_HOME||e.join(n,".cache"),o),log:e.join(r.XDG_STATE_HOME||e.join(n,".local","state"),o),temp:e.join(a,t,o)}};function I(o,{suffix:t="nodejs"}={}){if(typeof o!="string")throw new TypeError(`Expected a string, got ${typeof o}`);return t&&(o+=`-${t}`),c.platform==="darwin"?O(o):c.platform==="win32"?A(o):S(o)}var T="shopify-cli",E=()=>process.env.XDG_CACHE_HOME?process.env.XDG_CACHE_HOME:I(T).cache;var C={alwaysLogAnalytics:"SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",alwaysLogMetrics:"SHOPIFY_CLI_ALWAYS_LOG_METRICS",deviceAuth:"SHOPIFY_CLI_DEVICE_AUTH",doctor:"SHOPIFY_CLI_DOCTOR",enableCliRedirect:"SHOPIFY_CLI_ENABLE_CLI_REDIRECT",env:"SHOPIFY_CLI_ENV",noAnalytics:"SHOPIFY_CLI_NO_ANALYTICS",optOutInstrumentation:"OPT_OUT_INSTRUMENTATION",appAutomationToken:"SHOPIFY_APP_AUTOMATION_TOKEN",partnersToken:"SHOPIFY_CLI_PARTNERS_TOKEN",runAsUser:"SHOPIFY_RUN_AS_USER",serviceEnv:"SHOPIFY_SERVICE_ENV",skipCliRedirect:"SHOPIFY_CLI_SKIP_CLI_REDIRECT",spinInstance:"SPIN_INSTANCE",themeToken:"SHOPIFY_CLI_THEME_TOKEN",unitTest:"SHOPIFY_UNIT_TEST",verbose:"SHOPIFY_FLAG_VERBOSE",codespaces:"CODESPACES",codespaceName:"CODESPACE_NAME",codespacePortForwardingDomain:"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",gitpod:"GITPOD_WORKSPACE_URL",cloudShell:"CLOUD_SHELL",spinAppPort:"SERVER_PORT",spinAppHost:"SPIN_APP_HOST",organization:"SHOPIFY_CLI_ORGANIZATION",identityToken:"SHOPIFY_CLI_IDENTITY_TOKEN",refreshToken:"SHOPIFY_CLI_REFRESH_TOKEN",otelURL:"SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",themeKitAccessDomain:"SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",json:"SHOPIFY_FLAG_JSON",skipNetworkLevelRetry:"SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",maxRequestTimeForNetworkCalls:"SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS",disableImportScanning:"SHOPIFY_CLI_DISABLE_IMPORT_SCANNING"},P="theme-kit-access.shopifyapps.com",m={backendPort:"BACKEND_PORT"},Y={executables:{dev:"/opt/dev/bin/dev"},directories:{cache:{path:()=>E(),vendor:{path:()=>_(E(),"vendor"),binaries:()=>_(E(),"vendor","binaries")}}}},f={expirationTimeMarginInMinutes:4},g="9e1e6889176fd0c795d5c659225e0fae",j={limit:300,timeout:{days:1}},M=process.env[C.themeKitAccessDomain]??P;export{L as a,I as b,C as c,P as d,m as e,Y as f,f as g,g as h,j as i,M as j};
|
package/dist/chunk-UOQBCBKY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as d,c as f}from"./chunk-BPDUBZMU.js";import{a as c}from"./chunk-LEEVJH4B.js";import{a as p}from"./chunk-NENUUNWB.js";import{e as i,ua as u}from"./chunk-5HJTCBBV.js";import{b as n}from"./chunk-4TANJ4JK.js";import{v as e}from"./chunk-JX4HSDDG.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a,t=class extends c{async run(){let{flags:o}=await this.parse(a),{app:r}=await u({directory:o.path,userProvidedConfigName:o.config}),m=await f(r,o.path);return await i(m,{stdout:process.stdout,stderr:process.stderr,app:r}),e({headline:"GraphQL types generated successfully."}),{app:r}}};a=t;t.summary="Generate GraphQL types for a function.";t.descriptionWithMarkdown="Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...p,...d};var x=t;export{x as a};
|
package/dist/chunk-UQWT2PFO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,B as r,F as o,G as s,k as n,z as h}from"./chunk-JX4HSDDG.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
|
package/dist/chunk-V26QBVCN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b}from"./chunk-HVMEBH24.js";import{a as F}from"./chunk-LDWMX3KZ.js";import{j as h,l as u,o as T}from"./chunk-NKT5U6IJ.js";import{p as y,v as O}from"./chunk-445NFHXL.js";import{b as I}from"./chunk-4TANJ4JK.js";import{n as f,ra as v}from"./chunk-AFM3UZQO.js";import{v as _}from"./chunk-JX4HSDDG.js";import{m as s}from"./chunk-2GB3EAD3.js";import{Mb as S,Ua as l,ma as c}from"./chunk-BCZMDFI2.js";import{a as U}from"./chunk-CTNBSUVU.js";import{e as A,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function P({session:e,overridesContent:r,themeId:t}){v("theme-preview:create");let w=`${u(e)}/theme_preview.json?preview_theme_id=${t}`,o=await h(e,{headers:{"Content-Type":"application/json"}}),i=await f(w,{method:"POST",body:r,headers:o});if(!i.ok)throw new s(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let a=await J(i);return v("theme-preview:create"),a}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:d}){v("theme-preview:update");let o=`${u(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(d)}`,i=await h(e,{headers:{"Content-Type":"application/json"}}),a=await f(o,{method:"POST",body:r,headers:i});if(!a.ok)throw new s(`Theme preview request failed with status ${a.status}: ${a.statusText}`);let x=await J(a);return v("theme-preview:update"),x}async function J(e){let r=await e.json();if(r.error)throw new s(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new s(`Override file not found: ${e.overrideJson}`);let r=await c(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let a=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${e.overrideJson}`,a)}let d=await T(e.themeId,e.adminSession,e.password),w=JSON.stringify(t),o=e.previewIdentifier?await g({session:d,overridesContent:w,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:d,overridesContent:w,themeId:e.themeId});e.json?S(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):_({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var m=A(U(),1);var E,n=class extends O{async command(r,t){let d=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:d.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};E=n;n.summary="Applies JSON overrides to a theme and returns a preview URL.";n.descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";n.description=E.descriptionWithoutMarkdown();n.flags={...I,...y,theme:m.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:m.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":m.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:m.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:m.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};n.multiEnvironmentsFlags=null;var ee=n;export{ee as a};
|
package/dist/chunk-VVEQ4IHW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-NKBSS7YL.js";import{b as a}from"./chunk-WHT2RCAD.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static{this.summary="Upgrades Shopify CLI."}static{this.descriptionWithMarkdown="Upgrades Shopify CLI using your package manager."}static{this.description=this.descriptionWithoutMarkdown()}async run(){await r()}};export{i as a};
|
package/dist/chunk-VXBHTSMX.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{a as Ir}from"./chunk-R2W5B7YI.js";import{a as bt}from"./chunk-UOHNRH6E.js";import{a as br}from"./chunk-NEK2KNKR.js";import{a as Sr}from"./chunk-XBBP5BWC.js";import{a as Ar}from"./chunk-V26QBVCN.js";import{a as Ur}from"./chunk-5Q4WAGQL.js";import{a as Rr}from"./chunk-STJWHL36.js";import{b as _r}from"./chunk-CNI7ZUST.js";import{a as Cr}from"./chunk-ZHPPBTNE.js";import{a as kr}from"./chunk-PKR6HS4T.js";import{a as dr}from"./chunk-MPYCIVRA.js";import{a as fr}from"./chunk-BDDROQGK.js";import{a as hr}from"./chunk-7US4TVO2.js";import{a as gr}from"./chunk-PUOCHFFI.js";import{a as wr}from"./chunk-MDQHEW7V.js";import{a as yr}from"./chunk-H5I7BSNG.js";import{a as Pr,b as vr,c as xr,d as Er}from"./chunk-FGG6HXIZ.js";import{a as Tr}from"./chunk-AHLNB45E.js";import{g as mr}from"./chunk-7MD5MIGN.js";import{a as uo,b as mo,c as fo,d as ho}from"./chunk-J3D4KQOQ.js";import{a as cr}from"./chunk-JRTJZAFJ.js";import{a as ur}from"./chunk-OHQTOHUX.js";import{a as Ze}from"./chunk-RMF3YNWE.js";import{a as pr}from"./chunk-TEPMNVJN.js";import{c as Xe,m as et}from"./chunk-NKT5U6IJ.js";import{b as lr,g as Ce,j as Je}from"./chunk-Y7A7Z2V3.js";import{a as ar,b as ir,c as co,d as lo,e as ot,f as po,g as go}from"./chunk-WOYI6SDK.js";import{a as $,b as Qe}from"./chunk-PCTVUTV3.js";import{a as er,b as tr,d as Ae,f as rr,m as _e,n as H,s as q,u as or,v as nr,w as sr}from"./chunk-Q7BOSHWX.js";import{c as Lr}from"./chunk-DC7TXY4K.js";import{a as Zt}from"./chunk-XZ2KUBFJ.js";import{a as to,b as rt,c as te,d as ro}from"./chunk-534U3DKZ.js";import{a as wo,f as yo,g as Po,h as nt,i as vo,j as xo,k as Eo,l as bo,m as So,n as Uo,o as Ro,p as To,q as Ao,v as _o,x as Co,z as st}from"./chunk-QEL3F2NY.js";import{a as oo,b as no,c as so,d as ao,e as io}from"./chunk-MMP3F6LO.js";import{a as Mr}from"./chunk-M5YGJYNI.js";import{a as eo}from"./chunk-EZBB2ULE.js";import{a as Zr}from"./chunk-WDCCITSG.js";import{a as $r}from"./chunk-NENUUNWB.js";import{a as ko}from"./chunk-25Z36VJG.js";import{C as jr,E as zr,G as ee,N as Yr,O as Qr,Y as Jr,i as Dr,j as W,k as Fr,m as Nr,na as Ie,oa as Le,p as tt,q as qr,s as Wr,t as Hr,ta as Xr,u as Gr,v as Br,w as Kr}from"./chunk-5HJTCBBV.js";import{X as Vr,e as ke,j as ce,p as Or}from"./chunk-7EE7YOCR.js";import{c as Jt}from"./chunk-WE3VLC2S.js";import{a as j}from"./chunk-X5RH4ALT.js";import{b as Xt,e as Te}from"./chunk-4TANJ4JK.js";import{$ as Dt,N as Mt,Z as X,a as ze,c as At,e as _t,g as Ct,k as kt,m as It,p as Lt,qa as Ft,s as $t,t as xe,y as Ee}from"./chunk-AFM3UZQO.js";import{D as Se,H as Kt,J as Ue,O as Re,P as ie,Q as Ve,R as zt,T as Yt,a as Tt,i as Nt,j as qt,k as Wt,l as D,m as Ht,n as Ye,o as Gt,p as Bt,u as be,w as ae}from"./chunk-JX4HSDDG.js";import{a as In}from"./chunk-7UNQOKZW.js";import{d as Ot}from"./chunk-STCLJWHD.js";import{f as Rt,m as T,p as Z,u as jt}from"./chunk-2GB3EAD3.js";import{$a as xt,Ea as vt,Fb as v,Hb as b,Mb as K,Na as ge,P as Ke,Pb as g,Qb as C,Ta as F,Wa as we,cb as Et,eb as ye,fb as k,gb as L,jb as Pe,kb as ve,ma as I,mb as St,nb as Ut,tb as je,ua as fe,wa as he}from"./chunk-BCZMDFI2.js";import{d as Vt,f as Qt}from"./chunk-EQNJ2NQD.js";import{a as ht}from"./chunk-UKQ7NE5V.js";import{d as S,f as Be,g as gt,i as de,j as wt,k as me,o as yt,p as Pt}from"./chunk-773TIA5M.js";import{a as kn}from"./chunk-CTNBSUVU.js";import{e as J,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var Ln=300*1e3,$n='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Io(t,e,r=Date.now()){for(;await Mn(t,e,r););}async function Mn(t,e,r){let o=await Ce(t,e);if(!o||Dn(o,r))throw new T($n);return await ie(3),o.processing}function Dn(t,e){return t.processing&&Date.now()-e>=Ln}var Fn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",On="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",at=3,$e=class extends pr{constructor(e,r={devPreview:!1}){super(e),this.context="App Ext. Host",this.themeId=Pr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??(e=this.devPreview?await this.createHostTheme():await this.create()),e}setTheme(e){vr(this.adminSession.storeFqdn,e)}removeTheme(){xr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:lr,name:this.generateThemeName(this.context),src:Fn};for(let o=0;o<at;o++){g(`Attempt ${o}/${at}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Je(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Io(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${at} retries. Creating theme using fallback theme zip`);let r=await Je({...e,src:On},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new Z(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var Nn={"theme:init":wr,"theme:check":cr,"theme:console":ur,"theme:delete":dr,"theme:dev":fr,"theme:duplicate":hr,"theme:info":gr,"theme:language-server":yr,"theme:list":Er,"theme:metafields:pull":Tr,"theme:open":br,"theme:package":Sr,"theme:profile":Ur,"theme:publish":Rr,"theme:preview":Ar,"theme:pull":_r,"theme:push":Cr,"theme:rename":kr,"theme:share":Ir},La=Nn;async function Lo(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([Mt(t.storeFqdn),Hn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([et(c),Xe(c)]),w=h?await Ze(t.storePassword,l,u):void 0,m=await Wn(c,t.theme),f=m.id.toString();return be({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:qn,options:{theme:m,adminSession:c,storefrontPassword:w,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var qn=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await mr(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function Wn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await Ce(parseInt(e,10),t);else{let o=new $e(t,{devPreview:!0});await Se([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new T("Could not find or create a host theme for theme app extensions");return r}async function Hn(t){return t.developerPlatformClient?.clientName===Vr.AppManagement?`https://${await xe()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await $t()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Gn(t){let e=S(t.directory,"locales");return we([S(e,"*.json")])}async function $o(t,e){let r=await Gn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Bn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Bn(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new jt.ExtendableError(i)}}p();function Me(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var it=".js.map";async function re(t,e,r,o){return D({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await $o(t,r),c=await Fr(t),d=t.outputRelativePath?de(n):n,l=await Kn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=t.configuration.metafields),{assets:{main:le(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await ge(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:Me(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Kn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),le(s)){let a=await jn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l={...i,surface:Le(c),root:{url:`${e}/${c}`},resource:d||{url:""}},u=a?.[c];if(!u)return l;let w=await Xn(u,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...l,...w}}))}return s}async function jn(t){try{let e=S(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let w=await De(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[w.name]:w}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await De(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function Yn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await ge(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function Vn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await De("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Qn({target:t,url:e,extension:r,resolver:o},n,s){let a=await De(n,`${t}/${n}`,s,e,r,o);return await Jn(t,s,r,o),{assets:{[a.name]:a}}}async function Jn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(it)&&await F(S(r.directory,n))&&o.set(`${t}/${wt(n)}`,n)}async function Xn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Zn(o,n)?Vn(e,n):es(o,n)?Qn(e,o,n):ts(o,n)?Yn(e,o,n):zn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function le(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function De(t,e,r,o,n,s,a){let i=`${e}${me(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await ge(S(n.directory,a??r))??0}}function Zn(t,e){return t==="intents"&&Array.isArray(e)}function es(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function ts(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as rs}from"events";var pe;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(pe||(pe={}));async function Mo(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:co(t.storeFqdn,t.apiKey),mobileUrl:po(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>re(n,e,t,r&&ct(r,n.devUUID))))}}function ct(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var Fe=class extends rs{constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=X(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(le(n.extensionPoints)&&le(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=X(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?X(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return X(o,i)}return X(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await re(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},ct(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await re(e,r,this.options,ct(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(pe.Update,e)}};p();p();var z;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(z||(z={}));function Do(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,os(t,e)))}}function os(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${v.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",cs(t,e))}}function ns(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?v.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var ss={debug:t=>v.gray(t),warn:t=>v.yellow(t),error:t=>v.errorText(t)};function as({type:t,message:e}){let r=ns(e);switch(t){case"debug":case"warn":case"error":return b`${ss[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function is(t,e){D({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(as(t))})}function cs(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
|
|
2
|
-
${v.json(s)}
|
|
3
|
-
`,e.stdout),n===z.Update){let a=e.payloadStore.getRawPayload().app.apiKey,i=s.app?.apiKey;if(s.app){if(a!==i)return;e.payloadStore.updateApp(s.app)}s.extensions&&e.payloadStore.updateExtensions(s.extensions)}else if(n===z.Dispatch){let a=ls(o,e);Oo(t,a,e)}else n===z.Log&&is(s,e)}}function Fo(t,e){return r=>{let o={event:z.Update,version:e.manifestVersion,data:{...e.payloadStore.getRawPayloadFilteredByExtensionIds(r)}};g(b`Sending websocket update event to the websocket clients:
|
|
4
|
-
${v.json(o)}
|
|
5
|
-
`,e.stdout),Oo(t,o,e)}}function Oo(t,e,r){g(b`Sending websocket with event type ${e.event} and data:
|
|
6
|
-
${v.json(e.data)}
|
|
7
|
-
`,r.stdout);let o=JSON.stringify(e);t.clients.forEach(n=>n.send(o))}function ls(t,e){let r=e.payloadStore.getRawPayload();return{...t,version:e.manifestVersion,data:{...t.data,extensions:[],store:r.store,app:r.app}}}var ps=10;function No(t){let e=new bt.default({noServer:!0,clientTracking:!0}),r=us(e);return t.httpServer.on("upgrade",Do(e,t)),t.payloadStore.on(pe.Update,Fo(e,t)),{close:()=>{e.close(),clearInterval(r)}}}function us(t){return setInterval(()=>{t.clients.forEach(e=>{e.readyState<2&&e.ping()})},ps*1e3)}p();p();p();function qo(t,e){let{url:r}=Me(t.type,e);if(t.surface==="checkout"&&r){let o=new URL(`https://${e.storeFqdn}/`);return o.pathname=r,o.searchParams.append("dev",`${e.url}/extensions`),o.toString()}else{let o=new URL(`https://${e.storeFqdn}/`);return o.pathname="admin/extensions-dev",o.searchParams.append("url",Oe(t,e)),o.toString()}}function Wo(t,e,r){let o=Le(t),n=new URL(`https://${r.storeFqdn}/`);switch(o){case"checkout":n.pathname=r.checkoutCartUrl,n.searchParams.append("dev",`${r.url}/extensions`);break;case"post_purchase":if(n.pathname=r.checkoutCartUrl,n.searchParams.set("script_url",`${r.url}/extensions/${e.devUUID}/assets/${e.localIdentifier}.js`),n.searchParams.set("post_purchase_dev_api_key",r.apiKey),e.devUUID&&r.websocketURL&&(n.searchParams.set("uuid",e.devUUID),n.searchParams.set("socket_url",r.websocketURL)),"metafields"in e.configuration){let s={config:{metafields:e.configuration.metafields}};n.searchParams.set("config",JSON.stringify(s))}break;case"admin":n.pathname="admin/extensions-dev",n.searchParams.append("url",Oe(e,r)),n.searchParams.append("target",t);break;case"customer-accounts":n=ds(e,r,t);break;default:return}return n.toString()}function ds(t,e,r=""){let o=`${e.url}/extensions`,n=e.storeId,s="shopify.com",a=new URL(`https://${s}/${n}/account/extensions-development`);return a.searchParams.append("origin",o),a.searchParams.append("extensionId",t.devUUID),a.searchParams.append("source","CUSTOMER_ACCOUNT_EXTENSION"),a.searchParams.append("appId",e.id??""),r!==""&&a.searchParams.append("target",r),a}function Oe(t,e){let r=new URL(e.url);return r.pathname=`/extensions/${t.devUUID}`,r.toString()}function O(t,e){tr(t,er(e))}p();var lt=class extends Z{constructor(e){super(`Couldn't find template ${e.template} for extension surface ${e.extensionSurface}`)}};async function Ho(t){let e=await ms(t),r=await I(e);return Zt(r,t.data)}async function ms(t){let e=await fs(),r=[];t.extensionSurface&&r.push(S(e,`${t.extensionSurface}/${t.template}.html.liquid`)),r.push(S(e,`${t.template}.html.liquid`));let o=await we(r);if(o.length===0)throw new lt(t);return o[0]}async function fs(){return await xt("templates/ui-extensions/html",{type:"directory",cwd:Pt(import.meta.url)})}var Go=q(t=>{H(t,"Access-Control-Allow-Origin","*"),H(t,"Access-Control-Allow-Methods","GET, OPTIONS"),H(t,"Access-Control-Allow-Headers","Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, ngrok-skip-browser-warning")}),Bo=q(t=>{H(t,"Cache-Control","no-cache")}),pt=q(async t=>_e(t,"/extensions",307));async function hs(t,e){let{filePath:r}=e;if(!await F(r))return O(t,{statusCode:404,statusMessage:`Not Found: ${r}`});if(await vt(r)&&(r+=r.endsWith("/")?"index.html":"/index.html",!await F(r)))return O(t,{statusCode:404,statusMessage:`Not Found: ${r}`});let o=await I(r,{}),n={".ico":"image/x-icon",".html":"text/html",".js":"text/javascript",".json":"application/json",".map":"application/json",".wasm":"application/wasm",".css":"text/css",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".wav":"audio/wav",".mp3":"audio/mpeg",".svg":"image/svg+xml",".pdf":"application/pdf",".doc":"application/msword"},s=me(r),a=n[s]||"text/plain";return H(t,"Content-Type",a),o}function Ko({getExtensions:t,payloadStore:e}){return q(async r=>{let{extensionId:o,assetPath:n=""}=Ae(r),s=t().find(h=>h.devUUID===o);if(!s)return O(r,{statusCode:404,statusMessage:`Extension with id ${o} not found`});let i=e.getAssetResolver(s.devUUID)?.get(n),c=i??n,d=c.endsWith(it);if(d&&i===void 0)return O(r,{statusCode:404,statusMessage:"Not Found"});let l=Be(d?s.directory:Nr(s.outputPath)),u=Be(S(l,c));return yt(l,u)?hs(r,{filePath:u}):O(r,{statusCode:404,statusMessage:"Not Found"})})}function ut({payloadStore:t}){return q(e=>(H(e,"content-type","application/json"),t.getRawPayload()))}function jo({devOptions:t}){return q(e=>{g(`UI extensions server received a ${e.method} request to URL ${e.path}`,t.stdout)})}function dt({devOptions:t,getExtensions:e}){return q(async r=>{let{extensionId:o}=Ae(r),n=e().find(i=>i.devUUID===o);if(!n)return O(r,{statusCode:404,statusMessage:`Extension with id ${o} not found`});if(rr(r,"accept")?.startsWith("text/html")){if(n.type==="checkout_post_purchase")return Ho({data:{url:Oe(n,t)},template:"index",extensionSurface:"post_purchase"});{let i=qo(n,t);return _e(r,i,307)}}let a=t.appWatcher.buildOutputPath;return H(r,"content-type","application/json"),{app:{apiKey:t.apiKey},version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:oe(t.url)},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extension:await re(n,a,t)}})}function zo({devOptions:t,getExtensions:e}){return q(async r=>{let{extensionId:o,extensionPointTarget:n=""}=Ae(r),s=e().find(i=>i.devUUID===o);if(!s)return O(r,{statusCode:404,statusMessage:`Extension with id ${o} not found`});if(s.configuration.type!=="checkout_post_purchase"&&!s.hasExtensionPointTarget(n))return O(r,{statusCode:404,statusMessage:`Extension with id ${o} has not configured the "${n}" extension target`});let a=Wo(n,s,t);return a?_e(r,a,307):O(r,{statusCode:404,statusMessage:`Redirect url can't be constructed for extension with id ${o} and extension target "${n}"`})})}import{createServer as gs}from"http";function Yo(t){let e=or(),r=nr();e.use(jo(t)),e.use(Go),e.use(Bo),r.use("/extensions/dev-console",pt),r.use("/extensions/:extensionId",dt(t)),r.use("/extensions/:extensionId/",dt(t)),r.use("/extensions/:extensionId/:extensionPointTarget",zo(t)),r.use("/extensions/:extensionId/assets/**:assetPath",Ko(t)),r.use("/extensions",ut(t)),r.use("/extensions/",ut(t)),r.use("/",pt),e.use(r);let o=gs(sr(e));return o.listen(t.devOptions.port,"localhost"),o}async function Vo(t){let e={...t,websocketURL:oe(t.url)},r=e.appWatcher.buildOutputPath,o=new Map,n=await Mo(e,r,o),s=new Fe(n,e,o),a=e.extensions.filter(u=>u.isPreviewable),i=()=>a;g("Setting up the UI extensions HTTP server...",e.stdout);let c=Yo({devOptions:e,payloadStore:s,getExtensions:i});g("Setting up the UI extensions Websocket server...",e.stdout);let d=No({...e,httpServer:c,payloadStore:s});g("Setting up the UI extensions bundler and file watching...",e.stdout);let l=async({appWasReloaded:u,app:h,extensionEvents:w})=>{u&&(a=h.allExtensions.filter(m=>m.isPreviewable));for(let m of w){if(!m.extension.isPreviewable)continue;let f=m.buildResult?.status==="ok"?"success":"error",U=m.buildResult?.status==="error"?{message:m.buildResult.error,file:m.buildResult.file}:void 0;switch(m.type){case te.Created:if(e.extensions.push(m.extension),!e.checkoutCartUrl){let E=await Ie(e.extensions,e.storeFqdn);e.checkoutCartUrl=E}await s.addExtension(m.extension,r);break;case te.Updated:await s.updateExtension(m.extension,e,r,{status:f,error:U});break;case te.Deleted:e.extensions=e.extensions.filter(E=>E.devUUID!==m.extension.devUUID),await s.deleteExtension(m.extension);break}}};e.appWatcher.onEvent(l).onStart(l),e.signal.addEventListener("abort",()=>{g("Closing the UI extensions dev server..."),d.close(),c.close()})}function oe(t){let e=new URL("/extensions",t);return e.protocol="wss:",e.toString()}var ws="3",ys=async({stderr:t,stdout:e,abortSignal:r},{apiKey:o,storeFqdn:n,storeId:s,subscriptionProductUrl:a,port:i,cartUrl:c,proxyUrl:d,appName:l,appDotEnvFile:u,appId:h,grantedScopes:w,allExtensions:m,appDirectory:f,appWatcher:U})=>{await Vo({appName:l,appDotEnvFile:u,appDirectory:f,id:h,extensions:m,stdout:e,stderr:t,signal:r,url:d,port:i,storeFqdn:Ee(n),storeId:s,apiKey:o,grantedScopes:w,checkoutCartUrl:c,subscriptionProductUrl:a,manifestVersion:ws,appWatcher:U})};async function Qo({allExtensions:t,storeFqdn:e,checkoutCartUrl:r,...o}){let n=t.filter(a=>a.isPreviewable),s=await Ie(n,e,r);return{prefix:"extensions",type:"previewable-extension",function:ys,options:{pathPrefix:"/extensions",port:-1,storeFqdn:e,allExtensions:t,cartUrl:s,...o}}}p();p();function Y(t){let e=t.find(o=>ee(o,W.Frontend)),r=t.find(o=>ee(o,W.Backend));return{frontendConfig:e,backendConfig:r}}p();async function Jo(t){let r={topic:"app/uninstalled",api_version:(await uo(t.developerPlatformClient,t.organizationId))[1],address:t.address,delivery_method:ho.LOCALHOST,shared_secret:t.sharedSecret},o=await mo(t.developerPlatformClient,r,t.organizationId);t.stdout.write("Sending APP_UNINSTALLED webhook to app server"),await ie(3);let n=await Ps(t,o);return t.stdout.write(n?"APP_UNINSTALLED webhook delivered":"APP_UNINSTALLED webhook delivery failed"),n}async function Ps(t,e){let r=0;for(;r<3;){try{return await fo(t.address,e.samplePayload,JSON.stringify({...JSON.parse(e.headers),"X-Shopify-Shop-Domain":t.storeFqdn}))}catch(o){if(o instanceof kt&&o.code==="ECONNREFUSED")r<3&&(t.stdout.write("App isn't responding yet, retrying in 5 seconds"),await ie(5));else throw o}r++}return t.stdout.write("App hasn't started in time, giving up"),!1}var vs=async({stdout:t},e)=>{await Jo({stdout:t,developerPlatformClient:e.developerPlatformClient,address:`http://localhost:${e.deliveryPort}${e.webhooksPath}`,sharedSecret:e.apiSecret,storeFqdn:e.storeFqdn,organizationId:e.organizationId})};function Xo({webs:t,remoteAppUpdated:e,backendPort:r,frontendPort:o,organizationId:n,...s}){let{backendConfig:a,frontendConfig:i}=Y(t),c=t.map(({configuration:l})=>l.webhooks_path).find(l=>l)??"/api/webhooks";if(c&&e&&(i??a))return{type:"send-webhook",prefix:"webhooks",function:vs,options:{deliveryPort:a?r:o,webhooksPath:c,organizationId:n,...s}}}p();async function Zo(t){return{type:"graphiql",prefix:"graphiql",options:t,function:xs}}var xs=async({stdout:t,abortSignal:e},r)=>{let o=go({apiKey:r.apiKey,apiSecret:r.apiSecret,storeFqdn:r.storeFqdn}),n=ir({stdout:t,port:r.port,storeFqdn:r.storeFqdn,key:r.key,tokenProvider:o,appContext:{appName:r.appName,appUrl:r.appUrl,apiSecret:r.apiSecret}});e.addEventListener("abort",async()=>{n.close()})};p();async function tn({webs:t,proxyUrl:e,frontendPort:r,backendPort:o,apiKey:n,apiSecret:s,scopes:a}){let{frontendConfig:i}=Y(t),c=i?.configuration.hmr_server?await $():void 0,d=void 0,l=t.map(async u=>{let h=await Es({web:u,frontendPort:r,backendPort:o}),w=c&&u.configuration.roles.includes(W.Frontend)?{port:c,httpPaths:u.configuration.hmr_server.http_paths}:void 0;return{type:"web",prefix:u.configuration.name??["web",...u.configuration.roles].join("-"),function:bs,options:{port:h,portFromConfig:u.configuration.port,apiKey:n,apiSecret:s,hostname:e,backendPort:o,frontendServerPort:r,directory:u.directory,devCommand:u.configuration.commands.dev,preDevCommand:u.configuration.commands.predev,scopes:a,shopCustomDomain:d,hmrServerOptions:w,roles:u.configuration.roles}}});return Promise.all(l)}async function Es({web:t,frontendPort:e,backendPort:r}){return ee(t,W.Frontend)?e:ee(t,W.Backend)?r:$()}async function bs({stdout:t,stderr:e,abortSignal:r},{port:o,apiKey:n,apiSecret:s,hostname:a,backendPort:i,frontendServerPort:c,directory:d,devCommand:l,preDevCommand:u,scopes:h,shopCustomDomain:w,hmrServerOptions:m}){let f=m?.port,U={SHOPIFY_API_KEY:n,SHOPIFY_API_SECRET:s,HOST:a,SCOPES:h,NODE_ENV:"development",...w&&{SHOP_CUSTOM_DOMAIN:w},BACKEND_PORT:`${i}`,FRONTEND_PORT:`${c}`,...f&&{HMR_SERVER_PORT:`${f}`},APP_URL:a,APP_ENV:"development",REMIX_DEV_ORIGIN:a},E={signal:r,directory:d,port:o,env:U,stdout:t,stderr:e};u&&(t.write(`Running pre-dev command: "${u}"`),await en({...E,command:u,showOutput:Vt()})),await en({...E,command:l,showOutput:!0})}async function en({command:t,signal:e,directory:r,port:o,env:n,showOutput:s,stdout:a,stderr:i}){let c=t.split("&&").map(d=>d.trim())??[];for(let d of c){let[l,...u]=d.split(" ");l?.length!==0&&await Re(l,u,{cwd:r,stdout:s?a:void 0,stderr:i,signal:e,env:{...n,PORT:`${o}`,SERVER_PORT:`${o}`}})}}p();p();p();var Ne=class{constructor(e){this.stdout=e}async info(e){await this.log(e)}async warning(e){await this.log(b`${v.yellow(e)}`.value)}async success(e){await this.log(b`${v.green(e)}`.value)}async debug(e){g(e,this.stdout)}async error(e,r){let o=v.errorText("\u274C Error"),n=v.errorText(`\u2514 ${e}`);await this.log(b`${o}`.value,r),await this.log(b`${n}`.value,r)}async logUserErrors(e,r){if(typeof e=="string")await this.error(e);else if(e instanceof Error)await this.error(e.message);else{let o=e.map(n=>{let s=n.on?n.on[0]:void 0,a=r.find(i=>i.uid===s?.user_identifier);return{error:n.message,prefix:a?.handle??"app-preview"}});await this.logMultipleErrors(o)}}async logExtensionEvents(e){let r=e.extensionEvents.filter(n=>n.extension.isAppConfigExtension),o=e.extensionEvents.filter(n=>!n.extension.isAppConfigExtension);r.length&&await this.log("App config updated","app-config"),o.forEach(async n=>{let s=n.extension.handle,a=`Extension ${n.type}`;await this.log(a,s)})}async logExtensionUpdateMessages(e){if(!e)return;let r=e.extensionEvents??[],n=(await Promise.all(r.map(async a=>a.type===te.Deleted?[]:(await a.extension.getDevSessionUpdateMessages())?.map(c=>({message:c,prefix:a.extension.handle}))??[]))).flat(),s=n.map((a,i)=>{let c=b`${v.gray(i===n.length-1?"\u2514 ":"\u2502 ")}${a.message}`.value;return this.log(c,a.prefix)});await Promise.all(s)}async logMultipleErrors(e){let r=v.errorText("\u274C Error");await this.log(b`${r}`.value,"app-preview");let o=e.map(n=>{let s=v.errorText(`\u2514 ${n.error}`);return this.log(b`${s}`.value,n.prefix)});await Promise.all(o)}async log(e,r){await D({outputPrefix:r??"app-preview",stripAnsi:!1},()=>{this.stdout.write(e)})}};p();var qe=class{constructor(e){this.processBatch=e,this.queue=[],this.processingPromise=void 0}enqueue(e){this.queue.push(e),this.processingPromise??(this.processingPromise=this.startProcessing())}async waitForCompletion(){if(this.processingPromise)return this.processingPromise}async startProcessing(){try{for(;this.queue.length>0;){let e=[...this.queue];this.queue=[],await this.processBatch(e)}}finally{this.processingPromise=void 0}}};var We=class t{static async start(e,r){let o=new t(e,r);return await o.start(),o}constructor(e,r){this.failedEvents=[],this.currentSessionState=null,this.statusManager=e.devSessionStatusManager,this.logger=new Ne(r),this.options=e,this.appWatcher=e.appWatcher,this.bundlePath=e.appWatcher.buildOutputPath,this.appEventsProcessor=new qe(o=>this.processEvents(o))}async start(){await this.logger.info(`Preparing dev preview on ${this.options.storeFqdn}`),this.statusManager.setMessage("LOADING"),this.appWatcher.onEvent(async e=>this.onEvent(e)).onStart(async e=>this.onStart(e)).onError(async e=>this.handleDevSessionResult({status:"unknown-error",error:e}))}async onEvent(e){await this.validateAppEvent(e)&&this.appEventsProcessor.enqueue(e)}async processEvents(e){let r=[...this.failedEvents,...e],o=this.consolidateAppEvents(r);if(this.failedEvents=[],!o)return;this.statusManager.setMessage("CHANGE_DETECTED"),this.updatePreviewURL(o),await this.logger.logExtensionEvents(o);let n=to(),s=await this.bundleExtensionsAndUpload(o);await this.handleDevSessionResult(s,o),await this.logger.debug(`\u2705 Event handled [Network: ${rt(n)}ms - Total: ${rt(o.startTime)}ms]`)}consolidateAppEvents(e){if(e.length===0)return;if(e.length===1)return e[0];let r=e[0],o=e[e.length-1];if(!r||!o)return;let n=new Map;for(let a of e)for(let i of a.extensionEvents)n.set(i.extension.uid,i);return{app:o.app,path:o.path,extensionEvents:Array.from(n.values()),startTime:r.startTime,appWasReloaded:e.some(a=>a.appWasReloaded)}}async onStart(e){let r=this.parseBuildErrors(e);if(r.length)await this.logger.logMultipleErrors(r),await setImmediate(()=>{let o=r.map(n=>n.prefix);throw new T(`Dev preview aborted, build errors detected in extensions: ${o}`)});else{let o=await this.bundleExtensionsAndUpload(e);await this.handleDevSessionResult(o,e)}}async validateAppEvent(e){if(!this.statusManager.status.isReady)return await this.logger.warning("Change detected, but dev preview is not ready yet."),!1;let r=this.parseBuildErrors(e);return r.length?(await this.logger.logMultipleErrors(r),this.statusManager.setMessage("BUILD_ERROR"),!1):e.extensionEvents.length===0?(this.statusManager.setMessage("READY"),!1):!0}parseBuildErrors(e){return e.extensionEvents.filter(o=>o.buildResult?.status==="error").map(o=>({error:"Build error. Please review your code and try again.",prefix:o.extension.handle}))}async handleDevSessionResult(e,r){e.status==="updated"?(await this.logger.success(`\u2705 Updated dev preview on ${this.options.storeFqdn}`),await this.logger.logExtensionUpdateMessages(r),await this.setUpdatedStatusMessage()):e.status==="created"?(this.statusManager.updateStatus({isReady:!0}),await this.logger.success("\u2705 Ready, watching for changes in your app "),await this.logger.logExtensionUpdateMessages(r),this.statusManager.setMessage("READY")):e.status==="aborted"?await this.logger.debug("\u274C Dev preview update aborted (new change detected or error during update)"):(e.status==="remote-error"||e.status==="unknown-error")&&(await this.logger.logUserErrors(e.error,r?.app.allExtensions??[]),e.error instanceof Error&&e.error.cause==="validation-error"?this.statusManager.setMessage("VALIDATION_ERROR"):(r&&this.failedEvents.push(r),this.statusManager.setMessage("REMOTE_ERROR"))),!this.statusManager.status.isReady&&!Qt()&&setImmediate(()=>{throw new T("Failed to start dev preview.")})}updatePreviewURL(e){let r=e.app.nonConfigExtensions.length>0;this.statusManager.updateStatus({previewURL:this.options.appPreviewURL,appEmbedded:e.app.configuration.embedded,hasExtensions:r})}async setUpdatedStatusMessage(){this.statusManager.setMessage("UPDATED"),setTimeout(async()=>{this.statusManager.status.statusMessage?.message==="Updated"&&this.statusManager.setMessage("READY")},2e3)}async bundleExtensionsAndUpload(e){try{let{manifest:r,inheritedModuleUids:o,assets:n}=await this.createManifest(e),s=await this.uploadAssetsIfNeeded(n,!this.statusManager.status.isReady),a=oe(this.options.url);if(this.statusManager.status.isReady){let i={shopFqdn:this.options.storeFqdn,appId:this.options.appId,assetsUrl:s,manifest:r,inheritedModuleUids:o};return this.devSessionUpdateWithRetry(i)}else{let i={shopFqdn:this.options.storeFqdn,appId:this.options.appId,assetsUrl:s,websocketUrl:a};return this.devSessionCreateWithRetry(i)}}catch(r){if(r.statusCode===401)throw new Error("Unauthorized");if(r instanceof Rt)throw r.response.status===401||r.response.status===403?new T("Auth session expired. Please run `shopify app dev` again."):(await this.logger.debug(JSON.stringify(r.response,null,2)),new T("Unknown error"));return r.code==="ETIMEDOUT"?{status:"unknown-error",error:new Error("Request timed out, please check your internet connection and try again.")}:{status:"unknown-error",error:r}}}async createManifest(e){let r=e.extensionEvents.filter(i=>i.type!=="deleted").map(i=>i.extension.uid);e.app.allExtensions.some(i=>i.type==="admin")&&!r.includes("admin")&&r.push("admin");let o=e.app.allExtensions.filter(i=>!r.includes(i.uid)).map(i=>i.uid),n=await e.app.manifest(void 0);await oo(n,this.bundlePath),this.statusManager.status.isReady&&(n.modules=n.modules.filter(i=>r.includes(i.uid)));let s=await Et(this.bundlePath),a=n.modules.map(i=>i.assets).filter(i=>s.includes(i));return{manifest:n,inheritedModuleUids:o,assets:a}}async uploadAssetsIfNeeded(e,r){if(!e.length&&!r)return;let o=S(de(this.bundlePath),`dev-bundle.${this.options.developerPlatformClient.bundleFormat}`),n=[...e.map(a=>`${a}/**`),...no];r&&n.push("manifest.json"),await so(this.bundlePath,o,n);let s=await this.getSignedURLWithRetry();return await ao(s,o),s}async getSignedURLWithRetry(){return io(this.options.developerPlatformClient,{apiKey:this.options.appId,organizationId:this.options.organizationId,id:this.options.appId})}async devSessionUpdateWithRetry(e){let r=await this.options.developerPlatformClient.devSessionUpdate(e),o=r.devSessionUpdate?.userErrors??[],n=r.devSessionUpdate?.devSession;if(n&&this.currentSessionState){let s=oe(this.options.url),a=this.currentSessionState?.userId;if(n.websocketUrl!==s||n.user?.id!==a){let i=n.user?.email;await this.logger.error(`Another developer ${i?`(${i}) `:""}has taken ownership of this dev preview.`);let c=`Another user${i?` (${i})`:""} has taken ownership of this dev preview. Your preview is no longer active.`,d=["You can restart by running",{command:"shopify app dev"},"again."];throw new T(c,d)}this.currentSessionState={websocketUrl:n.websocketUrl,userId:n.user?.id??null,userEmail:n.user?.email??null}}return o.length?{status:"remote-error",error:o}:{status:"updated"}}async devSessionCreateWithRetry(e){let r=await this.options.developerPlatformClient.devSessionCreate(e),o=r.devSessionCreate?.userErrors??[],n=r.devSessionCreate?.warnings??[],s=r.devSessionCreate?.devSession;return s&&(this.currentSessionState={websocketUrl:s.websocketUrl,userId:s.user?.id??null,userEmail:s.user?.email??null}),n.length>0&&await Promise.all(n.map(a=>{let i=a.code==="SESSION_TAKEOVER"?`\u26A0\uFE0F ${a.message}`:a.message;return this.logger.warning(i)})),o.length?{status:"remote-error",error:o}:{status:"created"}}};async function rn({app:t,apiKey:e,developerPlatformClient:r,...o}){return{type:"dev-session",prefix:"app-preview",function:Ss,options:{app:t,apiKey:e,developerPlatformClient:r,...o}}}var Ss=async({stdout:t},e)=>{await We.start(e,t)};p();p();p();var on=async({appLog:t,appLogPayload:e,stdout:r,storeName:o,logsDir:n})=>{let s=At().substring(0,6),i=`${Us(t.log_timestamp)}_${t.source_namespace}_${t.source}_${s}.json`,c=Co({appLog:t,appLogPayload:e,prettyPrint:!0,storeName:o}),d=S(n,i);try{return await he(n),await fe(d,c),{fullOutputPath:d,identifier:s}}catch(l){throw r.write(`Error while writing log to file: ${l}
|
|
8
|
-
`),l}};function Us(t){let e=new Date(t),r=e.getUTCFullYear(),o=(e.getUTCMonth()+1).toString().padStart(2,"0"),n=e.getUTCDate().toString().padStart(2,"0"),s=e.getUTCHours().toString().padStart(2,"0"),a=e.getUTCMinutes().toString().padStart(2,"0"),i=e.getUTCSeconds().toString().padStart(2,"0"),c=e.getUTCMilliseconds().toString().padStart(3,"0");return`${r}${o}${n}_${s}${a}${i}_${c}Z`}var He=async({stdout:t,appLogsFetchInput:{jwtToken:e,cursor:r},developerPlatformClient:o,resubscribeCallback:n,storeName:s,organizationId:a,abortSignal:i,logsDir:c,consecutiveResubscribeFailures:d=0})=>{if(!i?.aborted)try{let l=e,u=Po,h=d,w=await o.appLogs({jwtToken:e,cursor:r},a),{errors:m,status:f}=w;if(f===200){h=0;let{app_logs:E}=w;for(let R of E){let x=JSON.parse(R.payload);await D({outputPrefix:R.source,stripAnsi:!1},async()=>{R.log_type===Eo?(Rs(R,x,t),x=new wo(yo(x))):R.log_type.startsWith(bo)?Ts(R,x,t):t.write(JSON.stringify(x));let _=await on({appLog:R,appLogPayload:x,stdout:t,storeName:s,logsDir:c});t.write(b`${v.gray("\u2514 ")}${v.link("Open log file",`file://${_.fullOutputPath}`,`Log: ${_.fullOutputPath}`)} ${v.gray(`(${_.identifier})`)}\n`.value)})}}else{let E={errors:m.map(x=>({message:x,status:f}))},R=await _o({response:E,onThrottle:x=>{C("Request throttled while polling app logs.",t),C(`Retrying in ${x/1e3} seconds.`,t)},onUnknownError:x=>{C("Error while polling app logs.",t),C(`Retrying in ${x/1e3} seconds.`,t)},onResubscribe:()=>n()});if(R.resubscribeResult==="failed"){if(h+=1,h>=vo){C("App log streaming session has expired. Please restart your dev session.",t);return}}else R.resubscribeResult==="succeeded"&&(h=0);R.nextJwtToken&&(l=R.nextJwtToken),u=R.retryIntervalMs}let{cursor:U}=w;setTimeout(()=>{He({stdout:t,appLogsFetchInput:{jwtToken:l,cursor:U??r},developerPlatformClient:o,resubscribeCallback:n,storeName:s,organizationId:a,abortSignal:i,logsDir:c,consecutiveResubscribeFailures:h}).catch(E=>{g(`Unexpected error during polling: ${E}}
|
|
9
|
-
`)})},u)}catch(l){C("Error while polling app logs.",t),C(`Retrying in ${nt/1e3} seconds.`,t),g(`${l}}
|
|
10
|
-
`),setTimeout(()=>{He({stdout:t,appLogsFetchInput:{jwtToken:e,cursor:void 0},developerPlatformClient:o,resubscribeCallback:n,storeName:s,organizationId:a,abortSignal:i,logsDir:c}).catch(u=>{g(`Unexpected error during polling: ${u}}
|
|
11
|
-
`)})},nt)}};function Rs(t,e,r){let o=(e.fuel_consumed/xo).toFixed(4);t.status==="success"?r.write(`Function export "${e.export}" executed successfully using ${o}M instructions.`):t.status==="failure"&&r.write(`\u274C Function export "${e.export}" failed to execute with error: ${e.error_type}`);let n=e.logs;n.length>0&&r.write(n.split(`
|
|
12
|
-
`).filter(Boolean).map(s=>b`${v.gray("\u2502 ")}${s}`.value).join(`
|
|
13
|
-
`))}function Ts(t,e,r){t.log_type===So?r.write("Function network access response retrieved from cache."):t.log_type===Uo?e.reason===To?r.write("Function network access request executing in background because there is no cached response."):e.reason===Ao&&r.write("Function network access request executing in background because the cached response is about to expire."):t.log_type===Ro&&(t.status==="success"?r.write("Function network access request executed successfully."):t.status==="failure"&&r.write(`\u274C Function network access request failed to execute with error: ${e.error}.`))}function As(t){return t.allExtensions.some(e=>e.isFunctionExtension)}async function nn({developerPlatformClient:t,subscription:{shopIds:e,apiKey:r},storeName:o,organizationId:n,appWatcher:s,localApp:a}){return{type:"app-logs-subscribe",prefix:"app-logs",function:_s,options:{developerPlatformClient:t,appLogsSubscribeVariables:{shopIds:e,apiKey:r},storeName:o,organizationId:n,appWatcher:s,localApp:a}}}var _s=async({stdout:t,stderr:e,abortSignal:r},{developerPlatformClient:o,appLogsSubscribeVariables:n,storeName:s,organizationId:a,appWatcher:i,localApp:c})=>{async function d(l){let u=await st(o,n,a,t),h=c.getLogsDir();await he(h),await He({stdout:t,appLogsFetchInput:{jwtToken:u},resubscribeCallback:()=>st(o,n,a),developerPlatformClient:o,storeName:s,organizationId:a,abortSignal:l,logsDir:h})}try{let l=!1,u,h=async w=>{let m=As(w.app);if(m&&!l){g("Function extensions detected, starting logs polling"),l=!0,u=new AbortController;try{await d(u.signal)}catch(f){g(`Failed to start function logs: ${f}`,e)}}else!m&&l&&(g("No function extensions detected, stopping logs polling"),l=!1,u?.abort(),u=void 0)};i.onStart(h).onEvent(h)}catch{}};p();async function sn(t){return{type:"app-watcher",prefix:"app-preview",options:t,function:Cs}}var Cs=async({stdout:t,stderr:e,abortSignal:r},o)=>{let{appWatcher:n}=o;await n.start({stdout:t,stderr:e,signal:r})};p();import{EventEmitter as ks}from"events";var Is={BUILD_ERROR:{message:"Build error. Please review your code and try again",type:"error"},READY:{message:"Ready, watching for changes in your app",type:"success"},LOADING:{message:"Preparing dev preview",type:"loading"},UPDATED:{message:"Updated",type:"success"},VALIDATION_ERROR:{message:"Validation error in your app configuration",type:"error"},REMOTE_ERROR:{message:"Error updating dev preview",type:"error"},CHANGE_DETECTED:{message:"Change detected, updating dev preview",type:"loading"}},Ge=class extends ks{constructor(e){super(),this.currentStatus={isReady:!1,previewURL:void 0,graphiqlURL:void 0,statusMessage:void 0},e&&(this.currentStatus=e)}updateStatus(e){let r={...this.currentStatus,...e};Dt(this.currentStatus,r)||(this.currentStatus=r,this.emit("dev-session-update",r))}setMessage(e){this.updateStatus({statusMessage:Is[e]})}get status(){return this.currentStatus}reset(){this.currentStatus={isReady:!1,previewURL:void 0,graphiqlURL:void 0,statusMessage:void 0}}};p();import*as an from"http";import*as cn from"https";function ln(t){return"errors"in t&&Array.isArray(t.errors)}async function pn(t,e,r,o){let s=(await import("./http-proxy-node16-A6AKKRQH.js")).default.createProxyServer(),a=$s(t,s,o),i=r?cn.createServer(r,a):an.createServer(a);return i.on("upgrade",Ls(t,s,o)),e.addEventListener("abort",()=>{g("Closing reverse HTTP proxy"),i.close()}),{server:i}}function Ls(t,e,r){return function(o,n,s){let a=un(t,o,!0);if(a)return e.ws(o,n,s,{target:a},i=>{D({outputPrefix:"proxy",stripAnsi:!1},()=>{let d=(ln(i)?i.errors[i.errors.length-1]:void 0)??i;C(`Error forwarding websocket request: ${d.message}`,r),C(`\u2514 Unreachable target "${a}" for path: "${o.url}"`,r)})});n.destroy()}}function $s(t,e,r){return function(o,n){let s=un(t,o);if(s)return o.method==="OPTIONS"?(n.writeHead(204,{"Access-Control-Allow-Origin":o.headers.origin??"*","Access-Control-Allow-Methods":o.headers["access-control-request-method"]??"GET, POST, PUT, DELETE, PATCH, OPTIONS","Access-Control-Allow-Headers":o.headers["access-control-request-headers"]??"Content-Type, Authorization","Access-Control-Max-Age":"86400"}),n.end()):e.web(o,n,{target:s},a=>{D({outputPrefix:"proxy",stripAnsi:!1},()=>{let c=(ln(a)?a.errors[a.errors.length-1]:void 0)??a;C(`Error forwarding web request: ${c.message}`,r),C(`\u2514 Unreachable target "${s}" for path: "${o.url}"`,r)})});g(b`
|
|
14
|
-
Reverse HTTP proxy error - Invalid path: ${o.url??""}
|
|
15
|
-
These are the allowed paths:
|
|
16
|
-
${v.json(JSON.stringify(t))}
|
|
17
|
-
`),n.statusCode=500,n.end(`Invalid path ${o.url}`)}}function un(t,e,r=!1){let o=e.url??"/";for(let n in t)if(o.startsWith(n))return t[n];return r&&t.websocket?t.websocket:t.default}async function dn({localApp:t,remoteAppUpdated:e,developerPlatformClient:r,remoteApp:o,storeFqdn:n,storeId:s,commandOptions:a,network:i,graphiqlPort:c,graphiqlKey:d}){let l=o.apiKey,u=o.apiSecretKeys[0]?.secret??"",h=_t(),w=!ht(h[ke.disableGraphiQLExplorer]),m=await zr(t),f=new ro(m,i.proxyUrl),U=await xe(),E=lo(n,l,U),R=E,x=ar(d,u,n),_=w?`http://localhost:${c}/graphiql?key=${encodeURIComponent(x)}`:void 0,se=m.configuration.embedded,Q=m.nonConfigExtensions.length>0,N=new Ge({isReady:!1,previewURL:R,graphiqlURL:_,appEmbedded:se,hasExtensions:Q}),B=[...await tn({webs:m.webs,proxyUrl:i.proxyUrl,frontendPort:i.frontendPort,backendPort:i.backendPort,apiKey:l,apiSecret:u,scopes:Dr(m.configuration)}),w?await Zo({appName:o.title,appUrl:E,port:c,apiKey:l,apiSecret:u,key:x,storeFqdn:n}):void 0,await Qo({allExtensions:m.realExtensions,storeFqdn:n,storeId:s,apiKey:l,subscriptionProductUrl:a.subscriptionProductUrl,checkoutCartUrl:a.checkoutCartUrl,proxyUrl:i.proxyUrl,appName:m.name,appDotEnvFile:m.dotenv,grantedScopes:o.grantedScopes,appId:o.id,appDirectory:m.directory,appWatcher:f}),await rn({app:m,apiKey:l,developerPlatformClient:r,url:i.proxyUrl,appId:o.id,organizationId:o.organizationId,storeFqdn:n,appWatcher:f,appPreviewURL:E,devSessionStatusManager:N}),await Lo({remoteApp:o,localApp:m,storeFqdn:n,theme:a.theme,themeExtensionPort:a.themeExtensionPort,storePassword:a.storePassword}),Xo({webs:m.webs,backendPort:i.backendPort,frontendPort:i.frontendPort,organizationId:o.organizationId,developerPlatformClient:r,storeFqdn:n,apiSecret:u,remoteAppUpdated:e}),await nn({developerPlatformClient:r,subscription:{shopIds:[Number(s)],apiKey:l},storeName:n,organizationId:o.organizationId,localApp:t,appWatcher:f}),await sn({appWatcher:f})].filter(Ms);return{processes:await Ds(B,i.proxyPort,i.reverseProxyCert),previewUrl:R,graphiqlUrl:_,devSessionStatusManager:N}}var Ms=t=>t!==void 0&&t!==!1;async function Ds(t,e,r){let o=await Promise.all(t.map(async a=>{let i={};if(a.type==="web"&&a.options.roles.includes(W.Frontend)){let c=a.options.portFromConfig??a.options.port;i.default=`http://localhost:${c}`;let d=a.options.hmrServerOptions;d&&(i.websocket=`http://localhost:${d.port}`,d.httpPaths.forEach(l=>i[l]=`http://localhost:${d.port}`)),a.options.port=c}else if(a.type==="previewable-extension"){let c=await $();i[a.options.pathPrefix]=`http://localhost:${c}`,a.options.port=c}return{process:a,rules:i}})),n=o.map(({process:a})=>a),s=o.map(({rules:a})=>a).reduce((a,i)=>({...a,...i}),{});return Object.keys(s).length>0&&n.push({type:"proxy-server",prefix:"proxy",function:Fs,options:{port:e,rules:s,localhostCert:r}}),n}var Fs=async({abortSignal:t,stdout:e},{port:r,rules:o,localhostCert:n})=>{let{server:s}=await pn(o,t,n,e);K(`Proxy server started on port ${r} ${n?`with certificate ${n.certPath}`:""}`,e),await s.listen(r,"localhost")};p();p();p();var ne=J(ye(),1);var mn=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function fn(){let[t,e]=(0,ne.useState)(0);return(0,ne.useEffect)(()=>{let r=setInterval(()=>{e(o=>(o+1)%mn.length)},70);return()=>clearInterval(r)},[]),ne.default.createElement(L,null,mn[t])}p();var A=J(ye(),1);var hn=.9,gn=({tabs:t,initialActiveTab:e})=>{let{stdout:r}=St(),{isRawModeSupported:o}=Pe(),[n,s]=(0,A.useState)(e),[a,i]=(0,A.useState)(Math.floor(r.columns*hn)),[c,d]=(0,A.useState)(!0),l=(0,A.useRef)(null);if(!n)throw new Error("No tabs provided");ve((m,f)=>{(async()=>{if(f?.leftArrow||f?.rightArrow||f?.tab){let x=Object.entries(t).filter(([B,P])=>P.content),_=x.findIndex(([B])=>B===n);if(_===-1)return;let se=f?.leftArrow?-1:1,Q=(_+se+x.length)%x.length,N=x[Q];N&&s(N[0])}let E=t[m];if(E){E.action?await E.action():s(m);return}let R=t[n];if(R?.shortcuts){let x=R.shortcuts.find(_=>_.key===m);x&&(!x.condition||x.condition())&&await x.action()}})()},{isActive:!!o}),(0,A.useLayoutEffect)(()=>{let m=()=>{if(i(Math.floor(r.columns*hn)),!l.current)return;let f=Ut(l.current);d(f.width<r.columns)};return r.on("resize",m),()=>{r.off("resize",m)}},[r]);let u=Object.entries(t).map(([m,f])=>({...f,inputKey:m,header:` (${m}) ${f.label} `})),h=u.filter(m=>!m.action),w=u.filter(m=>m.action);return A.default.createElement(A.default.Fragment,null,A.default.createElement(k,{paddingTop:0,width:a,flexDirection:"row",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},A.default.createElement(k,{ref:l,flexDirection:"row",flexWrap:"nowrap",flexShrink:0,marginRight:3},A.default.createElement(L,{wrap:"truncate-end"},"\u2502",h.map(m=>A.default.createElement(A.default.Fragment,{key:m.inputKey},A.default.createElement(L,{bold:n===m.inputKey,inverse:n===m.inputKey,wrap:"truncate"},m.header),"\u2502")))),c&&A.default.createElement(k,{flexGrow:1,justifyContent:"flex-end"},w.map((m,f)=>A.default.createElement(L,{wrap:"truncate",key:m.inputKey},"(",m.inputKey,") ",m.label,f<w.length-1&&" \u2502 ")))),A.default.createElement(k,{flexDirection:"column",marginLeft:1,marginRight:1,marginTop:1},t[n]?.content))};var y=J(ye(),1);var wn=({abortController:t,processes:e,devSessionStatusManager:r,shopFqdn:o,appURL:n,appName:s,organizationName:a,configPath:i,localURL:c,onAbort:d})=>{let{isRawModeSupported:l}=Pe(),[u,h]=(0,y.useState)(void 0),[w,m]=(0,y.useState)(void 0),[f,U]=(0,y.useState)(r.status),[E,R]=(0,y.useState)(!1),{isAborted:x}=Bt(t.signal,async P=>{P&&m(typeof P=="string"?P:P.message),r.status.isReady?R(!0):(h("Shutting down dev ..."),await d()),ko()}),_=(0,y.useMemo)(()=>e.map(P=>({...P,action:async(ue,An,_n)=>{try{return await P.action(ue,An,_n)}catch(Cn){t.abort(Cn)}}})),[e,t]);(0,y.useEffect)(()=>(r.on("dev-session-update",U),()=>{r.off("dev-session-update",U)}),[]),ve((P,ue)=>{qt(P,ue,()=>t.abort())},{isActive:!!l});let se=P=>{switch(P){case"loading":return y.default.createElement(fn,null);case"success":return"\u2705";case"error":return"\u274C"}},Q=[{key:"p",shortcutLabel:"Open app preview",linkLabel:"Preview",url:f.previewURL,condition:()=>!!(f.isReady&&f.previewURL),action:async()=>{await j.addPublicMetadata(()=>({cmd_dev_preview_url_opened:!0})),f.previewURL&&await Ue(f.previewURL)}},{key:"c",shortcutLabel:"Open Dev Console for extension previews",linkLabel:"Dev Console",url:ot(o),condition:()=>!!(f.isReady&&f.appEmbedded===!1&&f.hasExtensions),action:async()=>{await j.addPublicMetadata(()=>({cmd_dev_preview_url_opened:!0})),await Ue(ot(o))}},{key:"g",shortcutLabel:"Open GraphiQL (Admin API)",linkLabel:"GraphiQL",url:f.graphiqlURL,condition:()=>!!(f.isReady&&f.graphiqlURL),action:async()=>{await j.addPublicMetadata(()=>({cmd_dev_graphiql_opened:!0})),f.graphiqlURL&&await Ue(f.graphiqlURL)}}],N=Q.filter(P=>P.condition?.()??!0),B={d:{label:"Dev status",shortcuts:Q,content:y.default.createElement(y.default.Fragment,null,f.statusMessage&&y.default.createElement(L,null,se(f.statusMessage.type)," ",f.statusMessage.message),l&&N.length>0&&y.default.createElement(k,{marginTop:1,flexDirection:"column"},N.map(P=>y.default.createElement(L,{key:P.key},Wt.pointerSmall," ",y.default.createElement(L,{bold:!0},"(",P.key,")")," ",Ve()&&P.url?y.default.createElement(je,{url:P.url,label:P.shortcutLabel}):P.shortcutLabel))),y.default.createElement(k,{marginTop:l?1:0,flexDirection:"column"},u?y.default.createElement(L,null,u):y.default.createElement(y.default.Fragment,null,f.isReady&&!(l&&Ve())&&y.default.createElement(y.default.Fragment,null,N.filter(P=>P.url).map(P=>y.default.createElement(L,{key:P.key},P.linkLabel," URL: ",y.default.createElement(je,{url:P.url})))))))},a:{label:"App info",content:y.default.createElement(k,{flexDirection:"column"},y.default.createElement(Ye,{tabularData:[["App:",s??""],["App URL:",n??""],["Local URL:",n?"":c??""],["Config:",i?.split("/").pop()??""],["Org:",a??""]].filter(([,P])=>P)}))},s:{label:"Store info",content:y.default.createElement(k,{flexDirection:"column"},y.default.createElement(Ye,{tabularData:[["Dev store:",{link:{url:`https://${o}`}}],["Dev store admin:",{link:{url:`https://${o}/admin`}}],["Org:",a??""]].filter(([,P])=>P)}))},q:{label:"Quit",action:async()=>{t.abort()}}};return y.default.createElement(y.default.Fragment,null,y.default.createElement(Ht,{processes:_,prefixColumnSize:Or,abortSignal:t.signal,keepRunningAfterProcessesResolve:!0,useAlternativeColorPalette:!0}),E&&y.default.createElement(k,{marginTop:1,flexDirection:"column"},y.default.createElement(Gt,{type:"info",headline:`A preview of your development changes is still available on ${o}.`,body:["Run",{command:"shopify app dev clean"},"to restore the latest released version of your app."],link:{label:"Learn more about dev previews",url:"https://shopify.dev/beta/developer-dashboard/shopify-app-dev"}})),x?null:y.default.createElement(k,{paddingTop:1,flexDirection:"column",flexGrow:1},l?y.default.createElement(gn,{tabs:B,initialActiveTab:"d"}):y.default.createElement(k,{marginY:1,paddingTop:0,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},B.d?.content)),w?y.default.createElement(k,{marginTop:1,flexDirection:"column"},y.default.createElement(L,{color:"red"},w)):null)};var yn=J(ye(),1);async function Pn({processes:t,previewUrl:e,app:r,abortController:o,graphiqlUrl:n,shopFqdn:s,devSessionStatusManager:a,appURL:i,appName:c,organizationName:d,configPath:l,localURL:u}){if(zt())return Nt(yn.default.createElement(wn,{processes:t,abortController:o,devSessionStatusManager:a,shopFqdn:s,appURL:i,appName:c,organizationName:d,configPath:l,localURL:u,onAbort:async()=>{await r.developerPlatformClient.devSessionDelete({appId:r.id,shopFqdn:s})}}),{exitOnCtrlC:!1});await Os({processes:t,previewUrl:e,graphiqlUrl:n,abortController:o})}async function Os({processes:t,previewUrl:e,graphiqlUrl:r,abortController:o}){return process.stdout.write(`
|
|
18
|
-
Preview URL: ${e}
|
|
19
|
-
`),r&&process.stdout.write(`GraphiQL URL (Admin API): ${r}
|
|
20
|
-
`),Promise.all(t.map(async n=>{await n.action(process.stdout,process.stderr,o.signal)}))}p();function vn(t){if(!t.length)return;let e=t.filter(n=>n.requested!==n.actual);if(e.length===0)return;if(e.length===1&&e[0]){let n=e[0];ae({headline:[`A random port will be used for ${n.for} because ${n?.requested} is not available.`],body:["If you want to use a specific port, you can choose a different one by setting the ",{command:n?.flagToRemedy}," flag."]});return}let r=Ke(e.map(n=>n.for)).join(" "),o=Ke(e.map(n=>({command:n.flagToRemedy})));ae({headline:[`Random ports will be used for ${r} because the requested ports are not available.`],body:["If you want to use specific ports, you can choose different ports using the",...o,"flags."]})}p();async function xn(t,e){return e?e.includes("localhost")?"localhost":(await Lt(t)).plugins.find(o=>e?.includes(o))??"custom":void 0}p();var En=J(In(),1);var V="v1.4.4",bn="FiloSottile/mkcert",mt=v.genericShellCommand("mkcert");async function Ns(t,e,r,o){let n=e[ke.mkcertBinaryPath];if(n)return n;let a=S(t,r==="win32"?"mkcert.exe":"mkcert");if(await F(a))return a;let i=await(0,En.default)("mkcert",{nothrow:!0});return i?(g(b`Found ${mt} at ${v.path(i)}`),i):(await qs(a,r,o),a)}async function qs(t,e,r){let o;switch(e){case"darwin":o=r==="arm64"?`mkcert-${V}-darwin-arm64`:`mkcert-${V}-darwin-amd64`;break;case"linux":o=r==="arm64"?`mkcert-${V}-linux-arm64`:`mkcert-${V}-linux-amd64`;break;case"win32":o=`mkcert-${V}-windows-amd64.exe`;break;default:throw new Z(`Unsupported platform: ${e}`)}await Lr(bn,V,o,t),g(b`${mt} saved to ${v.path(t)}`)}async function Ws(t){let e=S(t,"mkcert-LICENSE");if(await F(e))return;let r=`https://raw.githubusercontent.com/${bn}/refs/tags/${V}/LICENSE`,o={headline:"Failed to download mkcert license.",body:["We tried to download the license for mkcert, but the request failed. You can ",{link:{url:r,label:"view the license here"}}]},n;try{if(n=await It(r),!n.ok)return o}catch{return o}let s=await n.text();await fe(e,s)}async function Sn({appDirectory:t,forceInstall:e,env:r=process.env,platform:o=process.platform,arch:n=process.arch}){let s=S(".shopify","localhost-key.pem"),a=S(".shopify","localhost.pem"),i=S(t,s),c=S(t,a);if(await F(i)&&await F(c))return{keyContent:await I(i),certContent:await I(c),certPath:a};if(!(e??await Yr()))throw new T(`Localhost certificate and key are required at ${a} and ${s}`);let l="",u;return await Se([{title:"Finding or downloading mkcert binary",task:async()=>{let w=S(t,".shopify");l=await Ns(w,r,o,n),u=await Ws(w),g(b`${mt} found at: ${v.path(l)}`)}}]),u&&be(u),K(b`Generating self-signed certificate for localhost. You may be prompted for your password.`),await Re(l,["-install","-key-file",i,"-cert-file",c,"localhost"]),K(b`${v.successIcon()} Certificate generated at ${a}\n`),await Yt()&&(ae({headline:"It looks like you're using WSL.",body:["Additional steps are required to configure certificate trust in Windows."],link:{label:"See Shopify CLI documentation",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options#localhost-based-development-with-windows-subsystem-for-linux-wsl"}}),K("\u{1F449} Press any key to continue"),await Kt(),K("")),{keyContent:await I(i),certContent:await I(c),certPath:gt(t,c)}}p();function Un(){let t=["Your app has extensions which need to be assigned",{command:"uid"},"identifiers."],e=["You must first map IDs to your existing extensions by running",{command:"shopify app deploy"},"interactively, without",{command:"--allow-updates"},"or",{command:"--allow-deletes"},", to finish the migration."],r={title:"Reference",body:{list:{items:[{link:{label:"Migrating from the Partner Dashboard",url:"https://shopify.dev/docs/apps/build/dev-dashboard/migrate-from-partners"}}]}}};throw new T(t,void 0,[e],[r])}async function Rn(t){let e=await Hs(t);await Gs(e);let{processes:r,graphiqlUrl:o,previewUrl:n,devSessionStatusManager:s}=await dn(e);await Ks(e),await Ys({processes:r,previewUrl:n,graphiqlUrl:o,config:e,devSessionStatusManager:s})}async function Hs(t){let{app:e,remoteApp:r,developerPlatformClient:o,store:n,specifications:s,tunnel:a}=t,i;if(a.mode==="auto"){let E=await $();i=await Kr(t.commandConfig,E,"cloudflare")}let c=await Qr(r,o,s,r.flags);r.configuration=c,Jr({app:e,remoteApp:r,selectedStore:n,cachedInfo:tt(t.directory),organization:t.organization,tunnelMode:a.mode}),e.configuration.build?.dev_store_url&&(e.configuration.build={...e.configuration.build,dev_store_url:n.shopDomain},await(await Jt.read(e.configPath)).patch({build:{dev_store_url:n.shopDomain}})),!t.skipDependenciesInstallation&&!t.project.usesWorkspaces&&await Mr(t.project);let d=t.graphiqlPort??await $(ce.graphiql),l=[{for:"GraphiQL",flagToRemedy:"--graphiql-port",requested:t.graphiqlPort??ce.graphiql,actual:d}];a.mode==="use-localhost"&&l.push({for:"localhost",flagToRemedy:"--localhost-port",requested:a.requestedPort,actual:a.actualPort}),vn(l);let{webs:u,...h}=await zs(e.directory,e.webs,d,a,i,r.configuration,t.installMkcert);e.webs=u;let w=e.configuration.build?.automatically_update_urls_on_dev,m=tt(t.directory)?.previousAppId,f=r.apiKey,U=await js(u,t.update,h,e,w,r,f);return{storeFqdn:n.shopDomain,storeId:n.shopId,remoteApp:r,remoteAppUpdated:r.apiKey!==m,localApp:e,developerPlatformClient:o,commandOptions:t,network:h,partnerUrlsUpdated:U,graphiqlPort:d,graphiqlKey:t.graphiqlKey}}async function Gs(t){await Bs(t)}async function Bs(t){let{developerPlatformClient:e,remoteApp:r}=t;(await e.appExtensionRegistrations(r)).app.extensionRegistrations.filter(n=>n.type.toLowerCase()!=="webhook_subscription").every(n=>n.id)||Un()}async function Ks(t){qr({directory:t.commandOptions.directory,previousAppId:t.remoteApp.apiKey}),await Vs({devOptions:t.commandOptions,tunnelUrl:t.network.proxyUrl,shouldUpdateURLs:t.partnerUrlsUpdated,storeFqdn:t.storeFqdn}),await Ft({config:t.commandOptions.commandConfig,exitMode:"ok"})}async function js(t,e,r,o,n,s,a){let{backendConfig:i,frontendConfig:c}=Y(t),d=!1;if((c??i)&&e){let l=Hr(r.proxyUrl,t.map(({configuration:u})=>u.auth_callback_path).find(u=>u),o.configuration.app_proxy);d=await Br({currentURLs:r.currentUrls,appDirectory:o.directory,cachedUpdateURLs:n,newApp:s.newApp,localApp:o,apiKey:a,newURLs:l}),d&&o.setDevApplicationURLs(l)}return d}async function zs(t,e,r,o,n,s,a){let{backendConfig:i,frontendConfig:c}=Y(e);await Qs(e,r);let d=o.mode==="use-localhost"?{noTunnelUseLocalhost:!0,port:o.actualPort}:{noTunnelUseLocalhost:!1,tunnelUrl:o.mode==="custom"?o.url:void 0,tunnelClient:n},[{frontendUrl:l,frontendPort:u,usingLocalhost:h},w,m]=await Promise.all([Wr(d),Ct()??i?.configuration.port??$(),Gr(s)]),f=h?`${l}:${u}`:l,U=c?.configuration.port;c&&(U??(U=c===i?w:await $()),c.configuration.port=U),U=U??await $();let E;if(o.mode==="use-localhost"){let{keyContent:R,certContent:x,certPath:_}=await Sn({appDirectory:t,forceInstall:a});E={key:R,cert:x,certPath:_,port:o.actualPort}}return{proxyUrl:f,proxyPort:u,frontendPort:U,backendPort:w,currentUrls:m,webs:e,reverseProxyCert:E}}async function Ys({processes:t,previewUrl:e,graphiqlUrl:r,config:o,devSessionStatusManager:n}){let s=new Tt,a=t.map(d=>({prefix:d.prefix,action:async(u,h,w)=>{let m=d.function;return m({stdout:u,stderr:h,abortSignal:w},d.options)}})),i=o.developerPlatformClient,c={id:o.remoteApp.id,developerPlatformClient:i};return Pn({processes:a,previewUrl:e,graphiqlUrl:r,app:c,abortController:s,shopFqdn:o.storeFqdn,devSessionStatusManager:n,appURL:o.localApp.devApplicationURLs?.applicationUrl,appName:o.remoteApp.title,organizationName:o.commandOptions.organization.businessName,configPath:o.localApp.configPath,localURL:o.network.proxyUrl})}async function Vs(t){let e=await xn(t.devOptions.commandConfig,t.tunnelUrl);await j.addPublicMetadata(()=>({cmd_dev_tunnel_type:e,cmd_dev_tunnel_custom_hash:e==="custom"?ze(t.tunnelUrl):void 0,cmd_dev_urls_updated:t.shouldUpdateURLs,store_fqdn_hash:ze(t.storeFqdn),store_domain:t.storeFqdn,cmd_app_dependency_installation_skipped:t.devOptions.skipDependenciesInstallation})),await j.addSensitiveMetadata(()=>({store_fqdn:t.storeFqdn,cmd_dev_tunnel_custom:e==="custom"?t.tunnelUrl:void 0}))}async function Qs(t,e){let r=t.map(n=>n.configuration.port).filter(n=>n),o=r.find((n,s)=>r.indexOf(n)!==s);if(o)throw new T(`Found port ${o} for multiple webs.`,"Please define a unique port for each web.");await Promise.all([...r.map(async n=>{if(!await Qe(n))throw new T(`Hard-coded port ${n} is not available, please choose a different one.`)}),(async()=>{if(!await Qe(e)){let s=`Port ${e} is not available for serving GraphiQL.`,a=["Choose a different port for the",{command:"--graphiql-port"},"flag."];throw new T(s,a)}})()])}p();async function Tn({useLocalhost:t,localhostPort:e,tunnelUrl:r}){if(r)return{mode:"custom",url:r};if(!t&&!e)return{mode:"auto"};let o=e??ce.localhost,n=await $(o);if(e&&n!==o){let s=`Port ${e} is not available.`,a=["Choose a different port for the",{command:"--localhost-port"},"flag."];throw new T(s,a)}return{mode:"use-localhost",requestedPort:o,actualPort:n}}var M=J(kn(),1);var ft,G=class extends Zr{static analyticsStopCommand(){return"app dev stop"}async run(){let{flags:e}=await this.parse(ft),r=await Tn({useLocalhost:e["use-localhost"]??!1,tunnelUrl:e["tunnel-url"],localhostPort:e["localhost-port"]});await Ot(()=>({cmd_app_dependency_installation_skipped:e["skip-dependencies-installation"],cmd_app_reset_used:e.reset,cmd_dev_tunnel_type:r.mode})),await jr(e.path);let o=await Xr({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),n=await eo({appContextResult:o,storeFqdn:e.store,forceReselectStore:e.reset}),s={...o,store:n,directory:e.path,update:!e["no-update"],skipDependenciesInstallation:e["skip-dependencies-installation"],commandConfig:this.config,subscriptionProductUrl:e["subscription-product-url"],checkoutCartUrl:e["checkout-cart-url"],theme:e.theme,themeExtensionPort:e["theme-app-extension-port"],storePassword:e["store-password"],notify:e.notify,graphiqlPort:e["graphiql-port"],graphiqlKey:e["graphiql-key"],installMkcert:e["install-mkcert"]??!1,tunnel:r};return await Rn(s),{app:o.app}}};ft=G;G.summary="Run the app.";G.descriptionWithMarkdown="Builds and previews your app on a dev store, and watches for changes. [Read more about testing apps locally](https://shopify.dev/docs/apps/build/cli-for-apps/test-apps-locally).";G.description=ft.descriptionWithoutMarkdown();G.flags={...Xt,...$r,store:M.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",parse:async t=>Ee(t)}),"skip-dependencies-installation":M.Flags.boolean({description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1}),"no-update":M.Flags.boolean({description:"Uses the app URL from the toml file instead an autogenerated URL for dev.",env:"SHOPIFY_FLAG_NO_UPDATE",default:!1}),"subscription-product-url":M.Flags.string({description:'Resource URL for subscription UI extension. Format: "/products/{productId}"',env:"SHOPIFY_FLAG_SUBSCRIPTION_PRODUCT_URL"}),"checkout-cart-url":M.Flags.string({description:'Resource URL for checkout UI extension. Format: "/cart/{productVariantID}:{productQuantity}"',env:"SHOPIFY_FLAG_CHECKOUT_CART_URL"}),"tunnel-url":M.Flags.string({description:'Use a custom tunnel, it must be running before executing dev. Format: "https://my-tunnel-url:port".',env:"SHOPIFY_FLAG_TUNNEL_URL",exclusive:["tunnel"]}),"use-localhost":M.Flags.boolean({description:"Service entry point will listen to localhost. A tunnel won't be used. Will work for testing many app features, but not those that directly invoke your app (E.g: Webhooks)",env:"SHOPIFY_FLAG_USE_LOCALHOST",exclusive:["tunnel-url"]}),"install-mkcert":M.Flags.boolean({description:"Install and use mkcert to generate localhost certificates when --use-localhost is enabled without prompting.",env:"SHOPIFY_FLAG_INSTALL_MKCERT",dependsOn:["use-localhost"]}),"localhost-port":Te({description:"Port to use for localhost.",env:"SHOPIFY_FLAG_LOCALHOST_PORT"}),theme:M.Flags.string({char:"t",description:"Theme ID or name of the theme app extension host theme.",env:"SHOPIFY_FLAG_THEME"}),"theme-app-extension-port":Te({description:"Local port of the theme app extension development server.",env:"SHOPIFY_FLAG_THEME_APP_EXTENSION_PORT"}),"store-password":M.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),notify:M.Flags.string({description:"The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.",env:"SHOPIFY_FLAG_NOTIFY"}),"graphiql-port":Te({hidden:!0,description:"Local port of the GraphiQL development server.",env:"SHOPIFY_FLAG_GRAPHIQL_PORT"}),"graphiql-key":M.Flags.string({hidden:!0,description:"Key used to authenticate GraphiQL requests. By default, a key is automatically derived from the app secret. Use this flag to override with a custom key.",env:"SHOPIFY_FLAG_GRAPHIQL_KEY"})};var Yu=G;export{La as a,Yu as b};
|
package/dist/chunk-WDCCITSG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-CV5ELBVU.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
|
package/dist/chunk-WGMYSPR2.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{b as ye}from"./chunk-DC7TXY4K.js";import{a as ue,c as he}from"./chunk-2OYQHHKC.js";import{b as de}from"./chunk-XZ2KUBFJ.js";import{a as Fe}from"./chunk-WDCCITSG.js";import{D as be,I as ve,K as Pe,M as Ae,V as Ce,X as xe,h as we,qa as Re,ta as Le}from"./chunk-5HJTCBBV.js";import{Y as ke,aa as Ie,o as ge}from"./chunk-7EE7YOCR.js";import{b as fe}from"./chunk-4TANJ4JK.js";import{B as oe,D as re,E as ie,f as R,g as ee,i as te,p as ae}from"./chunk-CELVG4AL.js";import{b as Q}from"./chunk-6KAWCN3I.js";import{D as ce,f as ne,u as pe,v as le,z as S}from"./chunk-JX4HSDDG.js";import{a as M}from"./chunk-REABQXMP.js";import{d as se}from"./chunk-STCLJWHD.js";import{m}from"./chunk-2GB3EAD3.js";import{$a as Z,Ab as J,Ca as I,Fb as h,Gb as L,Hb as g,Ja as K,Oa as B,Ta as C,Ua as x,Va as W,Wa as q,_ as H,ka as O,ma as V,sa as _,ua as $,wa as Y,zb as X}from"./chunk-BCZMDFI2.js";import{e as me}from"./chunk-EQNJ2NQD.js";import{d as p,e as k,f as U,p as D,q as z}from"./chunk-773TIA5M.js";import{a as ze}from"./chunk-CTNBSUVU.js";import{e as De,g as c}from"./chunk-VKWPEFWQ.js";c();c();var b={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},G=Object.keys(b),F=G.filter(e=>b[e].visible),He=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:b.reactRouter.url};t??(t=await S({choices:He.map(i=>({label:b[i].label||i,value:i})),message:"Get started building your app:",defaultValue:G.find(i=>b[i].url===r.template)}));let o={...e,template:t,templateType:T(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(o.templateType!=="custom"){let i=b[o.templateType];n=i.url,i.branches&&(a?s=i.branches.options[a]?.branch:s=await S({message:i.branches.prompt||"Choose a flavor:",choices:Object.entries(i.branches.options).map(([f,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),o.template=n||o.template||r.template,o.globalCLIResult=await J(),o},Te=Oe;function T(e){return G.includes(e)}c();c();import{platform as Ve}from"os";async function _e({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=M,delete e.dependencies["@shopify/app"],t){let r=await Ye("cli");e.dependencies["@shopify/cli"]=r;let o={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...o}:o,e.resolutions=e.resolutions?{...e.resolutions,...o}:o}return e}async function Ye(e){return`file:${await Z(`packages/${e}`,{type:"directory",cwd:D(import.meta.url)})}`}async function $e({from:e,packageManager:t}){let a=Ve()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return ae({directory:k(e),packageManager:t,args:a})}c();async function E(e,t){let r=(await q([p(e,"**",".git"),p(e,"**",".github"),p(e,"**",".gitmodules"),p(e,"**",".cli-liquid-bypass"),p(e,"LICENSE*"),p(e,"**","frontend/LICENSE*"),p(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),o=new Set(ee[t]),n=R.filter(s=>!o.has(s)).map(s=>{let i=p(e,s);if(x(i))return K(i)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=H(e.name),r=p(e.directory,a),o=ye(e.template);await Se(r,a),await Be(r),pe({body:["Initializing project with",{command:t},`
|
|
2
|
-
Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await O(async i=>{let f=p(i,"download"),u=o.filePath?p(f,o.filePath):f,d=p(i,"app"),A=o.branch?`${o.baseURL}#${o.branch}`:o.baseURL;await Y(f);let w=[{title:`Downloading template from ${A}`,task:async()=>{await he({repoUrl:A,destination:f,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await de(u,d,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let l=(await oe(d)).content;l.name=a,l.author=await ne()??"",l.private=!0;let v=["extensions/*"].concat(We(d));switch(t){case"npm":case"yarn":case"bun":l.workspaces=v;break;case"pnpm":{await qe(d,v),await _(p(d,".npmrc"),`auto-install-peers=true
|
|
3
|
-
`);break}case"homebrew":case"unknown":throw new te}await _e({packageJSON:l,local:e.local,directory:d,useGlobalCLI:e.useGlobalCLI}),await re(d,l)}}),e.postCloneActions.removeLockfilesFromGitignore&&w.push({title:"Removing lockfiles from .gitignore",task:async()=>{let l=p(d,".gitignore");if(await C(l)){let v=await V(l);R.forEach(Me=>{let Ue=new RegExp(`^${Me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");v=v.replace(Ue,"")}),await $(l,v.trim())}}}),await me()&&w.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let l=p(d,".npmrc");await _(l,`@shopify:registry=https://registry.npmjs.org
|
|
4
|
-
`)}});let N=!1;w.push({title:"Preparing project directory",task:async()=>{await Se(r,a),N=!0,await B(d,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await $e({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await E(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await ue(r)}});try{await ce(w)}catch(l){throw N&&await I(r).catch(()=>{}),l}});let n;if(e.selectedAppOrNameResult.result==="new"){let i=await be(r,e.name),f=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(f,i)}else n=e.selectedAppOrNameResult.app;await Re({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Le({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return le({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:L(t,"shopify app generate extension")}],["To see your app, run",{command:L(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:L(t,"shopify app","--help")}]]}),{app:s.app}}async function Se(e,t){if(await C(e))throw new m(`
|
|
5
|
-
A directory with this name (${t}) already exists.
|
|
6
|
-
Choose a new name for your app.`)}async function Be(e){let t=new Q({projectName:"shopify-cli-app"}),a=k(e);t.delete(a)}function We(e){return["web","web/frontend"].filter(t=>x(p(e,t)))}async function qe(e,t){let a=p(e,"pnpm-workspace.yaml");if(await C(a))return;let r=t.map(o=>` - '${o}'`).join(`
|
|
7
|
-
`);await $(a,`packages:
|
|
8
|
-
${r}`)}var Ge=Ke;c();c();function j(e){try{return new URL(e)}catch{return}}function Ze(e){if(!e)return;let t=e.toLowerCase();for(let r of[t,`https://${t}`]){let o=j(r)?.hostname;if(o)return o}let a=t.replace(/^https?:\/\//,"").split("/")[0];if(a)return a}function Et(e){let t=Ze(e);if(!t)return;let a=t.match(/^([^.]+)\.myshopify\.com$/);return a?a[1]:void 0}function Ee(e){if(!e)return;let t=j(e);if(t&&t.origin!=="https://github.com")throw new m("Only GitHub repository references are supported, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]");if(!t&&!T(e))throw new m(g`Only ${F.map(a=>g`${h.yellow(a)}`.value).join(", ")} template aliases are supported, please provide a valid URL`)}function je(e,t){if(!e){if(t)throw new m(g`The ${h.yellow("--flavor")} flag requires the ${h.yellow("--template")} flag to be set`);return}if(!t)return;if(!T(e))throw new m(g`The ${h.yellow("--flavor")} flag is not supported for custom templates`);let a=b[e];if(!a.branches)throw new m(g`The ${h.yellow(e)} template does not support flavors`);if(!a.branches.options[t])throw new m(g`Invalid option for ${h.yellow("--flavor")}\nThe ${h.yellow("--flavor")} flag for ${h.yellow(e)} accepts only ${Object.keys(a.branches.options).map(r=>g`${h.yellow(r)}`.value).join(", ")}`)}var y=De(ze(),1);var Ne,P=class extends Fe{async run(){let{flags:t}=await this.parse(Ne);if(Ee(t.template),je(t.template,t.flavor),t.name!==void 0&&t.name.trim()==="")throw new m("The --name flag can't be empty","Provide a valid app name, for example: --name my-app");let a=ie(t["package-manager"]),r=t.name??await Qe(t.path),o=ke();await o.session();let n=await Te({template:t.template,flavor:t.flavor}),s,i;if(t["client-id"]){let u=await Ce({apiKey:t["client-id"]});i=u.title,s={result:"existing",app:u}}else{let u;t["organization-id"]?u=await Ie(t["organization-id"],o):u=await xe();let{organization:d,apps:A,hasMorePages:w}=await o.orgAndApps(u.id);s=await Xe(t.name!==void 0,r,A,w,d,o),i=s.result==="new"?s.name:s.app.title}n.globalCLIResult.install&&await X(a),await se(()=>({cmd_create_app_template:n.templateType,cmd_create_app_template_url:n.template}));let{app:f}=await Ge({name:i,selectedAppOrNameResult:s,packageManager:a,template:n.template,local:t.local,directory:t.path,useGlobalCLI:n.globalCLIResult.alreadyInstalled||n.globalCLIResult.install,developerPlatformClient:o,postCloneActions:{removeLockfilesFromGitignore:n.templateType!=="custom"}});return{app:f}}};Ne=P;P.summary="Create a new app project";P.flags={...fe,name:y.Flags.string({char:"n",env:"SHOPIFY_FLAG_NAME",hidden:!1,description:"The name for the new app. When provided, skips the app selection prompt and creates a new app with this name."}),path:y.Flags.string({char:"p",env:"SHOPIFY_FLAG_PATH",parse:async e=>U(e),default:async()=>z(),hidden:!1}),template:y.Flags.string({description:`The app template. Accepts one of the following:
|
|
9
|
-
- <${F.join("|")}>
|
|
10
|
-
- Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]`,env:"SHOPIFY_FLAG_TEMPLATE"}),flavor:y.Flags.string({description:"Which flavor of the given template to use.",env:"SHOPIFY_FLAG_TEMPLATE_FLAVOR"}),"package-manager":y.Flags.string({char:"d",env:"SHOPIFY_FLAG_PACKAGE_MANAGER",hidden:!1,options:["npm","yarn","pnpm","bun"]}),local:y.Flags.boolean({char:"l",env:"SHOPIFY_FLAG_LOCAL",default:!1,hidden:!0}),"client-id":y.Flags.string({hidden:!1,description:"The Client ID of your app. Use this to automatically link your new project to an existing app. Using this flag avoids the app selection prompt.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),"organization-id":y.Flags.string({hidden:!1,description:"The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/<organization-id>",env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]})};var sa=P;async function Qe(e){for(let t=0;t<3;t++){let a=await W({suffix:"app",directory:e});if(ge(a))return a}return""}async function Xe(e,t,a,r,o,n){let s=a.length===0||e;if(s||(s=await Ae()),s)return{result:"new",name:e?t:await Pe(t),org:o};{let i=await ve(we(n,o.id),a,r);if(!i)throw new m("Unable to select an app: the selection prompt was interrupted.");let f=await n.appFromIdentifiers(i.apiKey);if(!f)throw new m(`App with id ${i.id} not found`);return{result:"existing",app:f}}}export{Ze as a,Et as b,sa as c};
|
package/dist/chunk-WHT2RCAD.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{b as C}from"./chunk-WW7TENNA.js";import{G as T,a as F}from"./chunk-AFM3UZQO.js";import{R as O}from"./chunk-JX4HSDDG.js";import{d as _}from"./chunk-STCLJWHD.js";import{m as d}from"./chunk-2GB3EAD3.js";import{$ as E,Fb as h,Hb as g,Lb as $}from"./chunk-BCZMDFI2.js";import{c as P}from"./chunk-EQNJ2NQD.js";import{a as b}from"./chunk-UKQ7NE5V.js";import{a as I}from"./chunk-CTNBSUVU.js";import{e as A,g as w}from"./chunk-VKWPEFWQ.js";w();var u=A(I()),p=class extends u.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(n){n.skipOclifErrorHandling=!0;let{errorHandler:r}=await import("./error-handler-AOEXPYI7.js");return await r(n,this.config),u.Errors.handle(n)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),C(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:r}=await import("./error-handler-AOEXPYI7.js");await r(this.config)}await M(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-BTEFKXCS.js");return await n(),super.init()}showNpmFlagWarning(){let n=this.constructor;Object.keys(n.flags||{}).map(t=>`npm_config_${E(t).replace(/^no_/,"")}`).some(t=>process.env[t]!==void 0)&&import("./ui-AX6ZMY6P.js").then(({renderWarning:t})=>{t({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){b(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&($(`
|
|
2
|
-
SHOPIFY_CLI_TIMESTAMP_START
|
|
3
|
-
{ "timestamp": ${Date.now()} }
|
|
4
|
-
SHOPIFY_CLI_TIMESTAMP_END
|
|
5
|
-
`),process.exit(0))}async parse(n,r){let e=await super.parse(n,r);return e=await this.resultWithEnvironment(e,n,r),await T(e.flags["auth-alias"]),await j(e.flags),{...e,argv:e.argv}}environmentsFilename(){}failMissingNonTTYFlags(n,r){O()||r.forEach(e=>{if(!(e in n))throw new d(g`Flag not specified:
|
|
6
|
-
|
|
7
|
-
${h.cyan(e)}
|
|
8
|
-
|
|
9
|
-
This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(n,r,e){let t=n.flags,i=this.environmentsFilename();if(!i)return n;let{environmentFilePath:o}=await import("./environments-5P57CTOG.js"),s=await o(i,{from:t.path}),m=[];t.environment&&(m=Array.isArray(t.environment)?t.environment:[t.environment]);let c=m.length>0;if(!s&&!c||c&&m.length>1)return n;let{environment:l,isDefaultEnvironment:f}=await this.loadEnvironmentForCommand(t.path,i,m[0]);if(!l||f&&!S(r?.flags,"environment"))return n;let v=await super.parse(W(r),e),y=await super.parse(r,[...e??this.argv,...x(l,r,v),...f?["--environment","default"]:[]]);return N(v.flags,y.flags,f?"default":m[0],l),y}async loadEnvironmentForCommand(n,r,e){let{loadEnvironment:t}=await import("./environments-5P57CTOG.js");return e?{environment:await t(e,r,{from:n}),isDefaultEnvironment:!1}:{environment:await t("default",r,{from:n,silent:!0}),isDefaultEnvironment:!0}}};p.baseFlags={};async function j(a){await _(()=>({cmd_all_verbose:a.verbose,cmd_all_path_override:a.path!==void 0,cmd_all_path_override_hash:a.path===void 0?void 0:F(a.path)}))}function N(a,n,r,e){let t={};for(let[o,s]of Object.entries(n)){let m=Object.prototype.hasOwnProperty.call(a,o),c=Object.prototype.hasOwnProperty.call(e,o);if(!m&&c){let l=o==="password"?`********${s.substr(-4)}`:s;t[o]=l}}if(Object.keys(t).length===0)return;let i=Object.entries(t).map(([o,s])=>`${o}: ${s}`);import("./ui-AX6ZMY6P.js").then(({renderInfo:o})=>{o({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:i}}]})})}function W(a){return a?.flags?{...a,flags:Object.fromEntries(Object.entries(a.flags).map(([n,r])=>{let e={...r};return delete e.default,[n,e]}))}:a}function x(a,n,r){let e=[];for(let[t,i]of Object.entries(a)){let o=S(n?.flags,t),s=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,t);if(o&&!s)if(typeof i=="boolean")if(i)e.push(`--${t}`);else throw new d(g`Environments can only specify true for boolean flags. Attempted to set ${h.yellow(t)} to false.`);else Array.isArray(i)?i.forEach(m=>e.push(`--${t}`,`${m}`)):e.push(`--${t}`,`${i}`)}return e}function S(a,n){return!!a&&Object.prototype.hasOwnProperty.call(a,n)}async function M(a){let n=Array.from(a.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],e=n.filter(i=>r.includes(i.name));if(e.length>0){let i=e.map(s=>` - shopify plugins remove ${s.name}`).join(`
|
|
10
|
-
`),{renderWarning:o}=await import("./ui-AX6ZMY6P.js");o({headline:`Unsupported plugins detected: ${e.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
|
|
11
|
-
${i}`]})}let t=n.filter(i=>!r.includes(i.name));a.plugins=new Map(t.map(i=>[i.name,i]))}var z=p;export{W as a,z as b};
|
package/dist/chunk-WW7TENNA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t}from"./chunk-VKWPEFWQ.js";t();var n;function r(){return n??(n={currentCommandId:""}),n}function o(){return r().currentCommandId}function d(e){r().currentCommandId=e}export{o as a,d as b};
|
package/dist/chunk-WXJGZGQS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as g}from"./chunk-WHT2RCAD.js";import{A as l,B as f,C as m,D as d,J as p,x as u}from"./chunk-AFM3UZQO.js";import{h as n}from"./chunk-GXO2RRV2.js";import{F as S,z as h}from"./chunk-JX4HSDDG.js";import{Ob as w}from"./chunk-BCZMDFI2.js";import{a as C}from"./chunk-CTNBSUVU.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();var r="NEW_LOGIN";function N(e,t){let s=[],o=e[t];if(o)for(let[c,I]of Object.entries(o))s.push({label:I.identity.alias??c,value:c});return s}async function b(){let e=await p({},{forceNewSession:!0}),t=await f(e.userId);if(!t){let s=await S({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await m(e.userId,s),s}return t}async function v(){let e=await l(),t=await u(),s=[];return e&&s.push(...N(e,t)),s.length>0&&s.push({label:"Log in with a different account",value:r}),s}async function y(e){if(e){let o=await d(e);if(o)return n(o),e}let t=await v(),s=r;return t.length>0&&(s=await h({message:"Which account would you like to use?",choices:t})),s===r?b():(n(s),t.find(o=>o.value===s)?.label??s)}var A=L(C(),1);var a=class e extends g{static{this.description="Logs you in to your Shopify account."}static{this.flags={alias:A.Flags.string({description:"Alias of the session you want to login to.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})}}async run(){let{flags:t}=await this.parse(e),s=await y(t.alias);w(`Current account: ${s}.`)}};export{a};
|
package/dist/chunk-X4AZV5A2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as n}from"./chunk-WHT2RCAD.js";import{u as t}from"./chunk-JX4HSDDG.js";import{j as r}from"./chunk-EQNJ2NQD.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var e=class extends n{static{this.description="Run CLI doctor-release tests"}static{this.hidden=!0}async run(){r()&&t({headline:"Shopify CLI Doctor Release.",body:["Available doctor-release commands:",""," shopify doctor-release theme -e <environment> Run all theme command tests","","The -e/--environment flag is required to specify the store configuration.","Use --help with any command for more options."]})}};export{e as a};
|
package/dist/chunk-XBBP5BWC.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{p,v as d}from"./chunk-445NFHXL.js";import{a as u}from"./chunk-C7LFLIRT.js";import{aa as P}from"./chunk-7L5AIZOP.js";import{b as l}from"./chunk-4TANJ4JK.js";import{v as f}from"./chunk-JX4HSDDG.js";import{m as i}from"./chunk-2GB3EAD3.js";import{Ta as c,ma as h}from"./chunk-BCZMDFI2.js";import{f as r,n as m}from"./chunk-773TIA5M.js";import{e as w,g as n}from"./chunk-VKWPEFWQ.js";n();n();var g=w(P(),1),k=["assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await v(e),o=`${e}/${t}`,a=`${e}/(${k})`;await u({inputDirectory:e,outputZipPath:o,matchFilePattern:a}),f({body:["Your local theme was packaged in",{filePath:m(o)}]})}async function v(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let o=await j(t);if(o===void 0||o.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[o.theme_name,o.theme_version].filter(Boolean).join("-")}.zip`}async function j(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(o=>o.name==="theme_info")}var _,s=class extends d{async command(t){await y(t.path)}};_=s;s.summary="Package your theme into a .zip file, ready to upload to the Online Store.";s.descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
|
|
2
|
-
|
|
3
|
-
Only folders that match the [default Shopify theme folder structure](https://shopify.dev/docs/storefronts/themes/tools/cli#directory-structure) are included in the package.
|
|
4
|
-
|
|
5
|
-
The package includes the \`listings\` directory if present (required for multi-preset themes per [Theme Store requirements](https://shopify.dev/docs/storefronts/themes/store/requirements#adding-presets-to-your-theme-zip-submission)).
|
|
6
|
-
|
|
7
|
-
The ZIP file uses the name \`theme_name-theme_version.zip\`, based on parameters in your [settings_schema.json](https://shopify.dev/docs/storefronts/themes/architecture/config/settings-schema-json) file.`;s.description=_.descriptionWithoutMarkdown();s.flags={...l,path:p.path};s.multiEnvironmentsFlags=null;var E=s;export{E as a};
|
package/dist/chunk-XH32NPYG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v}from"./chunk-WDCCITSG.js";import{a as k}from"./chunk-NENUUNWB.js";import{pa as w,ra as A,sa as P,ta as C}from"./chunk-5HJTCBBV.js";import{b as y}from"./chunk-4TANJ4JK.js";import{v as u}from"./chunk-JX4HSDDG.js";import{m as h}from"./chunk-2GB3EAD3.js";import{j as p}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();async function f(l){let{directory:o,configName:e,configPath:a,configuration:n,remoteApp:i}=l;if(!n.client_id)throw new h("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,m=await w({developerPlatformClient:c,app:i}),d=i.flags,b={directory:o,configName:e,developerPlatformClient:c,apiKey:n.client_id},g=await A(b,m,d,i.apiKey),x=p(a),F=await P({remoteApp:i,developerPlatformClient:c,specifications:m,flags:d,configFileName:x,appDirectory:g.appDirectory??o,localAppOptions:g});return{configPath:a,configuration:F,remoteApp:i}}var s,t=class extends v{async run(){let{flags:o}=await this.parse(s),{app:e,remoteApp:a}=await C({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),{configuration:n,configPath:i}=await f({directory:o.path,configName:o.config,configPath:e.configPath,configuration:e.configuration,remoteApp:a});return u({headline:`Pulled latest configuration for "${n.name}"`,body:`Updated ${p(i)} with the remote data.`}),{app:e}}};s=t;t.summary="Refresh an already-linked app configuration without prompts.";t.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";t.description=s.descriptionWithoutMarkdown();t.flags={...y,...k};var z=t;export{z as a};
|
package/dist/chunk-Y7A7Z2V3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as p}from"./chunk-4BPFJDH3.js";import{ra as b,sa as k,ua as s}from"./chunk-AFM3UZQO.js";import{F as w}from"./chunk-JX4HSDDG.js";import{f as E,m as N}from"./chunk-2GB3EAD3.js";import{Pb as V,S as _}from"./chunk-BCZMDFI2.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ie="live",ae="unpublished";function te(e){return e.role===g}async function de(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 se(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",c={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function sn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await p({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),k(i),V(`Error fetching theme with ID: ${e}`)}}async function un(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await T({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});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 T({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw k(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 cn(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await T({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:c});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 k(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function pn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await T({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async u=>{let{attachment:h,value:v}=await J(u.body);return{attachment:h,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function vn(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 p({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:c});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:h}=o;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(k(`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 Nn(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);b("theme-api:upload-files");let o=await K(e,m,a);b("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 p({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:c})}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}`),k(`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 hn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await T({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(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 fn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await p({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:c});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let u=d.userErrors.map(h=>h.message).join(", ");throw k(new N(u))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function yn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await p({query:O,session:n,variables:{id:S(e)},preferredBehaviour:c});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 k(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function Sn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await p({query:x,session:n,variables:{id:S(e)},preferredBehaviour:c});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 k(new N(d))}return i||r("Failed to update theme"),!0}async function Fn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await p({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:c,responseOptions:{onResponse:u=>{i=u.headers.get("x-request-id")??void 0}}});if(!t)return k("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 Tn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await p({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 p({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 k(new N(e))}async function T(e){try{return await p(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 k(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:Z(i)}function Z(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function J(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 k(new N(`Error downloading content from URL: ${e.url}`))}}}export{se as a,g as b,ie as c,ae as d,te as e,de as f,sn as g,un as h,kn as i,cn as j,pn as k,vn as l,Nn as m,hn as n,fn as o,yn as p,Sn as q,Fn as r,Tn as s,bn as t};
|
package/dist/chunk-YE7XCF44.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-UQWT2PFO.js";import{b as e}from"./chunk-WHT2RCAD.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static{this.description="View the UI kit components prompts"}static{this.hidden=!0}async run(){await i()}};export{t as a};
|
package/dist/chunk-YIFT67BD.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-WDCCITSG.js";import{a as r}from"./chunk-NENUUNWB.js";import{qa as f,ta as s}from"./chunk-5HJTCBBV.js";import{b as n}from"./chunk-4TANJ4JK.js";import{a as g}from"./chunk-CTNBSUVU.js";import{e as m,g as a}from"./chunk-VKWPEFWQ.js";a();var o=m(g(),1);var t,e=class extends p{async run(){let{flags:i}=await this.parse(t),c={directory:i.path,apiKey:i["client-id"],organizationId:i["organization-id"],configName:i.config,fileName:i["file-name"],force:i.force??!1},d=await f(c),{app:l}=await s({directory:i.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:d.configFileName});return{app:l}}};t=e;e.summary="Fetch your app configuration from the Developer Dashboard.";e.descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
|
|
2
|
-
|
|
3
|
-
For more information on the format of the created TOML configuration file, refer to the [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration) page.
|
|
4
|
-
`;e.description=t.descriptionWithoutMarkdown();e.flags={...n,...r,"organization-id":o.Flags.string({hidden:!0,env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]}),"file-name":o.Flags.string({hidden:!1,description:"The name of the app configuration file to create or overwrite.",env:"SHOPIFY_FLAG_APP_CONFIG_FILE_NAME",exclusive:["config"]}),force:o.Flags.boolean({hidden:!1,description:"Overwrite an existing configuration file without prompting.",env:"SHOPIFY_FLAG_FORCE",dependsOn:["file-name"]})};var A=e;export{A as a};
|
package/dist/chunk-Z36JS7OX.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-GCN4O7HM.js";import{b as r}from"./chunk-WHT2RCAD.js";import{r as t}from"./chunk-GXO2RRV2.js";import{u as e}from"./chunk-JX4HSDDG.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var o=class extends r{static{this.summary="Enable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Enable automatic upgrades for Shopify CLI.
|
|
2
|
-
|
|
3
|
-
When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version once per day. Major version upgrades are skipped and must be done manually.
|
|
4
|
-
|
|
5
|
-
To disable auto-upgrade, run \`shopify config autoupgrade off\`.
|
|
6
|
-
`}static{this.description=this.descriptionWithoutMarkdown()}async run(){t(!0),e({body:i.on})}};export{o as a};
|
package/dist/chunk-ZHPPBTNE.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-LURVEPYP.js";import{p as r,q as m,v as a}from"./chunk-445NFHXL.js";import{b as s,c as h}from"./chunk-4TANJ4JK.js";import{ra as i}from"./chunk-AFM3UZQO.js";import{a as v}from"./chunk-CTNBSUVU.js";import{e as f,g as n}from"./chunk-VKWPEFWQ.js";n();var e=f(v(),1);var p,t=class extends a{async command(o,d,c,y,u){i("theme-command:push"),await l({...o,allowLive:o["allow-live"],noColor:o["no-color"],developmentContext:o["development-context"]},d,c,u),i("theme-command:push")}storeAuthScopes(){return["read_themes","write_themes"]}};p=t;t.summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";t.usage=["theme push","theme push --unpublished --json"];t.descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
|
|
2
|
-
|
|
3
|
-
If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
|
|
4
|
-
|
|
5
|
-
You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).
|
|
6
|
-
|
|
7
|
-
This command returns the following information:
|
|
8
|
-
|
|
9
|
-
- A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.
|
|
10
|
-
- A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.
|
|
11
|
-
|
|
12
|
-
If you use the \`--json\` flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.
|
|
13
|
-
|
|
14
|
-
Sample output:
|
|
15
|
-
|
|
16
|
-
\`\`\`json
|
|
17
|
-
{
|
|
18
|
-
"theme": {
|
|
19
|
-
"id": 108267175958,
|
|
20
|
-
"name": "MyTheme",
|
|
21
|
-
"role": "unpublished",
|
|
22
|
-
"shop": "mystore.myshopify.com",
|
|
23
|
-
"editor_url": "https://mystore.myshopify.com/admin/themes/108267175958/editor",
|
|
24
|
-
"preview_url": "https://mystore.myshopify.com/?preview_theme_id=108267175958"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
\`\`\`
|
|
28
|
-
`;t.description=p.descriptionWithoutMarkdown();t.flags={...s,...r,...m("upload"),...h,theme:e.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),development:e.Flags.boolean({char:"d",description:"Push theme files from your remote development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),"development-context":e.Flags.string({char:"c",description:"Unique identifier for a development theme context (e.g., PR number, branch name). Reuses an existing development theme with this context name, or creates one if none exists.",env:"SHOPIFY_FLAG_DEVELOPMENT_CONTEXT",dependsOn:["development"],exclusive:["theme"]}),live:e.Flags.boolean({char:"l",description:"Push theme files from your remote live theme.",env:"SHOPIFY_FLAG_LIVE"}),unpublished:e.Flags.boolean({char:"u",description:"Create a new unpublished theme and push to it.",env:"SHOPIFY_FLAG_UNPUBLISHED"}),nodelete:e.Flags.boolean({char:"n",description:"Prevent deleting remote files that don't exist locally.",env:"SHOPIFY_FLAG_NODELETE"}),"allow-live":e.Flags.boolean({char:"a",description:"Allow push to a live theme.",env:"SHOPIFY_FLAG_ALLOW_LIVE"}),publish:e.Flags.boolean({char:"p",description:"Publish as the live theme after uploading.",env:"SHOPIFY_FLAG_PUBLISH"}),force:e.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),strict:e.Flags.boolean({description:"Require theme check to pass without errors before pushing. Warnings are allowed.",env:"SHOPIFY_FLAG_STRICT_PUSH"}),listing:e.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"}),environment:r.environment};t.multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];var L=t;export{L as a};
|
package/dist/chunk-ZMSE5SQB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-TEPMNVJN.js";import{g as r,h,i as n}from"./chunk-445NFHXL.js";import{m}from"./chunk-2GB3EAD3.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var c=t=>`Development theme #${t} could not be found. Please create a new development theme.`,i="No development theme ID has been set. Please create a development theme first.",p=class extends s{constructor(e){super(e),this.context="Development",this.themeId=r()}async find(){let e=await this.fetch();if(!e)throw new m(this.themeId?c(this.themeId):i);return e}setTheme(e){h(e)}removeTheme(){n()}};export{p as a};
|