shopify 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{analytics-Q6QDIDYT.js → analytics-NMMVOF4B.js} +1 -1
- package/dist/{analytics-VKKJNJ62.js → analytics-UK77WNLG.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-Q5MEFIMV.js → chunk-224UPIYS.js} +1 -1
- package/dist/{chunk-XBQDMGUN.js → chunk-26PWHH3B.js} +1 -1
- package/dist/{chunk-46MSIQ6Z.js → chunk-27NXPOAS.js} +1 -1
- package/dist/{chunk-SFPXYHHL.js → chunk-2A2JSAAA.js} +1 -1
- package/dist/{chunk-P33TONYG.js → chunk-2L6AN3QA.js} +1 -1
- package/dist/{chunk-43KLFFP7.js → chunk-2MT3LSMZ.js} +1 -1
- package/dist/{chunk-PGLWZMJU.js → chunk-2T4HDR6R.js} +1 -1
- package/dist/{chunk-5UWMXOHM.js → chunk-2WJOTJOD.js} +1 -1
- package/dist/{chunk-HIRTL45Q.js → chunk-2ZBXHCQZ.js} +1 -1
- package/dist/chunk-33ZE3DRQ.js +16 -0
- package/dist/{chunk-WFWISGLS.js → chunk-34MOWGRL.js} +1 -1
- package/dist/{chunk-AXC2MHHO.js → chunk-35XFNKNB.js} +1 -1
- package/dist/{chunk-LHKVXJPX.js → chunk-3JSKNXL7.js} +1 -1
- package/dist/{chunk-Q2SZCZE7.js → chunk-3KM5ZOW2.js} +1 -1
- package/dist/{chunk-KJQDS5HI.js → chunk-3MG4MTWQ.js} +1 -1
- package/dist/{chunk-MDRVCBDO.js → chunk-3MYDSQHF.js} +1 -1
- package/dist/{chunk-MYAIWSOO.js → chunk-3ODQKAEA.js} +1 -1
- package/dist/{chunk-6DXP7PQ7.js → chunk-3XRI3D44.js} +1 -1
- package/dist/{chunk-KGRIYAMA.js → chunk-3Z3MADXZ.js} +1 -1
- package/dist/{chunk-GB6E3ATN.js → chunk-4KECSZTL.js} +1 -1
- package/dist/{chunk-G6ZMSWEU.js → chunk-4WYKPIN3.js} +1 -1
- package/dist/{chunk-M3ACZWMR.js → chunk-5AEZJZNQ.js} +1 -1
- package/dist/chunk-5ED7SOQZ.js +20 -0
- package/dist/{chunk-FFHH5LOR.js → chunk-5IDJALJH.js} +1 -1
- package/dist/{chunk-GXORLBVN.js → chunk-62EOM3Y2.js} +1 -1
- package/dist/{chunk-EXFBZPZS.js → chunk-64G5TGFF.js} +1 -1
- package/dist/{chunk-QN3774QI.js → chunk-66TMIQMB.js} +1 -1
- package/dist/{chunk-L7MSPGDS.js → chunk-67L7FIB6.js} +1 -1
- package/dist/{chunk-7UOA4DI7.js → chunk-6ES4KRFW.js} +1 -1
- package/dist/{chunk-XMODGI45.js → chunk-74NRFUGQ.js} +1 -1
- package/dist/{chunk-YVY32DNA.js → chunk-7CCTPBCT.js} +1 -1
- package/dist/{chunk-2DID73ML.js → chunk-7GUMJ5E4.js} +1 -1
- package/dist/{chunk-IUTZIN2T.js → chunk-7NFTSBHQ.js} +1 -1
- package/dist/{chunk-TPSA4JN5.js → chunk-ACZNWIRY.js} +1 -1
- package/dist/{chunk-CCMDZX35.js → chunk-AQ6EVL73.js} +1 -1
- package/dist/{chunk-7WPUV7GY.js → chunk-AQKWPRZE.js} +1 -1
- package/dist/chunk-AUE7LM32.js +1 -0
- package/dist/{chunk-PIAD3F6M.js → chunk-AXL2VIWA.js} +1 -1
- package/dist/{chunk-CVVQQLCF.js → chunk-B2O3ANRZ.js} +1 -1
- package/dist/chunk-B3ZJGYZY.js +3 -0
- package/dist/{chunk-4SS6DXC7.js → chunk-BWN2QG6D.js} +1 -1
- package/dist/{chunk-6BNKBCCU.js → chunk-C3RFAKWR.js} +1 -1
- package/dist/{chunk-SNNZ4U2W.js → chunk-CCUQM4FX.js} +1 -1
- package/dist/{chunk-EITIW5OX.js → chunk-CGVROSPS.js} +1 -1
- package/dist/{chunk-7QUZWCJZ.js → chunk-CLUUA3HX.js} +1 -1
- package/dist/{chunk-X7HVAVSZ.js → chunk-CXI3RHPW.js} +1 -1
- package/dist/chunk-CYEEGTVZ.js +11 -0
- package/dist/{chunk-CZ22VZDA.js → chunk-D2KIGKBI.js} +108 -108
- package/dist/chunk-DBDTE3EE.js +5 -0
- package/dist/{chunk-YKS7MH3F.js → chunk-DLVB3237.js} +1 -1
- package/dist/{chunk-UZROQRLX.js → chunk-DN6X7SHW.js} +1 -1
- package/dist/{chunk-OGWPS55W.js → chunk-DZKFP6H2.js} +1 -1
- package/dist/{chunk-S67I4E7M.js → chunk-E5COIKGY.js} +1 -1
- package/dist/{chunk-CW2T7EOQ.js → chunk-E6RONHMT.js} +1 -1
- package/dist/{chunk-2CMEKSI7.js → chunk-EAZIQI2D.js} +1 -1
- package/dist/{chunk-FNLECT7B.js → chunk-EEY4FKAW.js} +1 -1
- package/dist/{chunk-YGYEM6QO.js → chunk-EKFPTBXC.js} +1 -1
- package/dist/{chunk-VW6QS7DO.js → chunk-ER6C5WS3.js} +1 -1
- package/dist/{chunk-MR2AUT7Q.js → chunk-ESFCYB46.js} +1 -1
- package/dist/{chunk-GRGFA26K.js → chunk-F3CK3EJJ.js} +1 -1
- package/dist/{chunk-M4BVLMPH.js → chunk-FEBOZ2XX.js} +1 -1
- package/dist/{chunk-5OMJFPQW.js → chunk-GNCVDN7U.js} +1 -1
- package/dist/{chunk-H4V55Y3Z.js → chunk-GQLNG537.js} +83 -83
- package/dist/{chunk-IEQ4UOH3.js → chunk-GVI3DWSB.js} +1 -1
- package/dist/{chunk-DFQ4WTET.js → chunk-GW7YIJPJ.js} +1 -1
- package/dist/{chunk-SFQEHDJY.js → chunk-H6GNKWYM.js} +1 -1
- package/dist/{chunk-5TB52UUV.js → chunk-H6GYBLVQ.js} +1 -1
- package/dist/chunk-HSKDFEXW.js +1 -0
- package/dist/{chunk-JYMDWR25.js → chunk-HTRJU4R4.js} +1 -1
- package/dist/{chunk-EMSF57ZB.js → chunk-HXZAY5OA.js} +1 -1
- package/dist/{chunk-WJSUIUBW.js → chunk-I4CEH7AK.js} +1 -1
- package/dist/{chunk-4ARCB6DT.js → chunk-I7PEEJVH.js} +1 -1
- package/dist/{chunk-CCQNP5YR.js → chunk-IHMATNOR.js} +1 -1
- package/dist/{chunk-N2RFDHRY.js → chunk-IHXGZW42.js} +1 -1
- package/dist/chunk-IJY3RJPJ.js +47 -0
- package/dist/{chunk-52FDK2LC.js → chunk-ISKQQXLZ.js} +1 -1
- package/dist/{chunk-UVRKTMF7.js → chunk-J55GQLP4.js} +1 -1
- package/dist/{chunk-3LVCG4JB.js → chunk-J5ERDFIC.js} +1 -1
- package/dist/{chunk-LWCTKI4Z.js → chunk-JLQRDFR5.js} +3 -3
- package/dist/{chunk-HCZG7YJ6.js → chunk-JPWRZ5SL.js} +1 -1
- package/dist/{chunk-BWRNXCVN.js → chunk-K7ZSPQKL.js} +1 -1
- package/dist/{chunk-4GCI2YCZ.js → chunk-KNWT7JLL.js} +1 -1
- package/dist/{chunk-U25W35TX.js → chunk-KZRLZWOU.js} +1 -1
- package/dist/chunk-L5TSPCSY.js +26 -0
- package/dist/{chunk-J6TW43TG.js → chunk-LEHBZKK3.js} +1 -1
- package/dist/chunk-LGXI7EGM.js +8 -0
- package/dist/{chunk-3A3DZVEJ.js → chunk-LHXFTFFM.js} +1 -1
- package/dist/{chunk-4RDFMBRG.js → chunk-LUGMXSRI.js} +1 -1
- package/dist/chunk-M2CWCOFU.js +11 -0
- package/dist/{chunk-2VSNFOKD.js → chunk-M5VIFG2V.js} +1 -1
- package/dist/{chunk-IWEKM5Y3.js → chunk-MADINS4Z.js} +1 -1
- package/dist/{chunk-VMMUJN4T.js → chunk-MEYVUHQH.js} +1 -1
- package/dist/{chunk-PEVIRAMR.js → chunk-MGHPF7HU.js} +1 -1
- package/dist/{chunk-ZT5WFUKJ.js → chunk-MHR5OHT5.js} +1 -1
- package/dist/{chunk-5NEGOQT6.js → chunk-MXEXP3HT.js} +1 -1
- package/dist/{chunk-IQVRP7CT.js → chunk-N57Y7THE.js} +1 -1
- package/dist/{chunk-FWB3GLMW.js → chunk-NVKJ7ZLP.js} +1 -1
- package/dist/{chunk-GQNOVEKP.js → chunk-NXAEBGMO.js} +1 -1
- package/dist/{chunk-PYIICTLX.js → chunk-OJULL7HT.js} +1 -1
- package/dist/{chunk-SL3VBI62.js → chunk-OMPQ7REW.js} +1 -1
- package/dist/{chunk-NK2MGR6A.js → chunk-OR4IJ4BQ.js} +1 -1
- package/dist/{chunk-CIK5BF7V.js → chunk-P2RMFHQP.js} +1 -1
- package/dist/{chunk-R7EMV77H.js → chunk-P4VZYOKO.js} +2 -2
- package/dist/{chunk-NDKSG4CC.js → chunk-PDZBKVWL.js} +1 -1
- package/dist/{chunk-QKVVJXWS.js → chunk-PF53E2DC.js} +1 -1
- package/dist/{chunk-XNNKLUTN.js → chunk-PLSS456F.js} +1 -1
- package/dist/{chunk-XM7YUXTF.js → chunk-PTSCGSQV.js} +2 -2
- package/dist/{chunk-KSDU4YOB.js → chunk-PWAT52M4.js} +1 -1
- package/dist/{chunk-NOH63WC6.js → chunk-Q2KWXZQB.js} +1 -1
- package/dist/{chunk-EGCWR5AS.js → chunk-Q4JYAUVL.js} +1 -1
- package/dist/{chunk-4CRBTSVP.js → chunk-Q5IC3IYY.js} +1 -1
- package/dist/{chunk-Z5SILNH2.js → chunk-QDCLL5OI.js} +1 -1
- package/dist/{chunk-VB7YQMAM.js → chunk-QEKGGTMN.js} +1 -1
- package/dist/{chunk-BJPDJIS4.js → chunk-QEVTBD33.js} +1 -1
- package/dist/{chunk-PZUGDE7N.js → chunk-QF5WKTPD.js} +1 -1
- package/dist/{chunk-7NSK77WG.js → chunk-QFSENE5T.js} +1 -1
- package/dist/{chunk-IUP7POIE.js → chunk-QQJNQNKP.js} +1 -1
- package/dist/{chunk-PSSYLJG4.js → chunk-QW52RPAU.js} +1 -1
- package/dist/{chunk-ULD7CIOY.js → chunk-R4UVIYZP.js} +1 -1
- package/dist/{chunk-M5TGCSUK.js → chunk-RLNIOJH3.js} +1 -1
- package/dist/{chunk-ZYQ2XWC5.js → chunk-RPCIFYCY.js} +1 -1
- package/dist/{chunk-C3KEDG33.js → chunk-RPVZ2JON.js} +1 -1
- package/dist/{chunk-I4OVLRQR.js → chunk-RW6G4ZPU.js} +1 -1
- package/dist/{chunk-4GOJQKY5.js → chunk-S4LOWCGS.js} +1 -1
- package/dist/{chunk-OQU3HLAE.js → chunk-S5P7KWY4.js} +1 -1
- package/dist/{chunk-UWMZ5CSB.js → chunk-SACNUF4I.js} +1 -1
- package/dist/chunk-SB27UOXX.js +1 -0
- package/dist/{chunk-YVVU4J5O.js → chunk-SHD4VV5V.js} +1 -1
- package/dist/{chunk-M7LPHCP2.js → chunk-SIL6HPMK.js} +2 -2
- package/dist/{chunk-AJMDF3QC.js → chunk-SK7EPN6C.js} +1 -1
- package/dist/{chunk-XITZIDCL.js → chunk-SLY27GDC.js} +1 -1
- package/dist/{chunk-C7V755IT.js → chunk-SNH4XZ6E.js} +1 -1
- package/dist/{chunk-POKY4RWR.js → chunk-T4XJKM6B.js} +1 -1
- package/dist/{chunk-7MVWDCI3.js → chunk-TAWCKJKP.js} +1 -1
- package/dist/{chunk-BCYTZ7LM.js → chunk-TFPW2VGN.js} +1 -1
- package/dist/{chunk-UOS2XLGG.js → chunk-TODZ3TJR.js} +1 -1
- package/dist/chunk-U2T5HPRD.js +319 -0
- package/dist/{chunk-XTREQ4A2.js → chunk-U6YOP562.js} +1 -1
- package/dist/{chunk-53BG3NLH.js → chunk-UBP3LQFY.js} +1 -1
- package/dist/{chunk-GFVKTWFT.js → chunk-UKWIWCOH.js} +1 -1
- package/dist/{chunk-GAMC2BNY.js → chunk-UPPO3BMT.js} +1 -1
- package/dist/{chunk-Q2XRITUG.js → chunk-URXM5A2K.js} +1 -1
- package/dist/chunk-USXIXANP.js +103 -0
- package/dist/{chunk-R2BDABJD.js → chunk-UUAKOX7E.js} +1 -1
- package/dist/{chunk-WGUOLSMG.js → chunk-UV5GAGAD.js} +1 -1
- package/dist/{chunk-AYL6KBPE.js → chunk-UXVXVI6O.js} +1 -1
- package/dist/{chunk-VWH3VPYI.js → chunk-UY6W2EVZ.js} +1 -1
- package/dist/{chunk-BVSKBX7T.js → chunk-UYELAINQ.js} +1 -1
- package/dist/{chunk-KDPQXURV.js → chunk-VAVXDIUX.js} +1 -1
- package/dist/{chunk-OX7UVDSU.js → chunk-VEUKT5EI.js} +1 -1
- package/dist/chunk-VGSH52JM.js +1 -0
- package/dist/chunk-VHZ6RL67.js +1 -0
- package/dist/{chunk-UK6576EO.js → chunk-VQA3X7O3.js} +1 -1
- package/dist/{chunk-TTEF7GTX.js → chunk-VZCMJRYV.js} +1 -1
- package/dist/{chunk-3G4HJO72.js → chunk-W37IFK3P.js} +1 -1
- package/dist/{chunk-LMQGNECW.js → chunk-W56ZGEQQ.js} +1 -1
- package/dist/{chunk-GCNA3HXH.js → chunk-WBVS5NBV.js} +1 -1
- package/dist/{chunk-XKRJKUA7.js → chunk-WCC52MR2.js} +1 -1
- package/dist/{chunk-LDU5T3DN.js → chunk-WESTVWWD.js} +1 -1
- package/dist/{chunk-24NUJTIH.js → chunk-WRZWHT6M.js} +1 -1
- package/dist/{chunk-4TI7U2PN.js → chunk-WSDKCQH6.js} +1 -1
- package/dist/{chunk-UIQL5ZF3.js → chunk-X2PFXSU4.js} +1 -1
- package/dist/{chunk-NB4BRW3H.js → chunk-X5NIAZA4.js} +1 -1
- package/dist/{chunk-RFGEM5JC.js → chunk-XBMD3FEZ.js} +1 -1
- package/dist/{chunk-I6FRVYGE.js → chunk-XDVPIGXE.js} +1 -1
- package/dist/chunk-XLIJYJ6Q.js +1 -0
- package/dist/chunk-XUHGWIWW.js +4 -0
- package/dist/{chunk-2ORRV7GH.js → chunk-XWSWXQCC.js} +1 -1
- package/dist/{chunk-Q66CI37F.js → chunk-Y55T4IIQ.js} +1 -1
- package/dist/{chunk-WMAFG2JD.js → chunk-Y5CVX5LJ.js} +1 -1
- package/dist/{chunk-VHUD3CBC.js → chunk-Y6J46XYF.js} +1 -1
- package/dist/{chunk-DJAZBPYA.js → chunk-YKMINHYY.js} +1 -1
- package/dist/{chunk-KKPOOIE4.js → chunk-YSWVYPWR.js} +1 -1
- package/dist/{chunk-D7NB7YR6.js → chunk-YV2TP44L.js} +1 -1
- package/dist/{chunk-7IFE4UQY.js → chunk-Z2WAW6MM.js} +1 -1
- package/dist/chunk-ZBL7XMJ6.js +25 -0
- package/dist/{chunk-YTUDXZLN.js → chunk-ZGBTO46A.js} +1 -1
- package/dist/{chunk-ZQDDRIBA.js → chunk-ZJOX5HW4.js} +4 -4
- package/dist/{chunk-MXJAH2GW.js → chunk-ZOOT3GBY.js} +1 -1
- package/dist/{chunk-ZAA2DXK5.js → chunk-ZRI3SSLG.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/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.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/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.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.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/{command-json-schema-2UMKY7MY.js → command-json-schema-F5XF7XHL.js} +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-RI3TL6I4.js → conf-store-5CBLWTOC.js} +1 -1
- package/dist/{custom-oclif-loader-IZCKN67O.js → custom-oclif-loader-UDVUFKMD.js} +1 -1
- package/dist/{deprecations-IFVUXXDB.js → deprecations-EOHPSTCS.js} +1 -1
- package/dist/dist-RNV3GFZ7.js +1 -0
- package/dist/dist-ZFKWJVNB.js +1 -0
- package/dist/{environments-CYMEN7NV.js → environments-4FLRZW4P.js} +1 -1
- package/dist/{error-IL6WQMSW.js → error-JY2ADS6S.js} +1 -1
- package/dist/{error-handler-74HKA23T.js → error-handler-4GCXKC6I.js} +1 -1
- package/dist/{fs-AINFLJ2E.js → fs-XS5YF34R.js} +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +12 -12
- package/dist/{is-global-2VLKV46Q.js → is-global-27MUENOK.js} +1 -1
- package/dist/{json-error-HZB5YIHV.js → json-error-S5XFS3UX.js} +1 -1
- package/dist/{local-KOZETREJ.js → local-OKPVB4NH.js} +1 -1
- package/dist/{metadata-IBPHZB7N.js → metadata-2YJBAKR7.js} +1 -1
- package/dist/{node-package-manager-DXSRNEDC.js → node-package-manager-B3OW3PFQ.js} +1 -1
- package/dist/{notifications-system-XA3EBOGJ.js → notifications-system-BWTDYBG2.js} +1 -1
- package/dist/{os-X73O7BAB.js → os-F6QKJCFW.js} +1 -1
- package/dist/{output-3OYXK3Z5.js → output-BRIPK7UC.js} +1 -1
- package/dist/{system-JWYYT4PM.js → system-466QKFDI.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-PCG5D6RZ.js → ui-VJTNGCS6.js} +1 -1
- package/dist/{upgrade-7U2TUNC4.js → upgrade-VHVJLXKX.js} +1 -1
- package/dist/{version-7DGU2KYH.js → version-FETZRLZO.js} +1 -1
- package/dist/version-T4XXTJMB.js +1 -0
- package/dist/{workerd-MQZ3NKJI.js → workerd-32DMKLMN.js} +1 -1
- package/oclif.manifest.json +6 -3
- package/package.json +7 -7
- package/dist/chunk-3C6VLJ5D.js +0 -319
- package/dist/chunk-4C2DAX5T.js +0 -1
- package/dist/chunk-7LAKWAKX.js +0 -25
- package/dist/chunk-7RPFJZLP.js +0 -1
- package/dist/chunk-CEIJKJOF.js +0 -11
- package/dist/chunk-DNMXVMJM.js +0 -47
- package/dist/chunk-FDXHQZTO.js +0 -26
- package/dist/chunk-JDR6UVZA.js +0 -8
- package/dist/chunk-JEA3C7ON.js +0 -3
- package/dist/chunk-JOJV5E2K.js +0 -1
- package/dist/chunk-LVLAOBJM.js +0 -103
- package/dist/chunk-OQ5CLM2H.js +0 -4
- package/dist/chunk-OVWUGAEU.js +0 -11
- package/dist/chunk-PMHP57MH.js +0 -20
- package/dist/chunk-RVQV6G5M.js +0 -1
- package/dist/chunk-T2IUXXCT.js +0 -1
- package/dist/chunk-WDFCOZAY.js +0 -16
- package/dist/chunk-X2H6I2WW.js +0 -5
- package/dist/chunk-ZGV3HNEV.js +0 -1
- package/dist/dist-4H2B7BMN.js +0 -1
- package/dist/dist-QNWOGQN3.js +0 -1
- package/dist/version-SXQTRBXB.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-
|
|
1
|
+
import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-P4VZYOKO.js";import{a as aA}from"./chunk-U2T5HPRD.js";import{c as tA,e as rA}from"./chunk-SK7EPN6C.js";import{T as bCe,b as pCe,j as R4,u as tf,v as vI}from"./chunk-GQLNG537.js";import{a as jF}from"./chunk-HSKDFEXW.js";import{f as b}from"./chunk-D2KIGKBI.js";import{c as $F}from"./chunk-GW7YIJPJ.js";import{h as eA}from"./chunk-M5VIFG2V.js";import{Bb as b7}from"./chunk-JLQRDFR5.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var uA=m(Vi=>{"use strict";o();var yCe=b();function sA(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e1(){}var Gi={d:{f:e1,r:function(){throw Error(sA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},ICe=Symbol.for("react.portal");function SCe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ICe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rf=yCe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function k4(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gi;Vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(sA(299));return SCe(e,t,null,r)};Vi.flushSync=function(e){var t=rf.T,r=Gi.p;try{if(rf.T=null,Gi.p=2,e)return e()}finally{rf.T=t,Gi.p=r,Gi.d.f()}};Vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gi.d.C(e,t))};Vi.prefetchDNS=function(e){typeof e=="string"&&Gi.d.D(e)};Vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Gi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):r==="script"&&Gi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=k4(t.as,t.crossOrigin);Gi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gi.d.M(e)};Vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin);Gi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=k4(t.as,t.crossOrigin);Gi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gi.d.m(e)};Vi.requestFormReset=function(e){Gi.d.r(e)};Vi.unstable_batchedUpdates=function(e,t){return e(t)};Vi.useFormState=function(e,t,r){return rf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return rf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var dA=m(Yi=>{"use strict";o();process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(y){return""+y}function r(y,S,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(w);var M=!1}catch{M=!0}return M&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object"),t(w)),{$$typeof:f,key:w==null?null:""+w,children:y,containerInfo:S,implementation:E}}function a(y,S){if(y==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function n(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":'something with type "'+typeof y+'"'}function i(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":typeof y=="string"?JSON.stringify(y):typeof y=="number"?"`"+y+"`":'something with type "'+typeof y+'"'}function u(){var y=I.H;return y===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
2
2
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
3
3
|
2. You might be breaking the Rules of Hooks
|
|
4
4
|
3. You might have more than one copy of React in the same app
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as dn}from"./chunk-
|
|
1
|
+
import{g as dn}from"./chunk-PTSCGSQV.js";import{a as be}from"./chunk-NVKJ7ZLP.js";import{A as Je,B as Ke,C as fn,D as mn,Ja as wn,Na as xn,ea as vn,ga as bn,l as we,m as Be,r as ln,s as pn,t as hn}from"./chunk-U2T5HPRD.js";import{O as Qe,_ as un,ma as gn,na as yn,t as Ve}from"./chunk-33ZE3DRQ.js";import{a as cn}from"./chunk-YV2TP44L.js";import{da as Qr}from"./chunk-RLNIOJH3.js";import{a as We}from"./chunk-TODZ3TJR.js";import{a as Jt}from"./chunk-HSKDFEXW.js";import{F as rn,Q as on}from"./chunk-D2KIGKBI.js";import{a as nn}from"./chunk-335BUVBP.js";import{h as A,k as sn}from"./chunk-M5VIFG2V.js";import{Bb as an,Da as ze,Fa as Xt,Ga as Zt,Sa as en,Ta as Ge,ab as tn,la as Kt,ma as Yt,na as de}from"./chunk-JLQRDFR5.js";import{b as d}from"./chunk-FZCGRIOM.js";import{b as Br}from"./chunk-YTUUU33R.js";import{c as b,d as R,e as k,f as w,g as ve,h as T,i as S,j as O,n as P,p as L}from"./chunk-IWTNUJGY.js";import{e as Qt,g as u}from"./chunk-VKWPEFWQ.js";u();var kn=Qt(Br(),1);function Sn(e){return kn.Flags.boolean({description:"Scan --path as an app with no app configuration file. Config checks are skipped. Requires --client-id.",env:"SHOPIFY_FLAG_WITHOUT_APP_CONFIG",exclusive:["config"],...e})}var Jr={path:be.path,config:be.config,"client-id":be["client-id"],"without-app-config":Sn({dependsOn:["client-id"]})},dd={...Jr,"without-app-config":Sn({relationships:[{type:"all",flags:[{name:"client-id",when:async e=>!e.all}]}]})};u();import{lstat as Kr}from"node:fs/promises";var Yr={confirmScanWithoutAppConfig:e=>rn({message:`No app configuration found at or above ${e}. Scan it without app configuration? Config checks will be skipped.`,confirmationMessage:"Yes, scan without app configuration",cancellationMessage:"No",defaultValue:!1}),pickClientId:async e=>(await bn(wn(e))).apiKey,pickConfigFile:async e=>(await pn(e)).valueOrAbort(),lookUpApp:async e=>{await vn({apiKey:e,offerReset:!1})}};function _n(e){return e.kind==="config"?S(e.appConfigFilePath):void 0}function Tn(e){return e.kind==="no-config"?e.clientId:e.clientIdOverride??e.configClientId}function Ed(e){return e.kind==="no-config"?e.clientId:e.clientIdOverride??S(e.appConfigFilePath,".toml")}async function Ad(e){let t=await ke(e.path);if(e.withoutAppConfig)return t;try{return await de((await Je.load(e.path)).directory)}catch(n){throw n instanceof Ke?new xe(e.path):n}}async function Id(e,t=Yr){if(e.withoutAppConfig){if(!e.clientId)throw new A("--without-app-config requires --client-id.");let n=await ke(e.path);return await Ye(e,t),{kind:"no-config",appDirectory:n,clientId:e.clientId,clientIdSource:"flag"}}await ke(e.path);try{let n=e.config?void 0:await Xr(e,t),{app:i,project:r,activeConfig:s}=await xn({directory:e.path,userProvidedConfigName:e.config??n?.fileName,skipPrompts:!e.allowPrompts});await Ye(e,t);let o=await de(i.directory);return{kind:"config",appDirectory:o,appConfigFilePath:b(o,S(i.configPath)),appConfigDirectories:await es(r,s.file),configClientId:i.configuration.client_id||void 0,clientIdOverride:e.clientId,appConfigFilePicked:n?.picked}}catch(n){if(!(n instanceof Ke))throw n;return Zr(e,t)}}async function Xr(e,t){let{directory:n}=await Je.load(e.path),i=hn(n)?.configFile;if(i&&Ge(b(n,i)))return;if(Ge(b(n,Ve.app)))return i?{fileName:Ve.app,picked:!1}:void 0;let r=(await ln(n)).map(s=>S(s));return r.length===1?{fileName:r[0],picked:!1}:((!e.allowPrompts||e.clientId)&&is(n,r,e.clientId),{fileName:await t.pickConfigFile(n),picked:!0})}async function Zr(e,t){if(!e.allowPrompts)throw new xe(e.path);let n=await ke(e.path);return await Ye(e,t),await t.confirmScanWithoutAppConfig(e.path)?e.clientId?{kind:"no-config",appDirectory:n,clientId:e.clientId,clientIdSource:"flag"}:{kind:"no-config",appDirectory:n,clientId:await t.pickClientId(n),clientIdSource:"picker"}:{kind:"declined"}}async function Ye(e,t){e.validateClientIdFlag&&e.clientId!==void 0&&await t.lookUpApp(e.clientId)}async function Rd(e){let t=[];for(let n of e){let i=k(L(),n),r=await En(i);if(r===void 0)throw new A(`--include-dir ${n}: directory doesn't exist.`);if(!await ze(r))throw new A(`--include-dir ${n}: not a directory.`);t.push(r)}return t}async function es(e,t){let n=[...fn(e,t),...mn(e,t)].map(r=>T(r.path)).filter(r=>!P(e.directory,r)),i=[];for(let r of new Set(n))await ts(e.directory,r)||i.push(await de(r));return i.sort()}async function ts(e,t){let n=w(e,t).split("/"),i=b(e,...n.filter(r=>r===".."));for(let r of n.filter(s=>s!==".."))if(i=b(i,r),(await Kr(i)).isSymbolicLink())return!0;return!1}function Cd(e,t,n=[]){let i=a=>b(e,w(e,a))!==R(a),r=t.find(i);if(r)throw new A(`--include-dir ${r}: must be on the same drive as the app directory.`);let s=n.find(i);if(s)throw new A(`Extension or web directory ${s}: must be on the same drive as the app directory.`);let o=[{directory:e,origin:"app_directory"},...t.map(a=>({directory:a,origin:"include_dir"})),...n.map(a=>({directory:a,origin:"app_config_directory"}))].filter((a,c,p)=>p.findIndex(({directory:l})=>l===a.directory)===c);return{scanDirectories:o.filter(a=>!o.some(({directory:c})=>c!==a.directory&&P(c,a.directory))),requestedScanDirectories:o.map(({directory:a})=>a)}}function ns(e){return{headline:`No app configuration found at or above ${e}.`,nextStep:"Pass `--path` to your app directory, or scan without app configuration with `--without-app-config --client-id <client-id>`."}}var xe=class extends A{constructor(t){let{headline:n,nextStep:i}=ns(t);super(n,i)}};function is(e,t,n){let i=t.map(r=>we(r)??r).join(", ");throw new A(`${t.length} app configurations found in ${e}, and none is selected.`,n?`\`--client-id\` can't be combined with \`--config\`, so first select one with \`shopify app config use <config>\`: ${i}.`:`Pass \`--config\` with one of: ${i}.`)}async function ke(e){let t=await En(e);if(t===void 0||!await ze(t))throw new A(`--path ${e}: not a directory.`);return t}async function En(e){return de(e).catch(()=>{})}u();import{realpathSync as rs}from"node:fs";var ss={include_dirs:[],excludes:[],no_git_ignore:!1};function An(e){try{return rs(e)}catch{return k(e)}}function os(e){return An(e)===An(L())?[]:[{flag:"--path",value:w(L(),e)}]}function as(e){if(e.kind==="no-config")return[{flag:"--client-id",value:e.clientId},"--without-app-config"];if(e.clientIdOverride)return[{flag:"--client-id",value:e.clientIdOverride}];let t=_n(e),n=t?we(t):void 0;return n?[{flag:"--config",value:n}]:[]}function cs(e){return[...e.include_dirs.map(t=>({flag:"--include-dir",value:t})),...e.excludes.map(t=>({flag:"--exclude",value:t})),...e.no_git_ignore?["--no-git-ignore"]:[]]}function Fd(e,t,n=ss){let i="shopify",r=s=>["app","security",s,...os(t),...as(e)];return{scan:{command:i,args:[...r("check"),...cs(n)]},record:{command:i,args:r("record"),stdinPlaceholder:"<findings.json>"},review:{command:i,args:r("review")},clean:{command:i,args:r("clean")}}}function In(e=process.platform,t=process.env){return e!=="win32"||ds(t)?"posix":ls(t)}function ds(e){if(e.MSYSTEM||e.CYGWIN)return!0;let t=e.SHELL??"";return/(?:^|[\\/])(bash|zsh|sh|fish|dash)(?:\.exe)?$/i.test(t)}function ls(e){return e.PROMPT?"cmd":e.POWERSHELL_DISTRIBUTION_CHANNEL||e.PSExecutionPolicyPreference||e.PSModulePath?"powershell":"cmd"}function ps(e,t){return t==="cmd"?us(e):t==="powershell"?`'${e.replaceAll("'","''")}'`:`'${e.replaceAll("'","'\\''")}'`}function us(e){return e.split("%").map(hs).join("^%")}function hs(e){let t=e.replace(/"/g,'""'),n=/\\+$/.exec(t)?.[0]??"";return`"${t}${n}"`}function Md(e,t=In()){let n=Rn(e,t);return e.stdinPlaceholder?t==="powershell"?`Get-Content -Raw -Encoding UTF8 ${e.stdinPlaceholder} | ${n}`:`${n} < ${e.stdinPlaceholder}`:n}function $d(e,t,n=In()){let i=Rn(e,n);if(n==="posix")return`${i} <<'EOF'
|
|
2
2
|
${t}
|
|
3
3
|
EOF`;if(n==="powershell")return`@'
|
|
4
4
|
${t}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as K,v as Y}from"./chunk-
|
|
1
|
+
import{p as K,v as Y}from"./chunk-YKMINHYY.js";import{a as B}from"./chunk-SACNUF4I.js";import{c as C,m as z}from"./chunk-PTSCGSQV.js";import{b as J,c as V}from"./chunk-3KM5ZOW2.js";import{B as H,C as $,E as b,I as T,K as M,W as w}from"./chunk-D2KIGKBI.js";import{a as P}from"./chunk-BN7ZXAZJ.js";import{f as D,h as E,j as W}from"./chunk-M5VIFG2V.js";import{Ba as _,Sa as G,Ua as j,ja as N,la as I,ta as A,wb as q,za as O}from"./chunk-JLQRDFR5.js";import{b as i,i as U}from"./chunk-FZCGRIOM.js";import{b as le}from"./chunk-YTUUU33R.js";import{c as s,g as x}from"./chunk-IWTNUJGY.js";import{e as ae,g as m}from"./chunk-VKWPEFWQ.js";m();m();var u="https://github.com/Shopify/skeleton-theme.git",ce="https://github.com/Shopify/theme-liquid-docs.git",k={all:"All",github:"VS Code (GitHub Copilot)",cursor:"Cursor",claude:"Claude"};async function X(t,e){return v(t,e)}async function Z(t,e){return v(t,e,!0)}async function ee(t){let e=await B("Shopify","skeleton-theme",{filter:n=>!n.draft&&!n.prerelease});if(!e)throw new E("Couldn't find a stable Skeleton theme release");return{...await v(`${u}#${e.tag_name}`,t),repoUrl:u,latest:!0}}async function v(t,e,o){return await T([{title:`Cloning ${t} into ${e}`,task:async()=>{await C({repoUrl:t,destination:e,latestTag:o,shallow:!o}),await z(e),t.split("#")[0]===u&&(await Promise.all(Object.keys(k).map(async n=>Q(s(e,`.${n}`)))),await Q(s(e,".git")))}}]),{path:e,repoUrl:t,latest:o??!1,aiInstructions:null,instructionFiles:[]}}async function Q(t){await G(t)&&await _(t)}async function te(){return await b({message:"Which LLM instruction file would you like to include in your theme?",choices:[...Object.entries(k).map(([e,o])=>({label:o,value:e})),{label:"Skip",value:null}]})}async function oe(t,e){let o=[],n=[s(t,"AGENTS.md")];return await T([{title:`Adding AI instructions into ${t}`,task:async()=>{await N(async p=>{await C({repoUrl:ce,destination:p,shallow:!0});let h=e==="all"?Object.keys(k).filter(r=>r!=="all"):[e];try{let r=s(p,"ai","github","copilot-instructions.md"),d=await I(r),f=s(t,"AGENTS.md"),L=`# AGENTS.md
|
|
2
2
|
|
|
3
3
|
${d}`;await A(f,L);let a=await Promise.all(h.map(l=>me(t,f,l)));n.push(...h.flatMap(l=>l==="cursor"?[]:[s(t,l==="github"?"copilot-instructions.md":"CLAUDE.md")])),a.forEach(l=>{l.copiedFile&&o.push(l.copiedFile)})}catch{throw new E("Failed to create AI instructions")}})}}]),{files:n,copiedFiles:o}}async function me(t,e,o){if(o==="cursor")return{};let p={github:"copilot-instructions.md",claude:"CLAUDE.md"}[o],h=s(t,p);try{return await O(e,h),{}}catch(r){if(r instanceof Error){let d=await I(e);return await A(h,d),{copiedFile:p}}else throw r}}m();import{resolve as ne}from"node:path";var ue=i.enum(["all","github","cursor","claude"]).nullable(),F=i.string().refine(x).describe("An absolute native filesystem path."),S=P({name:"ThemeInitResult",definitions:{AbsolutePath:F},schema:i.object({status:i.enum(["success","partial"]),changed:i.literal(!0),directory:F,repoUrl:i.string().min(1).describe("The source Git remote (including HTTPS, SSH, or SCP-style Git URLs)."),latest:i.boolean(),aiInstructions:ue,instructionFilePaths:i.array(F).nullable().describe("Created instruction files, or null when setup failed before their completion could be established."),reason:i.string().nullable().describe("The reason for incomplete setup, or null when setup completed.")}).strict()});function re(t){return{status:t.status??"success",changed:!0,directory:ne(t.path),repoUrl:t.repoUrl,latest:t.latest,aiInstructions:t.aiInstructions,instructionFilePaths:t.status==="partial"?null:t.instructionFiles.map(e=>ne(e)),reason:t.reason??null}}m();function ie(t,e){e==="json"&&q(S.encode(re(t)))}function se(t){if(t.length===0)return;let e="Files created instead of symlinks.",o=`Shopify CLI attempted to create symbolic links between AGENTS.md and ${t.join(", ")}, but your system doesn't have Developer Mode enabled or symlinks are disabled. Separate files were created instead.`;H({headline:e,body:o})}var y=ae(le(),1);var R=class extends Y{static get jsonOutputSchema(){return S}static summary="Clones a Git repository to use as a starting point for building a new theme.";static descriptionWithMarkdown=`Clones a Git repository to your local machine to use as the starting point for building a theme.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk-
|
|
1
|
+
import{b as e}from"./chunk-ZJOX5HW4.js";import{b as t,c as a}from"./chunk-3KM5ZOW2.js";import{h as r}from"./chunk-M5VIFG2V.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var o=class extends e{static hidden=!0;static strict=!1;static summary="App logs were removed in Shopify CLI 5.0.";static flags={...t,...a};async run(){throw new r("`shopify app logs` and `shopify app logs sources` were removed in Shopify CLI 5.0. To see Function logs, run `shopify app dev`.")}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-PLSS456F.js";import{a as t}from"./chunk-XUHGWIWW.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a=class extends t{static hidden=!0;static flags={...t.flags};static baseFlags={...t.baseFlags};async run(){return r({from:"app import-custom-data-definitions",to:"app import custom-data-definitions"}),super.run()}};export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-XDVPIGXE.js";import{b as i}from"./chunk-ZJOX5HW4.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as i,c as r,d as p}from"./chunk-
|
|
1
|
+
import{b as i,c as r,d as p}from"./chunk-XWSWXQCC.js";import{b as o}from"./chunk-ZJOX5HW4.js";import{b as s,c as e}from"./chunk-3KM5ZOW2.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class u extends o{static summary="Disable automatic upgrades for Shopify CLI.";static descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
|
|
2
2
|
|
|
3
3
|
When auto-upgrade is disabled, Shopify CLI won't automatically update. Run \`shopify upgrade\` to update manually.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-VGSH52JM.js";import{a as n}from"./chunk-NVKJ7ZLP.js";import{F as s,G as c,H as f,L as m,Na as g,t as p}from"./chunk-U2T5HPRD.js";import{b as r,c as e}from"./chunk-3KM5ZOW2.js";import{b as F}from"./chunk-YTUUU33R.js";import{e as A,g as a}from"./chunk-VKWPEFWQ.js";a();var u=A(F(),1);var{config:U,...w}=n,o=class d extends l{static summary="Activate an app configuration.";static descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";static get jsonOutputSchema(){return s}static description=this.descriptionForHelp();static usage="app config use [config] [flags]";static flags={...r,...e,...w};static args={config:u.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};async run(){let{flags:t,args:i}=await this.parse(d),h=p(t.path)?.configFile??null,{app:y}=await g({directory:t.path,userProvidedConfigName:i.config});await m(t.path);let C=await f({directory:t.path,configName:i.config,reset:t.reset,previousConfigFile:h});return await c(C,t.path,t.json?"json":"text"),{app:y}}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-N57Y7THE.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function r(d){await t.addPublicMetadata(()=>d)}export{r as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as P}from"./chunk-6PUU6ZNQ.js";import{a as N}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-6PUU6ZNQ.js";import{a as N}from"./chunk-PWAT52M4.js";import{a as l}from"./chunk-QW52RPAU.js";import{a as U}from"./chunk-YY6TFARF.js";import{a as J,b as _}from"./chunk-2L6AN3QA.js";import{b as E,c as h,e as R,g as C,h as T}from"./chunk-QFWWCZOI.js";import{r as O}from"./chunk-H6GYBLVQ.js";import{p as c,v as x}from"./chunk-YKMINHYY.js";import{b as S,c as j,f as F}from"./chunk-3KM5ZOW2.js";import{A as y,C as u,F as D,X as a}from"./chunk-D2KIGKBI.js";import{h as v}from"./chunk-M5VIFG2V.js";import{wb as q}from"./chunk-JLQRDFR5.js";import{b as t}from"./chunk-FZCGRIOM.js";import{b as k}from"./chunk-YTUUU33R.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();var d=t.object({id:t.number(),name:t.string(),role:t.string()}),G=d.extend({shop:t.string(),preview_url:t.string().optional()}),B=t.object({status:t.literal("failed"),message:t.string(),errors:t.array(t.string()),requestId:t.string().optional()}),z=t.discriminatedUnion("status",[P.extend({originalTheme:d,theme:G}),B]),p=R({name:"ThemeDuplicateResult",schema:t.object({status:t.literal("success"),changed:t.boolean(),originalTheme:h,theme:h.extend({storeDomain:E,previewUrl:t.string().url().nullable()}).strict()}).strict(),definitions:{Theme:h},project(e){let r=z.parse(e);if(r.status==="failed")throw new TypeError("Failed duplications use the shared fatal error document.");return{status:r.status,changed:!0,originalTheme:T(r.originalTheme),theme:{...T(r.theme),storeDomain:C(r.theme.shop),previewUrl:r.theme.preview_url??null}}}}),A=t.discriminatedUnion("status",[t.object({status:t.literal("missing-theme-id")}),t.object({status:t.literal("not-found"),themeId:t.string()}),t.object({status:t.literal("development-theme")}),t.object({status:t.literal("cancelled")}),t.object({status:t.literal("completed"),originalTheme:d.extend({createdAtRuntime:t.boolean().default(!1),processing:t.boolean().default(!1)}),shop:t.string(),previewUrl:t.string().optional(),theme:d.optional(),userErrors:t.array(t.object({field:t.array(t.string()).nullish(),message:t.string()})),requestId:t.string().optional()})]);i();function w(e){if(e.status==="cancelled")return{status:"cancelled"};let r=M(e);if(r.status==="failed"){let o=new v(r.message.trim());throw o.details={errors:r.errors,...r.requestId?{requestId:r.requestId}:{}},o}return r}function Y(e,r){if(r==="json"){q(p.encode(w(e)));return}if(e.status==="cancelled")return;let o=M(e);o.status==="failed"&&(process.exitCode=1),e.status==="completed"?V(e):"message"in o&&u({body:[o.message]})}function M(e){switch(e.status){case"missing-theme-id":return{status:"failed",message:"A theme ID is required to duplicate a theme, specify one with the --theme flag",errors:[]};case"not-found":return{status:"failed",message:`No theme with ID ${e.themeId} could be found. Use shopify theme list to find a theme ID.`,errors:[]};case"development-theme":return{status:"failed",message:"Development themes can't be duplicated. Use shopify theme push to upload it to the store first.",errors:[]};case"completed":{if(e.userErrors.length>0)return{status:"failed",message:`The theme '${e.originalTheme.name}' could not be duplicated due to errors`,errors:e.userErrors.map(r=>r.message),requestId:e.requestId};if(e.theme){let{id:r,name:o,role:s}=e.theme;return{status:"success",originalTheme:e.originalTheme,theme:{id:r,name:o,role:s,shop:e.shop,preview_url:e.previewUrl}}}return{status:"failed",message:`The theme '${e.originalTheme.name}' unexpectedly could not be duplicated `,errors:[],requestId:e.requestId}}}}function V(e){let r=e.originalTheme;if(e.userErrors&&e.userErrors.length>0){let o=e.userErrors.map(s=>s.message).join(", ");u({body:["The theme",...l(r),"could not be duplicated due to errors: ",{subdued:o},{char:"."},...e.requestId?[`
|
|
2
2
|
Request ID: `,{subdued:e.requestId}]:[]]})}else e.theme?y({body:["The theme",...l(r),"has been duplicated",{char:"."}],nextSteps:[[{link:{label:"View the duplicated theme",url:e.previewUrl}}]]}):u({body:["The theme",...l(r),"unexpectedly could not be duplicated",{char:"."},...e.requestId?[`
|
|
3
3
|
Request ID: `,{subdued:e.requestId}]:[]]})}i();async function $(e,r,o,s=!1){let{name:m,force:H}=o,I=a()||!!H||s;if(I&&!r)return{status:"missing-theme-id"};let n=r?await _(e,r):await J(e,{header:"Select a theme to duplicate",filter:{theme:r}});if(!n)return{status:"not-found",themeId:r};if(n?.role==="development")return{status:"development-theme"};if(!I&&!await D({message:`Do you want to duplicate '${n.name}' on ${e.storeFqdn}?`,confirmationMessage:`Yes, duplicate '${n.name}'`,cancellationMessage:"No, cancel duplicate"}))return{status:"cancelled"};let g=await O(n.id,m,e);return A.parse({status:"completed",originalTheme:n,shop:e.storeFqdn,previewUrl:g.theme?U(g.theme,e):void 0,...g})}var f=L(k(),1);var b=class extends x{static get jsonOutputSchema(){return p}static summary="Duplicates a theme from your theme library.";static usage=["theme duplicate","theme duplicate --theme 10 --name 'New Theme'"];static descriptionWithMarkdown="If you want to duplicate your local theme, you need to run `shopify theme push` first.\n\nIf no theme ID is specified, you're prompted to select the theme that you want to duplicate from the list of themes in your store. You're asked to confirm that you want to duplicate the specified theme.\n\nPrompts and confirmations are not shown when duplicate is run in a CI environment or the `--force` flag is used, therefore you must specify a theme ID using the `--theme` flag.\n\nYou can optionally name the duplicated theme using the `--name` flag.\n\nIf you use the `--json` flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.\n\nSuccessful JSON results include `status`, `changed`, and explicit `originalTheme` and `theme` resources with decimal string IDs. Failures use the shared `{error}` document.";static description=this.descriptionForHelp();static flags={...S,...j,password:c.password,theme:F(f.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})),name:f.Flags.string({char:"n",description:"Name of the newly duplicated theme.",env:"SHOPIFY_FLAG_NAME"}),store:c.store,environment:c.environment,force:f.Flags.boolean({char:"f",description:"Force the duplicate operation to run without prompts or confirmations. Required if non interactive outside CI.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=["store","password","theme"];static nonTTYFlagRequirements(){return[{flags:["force"],when:()=>!a()}]}async command(r,o,s=!1){N(r);let m=await $(o,r.theme,r,s);if(r.json&&s)return w(m);Y(m,r.json?"json":"text")}requiresEnvironmentConfirmation(r){return!a()&&super.requiresEnvironmentConfirmation(r)}};export{b as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as x,c as D,f as M}from"./chunk-
|
|
1
|
+
import{b as x,c as D,f as M}from"./chunk-T4XJKM6B.js";import{a as o}from"./chunk-HSKDFEXW.js";import{A as y,E as s,H as h,K as e}from"./chunk-D2KIGKBI.js";import{d as w}from"./chunk-335BUVBP.js";import{ta as u,yb as _}from"./chunk-JLQRDFR5.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
|
|
2
2
|
`)}export{$ as a,j as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as r,ka as o}from"./chunk-U2T5HPRD.js";import{ea as i,ha as n}from"./chunk-33ZE3DRQ.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function m(S,e,c){await o(e,c.source);let t=await i(e);return t||n(),{variables:[{name:"SHOPIFY_API_KEY",value:e.apiKey,isSecret:!1},t?{name:"SHOPIFY_API_SECRET",value:t,isSecret:!0}:{name:"SHOPIFY_API_SECRET",isSecret:!0},{name:"SCOPES",value:r(S.configuration),isSecret:!1}]}}export{m as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as $}from"./chunk-J55GQLP4.js";import{a as V}from"./chunk-VHZ6RL67.js";import{a as L}from"./chunk-NVKJ7ZLP.js";import{L as w,Ma as x}from"./chunk-U2T5HPRD.js";import{fa as P}from"./chunk-33ZE3DRQ.js";import{e as E}from"./chunk-SK7EPN6C.js";import{b as ae}from"./chunk-TODZ3TJR.js";import{D,S as T,ea as A,ia as j,u as g}from"./chunk-GQLNG537.js";import{b as I,c as M}from"./chunk-3KM5ZOW2.js";import{I as R,J as k,z as O}from"./chunk-D2KIGKBI.js";import{a as h}from"./chunk-BN7ZXAZJ.js";import{qb as p,sb as c,wb as C,yb as v}from"./chunk-JLQRDFR5.js";import{b as m}from"./chunk-FZCGRIOM.js";import{b as te}from"./chunk-YTUUU33R.js";import{e as _,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}},{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:"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:"30"}},{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:"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:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetafieldForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetafieldForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetafieldDefinition"}},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:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}},{kind:"Field",name:{kind:"Name",value:"customerAccount"}}]}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adminFilterable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]};r();async function de(i){let n="Admin",e=E(i.storeFqdn,"unstable");return{token:i.token,api:n,url:e}}async function U(i){return j({query:i.query,...await de(i.session),variables:i.variables,autoRateLimitRestore:i.autoRateLimitRestore})}r();var K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metaobjectDefinitions"},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:"metaobjectDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}},{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:"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:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetaobjectForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetaobjectForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetaobjectDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}}]}},{kind:"Field",name:{kind:"Name",value:"displayNameKey"}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publishable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"translatable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"renderable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaTitleKey"}},{kind:"Field",name:{kind:"Name",value:"metaDescriptionKey"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"fieldDefinitions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{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:"description"}},{kind:"Field",name:{kind:"Name",value:"required"}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]}}]};var H=_(ae(),1);var oe={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",customer:"CUSTOMER",delivery_customization:"DELIVERY_CUSTOMIZATION",delivery_method:"DELIVERY_METHOD",delivery_option_generator:"DELIVERY_OPTION_GENERATOR",discount:"DISCOUNT",draft_order:"DRAFTORDER",fulfillment_constraint_rule:"FULFILLMENT_CONSTRAINT_RULE",gift_card_transaction:"GIFT_CARD_TRANSACTION",order_routing_location_rule:"ORDER_ROUTING_LOCATION_RULE",payment_customization:"PAYMENT_CUSTOMIZATION",selling_plan:"SELLING_PLAN",shop:"SHOP",validation:"VALIDATION",variant:"PRODUCTVARIANT",cart_transform:"CARTTRANSFORM"};async function B({query:i,session:n,toNodes:e,toVariables:t,performQuery:d=a=>U({query:i,session:n,variables:a,autoRateLimitRestore:!0})}){let a;try{let o=e(await d(t(a))),s=[];for(s.push(...o.nodes);o.pageInfo.hasNextPage;)a=o.pageInfo.endCursor,o=e(await d(t(a))),s.push(...o.nodes);return{status:"ok",items:s}}catch(o){if(o instanceof Error&&o.message.includes("ACCESS_DENIED"))return{status:"scope_error"};throw o}}function G(i,n){let e="";for(let t of i)e=(0,H.updateTomlValues)(e,t);return`# ${n}
|
|
2
|
+
${e}`}function se(i,n){let e=n.map(fe).map(a=>{switch(a.status){case"ok":{let{typeName:o,patches:s}=a;return G(s,`type: $app:${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null),t=i.flatMap(({items:a,ownerType:o,graphQLOwner:s})=>a.map(l=>({result:pe(l,o),graphQLOwner:s}))).map(({result:a,graphQLOwner:o})=>{switch(a.status){case"ok":{let{namespace:s,key:l,patches:S}=a;return G(S,`namespace: ${s==="app"?"$app":`$app:${s}`} key: ${l} owner_type: ${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null);return{tomlContent:[...e,...t].join(`
|
|
3
|
+
`),metafieldCount:t.length,metaobjectCount:e.length}}async function Y(i){let n=await ue(i),e=await le(n),t=await re(n),d=e.nodes,a=t.nodes;i.includeExistingDeclaredDefinitions||(d=me(d,i.appConfiguration),a=ce(a,i.appConfiguration));let{tomlContent:o,metafieldCount:s,metaobjectCount:l}=se(d,a);return{status:"success",storeDomain:n.storeFqdn,metafieldCount:s,metaobjectCount:l,tomlContent:o,skippedSections:[...e.skippedSections,...t.skippedSections]}}async function le(i){let n=[];return await R(Object.entries(oe).map(([e,t])=>({title:c`Loading ${p.green(e)} metafields`,task:async()=>{let d=await B({query:q,session:i,toNodes:a=>a.metafieldDefinitions,toVariables:a=>({ownerType:t,after:a})});n.push({metafields:d,ownerType:e,graphQLOwner:t})}}))),{nodes:n.map(({metafields:e,ownerType:t,graphQLOwner:d})=>e.status==="ok"?{ownerType:t,items:e.items,graphQLOwner:d}:null).filter(e=>e!==null),skippedSections:n.filter(({metafields:e})=>e.status==="scope_error").map(({graphQLOwner:e})=>({type:"metafields",ownerType:e}))}}async function re(i){let n=await k({title:c`Loading ${p.green("metaobjects")}`,task:async()=>B({query:K,session:i,toNodes:e=>e.metaobjectDefinitions,toVariables:e=>({after:e})})});return n.status==="ok"?{nodes:n.items,skippedSections:[]}:{nodes:[],skippedSections:[{type:"metaobjects"}]}}function me(i,n){return i.map(e=>{let t=e.items.filter(d=>!J(n,[e.ownerType,"metafields",f(d.namespace)??"",d.key]));return t.length>0?{...e,items:t}:null}).filter(e=>e!==null)}function ce(i,n){return i.filter(e=>!J(n,["metaobjects","app",f(e.type)??""]))}function J(i,n){let e=i;for(let t of n){if(!e[t])return!1;e=e[t]}return!0}async function ue(i){let{remoteApp:n,store:e}=i,t=await P(n);return await T(e.shopDomain,n.apiKey,t)}function f(i){if(!i.match(/^app--\d+/))return null;let n="app";return i.match(/^app--\d+--/)&&(n=i.replace(/^app--\d+--/,"")),n}function pe(i,n){let e=f(i.namespace);if(!e)return{status:"not_app_reserved"};let t=i.key,d=ke(i),a=be(d,n,e,t);return{status:"ok",key:t,namespace:e,patches:a}}function fe(i){let n=f(i.type);if(!n)return{status:"not_app_reserved"};let e=ve(i,n),t=Ne(e,n);return{status:"ok",typeName:n,patches:t}}function ke(i){let n={name:i.name===i.key?void 0:i.name,type:i.type.name,description:i.description??void 0,capabilities:u({admin_filterable:i.capabilities.adminFilterable.enabled||void 0}),access:u({admin:Z(i.access.admin),storefront:X(i.access.storefront),customer_account:Se(i.access.customerAccount)}),validations:z(i.validations)},{type:e,validations:t}=W(n.type,n.validations);return n.type=e,n.validations=t,n}function ve(i,n){return{name:i.name===n?void 0:i.name,description:i.description??void 0,display_name_field:i.displayNameKey??void 0,access:u({admin:Z(i.access.admin),storefront:X(i.access.storefront)}),capabilities:u({translatable:i.capabilities.translatable.enabled||void 0,publishable:i.capabilities.publishable.enabled||void 0,renderable:i.capabilities.renderable?.enabled||void 0,renderable_meta_title_field:i.capabilities.renderable?.data?.metaTitleKey??void 0,renderable_meta_description_field:i.capabilities.renderable?.data?.metaDescriptionKey??void 0}),fields:Object.fromEntries(i.fieldDefinitions.map(e=>{let t={type:e.type.name,description:e.description??void 0,name:e.name===e.key?void 0:e.name,required:e.required||void 0,validations:z(e.validations)},{type:d,validations:a}=W(t.type,t.validations);return t.type=d,t.validations=a,[e.key,t]}))}}function W(i,n){if(!n)return{type:i,validations:void 0};if(n.metaobject_definition_type&&typeof n.metaobject_definition_type=="string"){let e=f(n.metaobject_definition_type);return{type:`${i}<$app:${e}>`,validations:u({...n,metaobject_definition_type:void 0})}}if(n.metaobject_definition_types&&Array.isArray(n.metaobject_definition_types)&&n.metaobject_definition_types.every(e=>typeof e=="string")){let e=n.metaobject_definition_types.map(t=>f(t));return{type:`${i}<${e.map(t=>`$app:${t}`).join(",")}>`,validations:u({...n,metaobject_definition_types:void 0})}}return{type:i,validations:n}}function z(i){let n=e=>{try{return JSON.parse(e)}catch{return e}};return u(Object.fromEntries(i.filter(e=>e.value!==void 0&&e.name!=="metaobject_definition_id"&&e.name!=="metaobject_definition_ids").map(e=>[e.name,e.value?n(e.value):void 0])))}function be(i,n,e,t){let d=[[[n,"metafields",e,t,"name"],i.name],[[n,"metafields",e,t,"type"],i.type],[[n,"metafields",e,t,"description"],i.description]],a=[[[n,"metafields",e,t,"access","admin"],i.access?.admin],[[n,"metafields",e,t,"access","storefront"],i.access?.storefront],[[n,"metafields",e,t,"access","customer_account"],i.access?.customer_account],[[n,"metafields",e,t,"capabilities","admin_filterable"],i.capabilities?.admin_filterable||void 0]];return i.validations&&Q(i.validations).forEach(({validationKey:s,actualValue:l})=>{d.push([[n,"metafields",e,t,"validations",s],l])}),[b(d),b(a)]}function Ne(i,n){let e=[[["metaobjects","app",n,"name"],i.name===n?void 0:i.name],[["metaobjects","app",n,"description"],i.description],[["metaobjects","app",n,"display_name_field"],i.display_name_field]],t=[[["metaobjects","app",n,"access","admin"],i.access?.admin],[["metaobjects","app",n,"access","storefront"],i.access?.storefront]];return i.capabilities?.translatable&&t.push([["metaobjects","app",n,"capabilities","translatable"],!0]),i.capabilities?.publishable&&t.push([["metaobjects","app",n,"capabilities","publishable"],!0]),i.capabilities?.renderable&&(t.push([["metaobjects","app",n,"capabilities","renderable"],!0]),i.capabilities?.renderable_meta_title_field&&t.push([["metaobjects","app",n,"capabilities","renderable_meta_title_field"],i.capabilities.renderable_meta_title_field]),i.capabilities?.renderable_meta_description_field&&t.push([["metaobjects","app",n,"capabilities","renderable_meta_description_field"],i.capabilities.renderable_meta_description_field])),Object.entries(i.fields).forEach(([d,a])=>{if(typeof a=="string")e.push([["metaobjects","app",n,"fields",d],a]);else{let o=Object.fromEntries(Object.entries(a).filter(([s,l])=>l!==void 0));Object.keys(o).length===1?e.push([["metaobjects","app",n,"fields",d],a.type]):(e.push([["metaobjects","app",n,"fields",d,"type"],a.type]),e.push([["metaobjects","app",n,"fields",d,"description"],a.description]),e.push([["metaobjects","app",n,"fields",d,"name"],a.name]),e.push([["metaobjects","app",n,"fields",d,"required"],a.required||void 0]),a.validations&&Q(a.validations).forEach(({validationKey:l,actualValue:S})=>{e.push([["metaobjects","app",n,"fields",d,"validations",l],S])}))}}),[b(e),b(t)]}function Q(i){return Object.entries(i).map(([n,e])=>{let t;return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||Array.isArray(e)&&e.every(d=>typeof d=="string")?t=e:t=JSON.stringify(e),{validationKey:n,actualValue:t}})}function Z(i){switch(i){case"MERCHANT_READ_WRITE":return"merchant_read_write";case"MERCHANT_READ":case"PRIVATE":case"PUBLIC_READ":case"PUBLIC_READ_WRITE":case null:case void 0:return}}function X(i){switch(i){case"PUBLIC_READ":return"public_read";case"NONE":case null:case void 0:return}}function Se(i){switch(i){case"READ":return"read";case"READ_WRITE":return"read_write";case"NONE":case null:case void 0:return}}function u(i){if(i&&!A(i)&&!(typeof i=="object"&&Object.values(i).every(n=>n===void 0)))return i}function b(i){return i.filter(([n,e])=>e!==void 0)}r();var ee=m.object({type:m.literal("metafields"),ownerType:m.string().min(1).describe("The Admin API metafield owner type, such as PRODUCT.")}).strict(),ie=m.object({type:m.literal("metaobjects")}).strict(),N=h({name:"ImportCustomDataDefinitionsResult",schema:m.object({status:m.literal("success"),storeDomain:m.string().nullable().describe("The full myshopify.com domain of the development store, or null when unavailable."),metafieldCount:m.number().int().nonnegative().describe("The number of available metafields converted to TOML."),metaobjectCount:m.number().int().nonnegative().describe("The number of available metaobjects converted to TOML."),toml:m.string().describe("Suggested native TOML for app-reserved definitions. No file is written."),skippedSections:m.array(m.discriminatedUnion("type",[ee,ie])).describe("Sections skipped because required access scopes are unavailable. An empty array means all requests were authorized.")}).strict(),definitions:{SkippedMetafields:ee,SkippedMetaobjects:ie}});r();function ne({status:i,metafieldCount:n,metaobjectCount:e,storeDomain:t,tomlContent:d,skippedSections:a},o=!1){if(o){let s=D(t);C(N.encode({status:i,storeDomain:s?`${s}.myshopify.com`:null,metafieldCount:n,metaobjectCount:e,toml:d,skippedSections:a.map(l=>l.type==="metafields"?{type:l.type,ownerType:l.ownerType}:{type:l.type})}));return}O({headline:"Conversion to TOML complete.",body:["Converted",{warn:`${n} metafields`},"and",{warn:`${e} metaobjects`},"from",{warn:t},"into TOML, ready for you to copy."],orderedNextSteps:!0,nextSteps:["Review the suggested TOML carefully before applying.",["Missing sections? Make sure your app has the required access scopes to load metafields and metaobjects (e.g.",{command:"read_customers"},"to load customer metafields,",{command:"read_metaobject_definitions"},"to load metaobjects.)"],["Missing definitions? Only metafields and metaobjects that are app-reserved (using",{command:"$app"},") will be converted."],["When you're ready, add the generated TOML to your app's configuration file and test out changes with the",{command:"shopify app dev"},"command."]]}),ye(d)}function ye(i){let n=i.split(`
|
|
4
|
+
`);for(let e of n)e.match(/^\s*\[/)?v(c`${p.green(e)}`):e.match(/^\s*#/)?v(c`${p.gray(e)}`):v(c`${e}`)}var y=_(te(),1);var F=class i extends V{static summary="Import metafield and metaobject definitions.";static descriptionWithMarkdown="Import metafield and metaobject definitions from your development store. [Read more about declarative custom data definitions](https://shopify.dev/docs/apps/build/custom-data/declarative-custom-data-definitions).";static get jsonOutputSchema(){return N}static description=this.descriptionForHelp();static flags={...I,...L,...M,store:y.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",parse:async n=>g(n)}),"include-existing":y.Flags.boolean({description:"Include existing declared definitions in the output.",default:!1,env:"SHOPIFY_FLAG_INCLUDE_EXISTING"})};async run(){let{appContextResult:n,json:e,...t}=await k({title:c`Loading application`,task:async()=>{let{flags:a}=await this.parse(i);await w(a.path);let o=await x({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config}),s=await $({appContextResult:o,storeFqdn:a.store,forceReselectStore:a.reset});return{appContextResult:o,json:a.json,appConfiguration:o.app.configuration,remoteApp:o.remoteApp,store:s,includeExistingDeclaredDefinitions:a["include-existing"]}}}),d=await Y(t);return ne(d,e),{app:n.app}}};export{F as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r,t as a}from"./chunk-
|
|
1
|
+
import{s as r,t as a}from"./chunk-MHR5OHT5.js";import{z as p}from"./chunk-D2KIGKBI.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{wb as n}from"./chunk-JLQRDFR5.js";import{b as o}from"./chunk-FZCGRIOM.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();function l(){return{enabled:r()}}function f(t){return a(t),{enabled:t}}e();var d=u({name:"AutoUpgradeResult",schema:o.object({enabled:o.boolean()}).strict()});e();function S(t,m){if(m==="json"){n(d.encode({enabled:t.enabled}));return}p({body:t.enabled?"Auto-upgrade on. Shopify CLI will update automatically after each command.":"Auto-upgrade off. You'll need to run `shopify upgrade` to update manually."})}export{l as a,f as b,d as c,S as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as o,B as n,C as i,D as t,H as s,z as e}from"./chunk-
|
|
1
|
+
import{A as o,B as n,C as i,D as t,H as s,z as e}from"./chunk-D2KIGKBI.js";import{h as d,k as l}from"./chunk-M5VIFG2V.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
|
|
2
2
|
Error: Unexpected error
|
|
3
3
|
at Module._compile (internal/modules/cjs/loader.js:1137:30)
|
|
4
4
|
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as i}from"./chunk-
|
|
1
|
+
import{P as i}from"./chunk-D2KIGKBI.js";import{a as l}from"./chunk-7UNQOKZW.js";import{a as p}from"./chunk-CX5CC6P5.js";import{e as u,g as a}from"./chunk-VKWPEFWQ.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as b,i as u,n as w,p as _}from"./chunk-
|
|
1
|
+
import{c as b,i as u,n as w,p as _}from"./chunk-PDZBKVWL.js";import{a as h}from"./chunk-VHZ6RL67.js";import{Ma as g}from"./chunk-U2T5HPRD.js";import{c as d}from"./chunk-3KM5ZOW2.js";import{h as m}from"./chunk-M5VIFG2V.js";import{wb as s}from"./chunk-JLQRDFR5.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var j=250,c=class extends Error{constructor(){super("Migratable subscriptions were not found"),this.name="MigratableSubscriptionsNotFoundError"}},l=class extends Error{constructor(t){super(t),this.name="MigrationListProtocolError"}};async function*S({clientId:i,status:t,getPage:o=_}){let e=new Set,a;for(;;){let p=await o({clientId:i,first:j,after:a,status:t});if(p===null)throw new c;if(yield p.subscriptions,!p.pageInfo.hasNextPage)return;let{endCursor:n}=p.pageInfo;if(n===null||n.trim()==="")throw new l("Migratable subscription page has no cursor for its next page");if(e.has(n))throw new l(`Migratable subscription pagination repeated cursor: ${n}`);e.add(n),a=n}}r();var v="shop_id,status,manual_subscription_name,manual_subscription_price_amount,manual_subscription_price_currency_code,manual_subscription_interval,target_plan_handle,notification_kind,notification_opt_out_deadline,notification_sent_at,price_behavior,effective_date,last_failure_reason";function C(i){return u.encode({subscriptions:i.map(w)})}async function y({pages:i,json:t}){t?s(C(await x(i))):await E(i)}async function x(i){let t=[];for await(let o of i)t.push(...o);return t}async function E(i){let t=!1;for await(let o of i){let e=M(o);t?e.length>0&&s(e.join(`
|
|
2
2
|
`)):(s([v,...e].join(`
|
|
3
3
|
`)),t=!0)}t||s(v)}function M(i){return i.map(t=>[t.shopId,t.status,t.manualSubscriptionName,t.manualSubscriptionPrice?.amount,t.manualSubscriptionPrice?.currencyCode,t.manualSubscriptionInterval,t.targetPlanHandle,t.notification?.kind,t.notification?.optOutDeadline,t.notification?.sentAt,t.priceBehavior,t.effectiveDate,t.lastFailureReason].map(L).join(","))}function L(i){let t=i??"";return/[",\r\n]/.test(t)?`"${t.replaceAll('"','""')}"`:t}var f=class i extends h{static summary="Lists app subscriptions eligible for migration.";static descriptionWithMarkdown="Lists every app subscription eligible for migration.\n\nBy default, the command writes CSV to stdout, streaming each page of results as it arrives. If a later page fails, the rows already written remain valid CSV. Use `--json` to fetch all pages first and then write a single JSON envelope to stdout. Use shell redirection to save either format, for example `shopify app subscription-migrations list > subscriptions.csv` or `shopify app subscription-migrations list --json > subscriptions.json`.\n\nUse `--status` to filter subscriptions by migration status. Supported values are `UNSCHEDULED`, `SCHEDULED`, and `MIGRATED`.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --status SCHEDULED > scheduled-subscriptions.csv","<%= config.bin %> <%= command.id %> --json","<%= config.bin %> <%= command.id %> --json > subscriptions.json","<%= config.bin %> <%= command.id %> --client-id <client-id> > subscriptions.csv"];static flags={...b,...d};static get jsonOutputSchema(){return u}async run(){let{flags:t}=await this.parse(i),{app:o,remoteApp:e}=await g({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});try{let a=S({clientId:e.apiKey,status:t.status});await y({pages:a,json:t.json})}catch(a){throw a instanceof c?new m("App not found"):a}return{app:o}}};export{f as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Se}from"./chunk-7IFE4UQY.js";import{a as se}from"./chunk-6BNKBCCU.js";import{a as ye,b as H}from"./chunk-ZQDDRIBA.js";import{E as U,N as O,u as w,va as ce,xa as M,ya as me}from"./chunk-H4V55Y3Z.js";import{e as _}from"./chunk-ZT5WFUKJ.js";import{d as ve}from"./chunk-Q2SZCZE7.js";import{B as D,C as B,F as le,W as fe,a as ae,y as pe}from"./chunk-CZ22VZDA.js";import{c as ie}from"./chunk-J6TW43TG.js";import{b as ne,o as re}from"./chunk-335BUVBP.js";import{d as ue,e as de}from"./chunk-X7HVAVSZ.js";import{h as x,k as he}from"./chunk-2VSNFOKD.js";import{Bb as g,Ea as te,Ta as C,qb as G,sb as y,wb as ge}from"./chunk-LWCTKI4Z.js";import{h as oe,i as L,j as R}from"./chunk-FZCGRIOM.js";import{b as Le}from"./chunk-YTUUU33R.js";import{c as Z,e as $,h as ee,p as k}from"./chunk-IWTNUJGY.js";import{e as qe,g as S}from"./chunk-VKWPEFWQ.js";S();var b=qe(Le(),1);var Y={path:b.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async n=>{let e=$(n);if(!C(e))throw new x("A path was explicitly provided but doesn't exist.",`Please check the path and try again: ${e}`);if(!te(e))throw new x("The path must be a directory, not a file.",`The provided path is not a directory: ${e}. Did you mean: ${ee(e)}`);return e},default:async()=>k(),noCacheDefault:!0}),password:b.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:b.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async n=>w(n)}),environment:b.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},we="Wrap the value in double quotes if you're using wildcards.",Ve=n=>({only:b.Flags.string({char:"o",multiple:!0,description:`${n.charAt(0).toUpperCase()+n.slice(1)} only the specified files (Multiple flags allowed). ${we}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:b.Flags.string({char:"x",multiple:!0,description:`Skip ${n}ing the specified files (Multiple flags allowed). ${we}`,env:"SHOPIFY_FLAG_IGNORE"})});S();S();S();import{AsyncLocalStorage as Ue}from"node:async_hooks";var Fe=new Ue,Ae,Ee,xe,Te;function v(){return Ae??=new _({projectName:"shopify-cli-theme-conf"}),Ae}function z(){return Ee??=new _({projectName:"shopify-cli-development-theme-config"}),Ee}function J(){return xe??=new _({projectName:"shopify-cli-repl-theme-config"}),xe}function W(){return Te??=new _({projectName:"shopify-cli-theme-store-password"}),Te}function K(n=v()){return Fe.getStore()?.store??n.get("themeStore")}function Ie(n,e=v()){e.set("themeStore",n)}function rt(n=v()){return g(y`Getting development theme...`),z().get(F(n))}function ot(n,e=v()){g(y`Setting development theme...`),z().set(F(e),n)}function st(n=v()){g(y`Removing development theme...`),z().delete(F(n))}function it(n=v()){return g(y`Getting REPL theme...`),J().get(F(n))}function at(n,e=v()){g(y`Setting REPL theme to ${n}...`),J().set(F(e),n)}function ct(n=v()){g(y`Removing REPL theme...`),J().delete(F(n))}function mt(n=v()){let e=F(n);return g(y`Getting storefront password for shop ${e}...`),W().get(e)}function ut(n,e=v()){let t=F(e);g(y`Setting storefront password for shop ${t}...`),W().set(t,n)}function dt(n=v()){let e=F(n);g(y`Removing storefront password for ${e}...`),W().delete(e)}function F(n=v()){let e=K(n);if(!e)throw new he("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function _e(n,e){return Fe.run({store:n},e)}function be(n){let e=n.store??K();if(!e)throw ce(new x("A store is required",`Specify the store passing ${y`${G.genericShellCommand(`--${Y.store.name}=example.myshopify.com`)}`.value} or set the ${y`${G.genericShellCommand(Y.store.env)}`.value} environment variable.`));return Ie(e),e}S();var Ce="shopify.theme.toml",At=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Et=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],xt=50;S();S();var V="7e9cb568cfd431c538f36d1ad3f2b4f6";var Oe="shopify-cli-store",Me=240*1e3,Pe;function j(){return Pe??=new _({projectName:Oe}),Pe}function P(n){return`${V}::${De(n)}`}function De(n){return n.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function p(n){return typeof n=="string"}function Be(n){if(!n||typeof n!="object")return;let e=n;if(typeof e.id=="number")return{id:e.id,...p(e.email)?{email:e.email}:{},...p(e.firstName)?{firstName:e.firstName}:{},...p(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ge(n){if(!n||typeof n!="object")return;let e=n;if(!(!p(e.shopId)||!p(e.name)||!p(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...p(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...p(e.country)?{country:e.country}:{},...p(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function He(n){if(!n||typeof n!="object")return;let e=n;if(!p(e.store)||!p(e.clientId)||!p(e.userId)||!p(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(p)||!p(e.acquiredAt))return;let t=Be(e.associatedUser),r=e.kind==="preview"?"preview":"standard",o=r==="preview"?Ge(e.preview):void 0;if(!(r==="preview"&&!o))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...p(e.refreshToken)?{refreshToken:e.refreshToken}:{},...p(e.expiresAt)?{expiresAt:e.expiresAt}:{},...p(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...t?{associatedUser:t}:{},...r==="preview"?{kind:r}:{},...o?{preview:o}:{}}}function $e(n,e,t){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:o}=e;if(!(r!==void 0||o!==void 0))return;let s=P(n);if(!r||typeof r!="object"||Array.isArray(r)||typeof o!="string"){t.delete(s);return}let i=Object.fromEntries(Object.entries(r).flatMap(([c,m])=>{let u=He(m);return u?[[c,u]]:[]}));if(Object.keys(i).length!==Object.keys(r).length)if(i[o])t.set(s,{currentUserId:o,sessionsByUserId:i});else{t.delete(s);return}return{currentUserId:o,sessionsByUserId:i}}function Q(n,e){return $e(n,e.get(P(n)),e)}function Ye(n){return n.config?.store??{}}function ke(n=j()){let e=[],t=`${V}::`;for(let[r,o]of Object.entries(Ye(n))){if(!r.startsWith(t))continue;let a=$e(r.slice(t.length),o,n),s=a?.sessionsByUserId[a.currentUserId];s&&e.push(s)}return e}function Re(n,e=j()){let t=w(n),r=Q(t,e);if(!r)return;let o=r.sessionsByUserId[r.currentUserId];if(!o){e.delete(P(t));return}return o}function kt(n,e=j()){let t=P(n.store),r=Q(n.store,e),o={currentUserId:n.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[n.userId]:n}};e.set(t,o)}function Rt(n,e,t){let r=w(n),o=typeof e=="string"?e:void 0,a=(typeof e=="string"?t:e)??j(),s=P(r);if(!o){a.delete(s);return}let i=Q(r,a);if(!i)return;let{[o]:c,...m}=i.sessionsByUserId,u=Object.keys(m);if(u.length===0){a.delete(s);return}a.set(s,{currentUserId:i.currentUserId===o?u[0]:i.currentUserId,sessionsByUserId:m})}function je(n){if(!n.expiresAt)return!1;let e=new Date(n.expiresAt).getTime();return Number.isNaN(e)?!0:e-Me<Date.now()}var X=class extends H{static baseFlags={...H.baseFlags,...ve};environmentsFilename(){return this.hasExplicitEnvironment()&&this.collectsEnvironmentResults({json:re(process.env,this.argv)})?void 0:Ce}async command(e,t,r=!1,o,a){}async run(e){let t=this.constructor,r=t.multiEnvironmentsFlags,o=this.hasExplicitEnvironment(),{args:a,flags:s}=await this.parse(t);return this.runWithParsedOutput(s,async()=>{let i="password"in t.flags,c=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=o&&this.collectsEnvironmentResults(s),u=this.requiredFlagsForSingleEnvironment(r??[]),l=u.some(d=>Array.isArray(d)?d.includes("store"):d==="store");if(c.length<=1&&!(c.length>0&&m)){if(c[0]&&!s.store&&l)throw new x("Please provide a valid environment.");this.validateCommandFlags(s);let d=i?await this.createSession(s):void 0,N=this.constructor.name.toLowerCase();if(M(`theme-command:${N}:single-env:authenticated`),s.path&&!C(s.path))throw new x(`Path does not exist: ${s.path}`);try{await this.command(s,d,!1,a)}finally{await this.logAnalyticsData(d)}return}if(r===null&&c.length>1){if(s.json)throw new x("This command does not support multiple environments.");D({body:"This command does not support multiple environments."});return}let{flags:h}=await this.parse(ye(t),this.argv);if(c.length>1&&"path"in h){this.errorOnGlobalPath(!!s.json);return}let f=await this.loadEnvironments(c,s,h);m||=Array.from(f.values()).some(({flags:d})=>this.collectsEnvironmentResults(d));let T=async()=>{let d=await this.validateEnvironments(f,c.length===1?u:r??[],i,m);if((m?d.valid.some(({flags:I})=>this.requiresEnvironmentConfirmation(I)):this.requiresEnvironmentConfirmation(s))&&!await this.showConfirmation(this.constructor.name,r??[],d)){m&&this.renderEnvironmentResults(c.map(E=>({environment:E,result:{status:"cancelled"}})));return}let A=await this.runConcurrent(d.valid,m);if(m){let I=c.map(E=>{let q=d.invalid.find(Ne=>Ne.environment===E);return A.get(E)??{environment:E,error:{type:"abort",message:q?.reason??"The environment did not return a result."}}});this.renderEnvironmentResults(I),I.some(E=>"error"in E)&&(process.exitCode=1)}};return m&&R()!=="json"?oe({outputMode:"json",sink:ie},T):T()})}validateCommandFlags(e){}requiredFlagsForSingleEnvironment(e){return e.filter(t=>t!=="password")}collectsEnvironmentResults(e){let t=this.constructor;return!!(e.json&&t.jsonOutputSchema)}requiresEnvironmentConfirmation(e){return"force"in this.constructor.flags&&!e.force&&(!this.collectsEnvironmentResults(e)||fe())}renderEnvironmentResults(e){let t=this.constructor;ge(t.jsonOutputSchema.encode({environments:e}))}validateNonTTYFlags(e){let t=this.constructor;"multiEnvironmentsFlags"in t&&t.multiEnvironmentsFlags!==void 0&&Array.isArray(e.environment)&&(e.environment.length>1||e.environment.length===1&&this.hasExplicitEnvironment()&&this.collectsEnvironmentResults(e))||super.validateNonTTYFlags(e)}storeAuthScopes(){}hasExplicitEnvironment(){return this.argv.some(e=>e==="--environment"||e.startsWith("--environment=")||e.startsWith("-e"))||!!process.env.SHOPIFY_FLAG_ENVIRONMENT}async loadEnvironments(e,t,r){let o=new Map;for(let s of e){let i;try{i=await Se(s,"shopify.theme.toml",{from:t.path,silent:!0})}catch(c){if(!this.collectsEnvironmentResults(t))throw c;o.set(s,{flags:t,validationFlags:{},parserFlags:{},error:c instanceof Error?c.message:String(c)});continue}i?.store&&typeof i.store=="string"&&(i.store=w(i.store)),typeof i?.theme=="number"?i.theme=String(i.theme):Array.isArray(i?.theme)&&(i.theme=i.theme.map(String)),i?.path&&typeof i.path=="string"&&(i.path=$(i.path)),o.set(s,{parserFlags:{...i,...r},flags:{...t,...i,...r,environment:[s]},validationFlags:{...e.length===1?t:{},...i,...r}})}if(this.collectsEnvironmentResults(t)||Array.from(o.values()).some(s=>this.collectsEnvironmentResults(s.flags))){for(let[s,i]of o)if(!i.error){i.flags={...i.flags,json:!0};try{let c=await this.parseEnvironmentFlags({json:!0,...i.parserFlags},this.constructor,r);i.flags={...i.flags,...c,environment:[s]}}catch(c){i.error=c instanceof Error?c.message:String(c)}}}return o}async validateEnvironments(e,t,r,o=!1){let a=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,c=Array.from(e.entries()).map(([m,{flags:u,validationFlags:l,error:h}])=>({environmentName:m,error:h,flags:u,validationFlags:l,storeAuthSession:this.storeAuthSessionFromCache(l,i)}));for(let{environmentName:m,flags:u,validationFlags:l,storeAuthSession:h,error:f}of c){if(f){s.push({environment:m,reason:f});continue}let T=this.validConfig(l,t,m,h,o);if(T!==!0){let d=T.join(", ");s.push({environment:m,reason:`Missing flags: ${d}`});continue}try{this.validateCommandFlags(u),super.validateNonTTYFlags(u)}catch(d){if(!o)throw d;s.push({environment:m,reason:d instanceof Error?d.message:String(d)});continue}a.push({environment:m,flags:u,requiresAuth:r,storeAuthSession:h})}return{valid:a,invalid:s}}async showConfirmation(e,t,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},i=[...r.valid.map(({environment:c,flags:m})=>{let u=t.map(l=>{let h=Array.isArray(l)?l.find(f=>m[f]):l;if(h==="password")return"password";if(h==="path"&&typeof m.path=="string"){let f=m.path.split(/[/\\]/);if(f.length===1)return`path: ${m.path}`;let T=f[0]===""?`/${f[1]}`:f[0],d=f.at(-1);return`path: ${T}/.../${d}`}return h&&`${h}: ${m[h]}`}).join(", ");return[c,{subdued:u||"No flags required"}]}),...r.invalid.map(({environment:c,reason:m})=>[c,{error:`Skipping | ${m}`}])];return s.infoTable={Environment:i},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),le(s)}async runConcurrent(e,t=!1){let r=new Map,o=new ae,a=e.map(c=>c.flags.store),s=new Set(a),i=a.length===s.size?[e]:this.createSequentialGroups(e);for(let c of i){let m=c.map(({environment:u,flags:l,requiresAuth:h,storeAuthSession:f})=>({prefix:u,action:async(T,d,N)=>{try{let A=l.store,I=await _e(A,async()=>{let E=h?await this.createSession(l,f):void 0,q=this.constructor.name.toLowerCase();M(`theme-command:${q}:multi-env:authenticated`);try{return await this.command(t?{...l,json:!0}:l,E,!0,{},{stdout:T,stderr:d})}finally{await this.logAnalyticsData(E)}});r.set(u,{environment:u,result:I??{status:"cancelled"}})}catch(A){process.exitCode=1,t&&r.set(u,{environment:u,error:se(A)}),A instanceof Error&&(A.message=`Environment ${u} failed:
|
|
1
|
+
import{a as Se}from"./chunk-Z2WAW6MM.js";import{a as se}from"./chunk-C3RFAKWR.js";import{a as ye,b as H}from"./chunk-ZJOX5HW4.js";import{E as U,N as O,u as w,va as ce,xa as M,ya as me}from"./chunk-GQLNG537.js";import{e as _}from"./chunk-MHR5OHT5.js";import{d as ve}from"./chunk-3KM5ZOW2.js";import{B as D,C as B,F as le,W as fe,a as ae,y as pe}from"./chunk-D2KIGKBI.js";import{c as ie}from"./chunk-LEHBZKK3.js";import{b as ne,o as re}from"./chunk-335BUVBP.js";import{d as ue,e as de}from"./chunk-CXI3RHPW.js";import{h as x,k as he}from"./chunk-M5VIFG2V.js";import{Bb as g,Ea as te,Ta as C,qb as G,sb as y,wb as ge}from"./chunk-JLQRDFR5.js";import{h as oe,i as L,j as R}from"./chunk-FZCGRIOM.js";import{b as Le}from"./chunk-YTUUU33R.js";import{c as Z,e as $,h as ee,p as k}from"./chunk-IWTNUJGY.js";import{e as qe,g as S}from"./chunk-VKWPEFWQ.js";S();var b=qe(Le(),1);var Y={path:b.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async n=>{let e=$(n);if(!C(e))throw new x("A path was explicitly provided but doesn't exist.",`Please check the path and try again: ${e}`);if(!te(e))throw new x("The path must be a directory, not a file.",`The provided path is not a directory: ${e}. Did you mean: ${ee(e)}`);return e},default:async()=>k(),noCacheDefault:!0}),password:b.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:b.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async n=>w(n)}),environment:b.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},we="Wrap the value in double quotes if you're using wildcards.",Ve=n=>({only:b.Flags.string({char:"o",multiple:!0,description:`${n.charAt(0).toUpperCase()+n.slice(1)} only the specified files (Multiple flags allowed). ${we}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:b.Flags.string({char:"x",multiple:!0,description:`Skip ${n}ing the specified files (Multiple flags allowed). ${we}`,env:"SHOPIFY_FLAG_IGNORE"})});S();S();S();import{AsyncLocalStorage as Ue}from"node:async_hooks";var Fe=new Ue,Ae,Ee,xe,Te;function v(){return Ae??=new _({projectName:"shopify-cli-theme-conf"}),Ae}function z(){return Ee??=new _({projectName:"shopify-cli-development-theme-config"}),Ee}function J(){return xe??=new _({projectName:"shopify-cli-repl-theme-config"}),xe}function W(){return Te??=new _({projectName:"shopify-cli-theme-store-password"}),Te}function K(n=v()){return Fe.getStore()?.store??n.get("themeStore")}function Ie(n,e=v()){e.set("themeStore",n)}function rt(n=v()){return g(y`Getting development theme...`),z().get(F(n))}function ot(n,e=v()){g(y`Setting development theme...`),z().set(F(e),n)}function st(n=v()){g(y`Removing development theme...`),z().delete(F(n))}function it(n=v()){return g(y`Getting REPL theme...`),J().get(F(n))}function at(n,e=v()){g(y`Setting REPL theme to ${n}...`),J().set(F(e),n)}function ct(n=v()){g(y`Removing REPL theme...`),J().delete(F(n))}function mt(n=v()){let e=F(n);return g(y`Getting storefront password for shop ${e}...`),W().get(e)}function ut(n,e=v()){let t=F(e);g(y`Setting storefront password for shop ${t}...`),W().set(t,n)}function dt(n=v()){let e=F(n);g(y`Removing storefront password for ${e}...`),W().delete(e)}function F(n=v()){let e=K(n);if(!e)throw new he("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function _e(n,e){return Fe.run({store:n},e)}function be(n){let e=n.store??K();if(!e)throw ce(new x("A store is required",`Specify the store passing ${y`${G.genericShellCommand(`--${Y.store.name}=example.myshopify.com`)}`.value} or set the ${y`${G.genericShellCommand(Y.store.env)}`.value} environment variable.`));return Ie(e),e}S();var Ce="shopify.theme.toml",At=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Et=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],xt=50;S();S();var V="7e9cb568cfd431c538f36d1ad3f2b4f6";var Oe="shopify-cli-store",Me=240*1e3,Pe;function j(){return Pe??=new _({projectName:Oe}),Pe}function P(n){return`${V}::${De(n)}`}function De(n){return n.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function p(n){return typeof n=="string"}function Be(n){if(!n||typeof n!="object")return;let e=n;if(typeof e.id=="number")return{id:e.id,...p(e.email)?{email:e.email}:{},...p(e.firstName)?{firstName:e.firstName}:{},...p(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ge(n){if(!n||typeof n!="object")return;let e=n;if(!(!p(e.shopId)||!p(e.name)||!p(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...p(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...p(e.country)?{country:e.country}:{},...p(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function He(n){if(!n||typeof n!="object")return;let e=n;if(!p(e.store)||!p(e.clientId)||!p(e.userId)||!p(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(p)||!p(e.acquiredAt))return;let t=Be(e.associatedUser),r=e.kind==="preview"?"preview":"standard",o=r==="preview"?Ge(e.preview):void 0;if(!(r==="preview"&&!o))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...p(e.refreshToken)?{refreshToken:e.refreshToken}:{},...p(e.expiresAt)?{expiresAt:e.expiresAt}:{},...p(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...t?{associatedUser:t}:{},...r==="preview"?{kind:r}:{},...o?{preview:o}:{}}}function $e(n,e,t){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:o}=e;if(!(r!==void 0||o!==void 0))return;let s=P(n);if(!r||typeof r!="object"||Array.isArray(r)||typeof o!="string"){t.delete(s);return}let i=Object.fromEntries(Object.entries(r).flatMap(([c,m])=>{let u=He(m);return u?[[c,u]]:[]}));if(Object.keys(i).length!==Object.keys(r).length)if(i[o])t.set(s,{currentUserId:o,sessionsByUserId:i});else{t.delete(s);return}return{currentUserId:o,sessionsByUserId:i}}function Q(n,e){return $e(n,e.get(P(n)),e)}function Ye(n){return n.config?.store??{}}function ke(n=j()){let e=[],t=`${V}::`;for(let[r,o]of Object.entries(Ye(n))){if(!r.startsWith(t))continue;let a=$e(r.slice(t.length),o,n),s=a?.sessionsByUserId[a.currentUserId];s&&e.push(s)}return e}function Re(n,e=j()){let t=w(n),r=Q(t,e);if(!r)return;let o=r.sessionsByUserId[r.currentUserId];if(!o){e.delete(P(t));return}return o}function kt(n,e=j()){let t=P(n.store),r=Q(n.store,e),o={currentUserId:n.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[n.userId]:n}};e.set(t,o)}function Rt(n,e,t){let r=w(n),o=typeof e=="string"?e:void 0,a=(typeof e=="string"?t:e)??j(),s=P(r);if(!o){a.delete(s);return}let i=Q(r,a);if(!i)return;let{[o]:c,...m}=i.sessionsByUserId,u=Object.keys(m);if(u.length===0){a.delete(s);return}a.set(s,{currentUserId:i.currentUserId===o?u[0]:i.currentUserId,sessionsByUserId:m})}function je(n){if(!n.expiresAt)return!1;let e=new Date(n.expiresAt).getTime();return Number.isNaN(e)?!0:e-Me<Date.now()}var X=class extends H{static baseFlags={...H.baseFlags,...ve};environmentsFilename(){return this.hasExplicitEnvironment()&&this.collectsEnvironmentResults({json:re(process.env,this.argv)})?void 0:Ce}async command(e,t,r=!1,o,a){}async run(e){let t=this.constructor,r=t.multiEnvironmentsFlags,o=this.hasExplicitEnvironment(),{args:a,flags:s}=await this.parse(t);return this.runWithParsedOutput(s,async()=>{let i="password"in t.flags,c=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=o&&this.collectsEnvironmentResults(s),u=this.requiredFlagsForSingleEnvironment(r??[]),l=u.some(d=>Array.isArray(d)?d.includes("store"):d==="store");if(c.length<=1&&!(c.length>0&&m)){if(c[0]&&!s.store&&l)throw new x("Please provide a valid environment.");this.validateCommandFlags(s);let d=i?await this.createSession(s):void 0,N=this.constructor.name.toLowerCase();if(M(`theme-command:${N}:single-env:authenticated`),s.path&&!C(s.path))throw new x(`Path does not exist: ${s.path}`);try{await this.command(s,d,!1,a)}finally{await this.logAnalyticsData(d)}return}if(r===null&&c.length>1){if(s.json)throw new x("This command does not support multiple environments.");D({body:"This command does not support multiple environments."});return}let{flags:h}=await this.parse(ye(t),this.argv);if(c.length>1&&"path"in h){this.errorOnGlobalPath(!!s.json);return}let f=await this.loadEnvironments(c,s,h);m||=Array.from(f.values()).some(({flags:d})=>this.collectsEnvironmentResults(d));let T=async()=>{let d=await this.validateEnvironments(f,c.length===1?u:r??[],i,m);if((m?d.valid.some(({flags:I})=>this.requiresEnvironmentConfirmation(I)):this.requiresEnvironmentConfirmation(s))&&!await this.showConfirmation(this.constructor.name,r??[],d)){m&&this.renderEnvironmentResults(c.map(E=>({environment:E,result:{status:"cancelled"}})));return}let A=await this.runConcurrent(d.valid,m);if(m){let I=c.map(E=>{let q=d.invalid.find(Ne=>Ne.environment===E);return A.get(E)??{environment:E,error:{type:"abort",message:q?.reason??"The environment did not return a result."}}});this.renderEnvironmentResults(I),I.some(E=>"error"in E)&&(process.exitCode=1)}};return m&&R()!=="json"?oe({outputMode:"json",sink:ie},T):T()})}validateCommandFlags(e){}requiredFlagsForSingleEnvironment(e){return e.filter(t=>t!=="password")}collectsEnvironmentResults(e){let t=this.constructor;return!!(e.json&&t.jsonOutputSchema)}requiresEnvironmentConfirmation(e){return"force"in this.constructor.flags&&!e.force&&(!this.collectsEnvironmentResults(e)||fe())}renderEnvironmentResults(e){let t=this.constructor;ge(t.jsonOutputSchema.encode({environments:e}))}validateNonTTYFlags(e){let t=this.constructor;"multiEnvironmentsFlags"in t&&t.multiEnvironmentsFlags!==void 0&&Array.isArray(e.environment)&&(e.environment.length>1||e.environment.length===1&&this.hasExplicitEnvironment()&&this.collectsEnvironmentResults(e))||super.validateNonTTYFlags(e)}storeAuthScopes(){}hasExplicitEnvironment(){return this.argv.some(e=>e==="--environment"||e.startsWith("--environment=")||e.startsWith("-e"))||!!process.env.SHOPIFY_FLAG_ENVIRONMENT}async loadEnvironments(e,t,r){let o=new Map;for(let s of e){let i;try{i=await Se(s,"shopify.theme.toml",{from:t.path,silent:!0})}catch(c){if(!this.collectsEnvironmentResults(t))throw c;o.set(s,{flags:t,validationFlags:{},parserFlags:{},error:c instanceof Error?c.message:String(c)});continue}i?.store&&typeof i.store=="string"&&(i.store=w(i.store)),typeof i?.theme=="number"?i.theme=String(i.theme):Array.isArray(i?.theme)&&(i.theme=i.theme.map(String)),i?.path&&typeof i.path=="string"&&(i.path=$(i.path)),o.set(s,{parserFlags:{...i,...r},flags:{...t,...i,...r,environment:[s]},validationFlags:{...e.length===1?t:{},...i,...r}})}if(this.collectsEnvironmentResults(t)||Array.from(o.values()).some(s=>this.collectsEnvironmentResults(s.flags))){for(let[s,i]of o)if(!i.error){i.flags={...i.flags,json:!0};try{let c=await this.parseEnvironmentFlags({json:!0,...i.parserFlags},this.constructor,r);i.flags={...i.flags,...c,environment:[s]}}catch(c){i.error=c instanceof Error?c.message:String(c)}}}return o}async validateEnvironments(e,t,r,o=!1){let a=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,c=Array.from(e.entries()).map(([m,{flags:u,validationFlags:l,error:h}])=>({environmentName:m,error:h,flags:u,validationFlags:l,storeAuthSession:this.storeAuthSessionFromCache(l,i)}));for(let{environmentName:m,flags:u,validationFlags:l,storeAuthSession:h,error:f}of c){if(f){s.push({environment:m,reason:f});continue}let T=this.validConfig(l,t,m,h,o);if(T!==!0){let d=T.join(", ");s.push({environment:m,reason:`Missing flags: ${d}`});continue}try{this.validateCommandFlags(u),super.validateNonTTYFlags(u)}catch(d){if(!o)throw d;s.push({environment:m,reason:d instanceof Error?d.message:String(d)});continue}a.push({environment:m,flags:u,requiresAuth:r,storeAuthSession:h})}return{valid:a,invalid:s}}async showConfirmation(e,t,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},i=[...r.valid.map(({environment:c,flags:m})=>{let u=t.map(l=>{let h=Array.isArray(l)?l.find(f=>m[f]):l;if(h==="password")return"password";if(h==="path"&&typeof m.path=="string"){let f=m.path.split(/[/\\]/);if(f.length===1)return`path: ${m.path}`;let T=f[0]===""?`/${f[1]}`:f[0],d=f.at(-1);return`path: ${T}/.../${d}`}return h&&`${h}: ${m[h]}`}).join(", ");return[c,{subdued:u||"No flags required"}]}),...r.invalid.map(({environment:c,reason:m})=>[c,{error:`Skipping | ${m}`}])];return s.infoTable={Environment:i},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),le(s)}async runConcurrent(e,t=!1){let r=new Map,o=new ae,a=e.map(c=>c.flags.store),s=new Set(a),i=a.length===s.size?[e]:this.createSequentialGroups(e);for(let c of i){let m=c.map(({environment:u,flags:l,requiresAuth:h,storeAuthSession:f})=>({prefix:u,action:async(T,d,N)=>{try{let A=l.store,I=await _e(A,async()=>{let E=h?await this.createSession(l,f):void 0,q=this.constructor.name.toLowerCase();M(`theme-command:${q}:multi-env:authenticated`);try{return await this.command(t?{...l,json:!0}:l,E,!0,{},{stdout:T,stderr:d})}finally{await this.logAnalyticsData(E)}});r.set(u,{environment:u,result:I??{status:"cancelled"}})}catch(A){process.exitCode=1,t&&r.set(u,{environment:u,error:se(A)}),A instanceof Error&&(A.message=`Environment ${u} failed:
|
|
2
2
|
|
|
3
3
|
${A.message}`,t||R()==="json"?L({type:"diagnostic",level:"error",code:"theme-environment-failed",message:A.message}):B({body:[A.message]}))}}}));t?await Promise.all(m.map(({action:u})=>u(process.stdout,process.stderr,o.signal))):await pe({processes:m,abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}return r}createSequentialGroups(e){let t=[];return e.forEach(r=>{let o=t.find(a=>!a.some(s=>s.flags.store===r.flags.store));o?o.push(r):t.push([r])}),t}async createSession(e,t){let r=be({store:e.store}),o=e.password;return o?await O(r,o):t??await this.storeAuthSessionForTheme({store:r})??await O(r,o)}async storeAuthSessionForTheme(e){let t=this.storeAuthScopes();if(!t)return;let r=typeof e.store=="string"?e.store:void 0,o=e.password;if(!r||o)return;let a=w(r),s=Re(a);if(s)return this.adminSessionFromStoreAuthSession(s,a,t)}storeAuthSessionsForTheme(e){let t=this.storeAuthScopes();if(!t)return new Map;let r=new Set(e.filter(({store:o,password:a})=>typeof o=="string"&&!a).map(({store:o})=>w(o)));return r.size===0?new Map:new Map(ke().map(o=>{let a=w(o.store);if(!r.has(a))return;let s=this.adminSessionFromStoreAuthSession(o,a,t);return s?[a,s]:void 0}).filter(o=>o!==void 0))}storeAuthSessionFromCache(e,t){let r=typeof e.store=="string"?e.store:void 0,o=e.password;if(!(!r||o))return t.get(w(r))}adminSessionFromStoreAuthSession(e,t,r){if(je(e)){g(`Ignoring stored store auth session for ${t}: it expired at ${e.expiresAt??"unknown"}.`);return}if(!this.hasRequiredStoreAuthScopes(e.scopes,r)){g(`Ignoring stored store auth session for ${t}: it is missing required scopes (has: ${e.scopes.join(", ")}; needs: ${r.join(", ")}).`);return}return g(`Using stored store auth session for ${t} (scopes: ${e.scopes.join(", ")}).`),U(e.userId),{token:e.accessToken,storeFqdn:t}}expandImpliedStoreAuthScopes(e){let t=new Set(e);for(let r of e){let o=r.match(/^(unauthenticated_)?write_(.*)$/);o&&t.add(`${o[1]??""}read_${o[2]}`)}return t}hasRequiredStoreAuthScopes(e,t){let r=this.expandImpliedStoreAuthScopes(e);return t.every(o=>r.has(o))}validConfig(e,t,r,o,a=!1){let s=t.filter(i=>Array.isArray(i)?!i.some(c=>this.hasRequiredFlag(e,c,o)):!this.hasRequiredFlag(e,i,o)).map(i=>Array.isArray(i)?i.join(" or "):i);return s.length>0?(a||R()==="json"?L({type:"diagnostic",level:"warning",code:"theme-environment-invalid",message:`Missing required flags in environment configuration for ${r}: ${s.join(", ")}`}):D({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:s}}]}),s):!0}hasRequiredFlag(e,t,r){return t==="password"&&r?!0:!!e[t]}errorOnGlobalPath(e){let t=Z(k(),"shopify.theme.toml"),r=C(t),o="Can't use `--path` flag with multiple environments.",a=r?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."];if(e)throw new x(o,a.join(" "));B({body:[o,...a]})}async logAnalyticsData(e){if(e)try{let t=me();await ue(()=>({store_fqdn_hash:ne(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(t.timings),cmd_theme_errors:JSON.stringify(t.errors),cmd_theme_retries:JSON.stringify(t.retries),cmd_theme_events:JSON.stringify(t.events)})),await de(()=>({store_fqdn:e.storeFqdn}))}catch(t){g(`Unable to record theme analytics: ${t instanceof Error?t.message:String(t)}`)}}};export{V as a,ke as b,Re as c,kt as d,Rt as e,K as f,rt as g,ot as h,st as i,it as j,at as k,ct as l,mt as m,ut as n,dt as o,Y as p,Ve as q,be as r,At as s,Et as t,xt as u,X as v};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N,b as $,c as g}from"./chunk-
|
|
1
|
+
import{a as N,b as $,c as g}from"./chunk-URXM5A2K.js";import{j as D}from"./chunk-GQLNG537.js";import{a as b,b as A}from"./chunk-F3CK3EJJ.js";import{T as p,U as k,a as T}from"./chunk-D2KIGKBI.js";import{k as P}from"./chunk-M5VIFG2V.js";import{Bb as u,Ha as I,Ka as O,N as y,Oa as F,Ta as h,wa as _,ya as U}from"./chunk-JLQRDFR5.js";import{g as w}from"./chunk-LHXFTFFM.js";import{c as m,h as l,i as x}from"./chunk-IWTNUJGY.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{execFileSync as z}from"child_process";var H="2026.10.3",B=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,W={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},G={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},V={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:W,darwin:G,win32:V};function X(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 B+n}function Z(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 C(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=X(t,e),o=Z(r,t);if(h(o))try{let i=z(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!J(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await K(n,o);else if(t==="darwin")await tt(n,o);else if(t==="win32")await Q(n,o);else throw new Error(`Unsupported platform: ${t}`)}function J(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 K(r,t){await R(r,t),await F(t,"755")}async function Q(r,t){await R(r,t)}async function tt(r,t){await R(r,`${t}.tgz`);let e=x(`${t}.tgz`);await p("tar",["-xzf",e],{cwd:l(t)}),I(`${t}.tgz`),await U(`${l(t)}/cloudflared`,t)}async function R(r,t){h(l(t))||_(l(t));let e=Y.promisify(j),n=await D(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=O(t);return await e(n.body,o),t}import{Writable as rt}from"stream";import{fileURLToPath as et}from"url";var $t=$({provider:g,action:st}),nt=w()?.2:40,ot=5;async function st(r){try{let t=new E(r);return await t.startTunnel(),b(t)}catch(t){let e=new N("unknown",t.message);return A(e)}}var E=class{port;provider=g;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await C(),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 T;let e=!1;if(t>=ot){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=y(o).slice(-5).join(`
|
|
2
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()}},nt*1e3);let c=this,L=new rt({write(s,ft,M){if(u(s.toString()),e)return;a??=it(s),ut(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 S=at(s);S&&o.push(S),M()}});p(ct(),n,{stdout:L,stderr:L,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new P(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),w()||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 it(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${dt()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function at(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: ${lt(r.toString())}`}function lt(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ut(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function ct(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(et(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Bb as n,Sa as o,qb as e,sb as r,ta as d,va as f}from"./chunk-
|
|
1
|
+
import{Bb as n,Sa as o,qb as e,sb as r,ta as d,va as f}from"./chunk-JLQRDFR5.js";import{c as i}from"./chunk-IWTNUJGY.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
|
|
2
2
|
*`)),t}export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u}from"./chunk-
|
|
1
|
+
import{d as u}from"./chunk-TODZ3TJR.js";import{B as c}from"./chunk-D2KIGKBI.js";import{e as s}from"./chunk-CXI3RHPW.js";import{_a as d}from"./chunk-JLQRDFR5.js";import{p as m}from"./chunk-IWTNUJGY.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,25 @@
|
|
|
1
|
+
import{a as R,b as V,c as H,d as i,e as O,f as _,g as q,h as C,i as x}from"./chunk-KZRLZWOU.js";import{a as M}from"./chunk-VHZ6RL67.js";import{a as A}from"./chunk-NVKJ7ZLP.js";import{Ma as L,ja as F}from"./chunk-U2T5HPRD.js";import{fa as k}from"./chunk-33ZE3DRQ.js";import{b as E,c as I,f as p}from"./chunk-3KM5ZOW2.js";import{E as m,G as v,K as b}from"./chunk-D2KIGKBI.js";import{a as y}from"./chunk-BN7ZXAZJ.js";import{h as w}from"./chunk-M5VIFG2V.js";import{Cb as T,Eb as S,wb as P,zb as h}from"./chunk-JLQRDFR5.js";import{b as n}from"./chunk-FZCGRIOM.js";import{b as Q}from"./chunk-YTUUU33R.js";import{i as g}from"./chunk-IWTNUJGY.js";import{e as X,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function D(e,t,r){let o={api_version:t},{webhookTopics:s}=await e.topics(o,r);return s}a();async function W(e){let t=e.map(o=>({label:o,value:o}));return await v({message:"Webhook Topic",choices:t})}async function B(e){return m({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function N(){return m({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function Y(e){return(await b({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!O(o,e))return`Invalid address.
|
|
2
|
+
${l(e)}`}})).trim()}function Z(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 l(e){return Z(e).map(t=>` \xB7 ${S(t)}`).join(`
|
|
3
|
+
`)}async function G(e,t){let{clientSecret:r,clientId:o,remoteApp:s,app:c}=e;return r&&(o||t!==i.EVENTBRIDGE)?{clientSecret:r,apiKey:o}:(F({appName:s.title,configFile:g(c.configPath)}),r?{clientSecret:r,apiKey:s.apiKey}:{clientSecret:await k(s,"Pass the secret with the --client-secret flag."),apiKey:s.apiKey})}async function j(e,t,r){let o=await R(e,r);return t?q(t,o):B(o)}async function z(e,t,r,o){let s=await D(e,t,o);return r?C(r,t,s):W(s)}async function U(e,t){let r=e??x(t)??await N(),o=t??await Y(r);return _(o,r)}async function J(e){let t=await ee(e);return te(t)}async function ee(e){let t=await j(e.developerPlatformClient,e.apiVersion,e.organizationId),r=await z(e.developerPlatformClient,t,e.topic,e.organizationId),[o,s]=await U(e.deliveryMethod,e.address),c=await G(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 te(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 V(e.developerPlatformClient,t,e.organizationId);if(!r.success)return{status:"failed",reason:"sample-request",userErrors:r.userErrors};let o={topic:e.topic,apiVersion:e.apiVersion,deliveryMethod:e.deliveryMethod,address:e.address,status:"enqueued"};return e.deliveryMethod===i.LOCALHOST?await H(e.address,r.samplePayload,r.headers)?{status:"success",delivery:{...o,status:"delivered"},samplePayloadIsEmpty:r.samplePayload===JSON.stringify({})}:{status:"failed",reason:"localhost-delivery"}:{status:"success",delivery:o,samplePayloadIsEmpty:r.samplePayload===JSON.stringify({})}}a();var K=n.object({topic:n.string(),apiVersion:n.string(),deliveryMethod:n.enum(["localhost","http","google-pub-sub","event-bridge"]),address:n.string(),status:n.enum(["delivered","enqueued"]).describe("Remote delivery is enqueued, not confirmed received.")}).strict(),u=y({name:"AppWebhookTriggerResult",schema:n.object({status:n.literal("success"),delivery:K}).strict(),definitions:{AppWebhookDelivery:K}});a();function $(e,t){if(e.status==="failed"){if(t==="json"){let r=new w(e.reason==="sample-request"?"Webhook sample request failed.":"Localhost delivery failed");throw e.reason==="sample-request"&&(r.details={userErrors:e.userErrors.map(({message:o,fields:s})=>({message:o,fieldPath:s}))}),r}T(e.reason==="sample-request"?`Request errors:
|
|
4
|
+
${re(e.userErrors)}`:"Localhost delivery failed");return}t==="json"?P(u.encode({status:e.status,delivery:e.delivery})):e.delivery.status==="delivered"?h("Localhost delivery sucessful"):e.samplePayloadIsEmpty&&h("Webhook has been enqueued for delivery")}function re(e){try{return e.map(t=>JSON.parse(t.message).map(r=>` \xB7 ${r}`).join(`
|
|
5
|
+
`)).join(`
|
|
6
|
+
`)}catch{return JSON.stringify(e)}}var d=X(Q(),1);var f=class e extends M{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 get jsonOutputSchema(){return u}static description=this.descriptionForHelp();static flags={...E,...A,...I,help:d.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:p(d.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_TOPIC",description:"The requested webhook topic."})),"api-version":p(d.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_API_VERSION",description:"The API Version of the webhook topic."})),"delivery-method":d.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":d.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:p(d.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
|
+
${l(i.HTTP)}
|
|
24
|
+
${l(i.PUBSUB)}
|
|
25
|
+
${l(i.EVENTBRIDGE)}`}))};async run(){let{flags:t}=await this.parse(e),r=await L({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},s=await J(o);return $(s,t.json?"json":"text"),{app:r.app}}};export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,d as m,e as u,f,g as h}from"./chunk-
|
|
1
|
+
import{a as p,d as m,e as u,f,g as h}from"./chunk-S4LOWCGS.js";import{a as c}from"./chunk-VHZ6RL67.js";import{a as s}from"./chunk-NVKJ7ZLP.js";import{Ma as r}from"./chunk-U2T5HPRD.js";import{b as a,c as n}from"./chunk-3KM5ZOW2.js";import{b as v}from"./chunk-YTUUU33R.js";import{e as S,g as i}from"./chunk-VKWPEFWQ.js";i();var d=S(v(),1);var o=class l extends c{static get jsonOutputSchema(){return m}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.descriptionForHelp();static flags={...a,...s,...f,...n,stdout:d.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(l),{app:e,developerPlatformClient:g,organization:F}=await r({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),y=await h(e,t.path),w=await p({app:e,extension:y,developerPlatformClient:g,orgId:F.id});return await u(w,{stdout:t.stdout,json:t.json}),{app:e}}};export{o as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Y}from"./chunk-LFOBYEWG.js";import{F as W}from"./chunk-
|
|
1
|
+
import{b as Y}from"./chunk-LFOBYEWG.js";import{F as W}from"./chunk-GQLNG537.js";import{q as M}from"./chunk-MHR5OHT5.js";import{W as k}from"./chunk-D2KIGKBI.js";import{a as C,c as j}from"./chunk-LEHBZKK3.js";import{b as S,h as A}from"./chunk-335BUVBP.js";import{d as I}from"./chunk-CXI3RHPW.js";import{h as d}from"./chunk-M5VIFG2V.js";import{$ as P,qb as h,sb as g,wb as R}from"./chunk-JLQRDFR5.js";import{h as b,i as N,j as f}from"./chunk-FZCGRIOM.js";import{d as q}from"./chunk-LHXFTFFM.js";import{b as $}from"./chunk-ZDQO6CNY.js";import{b as J}from"./chunk-YTUUU33R.js";import{a as _}from"./chunk-JD5P5RAJ.js";import{e as H,g as E}from"./chunk-VKWPEFWQ.js";E();var u=H(J()),O=class extends u.Command{static baseFlags={"json-schema":u.Flags.boolean({description:"Print the command's JSON schemas.",env:"SHOPIFY_FLAG_JSON_SCHEMA"})};static descriptionWithMarkdown;static get jsonOutputSchema(){}static get requiresSyncAnalytics(){return!1}static nonTTYFlagRequirements(n){return[]}static descriptionForHelp(){let n=(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)');return z(n,this.jsonOutputSchema)}static descriptionWithoutMarkdown(){return this.descriptionForHelp()}static analyticsNameOverride(){}static analyticsStopCommand(){}jsonOutputFromFlags=!1;async catch(n){let e=async()=>{n.skipOclifErrorHandling=!0;let{errorHandler:r}=await import("./error-handler-4GCXKC6I.js");return await r(n,this.config),u.Errors.handle(n)};return this.jsonOutputFromFlags&&f()!=="json"?b({outputMode:"json",sink:j},e):e()}async _run(){return C(this.argv,()=>super._run())}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),Y(this.id??""),!q()){let{registerCleanBugsnagErrorsFromWithinPlugins:e}=await import("./error-handler-4GCXKC6I.js");await e(this.config)}await G(this.config),this.showNpmFlagWarning(),await this.showDeprecatedAutomationTokenVariableWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-BWTDYBG2.js");return await n(),super.init()}showNpmFlagWarning(){let n=this.constructor;Object.keys(n.flags||{}).map(t=>`npm_config_${P(t).replace(/^no_/,"")}`).some(t=>process.env[t]!==void 0)&&import("./ui-VJTNGCS6.js").then(({renderWarning:t})=>{t({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}async showDeprecatedAutomationTokenVariableWarning(){let n=A();n&&await M("warn-on-deprecated-automation-token-variable",{days:1},async()=>{let{renderWarning:e}=await import("./ui-VJTNGCS6.js");e({headline:`${n} is deprecated.`,body:`Move the token to ${$.serviceAccountToken}. ${n} still works for now, but a future release will stop reading it.`})})}exitWithTimestampWhenEnvVariablePresent(){_(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(R(`
|
|
2
2
|
SHOPIFY_CLI_TIMESTAMP_START
|
|
3
3
|
{ "timestamp": ${Date.now()} }
|
|
4
4
|
SHOPIFY_CLI_TIMESTAMP_END
|
|
@@ -7,9 +7,9 @@ import{b as Y}from"./chunk-LFOBYEWG.js";import{F as W}from"./chunk-H4V55Y3Z.js";
|
|
|
7
7
|
|
|
8
8
|
${h.cyan(s)}
|
|
9
9
|
|
|
10
|
-
${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(n){let e=this.constructor,r={...e.baseFlags,...e.flags},t=Object.entries(r).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),s=(e.nonTTYFlagRequirements?.(n)??[]).filter(a=>a.when?.(n)??!0);return[...t,...s]}async resultWithEnvironment(n,e,r){let t=n.flags,s=this.environmentsFilename();if(!s)return n;let{environmentFilePath:a}=await import("./environments-
|
|
10
|
+
${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(n){let e=this.constructor,r={...e.baseFlags,...e.flags},t=Object.entries(r).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),s=(e.nonTTYFlagRequirements?.(n)??[]).filter(a=>a.when?.(n)??!0);return[...t,...s]}async resultWithEnvironment(n,e,r){let t=n.flags,s=this.environmentsFilename();if(!s)return n;let{environmentFilePath:a}=await import("./environments-4FLRZW4P.js"),i=await a(s,{from:t.path}),l=[];t.environment&&(l=Array.isArray(t.environment)?t.environment:[t.environment]);let p=l.length>0;if(!i&&!p||p&&l.length>1)return n;let{environment:m,isDefaultEnvironment:v}=await this.loadEnvironmentForCommand(t.path,s,l[0]);if(!m||v&&!c(e?.flags,"environment"))return n;let y=await super.parse(B(e),r),F={...m,...y.flags};this.jsonOutputFromFlags=c(e?.flags,"json")&&F.json===!0||T(e?.flags)&&F.output==="json";let x=c(e?.flags,"json")&&T(e?.flags)&&F.output==="json"?{json:!0,...m}:m,w=await super.parse(e,[...r??this.argv,...D(x,e,y.flags),...v?["--environment","default"]:[]]),V=()=>L(y.flags,w.flags,v?"default":l[0],m);return this.runWithParsedOutput(w.flags,V),w}async loadEnvironmentForCommand(n,e,r){let{loadEnvironment:t}=await import("./environments-4FLRZW4P.js");return r?{environment:await t(r,e,{from:n}),isDefaultEnvironment:!1}:{environment:await t("default",e,{from:n,silent:!0}),isDefaultEnvironment:!0}}};async function U(o){await I(()=>({cmd_all_verbose:o.verbose,cmd_all_path_override:o.path!==void 0,cmd_all_path_override_hash:o.path===void 0?void 0:S(o.path)}))}function L(o,n,e,r){let t={};for(let[a,i]of Object.entries(n)){let l=Object.prototype.hasOwnProperty.call(o,a),p=Object.prototype.hasOwnProperty.call(r,a);if(!l&&p){let m=a==="password"||a==="store-password"?`********${i.substr(-4)}`:i;t[a]=m}}if(Object.keys(t).length===0)return;let s=Object.entries(t).map(([a,i])=>`${a}: ${i}`);if(f()==="json"){N({type:"diagnostic",level:"info",message:`Using applicable flags from ${e} environment:
|
|
11
11
|
${s.join(`
|
|
12
|
-
`)}`});return}import("./ui-
|
|
12
|
+
`)}`});return}import("./ui-VJTNGCS6.js").then(({renderInfo:a})=>{a({headline:["Using applicable flags from",{userInput:e},"environment:"],body:[{list:{items:s}}]})})}function B(o){return o?.flags?{...o,flags:Object.fromEntries(Object.entries(o.flags).map(([n,e])=>{let r={...e};return delete r.default,[n,r]}))}:o}function D(o,n,e){let r=[];for(let[t,s]of Object.entries(o)){let a=c(n?.flags,t),i=Object.prototype.hasOwnProperty.call(e,t);if(a&&!i){if(n?.flags?.[t]?.type==="boolean"&&typeof s!="boolean")throw new d(g`Environment flag ${h.yellow(t)} must be a boolean.`);if(typeof s=="boolean")if(s)r.push(`--${t}`);else throw new d(g`Environments can only specify true for boolean flags. Attempted to set ${h.yellow(t)} to false.`);else Array.isArray(s)?s.forEach(l=>r.push(`--${t}`,`${l}`)):r.push(`--${t}`,`${s}`)}}return r}function c(o,n){return!!o&&Object.prototype.hasOwnProperty.call(o,n)}function T(o){let n=o?.output;return n?.type==="option"&&n.options?.includes("json")===!0}function z(o,n){if(!n)return o;let e=`Use \`--json-schema\` to print the result, error, and event schemas.
|
|
13
13
|
|
|
14
14
|
Output from \`--json\` conforms to the \`${n.name}\` schema.
|
|
15
15
|
|
|
@@ -18,5 +18,5 @@ ${JSON.stringify(n.jsonSchema,null,2)}
|
|
|
18
18
|
\`\`\``;return[o,e].filter(Boolean).join(`
|
|
19
19
|
|
|
20
20
|
`)}async function G(o){let n=Array.from(o.plugins.values()),e=["@shopify/app","@shopify/plugin-cloudflare"],r=n.filter(s=>e.includes(s.name));if(r.length>0){let s=r.map(i=>` - shopify plugins remove ${i.name}`).join(`
|
|
21
|
-
`),{renderWarning:a}=await import("./ui-
|
|
21
|
+
`),{renderWarning:a}=await import("./ui-VJTNGCS6.js");a({headline:`Unsupported plugins detected: ${r.map(i=>i.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
|
|
22
22
|
${s}`]})}let t=n.filter(s=>!e.includes(s.name));o.plugins=new Map(t.map(s=>[s.name,s]))}var cn=O;export{B as a,cn as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
1
|
+
import{d}from"./chunk-D2KIGKBI.js";import{h as _}from"./chunk-M5VIFG2V.js";import{Bb as u,Cb as E,Y as y,ca as O}from"./chunk-JLQRDFR5.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();var f=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:t,input:r,inputBytes:s,output:n,outputBytes:o,logs:i,functionId:l,fuelConsumed:c,target:m,errorMessage:T,errorType:h,inputQueryVariablesMetafieldValue:S,inputQueryVariablesMetafieldNamespace:A,inputQueryVariablesMetafieldKey:g}){this.export=t,this.input=r,this.inputBytes=s,this.output=n,this.outputBytes=o,this.logs=i,this.functionId=l,this.fuelConsumed=c,this.target=m,this.errorMessage=T,this.errorType=h,this.inputQueryVariablesMetafieldValue=S,this.inputQueryVariablesMetafieldNamespace=A,this.inputQueryVariablesMetafieldKey=g}};a();function b(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function I(e,t){return t?.deep&&b(e)||t?.deep&&Array.isArray(e)?p(e,t):e}function p(e,t){if(Array.isArray(e))return e.map(r=>t?.deep?p(r,t):r);if(b(e)){let r={};for(let[s,n]of Object.entries(e))r[y(s)]=I(n,t);return r}return e}var R=450,x=5*1e3,N=60*1e3,K=5,F=1e6,D="function_run",$="function_network_access",j="function_network_access.response_from_cache",Y="function_network_access.request_execution_in_background",X="function_network_access.request_execution",H="no_cached_response",W="cached_response_about_to_expire",q=async e=>{let{errors:t}=e.response,r=R,s=null,n="not_attempted";if(t.length>0)if(u(`Errors: ${t.map(o=>o.message).join(", ")}`),t.some(o=>o.status===401))try{s=await e.onResubscribe(),n="succeeded"}catch(o){u(`Failed to resubscribe to app logs: ${o}`),r=N,n="failed",e.onThrottle(r)}else t.some(o=>o.status===429)?(r=N,e.onThrottle(r)):(r=x,e.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:s,resubscribeResult:n}},z=({appLog:e,appLogPayload:t,storeName:r,prettyPrint:s=!0})=>{let{cursor:n,...o}=e,i=p({...o,payload:t,localTime:O(e.log_timestamp),storeName:r});return t instanceof f&&(i.payload.logs=t.logs.split(`
|
|
2
2
|
`).filter(Boolean),i.payload.inputQueryVariablesMetafieldValue&&(i.payload.inputQueryVariablesMetafieldValue=C(i.payload.inputQueryVariablesMetafieldValue))),s?JSON.stringify(i,null,2):JSON.stringify(i)},Z=async(e,t,r,s)=>{let n=await e.subscribeToAppLogs(t,r);if(!n.appLogsSubscribe)throw new _("Failed to subscribe to app logs: No response received");let{jwtToken:o,success:i,errors:l}=n.appLogsSubscribe;if(u(`Token: ${o}
|
|
3
3
|
`),u(`API Key: ${t.apiKey}
|
|
4
4
|
`),l&&l.length>0){let c=l.join(", ");throw await d({stripAnsi:!1},()=>{E(`Errors subscribing to app logs: ${c}`,s),E("App log streaming is not available in this session.",s)}),new _(c)}else{if(!o)throw new _("Failed to subscribe to app logs: No response received");let c=Array.isArray(t.shopIds)?t.shopIds:[t.shopIds];u(`Subscribed to App Events for shop ID(s) ${c.join(", ")}`),i!==void 0&&u(`Success: ${i}
|