@shopify/cli 4.6.0 → 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-4YCMEC5R.js → chunk-2CYVZUYT.js} +1 -1
- package/dist/{chunk-C256W7D2.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-TAFOSPBW.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-FMTPUYSH.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-ILQXBASM.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-WPRAJ25Z.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-WWX265PC.js → chunk-CYOFLJ3Z.js} +1 -1
- package/dist/{chunk-HSKB5OTM.js → chunk-CZJZCJRX.js} +1 -1
- package/dist/chunk-CZPGC2E7.js +1 -0
- package/dist/{chunk-2I62GKIH.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-QU5NL2QT.js → chunk-DQCIORGH.js} +1 -1
- package/dist/chunk-DQFSKPKL.js +6 -0
- package/dist/{chunk-6Q5VRSRN.js → chunk-E2W5OYYM.js} +1 -1
- package/dist/chunk-E5T4YRGW.js +1 -0
- package/dist/chunk-EOMCXBCS.js +5 -0
- package/dist/{chunk-LWRDNTAD.js → chunk-EW55WWT7.js} +1 -1
- package/dist/{chunk-6UTUJKKC.js → chunk-F5HCSUXC.js} +5 -5
- package/dist/{chunk-W2GMKXM7.js → chunk-FCGKO2KY.js} +1 -1
- package/dist/{chunk-7CPECP5P.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-72GN655L.js → chunk-H5KWM27L.js} +1 -1
- package/dist/chunk-HHVHVGRT.js +1 -0
- package/dist/{chunk-EBZ6MDEM.js → chunk-HLNJL4B6.js} +1 -1
- package/dist/{chunk-OUUOML3D.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-VZKR2YFM.js → chunk-JQISGC7D.js} +1 -1
- package/dist/chunk-JQVXH26X.js +6 -0
- package/dist/{chunk-ERCJPRN3.js → chunk-JUKAWTYY.js} +1 -1
- package/dist/{chunk-JHRZCUBE.js → chunk-JZMRBJH3.js} +1 -1
- package/dist/chunk-JZXA3H5K.js +1 -0
- package/dist/chunk-K4KTNINH.js +1 -0
- package/dist/chunk-KCS75ZM4.js +1 -0
- package/dist/{chunk-AJ6VOBXU.js → chunk-KIYHEMHD.js} +7 -7
- package/dist/chunk-KK24VGVE.js +6 -0
- package/dist/{chunk-6BX62FFE.js → chunk-KOVAFUYN.js} +1 -1
- package/dist/{chunk-QG7TELFC.js → chunk-KUNDCAQN.js} +1 -1
- package/dist/{chunk-3NO6PWNL.js → chunk-L67BU25M.js} +1 -1
- package/dist/{chunk-4KZRP2JP.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-UM3OHLCX.js → chunk-LRQYUWWB.js} +1 -1
- package/dist/{chunk-CXWLHQKA.js → chunk-LWJA2DQG.js} +1 -1
- package/dist/{chunk-IKYZ5L3F.js → chunk-LZ3GZ7NS.js} +1 -1
- package/dist/chunk-MB7E5GEY.js +2 -0
- package/dist/{chunk-XERJY4IG.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-5EFQILLF.js → chunk-PANGX7SA.js} +1 -1
- package/dist/{chunk-DODCPRXT.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-E3RDAVJT.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-FPWLEGKZ.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-MDXSLAIC.js → chunk-TY4W7AYX.js} +1 -1
- package/dist/chunk-TYIGOVRQ.js +3 -0
- package/dist/{chunk-B6SY4BIK.js → chunk-U2Z5NMXV.js} +1 -1
- package/dist/{chunk-KGZH4RFA.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-XGRVAPLR.js → chunk-WCRZJY3P.js} +1 -1
- package/dist/{chunk-XGCJWCC4.js → chunk-WHLGNDRE.js} +1 -1
- package/dist/{chunk-E3RQCWSC.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-2JFZ6GZC.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-JS3X6BDT.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-OTT73YUA.js → chunk-ZO74GSWC.js} +1 -1
- package/dist/{chunk-5Y2VD4I3.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-6S5JVSRO.js +0 -1
- package/dist/analytics-E252SR3P.js +0 -1
- package/dist/chunk-2MCH43SL.js +0 -11
- package/dist/chunk-2SNT7U7B.js +0 -1
- package/dist/chunk-2VIUGNYO.js +0 -1
- package/dist/chunk-2Y6CYLKF.js +0 -1
- package/dist/chunk-3EHRA4LA.js +0 -1
- package/dist/chunk-3EPQ6UOK.js +0 -25
- package/dist/chunk-3TFUSDHY.js +0 -370
- package/dist/chunk-46NA23I7.js +0 -3
- package/dist/chunk-47URTBZF.js +0 -9
- package/dist/chunk-4FEBSLSU.js +0 -1
- package/dist/chunk-4HB4VZJQ.js +0 -4
- package/dist/chunk-4JARSKED.js +0 -32
- package/dist/chunk-4P7PWLUN.js +0 -1
- package/dist/chunk-53ZA2HD3.js +0 -1
- package/dist/chunk-57YF2UNT.js +0 -1
- package/dist/chunk-5JPV3HPJ.js +0 -1
- package/dist/chunk-5LJ5H4TD.js +0 -7
- package/dist/chunk-6FJBCRVK.js +0 -15
- package/dist/chunk-6SXB44CE.js +0 -1
- package/dist/chunk-6YCGMS7X.js +0 -28
- package/dist/chunk-7HAFBCL3.js +0 -2
- package/dist/chunk-7XPFLQEM.js +0 -1
- package/dist/chunk-A3JE5LX3.js +0 -7
- package/dist/chunk-A4SBXDZB.js +0 -14
- package/dist/chunk-B2WK53GH.js +0 -1
- package/dist/chunk-B34VYVGV.js +0 -1
- package/dist/chunk-BBEHNPKK.js +0 -7
- package/dist/chunk-BCTMBKAU.js +0 -7
- package/dist/chunk-BGUHH7AW.js +0 -10
- package/dist/chunk-DHU767C3.js +0 -1
- package/dist/chunk-DKHMLETG.js +0 -1
- package/dist/chunk-EJDWYASP.js +0 -1
- package/dist/chunk-ELJ7SKMH.js +0 -1
- package/dist/chunk-EQTULRM7.js +0 -2
- package/dist/chunk-ESZS7L6O.js +0 -11
- package/dist/chunk-ET2O5DAS.js +0 -1
- package/dist/chunk-EZ7EBYDT.js +0 -684
- package/dist/chunk-EZNJDFFK.js +0 -28
- package/dist/chunk-F34LB7M4.js +0 -20
- package/dist/chunk-FE24P4UQ.js +0 -6
- package/dist/chunk-FT4HLDK7.js +0 -1
- package/dist/chunk-G3YYMKWG.js +0 -3
- package/dist/chunk-G7QW5OSQ.js +0 -6
- package/dist/chunk-GCDEDRY7.js +0 -3
- package/dist/chunk-GEE5MXHT.js +0 -5
- package/dist/chunk-H4MYBJ6C.js +0 -1
- package/dist/chunk-HDXBZLHH.js +0 -8
- package/dist/chunk-HT6MOPLW.js +0 -1
- package/dist/chunk-HZXY7RWJ.js +0 -19
- package/dist/chunk-IDAWPBJM.js +0 -4
- package/dist/chunk-IDLDQ2JB.js +0 -1
- package/dist/chunk-IYU72M55.js +0 -3
- package/dist/chunk-J3IHP46B.js +0 -3
- package/dist/chunk-J4KJQHNS.js +0 -1
- package/dist/chunk-JIBLEZ57.js +0 -18
- package/dist/chunk-JIKIYMCT.js +0 -1
- package/dist/chunk-JJTGHARS.js +0 -3
- package/dist/chunk-JQP3ZCAG.js +0 -1
- package/dist/chunk-K7IZMKBR.js +0 -5
- package/dist/chunk-KO4FB4QU.js +0 -1
- package/dist/chunk-KPRKIZ5M.js +0 -3
- package/dist/chunk-KUN74JD4.js +0 -4
- package/dist/chunk-KURWC4A5.js +0 -16
- package/dist/chunk-L3D2CASO.js +0 -1
- package/dist/chunk-L7DZTIHJ.js +0 -1
- package/dist/chunk-LBDAYBIF.js +0 -1
- package/dist/chunk-LH3RIIOB.js +0 -8
- package/dist/chunk-LWWBU7ET.js +0 -6
- package/dist/chunk-M4BEPPA3.js +0 -1
- package/dist/chunk-M4YPMHIM.js +0 -1
- package/dist/chunk-M5KKLAM6.js +0 -3
- package/dist/chunk-MBLHXPGK.js +0 -1
- package/dist/chunk-MDHJJVXA.js +0 -2
- package/dist/chunk-NA2ERJIJ.js +0 -1
- package/dist/chunk-NOKCVDYD.js +0 -317
- package/dist/chunk-O6XSWAP2.js +0 -4
- package/dist/chunk-OB62WVZ5.js +0 -16
- package/dist/chunk-OT52JOML.js +0 -1
- package/dist/chunk-P7XC5HS2.js +0 -1
- package/dist/chunk-PALG4SNB.js +0 -1
- package/dist/chunk-PB37BTPE.js +0 -6
- package/dist/chunk-PWYRKTJ4.js +0 -1
- package/dist/chunk-PXSX63RF.js +0 -1
- package/dist/chunk-QDPDB5EP.js +0 -3
- package/dist/chunk-QV53BSQP.js +0 -6
- package/dist/chunk-QXXA2EQY.js +0 -15
- package/dist/chunk-QZ5FMWZS.js +0 -1
- package/dist/chunk-R26GJEH3.js +0 -1
- package/dist/chunk-RTW4RZWH.js +0 -6
- package/dist/chunk-SEV3S3WH.js +0 -8
- package/dist/chunk-STJ3LWFL.js +0 -1
- package/dist/chunk-TAV2ENJY.js +0 -1
- package/dist/chunk-TQNALMQH.js +0 -3
- package/dist/chunk-TUJNCWHZ.js +0 -1
- package/dist/chunk-U564K7SX.js +0 -1
- package/dist/chunk-UKQ7NE5V.js +0 -1
- package/dist/chunk-V65P572N.js +0 -10
- package/dist/chunk-VFIVXK53.js +0 -2
- package/dist/chunk-VVFPW4ZQ.js +0 -2
- package/dist/chunk-VYITPC34.js +0 -11
- package/dist/chunk-W4X3635B.js +0 -1
- package/dist/chunk-WEEYQX3M.js +0 -1
- package/dist/chunk-WO7LKJCJ.js +0 -1
- package/dist/chunk-WR2ZQGUR.js +0 -1
- package/dist/chunk-WW7TENNA.js +0 -1
- package/dist/chunk-XGMPC7KK.js +0 -2
- package/dist/chunk-Y4QC2YVE.js +0 -1
- package/dist/chunk-YNJZ2VXV.js +0 -5
- package/dist/chunk-Z5DDPQ26.js +0 -3
- package/dist/chunk-ZK7VJZ6V.js +0 -6
- package/dist/chunk-ZLT4DPHN.js +0 -5
- package/dist/chunk-ZOBQKNGK.js +0 -1
- package/dist/chunk-ZTE46E4Z.js +0 -153
- package/dist/conf-store-N5P2ZEAD.js +0 -1
- package/dist/custom-oclif-loader-4ZAXX5MR.js +0 -1
- package/dist/deprecations-4TY4DNME.js +0 -1
- package/dist/dist-6ZJS4I57.js +0 -1
- package/dist/dist-7W2KJOYN.js +0 -1
- package/dist/environments-TR5WW2MD.js +0 -1
- package/dist/error-VJQM4MFE.js +0 -1
- package/dist/error-handler-IYGE3Z72.js +0 -1
- package/dist/fs-EOQL26C3.js +0 -1
- package/dist/hooks/app-init.d.ts +0 -9
- package/dist/hooks/app-init.js +0 -1
- package/dist/is-global-RQCPBQA3.js +0 -1
- package/dist/is-wsl-UEMXYJPN.js +0 -1
- package/dist/lib-JKLF33A7.js +0 -1
- package/dist/local-TW3HCZ2S.js +0 -1
- package/dist/local-storage-T6FKS53K.js +0 -1
- package/dist/metadata-TYZDEER5.js +0 -1
- package/dist/node-package-manager-6SWUZILX.js +0 -1
- package/dist/notifications-system-SMHMV2UW.js +0 -1
- package/dist/output-JG5I2TEL.js +0 -1
- package/dist/system-D4Z32GDS.js +0 -1
- package/dist/ui-6M3XZ6MR.js +0 -1
- package/dist/upgrade-EKAG4IV7.js +0 -1
- package/dist/version-6UBWZCNS.js +0 -1
- package/dist/version-XRU7TEAI.js +0 -1
- package/dist/workerd-LXBSJULF.js +0 -18
- /package/dist/{chunk-VDN6MEYI.js → chunk-NJPL5BTN.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Aa as g,ua as a,va as b,wa as c,xa as d,ya as e,za as f}from"./chunk-YN6A26QL.js";import"./chunk-ZDF5N422.js";import"./chunk-KK24VGVE.js";import"./chunk-AGOEROAI.js";import"./chunk-GMTNOCMS.js";import"./chunk-7Y7AZRL3.js";import"./chunk-7UNQOKZW.js";import"./chunk-EOMCXBCS.js";import"./chunk-5HBIIYSK.js";import"./chunk-RJ5VF3QY.js";import"./chunk-GB3YC4TI.js";import"./chunk-5CYJG63I.js";import"./chunk-MPW2YJWU.js";import"./chunk-JQISGC7D.js";import"./chunk-TTAPXLI5.js";import"./chunk-R2R6JDNH.js";import"./chunk-T7KHS6RF.js";import"./chunk-CTNBSUVU.js";import"./chunk-636CTEW7.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-U2Z5NMXV.js";import"./chunk-Y34LWI3S.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-XAOYKECS.js";import"./chunk-DPNZWBT5.js";import"./chunk-JD5P5RAJ.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{g as compileData,d as recordError,f as recordEvent,e as recordRetry,c as recordTiming,b as reportAnalyticsEvent,a as sendAnalyticsEventFromStdin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ra as a,sa as b,ta as c}from"./chunk-YN6A26QL.js";import"./chunk-ZDF5N422.js";import"./chunk-KK24VGVE.js";import"./chunk-AGOEROAI.js";import"./chunk-GMTNOCMS.js";import"./chunk-7Y7AZRL3.js";import"./chunk-7UNQOKZW.js";import"./chunk-EOMCXBCS.js";import"./chunk-5HBIIYSK.js";import"./chunk-RJ5VF3QY.js";import"./chunk-GB3YC4TI.js";import"./chunk-5CYJG63I.js";import"./chunk-MPW2YJWU.js";import"./chunk-JQISGC7D.js";import"./chunk-TTAPXLI5.js";import"./chunk-R2R6JDNH.js";import"./chunk-T7KHS6RF.js";import"./chunk-CTNBSUVU.js";import"./chunk-636CTEW7.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-U2Z5NMXV.js";import"./chunk-Y34LWI3S.js";import"./chunk-B4OMIONW.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-XAOYKECS.js";import"./chunk-DPNZWBT5.js";import"./chunk-JD5P5RAJ.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{b as getEnvironmentData,c as getSensitiveEnvironmentData,a as startAnalytics};
|
package/dist/bootstrap.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as p}from"./chunk-6QDOCBD4.js";import{a as e}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-6QDOCBD4.js";import{a as e}from"./chunk-JJJTPEMD.js";import{a as s}from"./chunk-2WJAAJVX.js";import"./chunk-T7KHS6RF.js";import"./chunk-CTNBSUVU.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-DPNZWBT5.js";import"./chunk-JD5P5RAJ.js";import"./chunk-773TIA5M.js";import"./chunk-CRALWNNO.js";import{e as m,g as t}from"./chunk-VKWPEFWQ.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-YX56C43A.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-VYWSLAQ6.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
|
|
2
2
|
`)}catch{n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
|
|
3
3
|
`)}process.exit(1)});var f=["SIGINT","SIGTERM","SIGQUIT"];f.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function l({development:o}){await e({moduleURL:import.meta.url,development:o,lazyCommandLoader:s})}var S=l;export{S as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as V}from"./chunk-
|
|
1
|
+
import{a as V}from"./chunk-WHLGNDRE.js";import{a as N}from"./chunk-CZPGC2E7.js";import{a as F}from"./chunk-DQCIORGH.js";import{k as q,l as H,n as I}from"./chunk-MLZLDL6B.js";import{a as Y}from"./chunk-QPWMD2VR.js";import{a as y,c as U}from"./chunk-KOVAFUYN.js";import{b as L}from"./chunk-QEB3HUQE.js";import{a as p,b as w}from"./chunk-YY6TFARF.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-4JY2P2A5.js";import{r as k}from"./chunk-OORWOTAP.js";import{aa as B}from"./chunk-PIFW2R3S.js";import{S as b,wa as a,xa as O}from"./chunk-YN6A26QL.js";import{A as d,B as C,E as P,z as f}from"./chunk-GMTNOCMS.js";import{h as S}from"./chunk-R2R6JDNH.js";import{wb as $}from"./chunk-Y34LWI3S.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
|
|
2
2
|
|
|
3
3
|
`}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-WKUGSFTB.js";import{a as m}from"./chunk-CZPGC2E7.js";import{a as u}from"./chunk-DQCIORGH.js";import{a as y}from"./chunk-QZBSCOJV.js";import{d as f}from"./chunk-KOVAFUYN.js";import{p as c,v as p}from"./chunk-OORWOTAP.js";import{b as h,e as d}from"./chunk-JJJTPEMD.js";import{za as l}from"./chunk-YN6A26QL.js";import{a as O}from"./chunk-CTNBSUVU.js";import{e as _,g as a}from"./chunk-VKWPEFWQ.js";a();var t=_(O(),1);var s=class extends p{static get requiresSyncAnalytics(){return!0}static summary="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";static descriptionWithMarkdown=`
|
|
2
2
|
Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.
|
|
3
3
|
|
|
4
4
|
This command returns the following information:
|
|
@@ -17,10 +17,10 @@ If you already have a development theme for your current environment, then this
|
|
|
17
17
|
|
|
18
18
|
Development themes are deleted when you run \`shopify auth logout\`. If you need a preview link that can be used after you log out, then you should [share](https://shopify.dev/docs/api/shopify-cli/theme/theme-share) your theme or [push](https://shopify.dev/docs/api/shopify-cli/theme/theme-push) to an unpublished theme on your store.
|
|
19
19
|
|
|
20
|
-
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).`;
|
|
20
|
+
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).`;static description=this.descriptionWithoutMarkdown();static flags={...h,...c,host:t.Flags.string({description:"Set which network interface the web server listens on. The default value is 127.0.0.1.",env:"SHOPIFY_FLAG_HOST"}),"live-reload":t.Flags.string({description:`The live reload mode switches the server behavior when a file is modified:
|
|
21
21
|
- hot-reload Hot reloads local changes to CSS and sections (default)
|
|
22
22
|
- full-page Always refreshes the entire page
|
|
23
23
|
- off Deactivate live reload`,default:"hot-reload",options:["hot-reload","full-page","off"],env:"SHOPIFY_FLAG_LIVE_RELOAD"}),"error-overlay":t.Flags.string({description:`Controls the visibility of the error overlay when an theme asset upload fails:
|
|
24
24
|
- silent Prevents the error overlay from appearing.
|
|
25
25
|
- default Displays the error overlay.
|
|
26
|
-
`,options:["silent","default"],default:"default",env:"SHOPIFY_FLAG_ERROR_OVERLAY"}),poll:t.Flags.boolean({hidden:!0,description:"Force polling to detect file changes.",env:"SHOPIFY_FLAG_POLL"}),"theme-editor-sync":t.Flags.boolean({description:"Synchronize Theme Editor updates in the local theme files.",env:"SHOPIFY_FLAG_THEME_EDITOR_SYNC"}),"standard-events-inspector":t.Flags.boolean({description:"Inject the standard events inspector into storefront HTML.",env:"SHOPIFY_FLAG_STANDARD_EVENTS_INSPECTOR",default:!1}),"reconciliation-strategy":t.Flags.string({description:"How to resolve JSON conflicts when --theme-editor-sync is enabled. Use keep-local to keep local files, keep-remote to keep remote files, or abort to fail instead of prompting.",options:["keep-local","keep-remote","abort"],env:"SHOPIFY_FLAG_RECONCILIATION_STRATEGY",dependsOn:["theme-editor-sync"]}),port:d({description:"Local port to serve theme preview from.",env:"SHOPIFY_FLAG_PORT"}),theme:t.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),listing:t.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"}),nodelete:t.Flags.boolean({char:"n",description:"Prevents files from being deleted in the remote theme when a file has been deleted locally. This applies to files that are deleted while the command is running, and files that have been deleted locally before the command is run.",env:"SHOPIFY_FLAG_NODELETE"}),only:t.Flags.string({char:"o",multiple:!0,description:"Hot reload only files that match the specified pattern.",env:"SHOPIFY_FLAG_ONLY"}),ignore:t.Flags.string({char:"x",multiple:!0,description:"Skip hot reloading any files that match the specified pattern.",env:"SHOPIFY_FLAG_IGNORE"}),force:t.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),notify:t.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"}),open:t.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),"store-password":t.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),"allow-live":t.Flags.boolean({description:"Allow development on a live theme.",char:"a",env:"SHOPIFY_FLAG_ALLOW_LIVE",default:!1})};
|
|
26
|
+
`,options:["silent","default"],default:"default",env:"SHOPIFY_FLAG_ERROR_OVERLAY"}),poll:t.Flags.boolean({hidden:!0,description:"Force polling to detect file changes.",env:"SHOPIFY_FLAG_POLL"}),"theme-editor-sync":t.Flags.boolean({description:"Synchronize Theme Editor updates in the local theme files.",env:"SHOPIFY_FLAG_THEME_EDITOR_SYNC"}),"standard-events-inspector":t.Flags.boolean({description:"Inject the standard events inspector into storefront HTML.",env:"SHOPIFY_FLAG_STANDARD_EVENTS_INSPECTOR",default:!1}),"reconciliation-strategy":t.Flags.string({description:"How to resolve JSON conflicts when --theme-editor-sync is enabled. Use keep-local to keep local files, keep-remote to keep remote files, or abort to fail instead of prompting.",options:["keep-local","keep-remote","abort"],env:"SHOPIFY_FLAG_RECONCILIATION_STRATEGY",dependsOn:["theme-editor-sync"]}),port:d({description:"Local port to serve theme preview from.",env:"SHOPIFY_FLAG_PORT"}),theme:t.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),listing:t.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"}),nodelete:t.Flags.boolean({char:"n",description:"Prevents files from being deleted in the remote theme when a file has been deleted locally. This applies to files that are deleted while the command is running, and files that have been deleted locally before the command is run.",env:"SHOPIFY_FLAG_NODELETE"}),only:t.Flags.string({char:"o",multiple:!0,description:"Hot reload only files that match the specified pattern.",env:"SHOPIFY_FLAG_ONLY"}),ignore:t.Flags.string({char:"x",multiple:!0,description:"Skip hot reloading any files that match the specified pattern.",env:"SHOPIFY_FLAG_IGNORE"}),force:t.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),notify:t.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"}),open:t.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),"store-password":t.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),"allow-live":t.Flags.boolean({description:"Allow development on a live theme.",char:"a",env:"SHOPIFY_FLAG_ALLOW_LIVE",default:!1})};static multiEnvironmentsFlags=null;async command(o,i){let{ignore:w=[],only:g=[]}=o;l("theme-command:dev:single-env:authenticated");let r,e;if(o.theme){let n={filter:{theme:o.theme}};r=await u(i,n),e={...o,theme:r.id.toString(),store:i.storeFqdn}}else{r=await new m(i).findOrCreate();let n=o["theme-editor-sync"]&&r.createdAtRuntime;e={...o,theme:r.id.toString(),store:i.storeFqdn,"overwrite-json":n}}await f(r,"start development mode",o["allow-live"])&&(await v({adminSession:i,commandConfig:this.config,directory:e.path,store:e.store,password:e.password,storePassword:e["store-password"],theme:r,listing:e.listing,host:e.host,port:e.port,"live-reload":e["live-reload"],"error-overlay":e["error-overlay"],force:e.force,open:e.open,"theme-editor-sync":e["theme-editor-sync"],"standard-events-inspector":e["standard-events-inspector"],reconciliationStrategy:e["reconciliation-strategy"],noDelete:e.nodelete,ignore:w,only:g,notify:e.notify}),await y({path:e.path,password:e.password,store:e.store,force:e.force,verbose:e.verbose,noColor:e["no-color"],silent:!0}))}};export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-EW55WWT7.js";import{b as i}from"./chunk-RY2SJVWM.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static description="Generate a notifications.json file for the the CLI, appending a new notification to the current file.";static hidden=!0;async run(){await n()}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c,b as p,c as d}from"./chunk-DHU57LKD.js";import{a as r}from"./chunk-NEMPLS7C.js";import{a as n}from"./chunk-KUNDCAQN.js";import{sa as s}from"./chunk-ACTDYTAV.js";import{b as a}from"./chunk-JJJTPEMD.js";import{a as y}from"./chunk-CTNBSUVU.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var f=g(y(),1);var o=class m extends r{static summary="Fetch the latest GraphQL schema for a function.";static descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";static description=this.descriptionWithoutMarkdown();static flags={...a,...n,...p,stdout:f.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};async run(){let{flags:t}=await this.parse(m),{app:e,developerPlatformClient:h,organization:u}=await s({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),l=await d(e,t.path);return await c({app:e,extension:l,stdout:t.stdout,developerPlatformClient:h,orgId:u.id}),{app:e}}};export{o as a};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{b as l}from"./chunk-JJJTPEMD.js";import{b as u}from"./chunk-RY2SJVWM.js";import{r as f}from"./chunk-YN6A26QL.js";import{h as n}from"./chunk-R2R6JDNH.js";import{a as g}from"./chunk-CTNBSUVU.js";import{wb as m}from"./chunk-Y34LWI3S.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 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 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 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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,i as r,p as s}from"./chunk-773TIA5M.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();import{existsSync as f,readFileSync as u}from"fs";import{fileURLToPath as p,pathToFileURL as g}from"url";var a;function h(){if(!a){let n=i(s(import.meta.url),"..","oclif.manifest.json");a=JSON.parse(u(n,"utf8")).commands}return a}var m=new Map;function y(n){let t=m.get(n);if(!t){for(t=r(p(import.meta.resolve(n)));t!==r(t);){try{if(JSON.parse(u(i(t,"package.json"),"utf8")).name===n)break}catch(o){if(o instanceof SyntaxError){t=r(t);continue}if(o.code==="ENOENT"){t=r(t);continue}throw o}t=r(t)}m.set(n,t)}return t}var P={"app:logs:sources":"dist/cli/commands/app/app-logs/sources.js","demo:watcher":"dist/cli/commands/app/demo/watcher.js","kitchen-sink":"dist/cli/commands/kitchen-sink/index.js","doctor-release":"dist/cli/commands/doctor-release/doctor-release.js","doctor-release:theme":"dist/cli/commands/doctor-release/theme/index.js"};function l(n){return P[n]??`dist/cli/commands/${n.replace(/:/g,"/")}.js`}var C=new Set(["@shopify/cli","@shopify/app","@shopify/theme"]);async function D(n){let o=h()[n];if(!o)return;let e=o.customPluginName??o.pluginName;if(e)return C.has(e)?j(n,e):k(n,e)}var d=i(s(import.meta.url),"..");function w(n,t){let o=l(n),e=i(d,o);return f(e)?d:y(t)}async function j(n,t){let o=l(n),e=w(n,t);return(await import(g(i(e,o)).href)).default}async function k(n,t){if(t==="@shopify/cli-hydrogen"){let{COMMANDS:o}=await import("./dist-
|
|
1
|
+
import{d as i,i as r,p as s}from"./chunk-773TIA5M.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();import{existsSync as f,readFileSync as u}from"fs";import{fileURLToPath as p,pathToFileURL as g}from"url";var a;function h(){if(!a){let n=i(s(import.meta.url),"..","oclif.manifest.json");a=JSON.parse(u(n,"utf8")).commands}return a}var m=new Map;function y(n){let t=m.get(n);if(!t){for(t=r(p(import.meta.resolve(n)));t!==r(t);){try{if(JSON.parse(u(i(t,"package.json"),"utf8")).name===n)break}catch(o){if(o instanceof SyntaxError){t=r(t);continue}if(o.code==="ENOENT"){t=r(t);continue}throw o}t=r(t)}m.set(n,t)}return t}var P={"app:logs:sources":"dist/cli/commands/app/app-logs/sources.js","demo:watcher":"dist/cli/commands/app/demo/watcher.js","kitchen-sink":"dist/cli/commands/kitchen-sink/index.js","doctor-release":"dist/cli/commands/doctor-release/doctor-release.js","doctor-release:theme":"dist/cli/commands/doctor-release/theme/index.js"};function l(n){return P[n]??`dist/cli/commands/${n.replace(/:/g,"/")}.js`}var C=new Set(["@shopify/cli","@shopify/app","@shopify/theme"]);async function D(n){let o=h()[n];if(!o)return;let e=o.customPluginName??o.pluginName;if(e)return C.has(e)?j(n,e):k(n,e)}var d=i(s(import.meta.url),"..");function w(n,t){let o=l(n),e=i(d,o);return f(e)?d:y(t)}async function j(n,t){let o=l(n),e=w(n,t);return(await import(g(i(e,o)).href)).default}async function k(n,t){if(t==="@shopify/cli-hydrogen"){let{COMMANDS:o}=await import("./dist-EXJEE23W.js");return o?.[n]}if(t==="@oclif/plugin-commands"){let{commands:o}=await import("./lib-M72BVWQ3.js");return o[n]}if(t==="@oclif/plugin-plugins"){let{commands:o}=await import("./lib-P3APEIHY.js");return o[n]}if(t==="@shopify/plugin-did-you-mean"){let{DidYouMeanCommands:o}=await import("./dist-S62Z6IFV.js");return o[n]}}export{D as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as N,b as $,c as w}from"./chunk-V2HCVJYF.js";import{q as T}from"./chunk-YN6A26QL.js";import{S as P,T as k,a as F}from"./chunk-GMTNOCMS.js";import{a as D,b}from"./chunk-TTAPXLI5.js";import{k as A}from"./chunk-R2R6JDNH.js";import{Ab as u,Ia as U,La as I,N as x,Pa as O,Ua as p,xa as y,za as _}from"./chunk-Y34LWI3S.js";import{f as h}from"./chunk-XAOYKECS.js";import{d as m,i as l,j as S}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as z,execFileSync as B}from"child_process";var H="2024.8.2",W=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,G={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},V={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},X={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:G,darwin:V,win32:X};function Z(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return W+n}function J(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=Z(t,e),o=J(r,t);if(p(o))try{let i=B(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!K(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await Q(n,o);else if(t==="darwin")await rt(n,o);else if(t==="win32")await tt(n,o);else throw new Error(`Unsupported platform: ${t}`)}function K(r,t){let[e,n,o]=r.split(".").map(Number),[i,a,c]=t.split(".").map(Number);return e!==i?(e??0)>(i??0):n!==a?(n??0)>(a??0):(o??0)>(c??0)}async function Q(r,t){await C(r,t),await O(t,"755")}async function tt(r,t){await C(r,t)}async function rt(r,t){await C(r,`${t}.tgz`);let e=S(`${t}.tgz`);z(`tar -xzf ${e}`,{cwd:l(t)}),U(`${t}.tgz`),await _(`${l(t)}/cloudflared`,t)}async function C(r,t){p(l(t))||y(l(t));let e=Y.promisify(j),n=await T(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=I(t);return await e(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as nt}from"url";var $t=$({provider:w,action:it}),ot=h()?.2:40,st=5;async function it(r){try{let t=new R(r);return await t.startTunnel(),D(t)}catch(t){let e=new N("unknown",t.message);return b(e)}}var R=class{port;provider=w;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new F;let e=!1;if(t>=st){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],i=!1,a;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=x(o).slice(-5).join(`
|
|
2
|
+
`);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},ot*1e3);let c=this,E=new et({write(s,mt,M){if(u(s.toString()),e)return;a??=at(s),ct(s)&&(i=!0),i&&(a?(e=!0,c.currentStatus={status:"connected",url:a}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let L=lt(s);L&&o.push(L),M()}});P(dt(),n,{stdout:E,stderr:E,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new A(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),h()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function at(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${ft()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function lt(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${ut(r.toString())}`}function ut(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ct(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(nt(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function ft(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as C}from"./chunk-NEMPLS7C.js";import{a as R}from"./chunk-KUNDCAQN.js";import{O as I,P as E,Q as x,sa as F}from"./chunk-ACTDYTAV.js";import{b as k}from"./chunk-JJJTPEMD.js";import{B as v,H as h,z as g}from"./chunk-GMTNOCMS.js";import{d as w}from"./chunk-JQISGC7D.js";import{j as A}from"./chunk-R2R6JDNH.js";import{a as y}from"./chunk-CTNBSUVU.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(o){let{developerPlatformClient:e,app:l,remoteApp:s}=o,{extensionIdentifiersBreakdown:r,versionDetails:n}=await I(e,s,o.version),i=E({localApp:l,versionAppModules:n.appModuleVersions,activeAppVersion:await e.activeAppVersion(s)});if(!await x({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:s.title,release:!0,allowUpdates:o.force||o.allowUpdates,allowDeletes:o.force||o.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:s,version:{versionId:n.uuid,appVersionId:n.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:n.versionTag??void 0,url:n.location}},n.message?`
|
|
2
|
+
${n.message}`:""];if(p.userErrors&&p.userErrors.length>0){let m=p.userErrors?.map(_=>_.message).join(", ");v({headline:"Version couldn't be released.",body:[...c,`${c.length>0?`
|
|
3
|
+
|
|
4
|
+
`:""}${m}`]})}else g({headline:"Version released to users.",body:c})}var t=b(y(),1);var f=class o extends C{static summary="Release an app version.";static usage="app release --version <version>";static descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";static description=this.descriptionWithoutMarkdown();static flags={...k,...R,"allow-updates":t.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments. Required in non-interactive environments unless --allow-deletes is provided.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":t.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates. Required in non-interactive environments unless --allow-updates is provided.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:t.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};static nonTTYFlagRequirements(){return[{flags:["allow-updates","allow-deletes"]}]}async run(){let{flags:e}=await this.parse(o),l=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let s=e["allow-updates"],r=e["allow-deletes"],n=!!(s&&r),{app:i,remoteApp:u,developerPlatformClient:d}=await F({directory:e.path,clientId:l,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:i,remoteApp:u,developerPlatformClient:d,force:n,allowUpdates:s,allowDeletes:r,version:e.version}),{app:i}}};export{f as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{c as J}from"./chunk-ZSFAURIH.js";import{b as F}from"./chunk-JZMRBJH3.js";import{a as ae}from"./chunk-CZJZCJRX.js";import{a as ne}from"./chunk-NEMPLS7C.js";import{a as z}from"./chunk-KUNDCAQN.js";import{B as Z,D as ee,d as K,e as Q,sa as te}from"./chunk-ACTDYTAV.js";import{f as T,h as X,i as B}from"./chunk-F5HCSUXC.js";import{a as k}from"./chunk-U6HYEGAE.js";import{b as H,f as O}from"./chunk-JJJTPEMD.js";import{d as E}from"./chunk-YN6A26QL.js";import{C as G,p as P,x as L,y as _}from"./chunk-KK24VGVE.js";import{D as q,F as U,H as b,J as V,z as $}from"./chunk-GMTNOCMS.js";import{h as m}from"./chunk-R2R6JDNH.js";import{a as xe}from"./chunk-CTNBSUVU.js";import{Oa as j,Ta as h,Ua as R,Wa as D,X as f,_ as M,ka as w,qa as N,rb as W,wa as g,ya as v}from"./chunk-Y34LWI3S.js";import{e as Y}from"./chunk-XAOYKECS.js";import{d as p,n as C}from"./chunk-773TIA5M.js";import{e as he,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function re(e,t,r,n={}){let{templates:a,groupOrder:i}=await e.templateSpecifications(t,n);return{templates:a.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}d();d();async function ie(e,t){let r=e?.path??"",n=p(t,r);if(!await h(n))throw new m(`
|
|
2
|
+
The extension is not available for ${e?.value}`);return n}async function oe({name:e,app:t}){let r=M(e),n=p(t.directory,B.extensions.directoryName,r);if(await h(n))throw new m(`
|
|
3
|
+
A directory with this name (${r}) already exists.
|
|
4
|
+
Choose a new name for your extension.`);return await g(n),await N(p(n,T.lockFile)),n}function A(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function se(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,n=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),a=await oe({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:a,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:n,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await J({repoUrl:o,destination:c,shallow:!0})})};return await we(s),{directory:C(a),extensionTemplate:e.extensionTemplate}}async function we(e){try{switch(e.type){case"theme":await ge(e);break;case"function":await ve(e);break;default:await Ee(e);break}let t=p(e.directory,T.lockFile);await v(t)}catch(t){throw await v(e.directory),t}}async function ge({directory:e,url:t,type:r,name:n,extensionFlavor:a,onGetTemplateRepository:i}){return w(async s=>{let o=await I(t,a,s,i);await F(o,e,{name:n,type:r,uid:E(f(n))})})}async function ve({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await w(async l=>{let u=await I(t,i,l,s);await F(u,e,{name:a,handle:f(a),flavor:i?.value,uid:E(f(a))})}),o==="javascript"){let l=ce(i?.value??"rust");await le(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{n.usesWorkspaces&&await P({packageManager:n.packageManager,directory:n.directory});let l=Fe(o);await _(l,{packageManager:n.packageManager,type:"prod",directory:n.usesWorkspaces?e:n.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await Q({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await b(c)}async function Ee({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ce(i?.value??"vanilla-js");await w(async u=>{let y=await I(t,i,u,s);await F(y,e,{srcFileExtension:l,name:a,handle:f(a),flavor:i?.value??"",uid:E(f(a))})}),o==="javascript"&&await le(e,l)}},{title:"Installing dependencies",task:async()=>{let l=n.packageManager;if(n.usesWorkspaces)A(i?.value)==="javascript"&&await P({packageManager:l,directory:n.directory});else{await Te(n.directory,i?.value);let u=p(e,"package.json"),y=await ke(u);await _(y,{packageManager:l,type:"prod",directory:n.directory}),await v(u)}}}];c.push({title:"Update shared type definition",task:async()=>{await ee(r)}}),await b(c)}function ce(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function Fe(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${K}.0.0`}),t}async function le(e,t,r="*"){let n=await D(p(e,"src",r)),a=[];for(let i of n)a.push(j(i,`${i}.${t}`));await Promise.all(a)}async function Te(e,t){t==="typescript-react"&&await G(e,{"@types/react":X.reactTypes})}async function ke(e){if(!await h(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,n])=>({name:r,version:n}))}async function I(e,t,r,n){let a=p(r,"download");return await g(a),await n(e,a),ie(t,a)}d();function Pe(e,t=[]){let r=[...e.map(a=>({label:a.name,value:a.identifier,group:a.group||"Other",sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(a=>({label:`${a.name} (limit reached)`,value:a.identifier,group:a.group||"Other",disabled:!0,sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER}))],n=(a,i)=>a.sortPriority===i.sortPriority?a.label.localeCompare(i.label):a.sortPriority-i.sortPriority;return r.sort(n)}var _e=async e=>{let t=e.extensionTemplates,r=e.templateType,n=e.extensionFlavor;if(!r){if(n&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(n))),t.length===0)throw new m("You have reached the limit for the number of extensions you can create.");r=await U({message:"Type of extension?",choices:Pe(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let a=t.find(c=>c.identifier===r),i=e.name||await pe(e.directory,a.defaultName),s=e.extensionFlavor??await be(a);return{extensionTemplate:a,extensionContent:{name:i,flavor:s}}};async function pe(e,t,r=1){let n=t.includes(" ")?" ":"-",a=r<=1?t:`${t}${n}${r}`,i=p(e,f(a));return R(i)?pe(e,t,r+1):V({message:"Name your extension:",defaultValue:a})}async function be(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:q({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var de=_e;async function Oe(e){let{app:t,developerPlatformClient:r,remoteApp:n,specifications:a,template:i}=e,s=a.map(ye=>ye.identifier),{templates:o,groupOrder:c}=await re(r,n,s,{requestedTemplate:i}),l=await Ae(o,c,a,t,e),u=await de(l);await Se(u,i);let y=Ce(u,t,e,r),fe=await se(y);Me(fe,e.project.packageManager)}async function Ae(e,t,r,n,a){let i=await Re(a.template,n,e,r);Ne(i,a.flavor);let{validTemplates:s,templatesOverlimit:o}=Ie(e,r,n);return{templateType:i?.identifier,name:a.name,extensionFlavor:a.flavor,directory:p(a.directory,"extensions"),app:n,extensionTemplates:s??[],unavailableExtensions:o??[],reset:a.reset,groupOrder:t}}function Ie(e,t,r){return ae(e,a=>!ue(r,t,a)?"validTemplates":"templatesOverlimit")}function ue(e,t,r){let n=r.type,a=t.find(s=>s.identifier===n||s.externalIdentifier===n);return e.extensionsForType({identifier:n,externalIdentifier:n}).length>=(a?.registrationLimit??1)}async function Se(e,t){let{extensionContent:r}=e;return k.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Ce(e,t,r,n){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:n}}function Me(e,t){let r=je(e.extensionTemplate,e.directory,t);$(r)}function Ne(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(n=>n.value);if(!r.includes(t))throw new m("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function je(e,t,r){let n={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&n.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:W(r,"shopify app dev")}]),e.supportLinks[0]&&n.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),n}async function Re(e,t,r,n){if(!e)return;let a=r.find(i=>i.identifier===e);if(!a){let i=await Y(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new m(`Unknown extension type: ${e}.
|
|
5
|
+
The following extension types are supported: ${s.join(", ")}`,o)}if(ue(t,n,a))throw new m(`Invalid extension type: ${e}`,`You have reached the limit of extension(s) of type ${a.type} per app`);return a}var me=Oe;var x=he(xe(),1);var S=class e extends ne{static summary="Generate a new app Extension.";static descriptionWithMarkdown=`Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
|
|
6
|
+
|
|
7
|
+
Each new app extension is created in a folder under \`extensions/\`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.
|
|
8
|
+
`;static description=this.descriptionWithoutMarkdown();static flags={...H,...z,template:O(x.Flags.string({char:"t",hidden:!1,description:"Extension template",env:"SHOPIFY_FLAG_EXTENSION_TEMPLATE"})),name:O(x.Flags.string({char:"n",hidden:!1,description:"name of your Extension",env:"SHOPIFY_FLAG_NAME"})),"clone-url":x.Flags.string({hidden:!0,char:"u",description:"The Git URL to clone the function extensions templates from. Defaults to: https://github.com/Shopify/function-examples",env:"SHOPIFY_FLAG_CLONE_URL"}),flavor:x.Flags.string({hidden:!1,description:"Choose a starting template for your extension, where applicable. Required if non interactive when the selected extension template supports multiple flavors.",options:["vanilla-js","react","typescript","typescript-react","wasm","rust"],env:"SHOPIFY_FLAG_FLAVOR"})};async run(){let{flags:t}=await this.parse(e);await k.addPublicMetadata(()=>({cmd_scaffold_required_auth:!0,cmd_scaffold_template_custom:t["clone-url"]!==void 0,cmd_scaffold_type_owner:"@shopify/app"})),await Z(t.path);let{app:r,project:n,specifications:a,remoteApp:i,developerPlatformClient:s}=await te({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await me({directory:t.path,reset:t.reset,name:t.name,cloneUrl:t["clone-url"],template:t.template,flavor:t.flavor,app:r,project:n,specifications:a,remoteApp:i,developerPlatformClient:s}),{app:r}}};export{S as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as p}from"./chunk-CTRXLZAJ.js";import{k as E,wa as b,xa as k,za as s}from"./chunk-YN6A26QL.js";import{J as w}from"./chunk-GMTNOCMS.js";import{h as N}from"./chunk-R2R6JDNH.js";import{Ab as V,S as _}from"./chunk-Y34LWI3S.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??=!1,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};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a}from"./chunk-QZBSCOJV.js";import{p as i,v as s}from"./chunk-OORWOTAP.js";import{b as r}from"./chunk-JJJTPEMD.js";import{a as c}from"./chunk-CTNBSUVU.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var m=d(c(),1),t=class extends s{static summary="Download metafields definitions from your shop into a local file.";static descriptionWithMarkdown=`Retrieves metafields from Shopify Admin.
|
|
2
|
+
|
|
3
|
+
If the metafields file already exists, it will be overwritten.`;static description=this.descriptionWithoutMarkdown();static flags={...r,...i,force:m.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=null;async command(o){let n={path:o.path,password:o.password,store:o.store,force:o.force,verbose:o.verbose,noColor:o["no-color"]};await a(n)}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a,g as c,i as p,j as f}from"./chunk-4JY2P2A5.js";import{k as h}from"./chunk-R2R6JDNH.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{adminSession;themeId;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};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{a as A,b as S,c as E,d as i,e as k,f as F,g as L,h as M,i as _}from"./chunk-FULWTZS6.js";import{a as I}from"./chunk-NEMPLS7C.js";import{a as b}from"./chunk-KUNDCAQN.js";import{Y as P,sa as T}from"./chunk-ACTDYTAV.js";import{f as l}from"./chunk-JJJTPEMD.js";import{D as p,F as g,J as v}from"./chunk-GMTNOCMS.js";import{a as G}from"./chunk-CTNBSUVU.js";import{Bb as u,Db as w,yb as h}from"./chunk-Y34LWI3S.js";import{j as y}from"./chunk-773TIA5M.js";import{e as q,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function H(e,t,r){let o={api_version:t},{webhookTopics:s}=await e.topics(o,r);return s}a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!k(o,e))return`Invalid address.
|
|
2
|
+
${d(e)}`}})).trim()}function U(e){return e===i.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:e===i.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:e===i.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function d(e){return U(e).map(t=>` \xB7 ${w(t)}`).join(`
|
|
3
|
+
`)}async function x(e,t){let{clientSecret:r,clientId:o,remoteApp:s,app:c}=e;return r&&(o||t!==i.EVENTBRIDGE)?{clientSecret:r,apiKey:o}:(P({appName:s.title,configFile:y(c.configPath)}),{clientSecret:s.apiSecretKeys.find(f=>f.secret).secret,apiKey:s.apiKey})}async function O(e,t,r){let o=await A(e,r);return t?L(t,o):C(o)}async function B(e,t,r,o){let s=await H(e,t,o);return r?M(r,t,s):V(s)}async function N(e,t){let r=e??_(t)??await R(),o=t??await D(r);return F(o,r)}async function Y(e){let t=await W(e);await z(t)}async function W(e){let t=await O(e.developerPlatformClient,e.apiVersion,e.organizationId),r=await B(e.developerPlatformClient,t,e.topic,e.organizationId),[o,s]=await N(e.deliveryMethod,e.address),c=await x(e,s);return{topic:r,apiVersion:t,deliveryMethod:s,address:o,apiKey:c.apiKey,clientSecret:c.clientSecret,developerPlatformClient:e.developerPlatformClient,organizationId:e.organizationId}}async function z(e){let t={topic:e.topic,api_version:e.apiVersion,address:e.address,delivery_method:e.deliveryMethod,shared_secret:e.clientSecret,api_key:e.apiKey},r=await S(e.developerPlatformClient,t,e.organizationId);if(!r.success){u(`Request errors:
|
|
4
|
+
${K(r.userErrors)}`);return}if(e.deliveryMethod===i.LOCALHOST){if(await E(e.address,r.samplePayload,r.headers)){h("Localhost delivery sucessful");return}u("Localhost delivery failed");return}r.samplePayload===JSON.stringify({})&&h("Webhook has been enqueued for delivery")}function K(e){try{return e.map(t=>JSON.parse(t.message).map(r=>` \xB7 ${r}`).join(`
|
|
5
|
+
`)).join(`
|
|
6
|
+
`)}catch{return JSON.stringify(e)}}var n=q(G(),1);var m=class e extends I{static summary="Trigger delivery of a sample webhook topic payload to a designated address.";static descriptionWithMarkdown=`
|
|
7
|
+
Triggers the delivery of a sample Admin API event topic payload to a designated address.
|
|
8
|
+
|
|
9
|
+
You should use this command to experiment with webhooks, to initially test your webhook configuration, or for unit testing. However, to test your webhook configuration from end to end, you should always trigger webhooks by performing the related action in Shopify.
|
|
10
|
+
|
|
11
|
+
Because most webhook deliveries use remote endpoints, you can trigger the command from any directory where you can use Shopify CLI, and send the webhook to any of the supported endpoint types. For example, you can run the command from your app's local directory, but send the webhook to a staging environment endpoint.
|
|
12
|
+
|
|
13
|
+
To learn more about using webhooks in a Shopify app, refer to [Webhooks overview](https://shopify.dev/docs/apps/webhooks).
|
|
14
|
+
|
|
15
|
+
### Limitations
|
|
16
|
+
|
|
17
|
+
- Webhooks triggered using this method always have the same payload, so they can't be used to test scenarios that differ based on the payload contents.
|
|
18
|
+
- Webhooks triggered using this method aren't retried when they fail.
|
|
19
|
+
- Trigger requests are rate-limited using the [Partner API rate limit](https://shopify.dev/docs/api/partner#rate_limits).
|
|
20
|
+
- You can't use this method to validate your API webhook subscriptions.
|
|
21
|
+
`;static description=this.descriptionWithoutMarkdown();static flags={...b,help:n.Flags.help({required:!1,hidden:!1,env:"SHOPIFY_FLAG_HELP",description:"This help. When you run the trigger command the CLI will prompt you for any information that isn't passed using flags."}),topic:l(n.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_TOPIC",description:"The requested webhook topic."})),"api-version":l(n.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_API_VERSION",description:"The API Version of the webhook topic."})),"delivery-method":n.Flags.string({required:!1,hidden:!1,options:[i.HTTP,i.PUBSUB,i.EVENTBRIDGE],env:"SHOPIFY_FLAG_DELIVERY_METHOD",description:"Method chosen to deliver the topic payload. If not passed, it's inferred from the address."}),"client-secret":n.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_CLIENT_SECRET",description:"Your app's client secret. This secret allows us to return the X-Shopify-Hmac-SHA256 header that lets you validate the origin of the response that you receive."}),address:l(n.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_ADDRESS",description:`The URL where the webhook payload should be sent.
|
|
22
|
+
You will need a different address type for each delivery-method:
|
|
23
|
+
${d(i.HTTP)}
|
|
24
|
+
${d(i.PUBSUB)}
|
|
25
|
+
${d(i.EVENTBRIDGE)}`}))};async run(){let{flags:t}=await this.parse(e),r=await T({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o={...r,topic:t.topic,apiVersion:t["api-version"],deliveryMethod:t["delivery-method"],address:t.address,clientId:t["client-id"],clientSecret:t["client-secret"],path:t.path,config:t.config,organizationId:r.organization.id};return await Y(o),{app:r.app}}};export{m as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as w}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-NEMPLS7C.js";import{a as E}from"./chunk-KUNDCAQN.js";import{E as F,Z as x,i as C,sa as y}from"./chunk-ACTDYTAV.js";import{b as f}from"./chunk-LWJA2DQG.js";import{b as v}from"./chunk-JJJTPEMD.js";import{a as _}from"./chunk-CTNBSUVU.js";import{Ta as g,ma as u,qb as o,sb as p,ua as l,wb as h}from"./chunk-Y34LWI3S.js";import{f as c}from"./chunk-773TIA5M.js";import{e as k,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function S({app:d,remoteApp:t,organization:a,envFile:e}){await x(t,a.source);let n={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:C(d.configuration)};if(await g(e)){let i=await u(e),r=f(i,n);if(r===i)return p`No changes to ${o.path(e)}`;{await l(e,r);let I=w(i??"",r);return p`Updated ${o.path(e)} to be:
|
|
2
|
+
|
|
3
|
+
${r}
|
|
4
|
+
|
|
5
|
+
Here's what changed:
|
|
6
|
+
|
|
7
|
+
${o.linesDiff(I)}
|
|
8
|
+
`}}else{let i=f(null,n);return await l(e,i),p`Created ${o.path(e)}:
|
|
9
|
+
|
|
10
|
+
${i}
|
|
11
|
+
`}}var b=k(_(),1);var m=class d extends P{static summary="Pull app and extensions environment variables.";static descriptionWithMarkdown="Creates or updates an `.env` files that contains app and app extension environment variables.\n\n When an existing `.env` file is updated, changes to the variables are displayed in the terminal output. Existing variables and commented variables are preserved.";static description=this.descriptionWithoutMarkdown();static flags={...v,...E,"env-file":b.Flags.string({hidden:!1,description:"Specify an environment file to update if the update flag is set",env:"SHOPIFY_FLAG_ENV_FILE"})};async run(){let{flags:t}=await this.parse(d),{app:a,remoteApp:e,organization:n}=await y({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),i=c(a.directory,t["env-file"]??F(a.configPath));return h(await S({app:a,remoteApp:e,organization:n,envFile:i})),{app:a}}};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.7.0";export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h,c as T,g as p}from"./chunk-VKWPEFWQ.js";var b=T((w,I)=>{p();I.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&I.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&I.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var q=T((M,a)=>{p();var e=global.process,u=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};u(e)?(C=h("assert"),i=b(),U=/^win/i.test(e.platform),c=h("events"),typeof c!="function"&&(c=c.EventEmitter),e.__signal_exit_emitter__?n=e.__signal_exit_emitter__:(n=e.__signal_exit_emitter__=new c,n.count=0,n.emitted={}),n.infinite||(n.setMaxListeners(1/0),n.infinite=!0),a.exports=function(t,f){if(!u(global.process))return function(){};C.equal(typeof t,"function","a callback must be provided for exit handler"),l===!1&&_();var r="exit";f&&f.alwaysLast&&(r="afterexit");var x=function(){n.removeListener(r,t),n.listeners("exit").length===0&&n.listeners("afterexit").length===0&&S()};return n.on(r,t),x},S=function(){!l||!u(global.process)||(l=!1,i.forEach(function(f){try{e.removeListener(f,v[f])}catch{}}),e.emit=G,e.reallyExit=y,n.count-=1)},a.exports.unload=S,o=function(f,r,x){n.emitted[f]||(n.emitted[f]=!0,n.emit(f,r,x))},v={},i.forEach(function(t){v[t]=function(){if(u(global.process)){var r=e.listeners(t);r.length===n.count&&(S(),o("exit",null,t),o("afterexit",null,t),U&&t==="SIGHUP"&&(t="SIGINT"),e.kill(e.pid,t))}}}),a.exports.signals=function(){return i},l=!1,_=function(){l||!u(global.process)||(l=!0,n.count+=1,i=i.filter(function(f){try{return e.on(f,v[f]),!0}catch{return!1}}),e.emit=k,e.reallyExit=L)},a.exports.load=_,y=e.reallyExit,L=function(f){u(global.process)&&(e.exitCode=f||0,o("exit",e.exitCode,null),o("afterexit",e.exitCode,null),y.call(e,e.exitCode))},G=e.emit,k=function(f,r){if(f==="exit"&&u(global.process)){r!==void 0&&(e.exitCode=r);var x=G.apply(this,arguments);return o("exit",e.exitCode,null),o("afterexit",e.exitCode,null),x}else return G.apply(this,arguments)}):a.exports=function(){return function(){}};var C,i,U,c,n,S,o,v,l,_,y,L,G,k});export{q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r}from"./chunk-L67BU25M.js";import{b as a}from"./chunk-RY2SJVWM.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static summary="Upgrades Shopify CLI.";static descriptionWithMarkdown="Upgrades Shopify CLI using your package manager.";static description=this.descriptionWithoutMarkdown();async run(){await r()}};export{i as a};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{a as P}from"./chunk-E2W5OYYM.js";import{a as O}from"./chunk-4W3UE2ZI.js";import{c as I,i as _,n as k}from"./chunk-LZ3GZ7NS.js";import{b as S,m as b}from"./chunk-4JY2P2A5.js";import{j as g,k as T,l as L,p as R,v as q}from"./chunk-OORWOTAP.js";import{b as E}from"./chunk-JJJTPEMD.js";import{za as x}from"./chunk-YN6A26QL.js";import{a as v}from"./chunk-5CYJG63I.js";import{h as a}from"./chunk-R2R6JDNH.js";import{a as V}from"./chunk-CTNBSUVU.js";import{Ab as c,qb as l,sb as d,xb as o}from"./chunk-Y34LWI3S.js";import{e as U,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var m=class extends O{context="REPL";constructor(t){super(t),this.themeId=g()}async create(t,n){let s=await super.create(t,n);return await this.uploadThemeAssets(s),s}async findOrCreate(){let t=await this.fetch();if(!t){let n=`Liquid Console (${v})`;t=await this.create(S,n)}return t}setTheme(t){T(t)}removeTheme(){L()}async uploadThemeAssets(t){let n=[{key:"config/settings_data.json",value:"{}"},{key:"config/settings_schema.json",value:"[]"},{key:"snippets/eval.liquid",value:""},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"sections/announcement-bar.liquid",value:""},{key:"templates/index.json",value:JSON.stringify({sections:{announcement:{type:"announcement-bar",settings:{}}},order:["announcement"]})}];await b(t.id,n,this.adminSession)}};r();r();async function A(e){return await G(e)??await $(e)??await H(e)??await Y(e)??void 0}async function G(e){c(`Evaluating snippet - ${e.snippet}`);let t=`{ "type": "display", "value": {{ ${e.snippet} | json }} }`,n=await f({...e,snippet:t}),s=await n.text();return C(n.status,s)?K(s):void 0}async function $(e){c(`Evaluating context - ${e.snippet}`);let t=`{ "type": "context", "value": "{% ${e.snippet.replace(/"/g,'\\"')} %}" }`,n=await f({...e,snippet:t}),s=await n.text();C(n.status,s)&&e.replSession.push(JSON.parse(t))}async function H(e){if(c(`Evaluating assignment context - ${e.snippet}`),re(e.snippet))return e.snippet=`assign ${e.snippet}`,o(d`${l.gray(`> ${e.snippet}`)}`),$(e)}async function Y(e){c(`Evaluating syntax error - ${e.snippet}`);let t="";if(Q(e.snippet)||(t=await(await f({...e,snippet:`{{ ${e.snippet} }}`})).text()),h(t)||(t=await(await f({...e,snippet:`{% ${e.snippet} %}`})).text()),h(t)){let n=t.replace(/ \(snippets\/eval line \d+\)/,"");z(e.snippet,n)}}function z(e,t){if(t.includes("Unknown tag")){o(d`${l.errorText(`Unknown object, property, tag, or filter: '${e}'`)}`);return}let n=j(t);n&&o(d`${l.errorText(n)}`)}async function f(e){let t=B(e);e.url.startsWith("/")||(e.url=`/${e.url}`);let n=await _(e.themeSession,{method:"GET",path:e.url,query:[],themeId:e.themeId,sectionId:"announcement-bar",headers:{},replaceTemplates:{"sections/announcement-bar.liquid":"{% render 'eval' %}","snippets/eval.liquid":`
|
|
2
|
+
${t}
|
|
3
|
+
`}});return X(n)&&te(),Z(n)&&ne(),ee(n)&&se(),n}function B(e){return`[${[...e.replSession.map(n=>JSON.stringify(n)),e.snippet].join(",").replace(/\\"/g,'"')}]`}function K(e){let t=j(e);if(t)return JSON.parse(t)?.find(s=>s.type==="display")?.value}function j(e){let t=e.split(`
|
|
4
|
+
`).slice(1,-1);if(t.length!==0)return t.join("")}function h(e){return e.includes("Liquid syntax error")}function Q(e){return/^\s*assign\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function X(e){return e.status===401||e.status===403}function Z(e){return e.status===430||e.status===429}function ee(e){return e.headers.get("server-timing")?.includes('pageType;desc="404"')??!1}function te(){throw new a("Session expired. Please initiate a new one.")}function ne(){throw new a("Evaluations limit reached. Try again later.")}function se(){throw new a("Page not found. Please provide a valid --url value!")}function re(e){return/^\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function C(e,t){return e===200&&!h(t)}r();function F(e){if(N(e)){o("Object can't be printed, but you can access its fields. Read more at https://shopify.dev/docs/api/liquid.");return}if(e==null){M("null");return}let t=JSON.stringify(e,null,2);M(t)}function N(e){if(Array.isArray(e))return e.length>0?N(e[0]):!1;if(e&&typeof e=="object"){let n=e.error;return typeof n=="string"&&n.includes("json not allowed for this object")}return!1}function M(e){return o(d`${l.cyan(e)}`)}import{createInterface as oe}from"readline";var ie=`Liquid Console doesn't support Liquid delimiters such as '{{ ... }}' or '{% ... %}'.
|
|
5
|
+
Please use 'collections.first' instead of '{{ collections.first }}'.`;async function D(e,t,n){process.stdin.isTTY&&process.stdin.ref();let s=oe({input:process.stdin,output:process.stdout}),i=[];s.on("line",u=>{ae(u,e,t,n,s,i)}),s.prompt()}async function ae(e,t,n,s,i,u){try{if(ue(e))return o(ie),i.prompt();let p=await A({snippet:e,themeSession:t,themeId:n,url:s,replSession:u});F(p),i.prompt()}catch(p){throw i.close(),p instanceof Error?(c(p.stack??"Error backtrace not found"),new a(p.message)):new a("An unknown error occurred. Please try again.")}}function ue(e){return/^\s*(\{\{|{%)/.test(e)}async function W(e,t){let n=await pe(e),s=await I(e)?await P(t,e.storeFqdn):void 0;return{themeId:n,storePassword:s}}async function pe(e){return(await new m(e).findOrCreate()).id.toString()}async function J(e,t,n,s,i){if(o(`Welcome to Shopify Liquid console
|
|
6
|
+
(press Ctrl + C to exit)`),s?.startsWith("shpat_"))throw new a("Unable to use Admin API tokens with the console command",`To use this command with the --password flag you must:
|
|
7
|
+
|
|
8
|
+
1. Install the Theme Access app on your shop
|
|
9
|
+
2. Generate a new password
|
|
10
|
+
|
|
11
|
+
Alternatively, you can authenticate normally by not passing the --password flag.
|
|
12
|
+
|
|
13
|
+
Learn more: https://shopify.dev/docs/storefronts/themes/tools/theme-access`);let u=await k(t,e,s,i);return D(u,t,n)}var y=U(V(),1);var w=class extends q{static summary="Shopify Liquid REPL (read-eval-print loop) tool";static usage=["theme console","theme console --url /products/classic-leather-jacket"];static descriptionWithMarkdown=`Starts the Shopify Liquid REPL (read-eval-print loop) tool. This tool provides an interactive terminal interface for evaluating Liquid code and exploring Liquid objects, filters, and tags using real store data.
|
|
14
|
+
|
|
15
|
+
You can also provide context to the console using a URL, as some Liquid objects are context-specific`;static description=this.descriptionWithoutMarkdown();static flags={...E,...R,url:y.Flags.string({description:"The url to be used as context",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":y.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"})};static multiEnvironmentsFlags=null;async command(t,n){let{url:s,password:i}=t,{themeId:u,storePassword:p}=await W(n,t["store-password"]);x("theme-command:console:single-env:authenticated"),await J(n,u,s,i,p)}};export{w as a};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as U}from"./chunk-CZJZCJRX.js";import{D as H}from"./chunk-ACTDYTAV.js";import{a as q}from"./chunk-VJEKDBGZ.js";import{f as I}from"./chunk-F5HCSUXC.js";import{a as O,o as D,w as k}from"./chunk-GMTNOCMS.js";import{h as N}from"./chunk-R2R6JDNH.js";import{Ab as h,Ca as F,Ta as A,Ua as P,bb as y,na as R,wa as g}from"./chunk-Y34LWI3S.js";import{f as S}from"./chunk-XAOYKECS.js";import{d as x,e as E,g as v,i as C}from"./chunk-773TIA5M.js";import{e as X,g as m}from"./chunk-VKWPEFWQ.js";m();function w(){return process.hrtime()}function M(r){let t=process.hrtime(r);return(t[0]*1e3+t[1]/1e6).toFixed(2)}m();m();var $=X(q(),1),G=200,K=6e4,L=200,Q=500,_=class{currentEvents=[];extensionPaths=[];app;options;onChangeCallback;watcher;debouncedEmit;ignored={};extensionWatchedFiles=new Map;constructor(t,e,s=G){this.app=t,this.options=e,this.debouncedEmit=k(this.emitEvents.bind(this),s,{leading:!0,trailing:!0}),this.updateApp(t)}onChange(t){this.onChangeCallback=t}async start(){let e=[...this.app.configuration.extension_directories??["extensions"]].map(n=>x(this.app.directory,n));await Promise.all(e.map(async n=>{try{await g(n.replace(/\/\*+$/,""))}catch{}}));let s=[this.app.configPath,...e],i=this.getAllWatchedFiles();s.push(...i),this.close();let{default:o}=await import("./chokidar-5RWEYTNQ.js");this.watcher=o.watch(s,{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),this.watcher.on("all",this.handleFileEvent),this.addAbortListener(),h(`File watcher started with ${s.length} paths`,this.options.stdout)}updateApp(t){this.app=t,this.extensionPaths=this.app.nonConfigExtensions.map(e=>E(e.directory)).filter(e=>e!==this.app.directory),this.extensionPaths.forEach(e=>{this.ignored[e]??=this.createIgnoreInstance(e)})}addAbortListener(){this.options.signal.removeEventListener("abort",this.close),this.options.signal.addEventListener("abort",this.close)}getAllWatchedFiles(){this.extensionWatchedFiles.clear();let t=this.app.realExtensions.map(s=>({extension:s,watchedFiles:s.watchedFiles()})),e=new Set;for(let{extension:s,watchedFiles:i}of t)for(let o of i){let n=E(o);e.add(n);let a=this.extensionWatchedFiles.get(n)??new Set;a.add(s.handle),this.extensionWatchedFiles.set(n,a)}return Array.from(e)}emitEvents=()=>{let t=this.currentEvents;this.currentEvents=[];let e=`\u{1F509} ${t.length} EVENTS EMITTED in files: ${t.map(s=>s.path).join(`
|
|
2
|
+
`)}`;h(e,this.options.stdout),this.onChangeCallback?.(t)};pushEvent(t){this.shouldIgnoreEvent(t)||(t.type==="extension_folder_created"&&(this.ignored[t.path]=this.createIgnoreInstance(t.path)),!this.currentEvents.some(e=>e.path===t.path&&e.type===t.type&&e.extensionHandle===t.extensionHandle)&&this.currentEvents.push(t))}shouldIgnoreEvent(t){if(t.type==="extension_folder_deleted"||t.type==="extension_folder_created"||t.extensionHandle&&this.extensionWatchedFiles.get(E(t.path))?.has(t.extensionHandle))return!1;let s=(t.extensionHandle?this.app.realExtensions.find(o=>o.handle===t.extensionHandle):void 0)?.watchedFiles(),i=this.ignored[t.extensionPath];if(s)return!s.some(n=>y(t.path,n));if(i){let o=v(t.extensionPath,t.path);return i.ignores(o)}return!1}handleFileEvent=(t,e)=>{let s=w(),i=E(e),o=e===this.app.configPath,n=e.endsWith(".extension.toml");if(h(`\u{1F300}: ${t} ${e.replace(this.app.directory,"")}
|
|
3
|
+
`),o)this.handleEventForExtension(t,e,this.app.directory,s,!1);else{let a=this.extensionWatchedFiles.get(i),d=a===void 0||a.size===0;if(d&&t==="add"&&!n){let c=this.discoverFileOwners(i);c.size>0&&(this.extensionWatchedFiles.set(i,c),a=c,d=!1)}if(d&&!n&&!o){h(`\u{1F300}: File ${e} is not watched by any extension`,this.options.stdout);return}for(let c of a??[]){let l=this.app.realExtensions.find(f=>f.handle===c),u=l?E(l.directory):this.app.directory;this.handleEventForExtension(t,e,u,s,!1,c)}d&&this.handleEventForExtension(t,e,this.app.directory,s,!0)}this.debouncedEmit()};discoverFileOwners(t){let e=new Set;for(let s of this.app.realExtensions){let i=E(s.directory);i!==this.app.directory&&t.startsWith(`${i}/`)&&this.pathMatchesWatchPatterns(t,s)&&e.add(s.handle)}return e}pathMatchesWatchPatterns(t,e){let{paths:s,ignore:i}=e.watchPatterns(),o=v(E(e.directory),t);return i.some(n=>y(o,n))?!1:s.some(n=>y(o,n))}handleEventForExtension(t,e,s,i,o,n){let a=e.endsWith(".extension.toml"),d=e===this.app.configPath;switch(t){case"change":if(o)break;a||d?this.pushEvent({type:"extensions_config_updated",path:e,extensionPath:s,extensionHandle:n,startTime:i}):this.pushEvent({type:"file_updated",path:e,extensionPath:s,extensionHandle:n,startTime:i});break;case"add":if(!a){this.pushEvent({type:"file_created",path:e,extensionPath:s,extensionHandle:n,startTime:i});break}let c=0,l=C(e),u=setInterval(()=>{P(x(l,I.lockFile))?(h(`Waiting for extension to complete creation: ${e}
|
|
4
|
+
`),c+=L):(clearInterval(u),this.extensionPaths.push(l),this.pushEvent({type:"extension_folder_created",path:l,extensionPath:s,startTime:i}),this.debouncedEmit()),c>=K&&(clearInterval(u),this.options.stderr.write(`Error loading new extension at path: ${e}.
|
|
5
|
+
Please restart the process.`))},L);break;case"unlink":if(e.endsWith(I.lockFile))break;d?this.pushEvent({type:"app_config_deleted",path:e,extensionPath:s,startTime:i}):a?(this.extensionPaths=this.extensionPaths.filter(f=>f!==s),this.pushEvent({type:"extension_folder_deleted",path:s,extensionPath:s,startTime:i})):setTimeout(()=>{this.extensionPaths.includes(s)&&(this.pushEvent({type:"file_deleted",path:e,extensionPath:s,extensionHandle:n,startTime:i}),this.extensionWatchedFiles.delete(E(e)),this.debouncedEmit())},Q);break;case"addDir":case"unlinkDir":break}}close=()=>{this.watcher&&(h("Closing file watcher",this.options.stdout),this.watcher.close().then(()=>h("File watching closed",this.options.stdout)).catch(t=>h(`File watching failed to close: ${t.message}`,this.options.stderr)))};createIgnoreInstance(t){let e=x(t,".gitignore");if(!P(e))return;let s=R(e).toString().split(`
|
|
6
|
+
`).map(i=>i.trim()).filter(i=>i!==""&&!i.startsWith("#"));return $.default.default().add(s)}};m();m();function B(r,t,e=!0){let s=r.realExtensions,i=s.map(l=>l.uid),o=t.realExtensions,n=o.map(l=>l.uid),a=o.filter(l=>!i.includes(l.uid)),d=s.filter(l=>!n.includes(l.uid)),c;return e&&(c=o.filter(l=>{let u=s.find(b=>b.uid===l.uid);if(!u)return!1;let f=JSON.stringify(u.configuration)!==JSON.stringify(l.configuration),W=u.configurationPath!==l.configurationPath;return f||W})),{created:a,updated:c??[],deleted:d}}async function V(r,t,e){if(r[0]===void 0)return;let s=r.some(n=>j.includes(n.type)),i=r.filter(n=>!j.includes(n.type));if(s)return et({event:r[0],app:t,options:e,extensions:[]});let o={app:t,extensionEvents:[],path:r[0].path,startTime:r[0].startTime};for(let n of i){let a=n.extensionHandle?t.realExtensions.filter(c=>c.handle===n.extensionHandle):t.realExtensions.filter(c=>c.directory===n.extensionPath),d=Y[n.type]({event:n,app:o.app,extensions:a,options:e});o.extensionEvents.push(...d.extensionEvents)}return o}var j=["extensions_config_updated","extension_folder_created"],Y={extension_folder_deleted:Z,file_created:T,file_deleted:T,file_updated:T,app_config_deleted:tt,extension_folder_created:z,extensions_config_updated:z};function Z({event:r,app:t,extensions:e}){let s=e.map(i=>(t.removeExtension(i.uid),{type:p.Deleted,extension:i}));return{app:t,extensionEvents:s,startTime:r.startTime,path:r.path}}function T({event:r,app:t,extensions:e}){let s=e.map(i=>({type:p.Updated,extension:i}));return{app:t,extensionEvents:s,startTime:r.startTime,path:r.path}}function z(r){return{app:r.app,extensionEvents:[],startTime:r.event.startTime,path:r.event.path}}function tt(r){throw new N("The active app.toml was deleted, exiting")}async function et({event:r,app:t}){let e=await st(t),s=B(t,e,!0),i=s.created.map(d=>({type:p.Created,extension:d})),o=s.deleted.map(d=>({type:p.Deleted,extension:d})),n=s.updated.map(d=>({type:p.Updated,extension:d})),a=[...i,...o,...n];return{app:e,extensionEvents:a,startTime:r.startTime,path:r.path,appWasReloaded:!0}}async function st(r){let t=w();try{let e=await H(r);return h(`App reloaded [${M(t)}ms]`),e}catch(e){let s=new Error(`Error reloading app: ${e.message}`);throw s.cause="validation-error",s}}import{formatMessagesSync as it}from"esbuild";import nt from"events";var p;(function(r){r.Updated="changed",r.Deleted="deleted",r.Created="created"})(p||(p={}));var J=class extends nt{buildOutputPath;app;options;appURL;started=!1;ready=!1;initialEvents=[];fileWatcher;constructor(t,e,s,i){super(),this.app=t,this.appURL=e,this.buildOutputPath=s??x(t.directory,".shopify","dev-bundle"),this.options={stdout:process.stdout,stderr:process.stderr,signal:new O().signal},this.fileWatcher=i}async start(t,e=!0){this.started||(this.started=!0,this.options=t??this.options,await A(this.buildOutputPath)&&await F(this.buildOutputPath,{force:!0}),await g(this.buildOutputPath),e&&(this.initialEvents=this.app.realExtensions.map(s=>({type:p.Updated,extension:s})),await this.buildExtensions(this.initialEvents)),this.fileWatcher=this.fileWatcher??new _(this.app,this.options),this.fileWatcher.onChange(s=>{V(s,this.app,this.options).then(async i=>{if(i?.extensionEvents.length===0&&h("Change detected, but no extensions were affected"),!i)return;this.app=i.app,i.appWasReloaded&&this.fileWatcher?.updateApp(this.app),await this.rescanImports(i);let o=i.extensionEvents.filter(n=>n.type!==p.Deleted);await this.buildExtensions(o),i.appWasReloaded||await this.app.generateExtensionTypes(),await this.deleteExtensionsBuildOutput(i),this.emit("all",i)}).catch(i=>{this.emit("error",i)})}),await this.fileWatcher.start(),this.ready=!0,this.emit("ready",{app:this.app,extensionEvents:this.initialEvents}))}onEvent(t){return this.addListener("all",t),this}onStart(t){if(this.ready){let e={app:this.app,extensionEvents:this.initialEvents,startTime:[0,0],path:""};t(e)?.catch(()=>{})}else this.once("ready",t);return this}onError(t){return this.addListener("error",t),this}async deleteExtensionsBuildOutput(t){let s=t.extensionEvents.filter(i=>i.type===p.Deleted).map(i=>i.extension).map(async i=>{let o=x(this.buildOutputPath,i.getOutputFolderId());return F(o,{force:!0})});await Promise.all(s)}async buildExtensions(t){let e=U(t,o=>o.extension.uid),s=[];for(let o of Object.values(e))o.length>0&&o[0]&&s.push({extension:o[0].extension,events:o});let i=s.map(async({extension:o,events:n})=>D({outputPrefix:o.handle,stripAnsi:!1},async()=>{try{await this.buildExtension(o);let a={status:"ok",uid:o.uid};n.forEach(d=>{d.buildResult=a})}catch(a){let d=a.errors??[],c=a.message,l;if(d.length){let f=d[0];c=f?.text,l=f?.location?.file,it(d,{kind:"error",color:!S()}).forEach(b=>{this.options.stderr.write(b)})}else this.options.stderr.write(a.message);let u={status:"error",error:c,file:l,uid:o.uid};n.forEach(f=>{f.buildResult=u})}}));return Promise.all(i)}async buildExtension(t){let e={app:this.app,stdout:this.options.stdout,stderr:this.options.stderr,useTasks:!1,environment:"development",appURL:this.appURL};await t.buildForBundle(e,this.buildOutputPath)}async rescanImports(t){if(t.path.endsWith(".toml"))return;let s=t.extensionEvents.filter(i=>i.type!==p.Deleted).map(i=>i.extension);s.length>0&&(await Promise.all(s.map(async n=>n.rescanImports()))).some(n=>n)&&await this.fileWatcher?.start()}};export{w as a,M as b,p as c,J as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as h,E as e,F as r,J as o,K as s,n}from"./chunk-GMTNOCMS.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c}from"./chunk-
|
|
1
|
+
import{e as c}from"./chunk-YIZZ5LZN.js";import{V as s}from"./chunk-YN6A26QL.js";import{h as p,k as a}from"./chunk-R2R6JDNH.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as y}from"./chunk-JJJTPEMD.js";import{b as g}from"./chunk-RY2SJVWM.js";import{B as u,E as l,F as f,G as m,H as d,N as p}from"./chunk-YN6A26QL.js";import{j as n}from"./chunk-AGOEROAI.js";import{D as S,J as h}from"./chunk-GMTNOCMS.js";import{a as v}from"./chunk-CTNBSUVU.js";import{zb as w}from"./chunk-Y34LWI3S.js";import{e as N,g as i}from"./chunk-VKWPEFWQ.js";i();i();var r="NEW_LOGIN";function C(s,t){let e=[],o=s[t];if(o)for(let[c,L]of Object.entries(o))e.push({label:L.identity.alias??c,value:c});return e}async function b(){let s=await p({},{forceNewSession:!0}),t=await f(s.userId);if(!t){let e=await h({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await m(s.userId,e),e}return t}async function x(){let s=await l(),t=await u(),e=[];return s&&e.push(...C(s,t)),e.length>0&&e.push({label:"Log in with a different account",value:r}),e}async function A(s){if(s){let o=await d(s);if(o)return n(o),s}let t=await x(),e=r;return t.length>0&&(e=await S({message:"Which account would you like to use?",choices:t})),e===r?b():(n(e),t.find(o=>o.value===e)?.label??e)}var I=N(v(),1);var a=class s extends g{static description="Logs you in to your Shopify account.";static flags={alias:y(I.Flags.string({description:"Alias of an existing session you want to use.",env:"SHOPIFY_FLAG_AUTH_ALIAS"}))};async run(){let{flags:t}=await this.parse(s),e=await A(t.alias);w(`Current account: ${e}.`)}};export{a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{b as j}from"./chunk-ZO74GSWC.js";import{a as O}from"./chunk-NEMPLS7C.js";import{a as T}from"./chunk-KUNDCAQN.js";import{i as k,sa as N}from"./chunk-ACTDYTAV.js";import{f as u}from"./chunk-F5HCSUXC.js";import{b as P,c as I}from"./chunk-JJJTPEMD.js";import{L as S,M as b}from"./chunk-YN6A26QL.js";import{y as E}from"./chunk-GMTNOCMS.js";import{d as v}from"./chunk-EOMCXBCS.js";import{a as m}from"./chunk-5CYJG63I.js";import{a as W}from"./chunk-CTNBSUVU.js";import{Hb as _,L as g,N as y,rb as C,sb as w,wb as A}from"./chunk-Y34LWI3S.js";import{g as a,j as h}from"./chunk-773TIA5M.js";import{e as U,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function x(n,e,t,o,i){return i.webEnv?F(n,e,t,i):R(n,e,o,i)}async function F(n,e,t,{format:o}){return j(n,e,t,o)}async function R(n,e,t,o){if(o.format==="json"){let i=$(n.allExtensions.filter(s=>s.isReturnedAsInfo())),r={...n,packageManager:t.packageManager,nodeDependencies:t.nodeDependencies,usesWorkspaces:t.usesWorkspaces,allExtensions:i};return"realExtensions"in r&&(r.realExtensions=$(r.realExtensions)),"specifications"in r&&(r={...r,specifications:r.specifications?.map(s=>D(s))}),w`${JSON.stringify(Object.fromEntries(Object.entries(r).filter(([s])=>s!=="configSchema")),null,2)}`}else return new l(n,e,t,o).output()}function D(n){if("schema"in n){let{schema:e,...t}=n;return t}return n}function $(n){return n.map(e=>{if("specification"in e&&e.specification){let t=e.specification,o=D(t);return{...e,specification:o}}else return e})}var M="unknown",f={subdued:"Not yet configured"},K="NOT LOADED",l=class{app;remoteApp;project;options;constructor(e,t,o,i){this.app=e,this.remoteApp=t,this.project=o,this.options=i}async output(){return[...await this.devConfigsSection(),this.projectSettingsSection(),...await this.appComponentsSection(),await this.systemInfoSection()]}async devConfigsSection(){let e=f;this.app.configuration.build?.automatically_update_urls_on_dev!==void 0&&(e=this.app.configuration.build.automatically_update_urls_on_dev?"Yes":"No");let t=["User","unknown"],o=await this.options.developerPlatformClient.accountInfo();return b(o)?t=["Service account",o.orgName]:S(o)&&(t[1]=o.email),[this.tableSection("Current app configuration",[["Configuration file",{filePath:h(this.app.configPath)||u.app}],["App name",this.remoteApp.title?{userInput:this.remoteApp.title}:f],["Client ID",this.remoteApp.apiKey||f],["Access scopes",k(this.app.configuration)],["Dev store",this.app.configuration.build?.dev_store_url??this.app.hiddenConfig.dev_store_url??f],["Update URLs",e],t],{isFirstItem:!0}),{body:["\u{1F4A1} To change these, run",{command:C(this.project.packageManager,"shopify app config link")}]}]}projectSettingsSection(){return this.tableSection("Your Project",[["Root location",{filePath:this.app.directory}]])}async appComponentsSection(){let e=this.webComponentsSection();return[{title:`
|
|
2
|
+
Directory components`.toUpperCase(),body:""},...e?[e]:[],...this.extensionsSections()]}webComponentsSection(){let e=[],t=[];if(this.app.webs[0])return this.app.webs.forEach(o=>{if(o.configuration)if(o.configuration.name){let{name:i,roles:r}=o.configuration,s=a(this.app.directory,o.directory);t.push([` \u{1F4C2} ${i}`,{filePath:s||"/"}]),r.length>0&&t.push([" roles",r.join(", ")])}else o.configuration.roles.forEach(i=>{t.push([` \u{1F4C2} ${i}`,{filePath:a(this.app.directory,o.directory)}])});else t.push([{subdued:` \u{1F4C2} ${M}`},{filePath:a(this.app.directory,o.directory)}]);if(!this.app.errors.isEmpty()){let i=this.app.errors.getErrors(`${o.directory}/${u.web}`);e.push(...i.map(r=>r.message))}}),this.subtableSection("web",[["\u{1F4C2} web",""],...t,...e.map(o=>[{error:"error"},{error:this.formattedError(o)}])])}extensionsSections(){let e=this.app.allExtensions.filter(i=>i.isReturnedAsInfo()),o=y(e.map(i=>i.type)).map(i=>{let r=e.filter(s=>s.type===i);if(r[0])return this.subtableSection(r[0].externalType,r.flatMap(s=>this.extensionSubSection(s)))});return g(o)}extensionSubSection(e){let t=e.configuration,o=[[`\u{1F4C2} ${e.handle||K}`,{filePath:a(this.app.directory,e.directory)}],[" config file",{filePath:a(e.directory,e.configurationPath)}]];t&&"metafields"in t&&Array.isArray(t.metafields)&&t.metafields.length>0&&o.push([" metafields",`${t.metafields.length}`]);let i=this.app.errors.getErrors(e.configurationPath);for(let r of i)o.push([{error:" error"},{error:this.formattedError(r.message)}]);return o}formattedError(e){let t=e.trim();if(_())return t;let[o,...i]=t.split(`
|
|
3
|
+
`);return[`! ${o}`,...i.map(r=>` ${r}`)].join(`
|
|
4
|
+
`)}async systemInfoSection(){let{platform:e,arch:t}=v();return this.tableSection("Tooling and System",[["Shopify CLI",m],["Package manager",this.project.packageManager],["OS",`${e}-${t}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}tableSection(e,t,{isFirstItem:o=!1}={}){return{title:`${o?"":`
|
|
5
|
+
`}${e.toUpperCase()}
|
|
6
|
+
`,body:{tabularData:t,firstColumnSubdued:!0}}}subtableSection(e,t){return{title:e,body:{tabularData:t,firstColumnSubdued:!0}}}};var L=U(W(),1);var d=class n extends O{static summary="Print basic information about your app and extensions.";static descriptionWithMarkdown=`The information returned includes the following:
|
|
7
|
+
|
|
8
|
+
- The app and dev store that's used when you run the [dev](https://shopify.dev/docs/api/shopify-cli/app/app-dev) command. You can reset these configurations using [\`dev --reset\`](https://shopify.dev/docs/api/shopify-cli/app/app-dev#flags-propertydetail-reset).
|
|
9
|
+
- The [structure](https://shopify.dev/docs/apps/tools/cli/structure) of your app project.
|
|
10
|
+
- The [access scopes](https://shopify.dev/docs/api/usage) your app has requested.
|
|
11
|
+
- System information, including the package manager and version of Shopify CLI used in the project.`;static description=this.descriptionWithoutMarkdown();static flags={...P,...T,...I,"web-env":L.Flags.boolean({hidden:!1,description:"Outputs environment variables necessary for running and deploying web/.",env:"SHOPIFY_FLAG_OUTPUT_WEB_ENV",default:!1})};async run(){let{flags:e}=await this.parse(n),{app:t,project:o,remoteApp:i,organization:r,developerPlatformClient:s}=await N({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config,unsafeTolerateErrors:!0}),p=await x(t,i,r,o,{format:e.json?"json":"text",webEnv:e["web-env"],configName:e.config,developerPlatformClient:s});return typeof p=="string"||"value"in p?A(p):E({customSections:p}),t.errors.isEmpty()||process.exit(2),{app:t}}};export{d as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as L,b as g,d as P,g as w}from"./chunk-FCGKO2KY.js";import{a as A}from"./chunk-JUKAWTYY.js";import{t as F}from"./chunk-YIZZ5LZN.js";import{a as G}from"./chunk-NEMPLS7C.js";import{a as S}from"./chunk-KUNDCAQN.js";import{b as v,e as b}from"./chunk-JJJTPEMD.js";import{C as d,x as l}from"./chunk-YN6A26QL.js";import{N as u,a as c}from"./chunk-GMTNOCMS.js";import{a as q}from"./chunk-CTNBSUVU.js";import{Bb as y,qb as f,sb as h,xb as i}from"./chunk-Y34LWI3S.js";import{e as Q,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();import{randomBytes as x}from"crypto";function K(){return x(32).toString("hex")}function C(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 k(r){let e=await A(r.port),t=g({stdout:r.stdout??process.stdout,port:e,storeFqdn:r.storeFqdn,tokenProvider:r.tokenProvider,key:r.key,appContext:r.appContext,protectMutations:r.protectMutations}),a=C({port:e,key:r.key,query:r.query,variables:r.variables,apiVersion:r.apiVersion});try{i(h`GraphiQL is running at ${f.link(a)}`),r.additionalReadyMessages?.forEach(s=>i(s)),i("Press Ctrl+C to stop."),await u(a)||y("Browser did not open automatically. Open the URL above manually."),await T(r.abortSignal)}finally{t.close()}}async function T(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 I(r){let e=r.remoteApp.apiSecretKeys[0]?.secret??"",t=L(void 0,e,r.store),a=w({apiKey:r.remoteApp.apiKey,apiSecret:e,storeFqdn:r.store}),m=await l(),s=P(r.store,r.remoteApp.apiKey,m);await k({port:r.port,storeFqdn:r.store,tokenProvider:a,key:t,appContext:{appName:r.remoteApp.title,appUrl:s,apiSecret:e},variables:r.variables,apiVersion:r.apiVersion,abortSignal:r.abortSignal})}var n=Q(q(),1),p=class r extends G{static summary="Open a local GraphiQL UI for your app and store.";static descriptionWithMarkdown=`Opens an authenticated Admin API GraphiQL UI for your app and selected store.
|
|
2
|
+
|
|
3
|
+
The app must be installed on the store.`;static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --port 9123"];static flags={...v,...S,store:n.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 e=>d(e)}),port:b({description:"Local port for the GraphiQL server.",env:"SHOPIFY_FLAG_PORT"}),variables:n.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES"}),version:n.Flags.string({description:"The API version to use in GraphiQL. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})};async run(){let{flags:e}=await this.parse(r),{appContextResult:t,store:a}=await F(e);return await I({remoteApp:t.remoteApp,store:a.shopDomain,port:e.port,variables:e.variables,apiVersion:e.version}),{app:t.app}}};export{K as a,k as b,p as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u}from"./chunk-
|
|
1
|
+
import{c as u}from"./chunk-KIYHEMHD.js";import{A as c}from"./chunk-GMTNOCMS.js";import{e as s}from"./chunk-JQISGC7D.js";import{$a as d}from"./chunk-Y34LWI3S.js";import{q as m}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m}from"./chunk-ZO74GSWC.js";import{a as p}from"./chunk-NEMPLS7C.js";import{a as n}from"./chunk-KUNDCAQN.js";import{sa as r}from"./chunk-ACTDYTAV.js";import{b as s}from"./chunk-JJJTPEMD.js";import{wb as e}from"./chunk-Y34LWI3S.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var i=class d extends p{static summary="Display app and extensions environment variables.";static descriptionWithMarkdown="Displays environment variables that can be used to deploy apps and app extensions.";static description=this.descriptionWithoutMarkdown();static flags={...s,...n};async run(){let{flags:t}=await this.parse(d),{app:a,remoteApp:l,organization:c}=await r({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return e(await m(a,l,c)),{app:a}}};export{i as a};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as v}from"./chunk-DQCIORGH.js";import{a as y}from"./chunk-KOVAFUYN.js";import{a as d}from"./chunk-YY6TFARF.js";import{p}from"./chunk-4JY2P2A5.js";import{p as f,v as u}from"./chunk-OORWOTAP.js";import{b as l,f as m}from"./chunk-JJJTPEMD.js";import{E as c,z as s}from"./chunk-GMTNOCMS.js";import{a as g}from"./chunk-CTNBSUVU.js";import{e as b,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function w(o,t,i){let e=await v(o,{header:"Select a theme to publish",filter:{development:!1,live:!1,theme:t.theme}}),h=d({...e,role:"live"},o);!t.force&&!i&&!await c({message:`Do you want to make '${e.name}' the new live theme on ${o.storeFqdn}?`,confirmationMessage:`Yes, make '${e.name}' the new live theme`,cancellationMessage:"No, cancel publish"})||(await p(e.id,o),s({headline:t.environment?`Environment: ${t.environment}`:void 0,body:["The theme",...y(e),"is now live at",{link:{label:h,url:h}},{char:"."}]}))}var n=b(g(),1);var a=class extends u{static summary="Set a remote theme as the live theme.";static 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.`;static description=this.descriptionWithoutMarkdown();static flags={...l,...f,force:m(n.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE"})),theme:m(n.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}))};static multiEnvironmentsFlags=["store","password","theme"];async command(t,i,e){await w(i,t,e)}};export{a};
|