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{a as L,b as w,c as P}from"./chunk-HF4NDEX3.js";import{a as g,b as x}from"./chunk-
|
|
1
|
+
import{a as L,b as w,c as P}from"./chunk-HF4NDEX3.js";import{a as g,b as x}from"./chunk-QW52RPAU.js";import{a as A}from"./chunk-CGVROSPS.js";import{a as q,c as J}from"./chunk-2L6AN3QA.js";import{e as R}from"./chunk-QFWWCZOI.js";import{e as Y,q as H}from"./chunk-H6GYBLVQ.js";import{i as _,p as $,v as C}from"./chunk-YKMINHYY.js";import{b as O,c as E,f as M}from"./chunk-3KM5ZOW2.js";import{A as b,B as D,F}from"./chunk-D2KIGKBI.js";import{g as I,h as S}from"./chunk-M5VIFG2V.js";import{Cb as j,U as T,wb as u}from"./chunk-JLQRDFR5.js";import{b as o}from"./chunk-FZCGRIOM.js";import{b as U}from"./chunk-YTUUU33R.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();var N=o.object({status:o.enum(["success","partial"]),themes:o.array(L),errors:o.array(o.object({themeId:o.number(),message:o.string()})).optional()}),p=R({name:"ThemeDeleteResult",schema:o.object({status:o.enum(["success","partial"]),changed:o.boolean(),themes:o.array(w),errors:o.array(o.object({themeId:o.string().regex(/^\d+$/),error:o.object({type:o.literal("abort"),message:o.string()}).strict()}).strict()).optional()}).strict(),definitions:{Theme:w},project(t){let e=N.parse(t);return{status:e.status,changed:e.themes.length>0,themes:e.themes.map(P),...e.errors?{errors:e.errors.map(n=>({themeId:String(n.themeId),error:{type:"abort",message:n.message}}))}:{}}}});c();function k(t,e,n){if(e==="json"){u(p.encode(t));return}let s=n.environment?[{subdued:`Environment: ${n.environment}
|
|
2
2
|
|
|
3
3
|
`}]:[];(t.status==="partial"?D:b)({body:T(t.themes,m=>[...s,`The following themes were deleted from ${n.store}:`,x(m)],m=>[...s,"The theme",...g(m),`was deleted from ${n.store}.`]),...t.errors?{nextSteps:t.errors.map(m=>[`Theme #${m.themeId}: ${m.message}`])}:{}})}c();async function G(t,e,n){let s=e.themes;e.development&&(s=[(await new A(t).find()).id.toString()]);let i=t.storeFqdn,m=await B(t,{...e,themes:s,development:!1});if(!e.force&&!n&&!await V(m,i))return;let f=await Promise.allSettled(m.map(async r=>(await H(r.id,t),{...r,shop:i}))),d=f.flatMap(r=>r.status==="fulfilled"?[r.value]:[]);for(let r of d)if(Y(r))try{_()}catch(l){let a=l instanceof Error?l.message:String(l);j(`Theme #${r.id} was deleted, but its local development theme reference could not be removed: ${a}`)}let h=f.flatMap((r,l)=>{if(r.status==="fulfilled")return[];let a=r.reason;return[{themeId:m[l].id,message:a instanceof Error?a.message:String(a)}]});if(h.length>0&&d.length===0){let r=f.find(a=>a.status==="rejected")?.reason;if(r instanceof I)throw r;let l=new S(h[0].message);throw l.details={errors:h.map(({themeId:a,message:W})=>({themeId:String(a),message:W}))},l}return{status:h.length>0?"partial":"success",themes:d,...h.length>0?{errors:h}:{}}}async function B(t,e){if(e.selectTheme||e.themes.length>0)return J(t,e);let n=t.storeFqdn;return[await q(t,{header:`Select a theme to delete from ${n}`,filter:{development:e.development}})]}async function V(t,e){let s={message:T(t,i=>[`Delete the following themes from ${e}?`],i=>["Delete",...g(i),`from ${e}?`]),confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return t.length>1&&(s.infoTable={"":t.map(g)}),F(s)}var v=z(U(),1);var y=class extends C{static get jsonOutputSchema(){return p}static summary="Delete remote themes from the connected store. This command can't be undone.";static descriptionWithMarkdown=`Deletes a theme from your store.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as S,n as O,q as R}from"./chunk-IJY3RJPJ.js";import{a as x}from"./chunk-2L6AN3QA.js";import{e as J}from"./chunk-QFWWCZOI.js";import{p as E,v as j}from"./chunk-YKMINHYY.js";import{k as l,ua as u}from"./chunk-GQLNG537.js";import{b as g,c as f}from"./chunk-3KM5ZOW2.js";import{A as b,B as I,O as _}from"./chunk-D2KIGKBI.js";import{h as s}from"./chunk-M5VIFG2V.js";import{Ta as y,la as P,wb as w}from"./chunk-JLQRDFR5.js";import{b as p}from"./chunk-FZCGRIOM.js";import{b as N}from"./chunk-YTUUU33R.js";import{e as H,g as n}from"./chunk-VKWPEFWQ.js";n();n();n();async function $({session:r,overridesContent:e,themeId:t}){u("theme-preview:create");let d=`${O(r)}/theme_preview.json?preview_theme_id=${t}`,i=await S(r,{headers:{"Content-Type":"application/json"}}),o=await l(d,{method:"POST",body:e,headers:i});if(!o.ok)throw new s(`Theme preview request failed with status ${o.status}: ${o.statusText}`);let m=await U(o);return u("theme-preview:create"),m}async function A({session:r,overridesContent:e,themeId:t,previewIdentifier:a}){u("theme-preview:update");let i=`${O(r)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(a)}`,o=await S(r,{headers:{"Content-Type":"application/json"}}),m=await l(i,{method:"POST",body:e,headers:o});if(!m.ok)throw new s(`Theme preview request failed with status ${m.status}: ${m.statusText}`);let v=await U(m);return u("theme-preview:update"),v}async function U(r){let e=await r.json();if(e.error)throw new s(`Theme preview failed: ${e.error}`);if(!e.url||!e.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:e.url,preview_identifier:e.preview_identifier}}async function L(r){if(!y(r.overrideJson))throw new s(`Override file not found: ${r.overrideJson}`);let e=await P(r.overrideJson),t;try{t=JSON.parse(e)}catch(i){let o=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${r.overrideJson}`,o)}let a=await R(r.themeId,r.adminSession,r.password),d=JSON.stringify(t);return r.previewIdentifier?A({session:a,overridesContent:d,themeId:r.themeId,previewIdentifier:r.previewIdentifier}):$({session:a,overridesContent:d,themeId:r.themeId})}n();n();var C=p.object({id:p.string().min(1).describe("The opaque Storefront preview identifier, not a theme ID or Shopify GID."),url:p.string().url()}).strict(),h=J({name:"ThemePreviewResult",schema:p.object({status:p.literal("success"),preview:C}).strict(),definitions:{ThemePreview:C},project:r=>{let e=r;return{status:"success",preview:{id:e.preview_identifier,url:e.url}}}});function D(r,e,t){if(e==="json"){w(h.encode(r));return}b({body:[{list:{title:t?"Preview updated":"Preview is ready",items:[{link:{url:r.url}},`Preview ID: ${r.preview_identifier}`]}}]})}function T(r){let e="Failed to open theme preview.",t=r.stack??r.message;I({headline:e,body:t})}var c=H(N(),1);var F=class extends j{static get jsonOutputSchema(){return h}static summary="Applies JSON overrides to a theme and returns a preview URL.";static descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";static description=this.descriptionForHelp();static flags={...g,...f,...E,theme:c.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),overrides:c.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES"}),"preview-id":c.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:c.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:c.Flags.boolean({...f.json,description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};static multiEnvironmentsFlags=["store","password","theme","overrides"];async command(e,t,a=!1){let d=await x(t,{filter:{theme:e.theme}}),i=await L({adminSession:t,overrideJson:e.overrides,themeId:d.id.toString(),previewIdentifier:e["preview-id"],password:e.password}),o=e.json?"json":"text";return e.open&&await _(i.url).catch(v=>T(v))===!1&&T(new Error(`Could not open the browser. Open this URL manually: ${i.url}`)),(!a||!e.json)&&D(i,o,!!e["preview-id"]),i}renderEnvironmentResults(e){w(h.encode({environments:e}))}validateCommandFlags(e){if(!e.theme||!e.overrides)throw new s("Specify both --theme and --overrides, either as flags or in an environment.")}requiredFlagsForSingleEnvironment(e){return super.requiredFlagsForSingleEnvironment(e).filter(t=>t!=="store")}};export{F as a};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{c as en}from"./chunk-Y5CVX5LJ.js";import{G as Ke,H as Ge,K as ue,O as _,P as Ye,a as $e,aa as Je,ca as P,da as Ze,e as He,ia as y,j as Be,ja as Z,k as le,ma as A,na as Xe,oa as T,q as h,r as We,s as me,u as E}from"./chunk-GQLNG537.js";import{b as Qe}from"./chunk-ZDF5N422.js";import{w as ce}from"./chunk-QQJNQNKP.js";import{b as je}from"./chunk-MHR5OHT5.js";import{a as ze}from"./chunk-HSKDFEXW.js";import{A as nn,E as an,F as tn,G as on,J as rn,K as sn,U as dn}from"./chunk-D2KIGKBI.js";import{e as Le,j as Me,k as J}from"./chunk-335BUVBP.js";import{a as Ee}from"./chunk-BN7ZXAZJ.js";import{h as c,k as D}from"./chunk-M5VIFG2V.js";import{Bb as ke,Cb as cn,N as z,Sa as qe,T as G,Va as Oe,fa as Y,la as Ue,qb as mn,sb as U,wb as un}from"./chunk-JLQRDFR5.js";import{i as pe}from"./chunk-B4OMIONW.js";import{b as t}from"./chunk-FZCGRIOM.js";import{g as ln}from"./chunk-LHXFTFFM.js";import{c as Pe,i as K}from"./chunk-IWTNUJGY.js";import{e as W,g as r}from"./chunk-VKWPEFWQ.js";r();function q(e,{httpsOnly:n=!1,message:i="Invalid URL"}={}){return e.refine(a=>ve(a,n),{message:i}).refine(a=>!a.includes(`
|
|
2
|
+
`),{message:i})}function Nt(e,{message:n="URL must be HTTPS URL or start with /"}={}){return e.refine(i=>i.startsWith("/")||ve(i,!0),{message:n})}var pn=/[\r\n\t]/;function kn(e){return ve(e,!0)}function ve(e,n){try{let i=new URL(e);return n?i.protocol==="https:":["http:","https:"].includes(i.protocol)}catch{return!1}}function St(e){return typeof e=="string"&&!e.startsWith("/")?`/${e}`:e}var Oi=30;function ht(e){return e.length<=Oi}r();r();r();function vn(e){return He`
|
|
3
|
+
query OrganizationBetaFlags($organizationId: OrganizationID!) {
|
|
4
|
+
organization(organizationId: $organizationId) {
|
|
5
|
+
id
|
|
6
|
+
${e.map(n=>`flag_${n}: hasFeatureFlag(handle: "${n}")`).join(`
|
|
7
|
+
`)}
|
|
8
|
+
}
|
|
9
|
+
}`}r();var fn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OrganizationExpFlags"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"flagHandles"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"enabledFlags"},arguments:[{kind:"Argument",name:{kind:"Name",value:"flagHandles"},value:{kind:"Variable",name:{kind:"Name",value:"flagHandles"}}}]},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var fe=class extends c{},w=class extends c{constructor(n,i){let a="unknown",o=d=>`an ${d}`;Ge(n)?(a=n.orgName,o=d=>`the ${d} organization`):Ke(n)&&(a=n.email,o=d=>`the ${d} user`);let s=U`${mn.yellow(a)}`.value,m=[[`Your current active session is associated with ${o(s)} account. To start a new session with a different account, run`,{command:"shopify auth login"}],["Have you",{link:{label:"created a Shopify Partners organization",url:"https://partners.shopify.com/signup"}},{char:"?"}],["Does your account include",{subdued:"Manage app"},"permissions?, please contact the owner of the organization to grant you access."],"Have you confirmed your accounts from the emails you received?",["Need to connect to a different App or organization? Run the command again with",{command:"--reset"}]];i&&m.push(["Do you have access to the right Shopify Partners organization? The CLI is loading",{link:{label:"this organization",url:`https://partner.shopify.com/${i}`}}]),super("No Organization found",void 0,m)}};async function Rt(){let e=gn(),n=await e.organizations();if(n.length===0){let i=await e.session();throw new w(i.accountInfo)}return n}async function Ct(e,n){let i=await n.orgFromId(e);if(!i)throw new w((await n.session()).accountInfo,e);return i}async function zt(e,n,i,a=["APP_DEVELOPMENT"]){let o=await i.storeByDomain(e.id,n,a);if(!o){let m=a.length===1&&a[0]==="APP_DEVELOPMENT"?"Ensure you have provided the correct store domain, that the store is a dev store, and that you have access to the store.":"Ensure you have provided the correct store domain and that you have access to the store.";throw new fe(`Could not find store for domain ${n} in organization ${e.businessName}.`,m)}return o}r();var O=class extends c{versionTag;constructor(n){super(`Version ${n} could not be found.`),this.versionTag=n}};r();var Nn={skipEsbuildReactDedeuplication:"SHOPIFY_CLI_SKIP_ESBUILD_REACT_DEDUPLICATION",disableGraphiQLExplorer:"SHOPIFY_CLI_DISABLE_GRAPHIQL",useDynamicConfigSpecifications:"SHOPIFY_CLI_DYNAMIC_CONFIG",enableAppLogPolling:"SHOPIFY_CLI_ENABLE_APP_LOG_POLLING",templatesJsonPath:"SHOPIFY_CLI_APP_TEMPLATES_JSON_PATH",mkcertBinaryPath:"SHOPIFY_CLI_MKCERT_BINARY",disableMinificationOnDev:"SHOPIFY_CLI_DISABLE_MINIFICATION_ON_DEV"},Li={app:"shopify.app.toml",web:"shopify.web.toml",appEnvironments:"shopify.environments.toml",lockFile:".shopify.lock",hiddenConfig:"project.json",hiddenFolder:".shopify"},Lt={production:".env"},Mt={reactTypes:"17.0.30"},Sn={extensions:{directoryName:"extensions",defaultRegistrationLimit:1},web:{directoryName:"web",configurationName:Li.web}},$t={graphiql:3457,localhost:3458},Ht=/^([a-zA-Z_$])([a-zA-Z0-9_$])*$/;r();var Q;(function(e){e.Partners="Partners",e.BusinessPlatform="BusinessPlatform"})(Q||(Q={}));var Mi="https://dev.shopify.com",$i=["SHOPIFY_SERVICE_ACCOUNT_TOKEN","SHOPIFY_APP_AUTOMATION_TOKEN","SHOPIFY_CLI_PARTNERS_TOKEN"];async function Hi(e){let n=hn(e.apiSecretKeys);return n||hn(await e.developerPlatformClient.appClientSecrets(e))}async function Yt(e,n){let i=await Hi(e);if(i)return i;throw new c("This command needs the app's client secret, and the App Management API didn't return one for your credentials.",n??yn())}function yn(){let e=Me(),n=$i.filter(i=>e[i]!==void 0);return n.length>0?`The token in ${n[0]} might not have access to the app's client secret. To use your own account, unset ${n.join(" and ")}, log in with \`shopify auth login\`, and run the command again.`:`Check that your account can view the app's client credentials in the Developer Dashboard: ${Mi}`}function Jt(){cn(`SHOPIFY_API_SECRET isn't included because the App Management API didn't return the app's client secret for your credentials. ${yn()}`)}function hn(e){return e.find(n=>n.secret)?.secret}r();r();var bn=50,Fn=250,Bi=t.object({namespace:t.string(),key:t.string(),owner_type:t.string().optional()}),ji=t.object({sms_marketing:t.boolean().optional(),customer_privacy:t.boolean().optional()}),Wi=t.object({sources:t.array(t.string()).optional()}),Ki=t.object({network_access:t.boolean().optional(),block_progress:t.boolean().optional(),api_access:t.boolean().optional(),collect_buyer_consent:ji.optional(),iframe:Wi.optional(),bundle_size_exception:t.boolean().optional()}),Gi=t.object({runs_offline:t.boolean().optional()}),eo=t.object({type:t.string().optional(),extensions:t.array(t.any()).optional()}),Yi=t.object({event:t.string(),blocking:t.boolean().default(!1),applies_to:t.array(t.string()).optional()}),Ji=t.object({allow_direct_linking:t.boolean().optional(),intercepts:t.array(Yi).optional()}),Zi=t.object({module:t.string()}),Qi=t.object({target:t.string(),module:t.string(),should_render:Zi.optional(),tools:t.string().optional(),instructions:t.string().optional(),intents:t.array(t.object({type:t.string(),action:t.string(),schema:t.string(),name:t.string().optional(),description:t.string().optional()})).optional(),metafields:t.array(Bi).optional(),default_placement:t.string().optional(),urls:t.object({edit:t.string().optional()}).optional(),capabilities:Ji.optional(),preloads:t.object({chat:t.string().optional()}).optional(),assets:t.string().optional()}),no=t.array(Qi),_n=t.string(),Xi=t.object({key:t.string().optional(),name:t.string().optional(),description:t.string().optional(),required:t.boolean().optional(),default_value:t.any().optional(),type:t.string(),validations:t.array(t.any()).optional(),marketingActivityCreateUrl:t.string().optional(),marketingActivityDeleteUrl:t.string().optional()}),Dn=t.object({fields:t.array(Xi).optional()}),An=t.string().trim().nonempty("Handle can't be empty").max(bn,`Handle can't exceed ${bn} characters`).regex(/^[a-zA-Z0-9-]*$/,"Handle can only contain alphanumeric characters and hyphens").refine(e=>!e.startsWith("-")&&!e.endsWith("-"),"Handle can't start or end with a hyphen"),ea=t.string().trim().nonempty("UID can't be empty").max(Fn,`UID can't exceed ${Fn} characters`).regex(/^[a-zA-Z0-9-${}.()_`]*$/,"UID can only contain alphanumeric characters and hyphens").refine(e=>!e.startsWith("-")&&!e.endsWith("-"),"UID can't start or end with a hyphen"),X=t.object({name:t.string().optional(),type:t.string().optional(),handle:An.optional(),uid:ea.optional(),description:t.string().optional(),api_version:_n.optional(),extension_points:t.any().optional(),capabilities:Ki.optional(),supported_features:Gi.optional(),settings:Dn.optional()}),io=X.extend({handle:An}),b=X.omit({handle:!0}),ao=t.object({api_version:_n.optional(),description:t.string().optional(),extensions:t.array(t.any()),settings:Dn.optional()});r();r();r();r();var na=/^(https:\/\/)/,ia=/^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/,aa=/^arn:aws:events:(?<aws_region>[a-z]{2}-[a-z]+-[0-9]+)::event-source\/aws\.partner\/shopify\.com(\.test)?\/(?<api_client_id>\d+)\/(?<event_source_name>.+)$/,ta=/^kafka:\/\/(?<kafka_topic>[a-zA-Z0-9_.-]+)$/;function V(e){return typeof e=="string"&&e.endsWith("/")?e.replace(/\/+$/,""):e}var F=t.string({invalid_type_error:"Value must be string"}).refine(e=>e.startsWith("/")?!0:na.test(e)||ia.test(e)||aa.test(e)||ta.test(e),{message:"URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id}, kafka://{topic-id} or Eventbridge ARN"});function ee(e,n){return!n||!e.startsWith("/")?e:`${V(n)}${e}`}var oa=(e,n,i,a)=>{if(i.startsWith("//"))throw new c(`${e} ${n} is invalid: a URL relative to the app URL must start with a single slash.`);if(pn.test(i))throw new c(`${e} ${n} is invalid: a URL must not contain control characters such as newlines or tabs.`);let o=ee(i,a);if(o.startsWith("/"))throw new c(`${e} ${n} is a relative URL, but no application_url is configured. Set application_url in your app configuration or use an absolute HTTPS URL.`);if(!kn(o))throw new c(`${e} ${n} must resolve to an HTTPS URL. Set application_url to an HTTPS URL or use an absolute HTTPS URL.`);return o};function ge(e,n,i,a){let o=i;for(let s of n){let m=o[s];typeof m=="string"&&m.startsWith("/")&&(o[s]=oa(e,s,m,a))}}r();import{isUtf8 as ra}from"node:buffer";import Tn from"fs";async function wn(e,n){let i=await Oe(Pe(e,"locales/*.json"));if(!i||i.length===0)return{};let a=sa(i);if(a.length===0)throw new c(`Missing default language in ${n} configuration`,"Make sure to have a {locale}.default.json file in your locales directory");if(a.length>1)throw new c(`Error loading ${n}`,'There must be one (and only one) locale identified as the default locale: e.g. "en.default.json"');for(let o of i)if(Tn.statSync(o).size===0)throw new c(`Error loading ${n}`,`Locale file ${o} can't be empty`);return{default_locale:a[0],translations:da(i,n)}}function sa(e){return e.filter(i=>K(i).endsWith(".default.json")).map(i=>K(i).split(".")[0])}function da(e,n){let i={};for(let a of e){let o=la(K(a).split(".")[0],"Locale code is unset"),s=Tn.readFileSync(a);if(!ra(s))throw new c(`Error loading ${n}`,`Locale file ${a} contains invalid UTF-8 byte sequences. Re-save the file using UTF-8 encoding.`);i[o]=s.toString("base64")}return i}function la(e,n){if(e===void 0)throw new D(n);return e}function ma(e){return e.experience==="configuration"}var Vn;(function(e){e.ShouldRender="should_render",e.Main="main",e.Tools="tools",e.Instructions="instructions",e.Intents="intents"})(Vn||(Vn={}));function In(e){let i={...{externalIdentifier:`${e.identifier}_external`,additionalIdentifiers:[],externalName:G(e.identifier.replace(/_/g," ")),surface:"test-surface",partnersWebIdentifier:e.identifier,schema:X,registrationLimit:Sn.extensions.defaultRegistrationLimit,transform:e.transformLocalToRemote,reverseTransform:e.transformRemoteToLocal,experience:e.experience??"extension",uidStrategy:e.uidStrategy??(e.experience==="configuration"?"single":"uuid"),getDevSessionUpdateMessages:e.getDevSessionUpdateMessages,clientSteps:e.clientSteps},...e};return{...i,contributeToAppConfigurationSchema:a=>{let o=ma(i),s=i.schema._def.shape!==void 0,m=i.uidStrategy==="single";return o&&s&&m?a.merge(i.schema):a},parseConfigurationObject:a=>{let o=i.schema.safeParse(a);return o.success?{state:"ok",data:o.data,errors:void 0}:{state:"error",data:void 0,errors:o.error.errors}}}}function S(e){let n=e.appModuleFeatures??(()=>[]);return In({identifier:e.identifier,schema:e.schema,appModuleFeatures:n,transformLocalToRemote:ua(e.transformConfig),transformRemoteToLocal:ca(e.schema,e.transformConfig),experience:"configuration",uidStrategy:e.uidStrategy??"single",expandConfig:e.expandConfig,getIdentity:e.getIdentity,getTarget:e.getTarget,clientSteps:e.clientSteps,getDevSessionUpdateMessages:e.getDevSessionUpdateMessages,patchWithAppDevURLs:e.patchWithAppDevURLs})}function Ro(e){let n=e.appRelativeUrlFields;return In({identifier:e.identifier,schema:t.any({}),appModuleFeatures:e.appModuleFeatures,experience:e.experience,clientSteps:e.clientSteps,uidStrategy:e.uidStrategy,transformRemoteToLocal:e.transformRemoteToLocal,devSessionWatchConfig:e.devSessionWatchConfig,appRelativeUrlFields:n,patchWithAppDevURLs:n?.length?(i,a)=>{ge(G(e.identifier.replace(/_/g," ")),n,i,a.applicationUrl)}:void 0,deployConfig:async(i,a,o,s,m)=>{let d=pa(i);if(n?.length){let l=m?.appConfiguration?.application_url,p=typeof l=="string"?l:void 0;ge(G(e.identifier.replace(/_/g," ")),n,d,p)}if(e.appModuleFeatures().includes("localization")){let l=await wn(a,e.identifier);d={...d,localization:l}}return d}})}function ua(e){return Object.keys(e).includes("forward")?e.forward:n=>L(n,e)}function ca(e,n){return n?Object.keys(n).includes("reverse")?n.reverse:i=>L(i,n,!0):i=>xn(e,i)}function L(e,n,i=!1){let a={};for(let[o,s]of Object.entries(n)){let m=i?o:s,d=i?s:o,l=P(e,m);l!==void 0&&Ze(a,d,l)}return a}function xn(e,n){return Object.keys(e._def.shape()).reduce((i,a)=>{let o=e._def.shape()[a];return o instanceof t.ZodOptional&&(o=o._def.innerType),o instanceof t.ZodObject?i[a]=xn(o,n):(n[a]!==void 0&&(i[a]=n[a]),delete n[a]),i},{})}function pa(e){let{type:n,handle:i,uid:a,path:o,extensions:s,...m}=e;return m}var ka=b.extend({application_url:q(t.string({required_error:"Valid URL is required"})),embedded:t.boolean({required_error:"Boolean is required",invalid_type_error:"Value must be Boolean"}),app_preferences:t.object({url:q(t.string().max(255,{message:"String must be less than 255 characters"}))}).optional()}),va={app_url:"application_url",embedded:"embedded",preferences_url:"app_preferences.url"},Ne="app_home",fa=S({identifier:Ne,schema:ka,transformConfig:va,patchWithAppDevURLs:(e,n)=>{e.application_url=n.applicationUrl},getDevSessionUpdateMessages:async e=>[`Using URL: ${e.application_url}`]}),Oo=fa;r();var ga=b.extend({name:t.string({required_error:"String is required"}).max(30,{message:"String must be less than 30 characters"}),handle:t.string({required_error:"String is required"}).max(256,{message:"String must be less than 256 characters long"}).refine(e=>e&&/^\w*(?!-)[_a-z0-9-]+(?<!-)$/.test(e),{message:"String can't contain special characters"}).optional()}),Na={name:"name",app_handle:"handle"},Se="branding",Sa=S({identifier:Se,schema:ga,transformConfig:Na}),jo=Sa;r();var ha=t.object({scopes:t.string().transform(e=>Y(e)??"").optional(),required_scopes:t.array(t.string()).optional(),optional_scopes:t.array(t.string()).optional(),use_legacy_install_flow:t.boolean().optional()}),ya=t.object({redirect_urls:t.array(q(t.string()))}),ba=b.extend({access:t.object({admin:t.object({direct_api_mode:t.union([t.literal("online"),t.literal("offline")]).optional(),embedded_app_direct_api_access:t.boolean().optional()}).optional()}).optional(),access_scopes:ha.optional(),auth:ya}),he="app_access",Rn={access:"access",scopes:"access_scopes.scopes",required_scopes:"access_scopes.required_scopes",optional_scopes:"access_scopes.optional_scopes",use_legacy_install_flow:"access_scopes.use_legacy_install_flow",redirect_url_allowlist:"auth.redirect_urls"};function Fa(e){let{shop_scopes:n,...i}=e,a=typeof n=="string"?Y(n):void 0;if(!a)return i;let o=typeof i.scopes=="string"?i.scopes:"";return{...i,scopes:Y([o,a].join(","))}}var _a={forward:e=>L(e,Rn),reverse:e=>L(Fa(e),Rn,!0)},Da=S({identifier:he,schema:ba,transformConfig:_a,getDevSessionUpdateMessages:async e=>{let n=e.access_scopes!==void 0,i=e.access_scopes?.use_legacy_install_flow===!0,a=e.access_scopes?.scopes==null&&e.access_scopes?.required_scopes==null;if(i||n&&a)return["Using legacy install flow - access scopes are not auto-granted"];let o=e.access_scopes?.scopes?e.access_scopes.scopes.split(",").map(s=>s.trim()).join(", "):e.access_scopes?.required_scopes?.join(", ");return o?[`Access scopes auto-granted: ${o}`]:["App has been installed"]},patchWithAppDevURLs:(e,n)=>{n.redirectUrlWhitelist&&(e.auth={redirect_urls:n.redirectUrlWhitelist})}}),Xo=Da;r();var Cn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"websocketUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"assetsUrl"},value:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}}},{kind:"Argument",name:{kind:"Name",value:"websocketUrl"},value:{kind:"Variable",name:{kind:"Name",value:"websocketUrl"}}},{kind:"Argument",name:{kind:"Name",value:"isUnsafe"},value:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSession"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websocketUrl"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"warnings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var zn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"manifest"}},type:{kind:"NamedType",name:{kind:"Name",value:"JSON"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inheritedModuleUids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"assetsUrl"},value:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}}},{kind:"Argument",name:{kind:"Name",value:"manifest"},value:{kind:"Variable",name:{kind:"Name",value:"manifest"}}},{kind:"Argument",name:{kind:"Name",value:"inheritedModuleUids"},value:{kind:"Variable",name:{kind:"Name",value:"inheritedModuleUids"}}},{kind:"Argument",name:{kind:"Name",value:"isUnsafe"},value:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSession"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websocketUrl"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"warnings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var En={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Pn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FetchStoreByDomain"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"domain"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ShopFilterInput"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"domain"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"externalId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"shortName"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"currentUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationPermissions"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Un={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListAppDevStores"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"STORE_TYPE"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"EQUALS"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"StringValue",value:"app_development",block:!1}}]},{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"STORE_STATUS"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"EQUALS"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"StringValue",value:"ACTIVE",block:!1}}]}]}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"externalId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"shortName"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"currentUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationPermissions"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var qn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DevStoreCapReached"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devStoreCapReached"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var On={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ProvisionShopAccess"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationUserProvisionShopAccessInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationUserProvisionShopAccess"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationUserProvisionShopAccessInput"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Ln={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ActiveAppReleaseFromApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"app"},name:{kind:"Name",value:"appByKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"key"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AppVersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AppVersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"App"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"organizationId"}},{kind:"Field",name:{kind:"Name",value:"activeRoot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"grantedShopifyApprovalScopes"}}]}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]}}]}}]};r();var Mn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppClientCredentials"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"app"},name:{kind:"Name",value:"appByKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"key"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"activeRoot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clientCredentials"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"secrets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var ye={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReleaseVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appReleaseCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"versionId"},value:{kind:"Variable",name:{kind:"Name",value:"versionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"release"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var $n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAppVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AppVersionInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"metadata"}},type:{kind:"NamedType",name:{kind:"Name",value:"VersionMetadataInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appVersionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}},{kind:"Argument",name:{kind:"Name",value:"metadata"},value:{kind:"Variable",name:{kind:"Name",value:"metadata"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}}]};r();var Hn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAssetURL"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sourceExtension"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SourceExtension"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appRequestSourceUploadUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sourceExtension"},value:{kind:"Variable",name:{kind:"Name",value:"sourceExtension"}}},{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceUploadUrl"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Bn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"versionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Version"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}}]}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]};r();var jn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"versions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"createdBy"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"versionsCount"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Wn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppInstallCount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"installCount"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Kn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateApp"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"initialVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AppVersionInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"initialVersion"},value:{kind:"Variable",name:{kind:"Name",value:"initialVersion"}}},{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Gn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchSpecifications"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"specifications"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"features"}},{kind:"Field",name:{kind:"Name",value:"uidStrategy"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"appModuleLimit"}},{kind:"Field",name:{kind:"Name",value:"isClientProvided"}}]}},{kind:"Field",name:{kind:"Name",value:"validationSchema"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonSchema"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Yn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"listApps"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appsConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Jn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"organizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Zn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"availableTopics"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availableTopics"},arguments:[{kind:"Argument",name:{kind:"Name",value:"apiVersion"},value:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}}}]}]}}]};r();var Qn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CliTesting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"address"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deliveryMethod"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sharedSecret"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"topic"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cliTesting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"address"},value:{kind:"Variable",name:{kind:"Name",value:"address"}}},{kind:"Argument",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}},{kind:"Argument",name:{kind:"Name",value:"apiVersion"},value:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}}},{kind:"Argument",name:{kind:"Name",value:"deliveryMethod"},value:{kind:"Variable",name:{kind:"Name",value:"deliveryMethod"}}},{kind:"Argument",name:{kind:"Name",value:"sharedSecret"},value:{kind:"Variable",name:{kind:"Name",value:"sharedSecret"}}},{kind:"Argument",name:{kind:"Name",value:"topic"},value:{kind:"Variable",name:{kind:"Name",value:"topic"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"headers"}},{kind:"Field",name:{kind:"Name",value:"samplePayload"}},{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Xn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var ei={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SchemaDefinitionByTarget"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"handle"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"target"},arguments:[{kind:"Argument",name:{kind:"Name",value:"handle"},value:{kind:"Variable",name:{kind:"Name",value:"handle"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"api"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"definition"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var ni={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SchemaDefinitionByApiType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"type"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"api"},arguments:[{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"Variable",name:{kind:"Name",value:"type"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"definition"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();r();r();var M;(function(e){e.CustomersRedact="customers/redact",e.CustomersDataRequest="customers/data_request",e.ShopRedact="shop/redact"})(M||(M={}));var ii=t.object({topics:t.array(t.string({invalid_type_error:"Values within array must be a string"}),{invalid_type_error:"Value must be string[]"}).optional(),actions:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),uri:t.preprocess(e=>V(e),F,{required_error:"Missing value at"}),include_fields:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),filter:t.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional(),compliance_topics:t.array(t.enum([M.CustomersRedact,M.CustomersDataRequest,M.ShopRedact]),{invalid_type_error:"Value must be an array containing values: customers/redact, customers/data_request or shop/redact"}).optional()});r();function ai(e,n){let i=Aa(e);if(i)return n.addIssue(i),t.NEVER}function Aa(e){let{subscriptions:n=[]}=e,i=new Set,a=[];if(!n.length)return;if(e.privacy_compliance&&e.subscriptions?.some(s=>s.compliance_topics))return{code:t.ZodIssueCode.custom,message:"The privacy_compliance section can't be used if there are subscriptions including compliance_topics"};let o=n.flatMap(s=>s.compliance_topics).filter(Boolean);if(z(o).length!==o.length)return{code:t.ZodIssueCode.custom,message:"You can\u2019t have multiple subscriptions with the same compliance topic",fatal:!0,path:["subscriptions"]};for(let[s,{uri:m,topics:d=[],compliance_topics:l=[],filter:p=""}]of n.entries()){let k=["subscriptions",s];if(!d.length&&!l.length)return{code:t.ZodIssueCode.custom,message:"Either topics or compliance_topics must be added to the webhook subscription",path:k};d.forEach(u=>{let f=`${u}::${m}::${p}`;if(i.has(f)){let N=p?pe.dim(`
|
|
10
|
+
|
|
11
|
+
topic: ${u}
|
|
12
|
+
uri: ${m}
|
|
13
|
+
filter: ${p}`):pe.dim(`
|
|
14
|
+
|
|
15
|
+
topic: ${u}
|
|
16
|
+
uri: ${m}`);a.push(N)}i.add(f)})}if(a.length>0){let s=a.join("");return{code:t.ZodIssueCode.custom,message:`Multiple subscriptions with the exact same topic, uri, and filter. To resolve, remove or edit the duplicates ${s}`,path:["subscriptions"]}}}r();function oi(e){let n=P(e,"webhooks");if(!n)return e;let{api_version:i}=n;return{api_version:i}}function ri(e){let n={},i=P(e,"api_version");return n={...i?{webhooks:{api_version:i}}:{}},n}function si(e){if(e.length===0)return;let n=e.filter(s=>s.topics!==void 0).flatMap(({compliance_topics:s,topics:m,...d})=>di(m)?.map(p=>({topics:[p],...d}))??[]),i=e.filter(s=>s.topics===void 0||s.compliance_topics!==void 0).map(({compliance_topics:s,topics:m,...d})=>({compliance_topics:s,...d})),a=Va(i,"compliance_topics"),o=Ta(a);return[...ti(o),...ti(n)]}function di(e){return e?.sort((n,i)=>n.localeCompare(i))}function ti(e){return e.sort((n,i)=>n.uri.localeCompare(i.uri))}function Ta(e){return e.forEach(n=>n.compliance_topics=di(n.compliance_topics)),e}function wa(e,n){return e.find(i=>i.uri===n.uri&&Je(i.include_fields??[],n.include_fields??[])&&i.filter===n.filter)}function Va(e,n){return e.reduce((i,a)=>{let o=wa(i,a);return o?n&&a?.[n]?.length?o[n]?.push(...a[n]):(a.topics&&(o.topics??=[],o.topics.push(...a.topics)),a.compliance_topics&&(o.compliance_topics??=[],o.compliance_topics.push(...a.compliance_topics))):i.push(a),i},[])}var Ia=t.object({api_version:t.string({required_error:"String is required"}),privacy_compliance:t.object({customer_deletion_url:F.optional(),customer_data_request_url:F.optional(),shop_deletion_url:F.optional()}).optional(),subscriptions:t.array(ii).optional().transform(e=>si(e??[]))}),li=b.extend({webhooks:Ia.superRefine(ai)});var be="webhooks",xa={forward:oi,reverse:e=>ri(e)},Ra=S({identifier:be,schema:li,transformConfig:xa}),Ss=Ra;r();var mi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionByTag"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionTag"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"versionByTag"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"tag"},value:{kind:"Variable",name:{kind:"Name",value:"versionTag"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Version"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}}]}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]};r();var ui={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppLogsSubscribe"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appLogsSubscribe"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopIds"},value:{kind:"Variable",name:{kind:"Name",value:"shopIds"}}},{kind:"Argument",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jwtToken"}},{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Fe="webhook_subscription",Ca=t.object({topic:t.string(),actions:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),api_version:t.string(),uri:t.preprocess(V,F,{required_error:"Missing value at"}),include_fields:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),filter:t.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional()});function za(e){let{api_version:n,topic:i,...a}=e;return{webhooks:{subscriptions:[{topics:[i],...a}]}}}var Ea={forward:(e,n)=>{let i=e,a;return"application_url"in n&&(a=n?.application_url),{...i,uri:ee(i.uri,a)}},reverse:za},Pa=S({identifier:Fe,schema:Ca,transformConfig:Ea,uidStrategy:"dynamic"}),Is=Pa;r();r();r();function I(e={}){return{type:"token_refresh",handler:async()=>({token:await _([],{noPrompt:e.noPrompt,allowAutomationToken:!0})})}}function Ua(e){if(typeof e!="object"||e===null)return!1;let{statusCode:n,response:i}=e,a=n??i?.status;return a===401||a===403}var ne=class extends c{constructor(n){let i=n.businessName??`organization ${n.id}`,a="in the Shopify admin under Settings > Users > Security";Ye()?super(`This service account can't manage dev stores in ${i}.`,null,[`Give the service account Dev store management access ${a}.`,"Or use a token from a service account that has that access."]):J()?super(`This automation token can't manage dev stores in ${i}.`,null,[`Create a service account with Dev store management access ${a}.`,"Set its token in the SHOPIFY_SERVICE_ACCOUNT_TOKEN environment variable."]):super(`You don't have permission to manage dev stores in ${i}.`,null,["Check that you're logged in to the right account.","Or ask an organization admin for access."])}};async function ie(e,n){try{return await T({...n,organizationId:e.id})}catch(i){throw Ua(i)?new ne(e):i}}r();var ci={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindOrganization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var pi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListOrganizations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"organizationsWithAccessToDestination"},arguments:[{kind:"Argument",name:{kind:"Name",value:"destination"},value:{kind:"EnumValue",value:"APPS_CLI"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"shopCount"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();function x(e){let n=e.match(/\/(\d+)$/);return n?n[1]:void 0}function ae(e){return x(Buffer.from(e,"base64").toString("utf8"))}function $(e){return Buffer.from(e).toString("base64")}async function H(){return(await ki()).organizations}async function qa(e){return ki(e)}async function _e(e,n,i){let a=n??await _([],{allowAutomationToken:!0}),s=(await A({query:ci,token:a,variables:{organizationId:Oa(e)},unauthorizedHandler:i??I(),cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:Le(a)}})).currentUserAccount?.organization;if(s)return{id:e,businessName:s.name}}function Oa(e){let n=e.startsWith("gid://")?x(e):e;if(n===void 0||!/^\d+$/.test(n))throw new c(`Invalid organization ID: ${e}`);return $(`gid://organization/Organization/${n}`)}async function ki(e){let n=e??await _([],{allowAutomationToken:!0}),i=await A({query:pi,token:n,unauthorizedHandler:I()});return i.currentUserAccount?{organizations:i.currentUserAccount.organizationsWithAccessToDestination.nodes.map(o=>{let s=ae(o.id);if(s===void 0)throw new c(`Failed to decode organization ID from: ${o.id}`);return{id:s,businessName:o.name,status:o.status,shopCount:o.shopCount??null,url:o.url}}),currentUserResolved:!0}:{organizations:[],currentUserResolved:!1}}r();r();async function De(e){if(e.length===1)return e[0];let i=new Set(e.map(o=>o.businessName)).size<e.length,a=await on({message:"Which organization do you want to use?",choices:e.map(o=>({label:i?`${o.businessName} (${o.id})`:o.businessName,value:o.id}))});return e.find(o=>o.id===a)}async function La(e){let n=await H();if(n.length===0)throw new c("No organizations found.","Make sure you have access to a Shopify organization.");if(e){let i=n.find(a=>a.id===e);if(!i)throw new c(`Organization with ID ${e} not found.`,`Available organizations: ${n.map(a=>`${a.businessName} (${a.id})`).join(", ")}`);return i}return De(n)}r();var Ma=["ACTIVE","LOCKED"];r();r();var Ae={basic:"BASIC_APP_DEVELOPMENT",grow:"PROFESSIONAL_APP_DEVELOPMENT",advanced:"UNLIMITED_APP_DEVELOPMENT",plus:"SHOPIFY_PLUS_APP_DEVELOPMENT"},R=Object.keys(Ae);r();r();var B=t.object({id:t.string(),name:t.string(),subdomain:t.string(),country:t.string().optional(),type:t.string().optional(),authScopes:t.array(t.string()).optional(),plan:t.string().optional(),organizationId:t.string(),organizationName:t.string()}),te=t.object({id:t.string(),name:t.string()});var vi=B.pick({name:!0}).extend({domain:B.shape.subdomain,adminUrl:t.string().nullish(),plan:t.enum(R),featurePreview:t.string().optional(),country:B.shape.country,demoData:t.boolean()}),Te=Ee({name:"CreateDevStoreResult",schema:t.object({store:vi,organization:te}),definitions:{CreatedDevStore:vi,StoreOrganization:te}});r();var fi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAppDevelopmentStore"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"priceLookupKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"prepopulateTestData"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"developerPreviewHandle"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"country"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createAppDevelopmentStore"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopName"},value:{kind:"Variable",name:{kind:"Name",value:"shopName"}}},{kind:"Argument",name:{kind:"Name",value:"priceLookupKey"},value:{kind:"Variable",name:{kind:"Name",value:"priceLookupKey"}}},{kind:"Argument",name:{kind:"Name",value:"prepopulateTestData"},value:{kind:"Variable",name:{kind:"Name",value:"prepopulateTestData"}}},{kind:"Argument",name:{kind:"Name",value:"developerPreviewHandle"},value:{kind:"Variable",name:{kind:"Name",value:"developerPreviewHandle"}}},{kind:"Argument",name:{kind:"Name",value:"country"},value:{kind:"Variable",name:{kind:"Name",value:"country"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shopAdminUrl"}},{kind:"Field",name:{kind:"Name",value:"shopDomain"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var gi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PollStoreCreation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopDomain"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"storeCreation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopDomain"},value:{kind:"Variable",name:{kind:"Name",value:"shopDomain"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var $a=2,Ha=300*1e3;function Ba(e){switch(e){case"CALLING_CORE":return"Initiating store creation";case"AWAITING_CORE_STORE_READY":return"Waiting for store to be ready";case"FINALIZING":return"Finalizing store setup";case"COMPLETE":return"Store creation complete!";case"FAILED":return"Store creation failed.";case"TIMED_OUT":return"Store creation timed out.";case"USER_ERROR":return"Store creation encountered a user error.";default:return`Store creation status: ${e}`}}async function ja(e){let{organization:n,name:i,plan:a}=e,o=await _([],{allowAutomationToken:!0}),s=I(),d=(await ie(n,{query:fi,token:o,variables:{shopName:i,priceLookupKey:Ae[a],prepopulateTestData:e.withDemoData??!1,developerPreviewHandle:e.featurePreview,country:e.country},unauthorizedHandler:s})).createAppDevelopmentStore;if(!d)throw new c("Store creation failed: unexpected empty response.");let l=d.userErrors;if(l&&l.length>0){let u=l.map(f=>f.message).join(", ");throw new c(`Failed to create dev store: ${u}`)}let{shopDomain:p,shopAdminUrl:k}=d;if(!p)throw new c("Store creation succeeded but no shop domain was returned.");if(await rn({title:U`Waiting for store to be ready`,task:async u=>{let f=Date.now(),N=!1;for(;;){if(Date.now()-f>Ha)throw N?new c("Store creation timed out after 5 minutes."):new c("Store creation timed out after 5 minutes without reporting a status.",null,[`Check whether ${p} was created with \`shopify store list\` before trying again.`]);let v=(await ie(n,{query:gi,token:o,variables:{shopDomain:p},unauthorizedHandler:s})).organization?.storeCreation?.status;if(v){if(N=!0,v==="COMPLETE")return;if(v==="FAILED"||v==="TIMED_OUT"||v==="USER_ERROR")throw new c(`Store creation failed with status: ${v}`)}u(U`${v?Ba(v):"Waiting for store creation to start"}`),await dn($a)}},renderOptions:{stdout:process.stderr}}),e.json)un(Te.encode({store:{name:i,domain:p,adminUrl:k,plan:a,...e.featurePreview?{featurePreview:e.featurePreview}:{},...e.country?{country:e.country}:{},demoData:e.withDemoData??!1},organization:{id:n.id,name:n.businessName}}));else if(e.summary!==!1){let u=[];j(u,"Domain",p),u.push(["Admin",k?{link:{label:k,url:k}}:"N/A"]),j(u,"Plan",a),j(u,"Feature preview",e.featurePreview),j(u,"Country",e.country),j(u,"Demo data",e.withDemoData?"enabled":"disabled"),nn({headline:`Dev store "${i}" created successfully.`,customSections:[{body:{tabularData:u,firstColumnSubdued:!0}}]})}return p}function j(e,n,i){i!=null&&i!==""&&e.push([n,i])}r();var Wa={basic:"Basic",grow:"Grow",advanced:"Advanced",plus:"Plus"};function Ka(){return sn({message:"Name for the new dev store"})}function Ga(){return an({message:"Which Shopify plan do you want to use?",choices:R.map(e=>({label:Wa[e],value:e}))})}function Ya(){return tn({message:"Populate the store with demo data?",confirmationMessage:"Yes, add demo data",cancellationMessage:"No, start with an empty store",defaultValue:!0})}r();r();var Ni=(e,n,i)=>{let a=new URL(e);return n&&a.searchParams.append("cursor",n),i?.status&&a.searchParams.append("status",i.status),i?.source&&a.searchParams.append("source",i.source),a.toString()};var Si=W(Z()),Ja=new Si.default({minTime:150,maxConcurrent:10});async function Za(e){let n="App Management",a=`https://${await h()}/app_management/unstable/graphql.json`;return{token:e,api:n,url:a,responseOptions:{onResponse:Ve}}}var we=e=>$e(e),hi=async(e,n,i)=>{let o=`https://${await h()}/app_management/unstable/organizations/${e}/app_logs/poll`;return Ni(o,n,i)},yi=async(e,n)=>`https://${await h()}/app_management/unstable/organizations/${encodeURIComponent(e)}/apps/${encodeURIComponent(n)}/channel_spec_export.json`;async function bi(e){let n=e.cacheOptions?.cacheExtraKey??"",i=e.cacheOptions?{...e.cacheOptions,cacheExtraKey:n}:void 0;return Ja.schedule(async()=>y({...await Za(e.token),query:e.query,variables:e.variables,cacheOptions:i,preferredBehaviour:e.requestOptions?.requestMode,unauthorizedHandler:e.unauthorizedHandler}))}function Ve(e){if(!e.extensions)return;let n=[];for(let i of e.extensions.deprecations)i.supportedUntilDate&&n.push(new Date(i.supportedUntilDate));Qe(n)}r();var Fi=W(Z()),Qa=new Fi.default({minTime:150,maxConcurrent:10});async function _i(e){let n="App Dev",i=E(e.shopFqdn),o=`https://${await We(i)}/app_dev/unstable/graphql.json`,s=je()==="local"?{"x-forwarded-host":i}:void 0;return Qa.schedule(()=>y({query:e.query,api:n,url:o,token:e.token,addedHeaders:s,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler,preferredBehaviour:e.requestOptions?.requestMode}))}r();var Di=W(Z()),Xa=new Di.default({minTime:150,maxConcurrent:10});async function et(e,n,i){let a="Functions",s=`https://${await h()}/functions/unstable/organizations/${e}/${i}/graphql`;return{token:n,api:a,url:s,responseOptions:{onResponse:Ve}}}async function Ai(e){return await Xa.schedule(async()=>y({...await et(e.organizationId,e.token,e.appId),query:e.query,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}r();var Ti=W(Z()),nt=new Ti.default({minTime:150,maxConcurrent:10});async function wi(e){let n="Webhooks",a=`https://${await h()}/webhooks/unstable/organizations/${e.organizationId}/graphql.json`;return nt.schedule(()=>y({query:e.query,api:n,url:a,token:e.token,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}import{randomUUID as it}from"crypto";var Vi="https://cdn.shopify.com/static/cli/extensions/templates.json",at=it(),tt=t.object({statusCode:t.literal(200),errors:t.array(t.object({path:t.tuple([t.literal("versionByTag")]),extensions:t.object({app_errors:t.object({errors:t.array(t.object({category:t.literal("not_found")})).nonempty()})})})).nonempty()}),re=class e{static instance;static getInstance(n){return e.instance??=new e(n),e.instance}static resetInstance(){e.instance=void 0}clientName=se.AppManagement;webUiName="Developer Dashboard";organizationSource=Q.BusinessPlatform;bundleFormat="br";_session;constructor(n){this._session=n}async subscribeToAppLogs(n,i){return this.appManagementRequest({query:ui,variables:{shopIds:n.shopIds,apiKey:n.apiKey}})}async appLogs(n,i){let a=await vt({organizationId:i,jwtToken:n.jwtToken,cursor:n.cursor,filters:n.filters});try{let o=await a.json();return a.ok?{app_logs:o.app_logs??[],cursor:o.cursor,status:a.status}:{errors:o.errors??[`Request failed with status ${a.status}`],status:a.status}}catch(o){return{errors:[`Failed to parse response: ${o}`],status:a.status}}}async channelSpecExport(n){let i=x(n.id)??n.id,a=await yi(n.organizationId,i),o=await le(a,{method:"GET",headers:we(await this.token())}),s;try{s=await o.json()}catch{s=void 0}let m=typeof s=="object"&&s!==null&&!Array.isArray(s)?s:void 0;return o.ok&&m?{ok:!0,status:o.status,body:m}:{ok:!1,status:o.status,body:m}}async session(){if(!this._session){if(ln())throw new Error("AppManagementClient.session() should not be invoked dynamically in a unit test");let n=await ue(),{appManagementToken:i,businessPlatformToken:a,userId:o}=n,s=await A({query:Jn,cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:o},token:a,unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")});if(J()&&s.currentUserAccount){let m=s.currentUserAccount.organizations.nodes.map(d=>({name:d.name}));if(m.length>1)throw new D("Multiple organizations found for the CLI token");this._session={token:i,businessPlatformToken:a,accountInfo:{type:"ServiceAccount",orgName:m[0]?.name??"Unknown organization"},userId:o}}else s.currentUserAccount?this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UserAccount",email:s.currentUserAccount.email},userId:o}:this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UnknownAccount"},userId:o}}return this._session}async token(){return(await this.session()).token}async businessPlatformToken(){return(await this.session()).businessPlatformToken}async unsafeRefreshToken(){let n=await ue({noPrompt:!0,forceRefresh:!0}),i=await this.session();return i.token=n.appManagementToken,i.businessPlatformToken=n.businessPlatformToken,i.token}async accountInfo(){return(await this.session()).accountInfo}async appFromIdentifiers(n){let{app:i}=await this.activeAppVersionRawResult(n);if(!i)return;let{name:a,appModules:o}=i.activeRelease.version,s=o.find(m=>m.specification.externalIdentifier==="app_home");return{id:i.id,title:a,apiKey:i.key,apiSecretKeys:[],organizationId:String(g(i.organizationId)),grantedScopes:i.activeRoot.grantedShopifyApprovalScopes,applicationUrl:s?.config?.app_url,embedded:s?.config?.embedded,flags:[],developerPlatformClient:this}}async appClientSecrets({apiKey:n}){let{app:i}=await this.appManagementRequest({query:Mn,variables:{apiKey:n}});return i?.activeRoot.clientCredentials?.secrets.map(o=>({secret:o.key}))??[]}async organizations(){return(await H()).map(i=>({...i,source:this.organizationSource}))}async orgFromId(n){let i=await _e(n,await this.businessPlatformToken(),this.createUnauthorizedHandler("businessPlatform"));if(i)return{...i,source:this.organizationSource}}async orgAndApps(n){let[i,{apps:a,hasMorePages:o}]=await Promise.all([this.orgFromId(n),this.appsForOrg(n)]);if(!i){let{accountInfo:s}=await this.session();throw new w(s,n)}return{organization:i,apps:a,hasMorePages:o}}async appsForOrg(n,i=""){let a=Yn,o={query:i.split(" ").filter(d=>d).map(d=>`title:${d}`).join(" "),organizationId:n},s=await this.appManagementRequest({query:a,variables:o});if(!s.appsConnection)throw new D("Server failed to retrieve apps");return{apps:s.appsConnection.edges.map(d=>{let l=d.node;return{id:l.id,apiKey:l.key,title:l.activeRelease.version.name,organizationId:n}}),hasMorePages:s.appsConnection.pageInfo.hasNextPage}}async specifications({organizationId:n}){let i=Gn,a={organizationId:Ie(n)};return(await this.appManagementRequest({query:i,variables:a})).specifications.map(s=>({name:s.name,externalName:s.name,identifier:s.identifier,externalIdentifier:s.externalIdentifier,gated:!1,managementExperience:"cli",registrationLimit:s.uidStrategy.appModuleLimit,uidStrategy:kt(s.uidStrategy.__typename),experience:xe(s.experience,s.identifier),validationSchema:s.validationSchema}))}async templateSpecifications({organizationId:n},i={}){let a,{templatesJsonPath:o}=Nn,s=process.env[o];if(s){if(!await qe(s))throw new c("There is no file at the path specified for template specifications");let u=await Ue(s);a=JSON.parse(u)}else try{a=await(await Be(Vi)).json()}catch{throw new c(["Failed to fetch extension templates from",{link:{url:Vi}},{char:"."},"This likely means a problem with your internet connection."])}let m=0,d=i.requestedTemplate?a.filter(u=>u.identifier===i.requestedTemplate):void 0,l=d&&d.length>0?d:a,p=(await pt(l,async u=>this.organizationBetaFlags(n,u),async u=>this.organizationExpFlags(n,u))).map(u=>({...u,sortPriority:m++})),k=[];for(let u of a)u.group&&!k.includes(u.group)&&k.push(u.group);return{templates:p,groupOrder:k}}async createApp(n,i){let o=(await this.apiVersions(n.id)).publicApiVersions.filter(k=>k!=="unstable").sort().at(-1)??"unstable",s=st(i,n.id,o),m=Kn,d=await this.appManagementRequest({query:m,variables:s});if(!d.appCreate.app||d.appCreate.userErrors?.length>0){let k=d.appCreate.userErrors.map(u=>u.message).join(", ");throw new c(k)}let l=Ei([]),p=d.appCreate.app;return{...p,title:i.name,apiKey:p.key,apiSecretKeys:[],grantedScopes:i?.scopesArray??[],organizationId:n.id,newApp:!0,flags:l,developerPlatformClient:this}}async devStoresForOrg(n,i){let a=await this.businessPlatformOrganizationsRequest({query:Un,organizationId:String(g(n)),variables:{searchTerm:i}}),o=a.organization;if(!o)throw new c("No organization found");let s=o.accessibleShops?.edges.map(d=>d.node)??[],m=zi(o.currentUser?.organizationPermissions??[]);return{stores:xi(s,m),hasMorePages:a.organization?.accessibleShops?.pageInfo.hasNextPage??!1}}async devStoreCapReached(n){return(await this.businessPlatformOrganizationsRequest({query:qn,organizationId:String(g(n)),variables:{}})).organization?.devStoreCapReached??!1}async appExtensionRegistrations(n,i){let a=i??await this.activeAppVersion(n),o=[],s=[],m=[];return a.appModuleVersions.forEach(d=>{let l={id:d.registrationId,uuid:d.registrationUuid,title:d.handle,type:d.type,activeVersion:d.config?{config:JSON.stringify(d.config),...d.target&&{context:d.target}}:void 0};d.specification?.experience==="configuration"?o.push(l):d.specification?.options?.managementExperience==="dashboard"?m.push(l):s.push(l)}),{app:{dashboardManagedExtensionRegistrations:m,configurationRegistrations:o,extensionRegistrations:s}}}async appVersions({id:n,organizationId:i,title:a}){let o=jn,s={appId:n},m=await this.appManagementRequest({query:o,variables:s});return m.app?{app:{id:m.app.id,organizationId:i,title:a,appVersions:{nodes:m.app.versions?.edges.map(d=>{let l=d.node;return{createdAt:l.createdAt,createdBy:{displayName:l.createdBy},versionTag:l.metadata.versionTag,status:l.id===m.app.activeRelease.version.id?"active":"inactive",versionId:l.id,message:l.metadata.message}})??[],pageInfo:{totalResults:m.app.versionsCount}}}}:{app:null}}async appInstallCount({id:n}){let i=Wn,a={appId:n};return(await this.appManagementRequest({query:i,variables:a})).app.installCount??0}async appVersionByTag({id:n,organizationId:i},a){let o=mi,s={appId:n,versionTag:a},d=(await this.appManagementRequest({query:o,variables:s}).catch(l=>{throw tt.safeParse(l).success?new O(a):l})).versionByTag;if(!d)throw new O(a);return{id:parseInt(d.id,10),uuid:d.id,versionTag:d.metadata.versionTag,location:[await oe({organizationId:i,id:n}),"versions",g(d.id)].join("/"),message:d.metadata.message??"",appModuleVersions:d.appModules.map(Ri)}}async appVersionsDiff(n,{versionId:i}){let a={versionId:i},[o,s]=await Promise.all([this.activeAppVersionRawResult(n.apiKey),this.appManagementRequest({query:Bn,variables:a})]),m=o.app.activeRelease.version.appModules,d=s.version.appModules,{added:l,removed:p,updated:k}=ct({currentModules:m,selectedVersionModules:d});function u(f){return{uuid:f.uuid,handle:f.handle,specification:{identifier:f.specification.identifier,experience:xe(f.specification.experience,f.specification.identifier),options:{managementExperience:"cli"}}}}return{app:{versionsDiff:{added:l.map(u),updated:k.map(u),removed:p.map(u)}}}}async activeAppVersion(n){let i=await this.activeAppVersionRawResult(n.apiKey);return{appModuleVersions:i.app.activeRelease.version.appModules.map(Ri),...i.app.activeRelease}}async generateSignedUploadUrl({apiKey:n,organizationId:i}){let a={sourceExtension:"BR",organizationId:Ie(i)},o=await this.appManagementRequest({query:Hn,variables:a,cacheOptions:{cacheTTL:{minutes:59},cacheExtraKey:`${n}-${at}`}});return{assetUrl:o.appRequestSourceUploadUrl.sourceUploadUrl,userErrors:o.appRequestSourceUploadUrl.userErrors}}async deploy({appManifest:n,appId:i,organizationId:a,versionTag:o,message:s,commitReference:m,bundleUrl:d,skipPublish:l}){let u={appId:i,version:d?{sourceUrl:d}:{source:n},metadata:{versionTag:o,message:s,sourceControlUrl:m}},f=await this.appManagementRequest({query:$n,variables:u,requestOptions:{requestMode:"slow-request"}}),{version:N}=f.appVersionCreate,C=f.appVersionCreate.userErrors.map(Ci)??[];if(!N)return{appDeploy:{userErrors:C}};let v={appDeploy:{appVersion:{uuid:N.id,id:parseInt(N.id,10),versionTag:N.metadata.versionTag,location:await ut(a,i,N.id),appModuleVersions:N.appModules.map(Ce=>({uuid:Ce.uuid,registrationUuid:Ce.uuid,validationErrors:[]})),message:N.metadata.message},userErrors:C}};if(l)return v;let qi={appId:i,versionId:N.id},de=await this.appManagementRequest({query:ye,variables:qi});return de.appReleaseCreate.userErrors&&(v.appDeploy.userErrors=(v.appDeploy.userErrors??[]).concat(de.appReleaseCreate.userErrors.map(Ci))),!de.appReleaseCreate.release&&v.appDeploy.userErrors.length===0&&v.appDeploy.userErrors.push({message:"The API did not return a release for the created app version.",category:"",details:[]}),v}async release({app:{id:n,organizationId:i},version:{versionId:a}}){let o={appId:n,versionId:a},s=await this.appManagementRequest({query:ye,variables:o});if(s.appReleaseCreate.release&&!s.appReleaseCreate.userErrors?.length)return{appRelease:{appVersion:{versionTag:s.appReleaseCreate.release.version.metadata.versionTag,message:s.appReleaseCreate.release.version.metadata.message,location:[await oe({organizationId:i,id:n}),"versions",g(s.appReleaseCreate.release.version.id).toString()].join("/")}}};if(!s.appReleaseCreate.userErrors?.length)throw new c("The Developer Dashboard did not confirm the app version release.");return{appRelease:{userErrors:s.appReleaseCreate.userErrors?.map(m=>({field:m.field,message:m.message,category:m.category,details:[],on:m.on}))??[]}}}async storeByDomain(n,i,a){let s=(await Promise.all(a.map(l=>this.businessPlatformOrganizationsRequest({query:Pn,organizationId:String(g(n)),variables:{domain:i,filters:ft(l)}})))).map(l=>l.organization).filter(l=>l!=null);if(s.length===0)throw new c("No organization found");let m=s.flatMap(l=>{let p=l.accessibleShops?.edges.map(u=>u.node)??[],k=zi(l.currentUser?.organizationPermissions??[]);return xi(p,k)}),d=E(i);return m.find(l=>l.shopDomain===d)}async ensureUserAccessToStore(n,i){if(!i.provisionable)return;let o={input:{shopifyShopId:lt(i.shopId)}},m=(await T({query:On,token:await this.businessPlatformToken(),organizationId:String(g(n)),variables:o,unauthorizedHandler:this.createUnauthorizedHandler()})).organizationUserProvisionShopAccess;if(!m.success){let d=m.userErrors?.map(l=>l.message).join(", ")??"";throw new D(`Failed to provision user access to store: ${d}`)}}async sendSampleWebhook(n,i){let a=Qn,o={address:n.address,apiKey:n.api_key,apiVersion:n.api_version,deliveryMethod:n.delivery_method,sharedSecret:n.shared_secret,topic:n.topic},s=await this.webhooksRequest({organizationId:i,query:a,variables:o}),m={samplePayload:"{}",headers:"{}",success:!1,userErrors:[]},d=s.cliTesting;return d&&(m={samplePayload:d.samplePayload??"{}",headers:d.headers??"{}",success:d.success,userErrors:d.errors.map(l=>({message:l,fields:[]}))}),{sendSampleWebhook:m}}async apiVersions(n){return{publicApiVersions:(await this.webhooksRequest({organizationId:n,query:Xn,variables:{}})).publicApiVersions.map(a=>a.handle)}}async topics({api_version:n},i){let a=Zn,o={apiVersion:n};return{webhookTopics:(await this.webhooksRequest({organizationId:i,query:a,variables:o})).availableTopics??[]}}async updateURLs(n){return ke("\u26A0\uFE0F updateURLs is not implemented"),{appUpdate:{userErrors:[]}}}async targetSchemaDefinition(n,i,a){try{let{app:o}=await this.activeAppVersionRawResult(i),s=String(g(o.id));return(await this.functionsRequest({organizationId:a,query:ei,appId:s,variables:{handle:n.handle,version:n.version}}))?.target?.api?.schema?.definition??null}catch(o){throw new c(`Failed to fetch schema definition: ${o}`)}}async apiSchemaDefinition(n,i,a){try{let{app:o}=await this.activeAppVersionRawResult(i),s=String(g(o.id));return(await this.functionsRequest({organizationId:a,query:ni,appId:s,variables:n}))?.api?.schema?.definition??null}catch(o){throw new c(`Failed to fetch schema definition: ${o}`)}}toExtensionGraphQLType(n){return n.toLowerCase()}async appDeepLink({id:n,organizationId:i}){return oe({id:n,organizationId:i})}async devSessionCreate({appId:n,assetsUrl:i,shopFqdn:a,websocketUrl:o,unsafeValidation:s}){let m=String(g(n));return this.appDevRequest({query:Cn,shopFqdn:a,variables:{appId:m,assetsUrl:i??"",websocketUrl:o,unsafeValidation:s??!1},requestOptions:{requestMode:"slow-request"}})}async devSessionUpdate({appId:n,assetsUrl:i,shopFqdn:a,manifest:o,inheritedModuleUids:s,unsafeValidation:m}){let l={appId:String(g(n)),assetsUrl:i,manifest:JSON.stringify(o),inheritedModuleUids:s,unsafeValidation:m??!1};return this.appDevRequest({query:zn,shopFqdn:a,variables:l})}async devSessionDelete({appId:n,shopFqdn:i}){let a=String(g(n));return this.appDevRequest({query:En,shopFqdn:i,variables:{appId:a}})}async getCreateDevStoreLink(n){let i=`https://${await me()}/dashboard/${n.id}/stores`;return[`Looks like you don't have any dev stores associated with ${n.businessName}'s Dev Dashboard.`,{link:{url:i,label:"Create a store in Dev Dashboard"}}]}async activeAppVersionRawResult(n){return this.appManagementRequest({query:Ln,variables:{apiKey:n}})}async organizationBetaFlags(n,i){let a={organizationId:Ii(n)},o=await Xe({query:vn(i),token:await this.businessPlatformToken(),organizationId:n,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),s={};return i.forEach(m=>{s[m]=!!o.organization[`flag_${m}`]}),s}async organizationExpFlags(n,i){let a={organizationId:Ii(n),flagHandles:i},o=await T({query:fn,token:await this.businessPlatformToken(),organizationId:n,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),s={},m=o.organization?.enabledFlags??[];return i.forEach((d,l)=>{s[d]=!!m[l]}),s}async appManagementRequest(n){return bi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async appDevRequest(n){return _i({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async businessPlatformRequest(n){return A({...n,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async businessPlatformOrganizationsRequest(n){return T({...n,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async functionsRequest(n){return Ai({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async webhooksRequest(n){return wi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}createUnauthorizedHandler(n="default"){return Pi(this,n)}},ot="https://shopify.dev/apps/default-app-home",rt="https://shopify.dev/apps/default-app-home/api/auth";function st(e,n,i){let{isLaunchable:a,scopesArray:o,name:s}=e;return{initialVersion:{source:{source:{name:s,modules:[{type:Ne,config:{app_url:a?"https://example.com":ot,embedded:!0}},{type:Se,config:{name:s}},{type:be,config:{api_version:i}},{type:he,config:{redirect_url_allowlist:[a?"https://example.com/api/auth":rt],...o&&{scopes:o.map(p=>p.trim()).join(",")}}}]}}.source},organizationId:Ie(n)}}function dt(e){let n=e.startsWith("gid://")?g(e):Number(e);if(Number.isNaN(n))throw new Error(`Invalid organization ID: ${e}`);return`gid://organization/Organization/${n}`}function Ii(e){return $(dt(e))}function Ie(e){return`gid://shopify/Organization/${e.startsWith("gid://")?g(e):Number(e)}`}function lt(e){return $(`gid://organization/ShopifyShop/${e}`)}function mt(e){let n=ae(e);if(n===void 0)throw new Error(`Invalid encoded GID: ${e}`);return n}function g(e){if(e.startsWith("gid://")){let n=x(e);if(n===void 0)throw new Error(`Invalid GID: ${e}`);return Number(n)}return Number(e)}async function oe({id:e,organizationId:n}){let i=g(n).toString();return`https://${await me()}/dashboard/${i}/apps/${g(e)}`}async function ut(e,n,i){return`${await oe({organizationId:e,id:n})}/versions/${g(i)}`}function ct({currentModules:e,selectedVersionModules:n}){let i=e.map(l=>l.userIdentifier),a=n.map(l=>l.userIdentifier),o=n.filter(l=>!i.includes(l.userIdentifier)),s=e.filter(l=>!a.includes(l.userIdentifier)),m=s.map(l=>l.userIdentifier),d=e.filter(l=>!m.includes(l.userIdentifier));return{added:o,removed:s,updated:d}}async function pt(e,n,i,a=ze){let o=z(e.flatMap(l=>l.organizationBetaFlags??[])),s=z(e.flatMap(l=>l.organizationExpFlags??[])),[m,d]=await Promise.all([o.length>0?n(o):Promise.resolve({}),s.length>0?i(s):Promise.resolve({})]);return e.filter(l=>{let p=!l.organizationBetaFlags||l.organizationBetaFlags.every(v=>m[v]),k=!l.organizationExpFlags||l.organizationExpFlags.every(v=>d[v]),u=!l.minimumCliVersion||ce(a,`>=${l.minimumCliVersion}`),f=!l.deprecatedFromCliVersion||ce(a,`<${l.deprecatedFromCliVersion}`),N=u&&f,C=en(a)&&l.deprecatedFromCliVersion===void 0;return p&&k&&(N||C)})}function xe(e,n){if(n===Fe)return"configuration";switch(e){case"extension":case"configuration":case"deprecated":return e;default:return ke(`Unknown specification experience value "${e}", defaulting to "extension"`),"extension"}}function kt(e){switch(e){case"UidStrategiesDynamic":return"dynamic";case"UidStrategiesStatic":return"single";case"UidStrategiesClientProvided":return"uuid";default:return"uuid"}}function xi(e,n){return e.map(i=>{let{externalId:a,primaryDomain:o,name:s,url:m,storeType:d}=i,l=m??o;if(!l)throw new D("The selected store does not have a valid URL");return{shopId:a?mt(a):void 0,link:o,shopDomain:E(l),shopName:s,transferDisabled:!0,convertableToPartnerTest:!0,provisionable:n,storeType:d}})}function Ri(e){return{registrationId:e.userIdentifier===e.uuid?"":e.userIdentifier,registrationUuid:e.uuid,handle:e.handle,type:e.specification.externalIdentifier,config:e.config,target:e.target??"",specification:{...e.specification,identifier:e.specification.identifier,options:{managementExperience:e.specification.managementExperience},experience:xe(e.specification.experience,e.specification.externalIdentifier)}}}var vt=async({organizationId:e,jwtToken:n,cursor:i,filters:a})=>{let o=await hi(e,i,a),s=we(n);return le(o,{method:"GET",headers:s})};function Ci(e){let n=[],i=e.on[0]?.user_identifier;return i&&n.push({extension_id:i}),{...e,details:n}}function ft(e){return[{field:"STORE_TYPE",operator:"EQUALS",value:e.toLowerCase()},{field:"STORE_STATUS",operator:"EQUALS",value:"ACTIVE"}]}function zi(e){return e.includes("ondemand_access_to_stores")}var se;(function(e){e.AppManagement="app-management",e.Partners="partners"})(se||(se={}));function gn(){return re.getInstance()}var Ui;Ui||(Ui={});var gt={};function Ei(e=[]){let n=[],i=e.map(a=>gt[a]);return n.filter(a=>!i.includes(a))}var Re=new WeakMap;function Pi(e,n="default"){return{type:"token_refresh",handler:async()=>{let i=Re.get(e);if(i)await i;else try{i=e.unsafeRefreshToken(),Re.set(e,i),await i}finally{Re.delete(e)}let a=await e.session();return{token:n==="businessPlatform"?a.businessPlatformToken:a.token}}}}export{I as a,ie as b,x as c,ae as d,H as e,qa as f,_e as g,De as h,La as i,Ma as j,R as k,B as l,te as m,Te as n,ja as o,Ka as p,Ga as q,Ya as r,Nn as s,Li as t,Lt as u,Mt as v,Sn as w,$t as x,Ht as y,Nt as z,pn as A,St as B,Oi as C,ht as D,bn as E,Fn as F,Bi as G,eo as H,no as I,Xi as J,X as K,io as L,b as M,ao as N,V as O,ee as P,oa as Q,wn as R,ma as S,Vn as T,In as U,S as V,Ro as W,Fe as X,Is as Y,M as Z,ii as _,si as $,Va as aa,li as ba,O as ca,Q as da,Hi as ea,Yt as fa,yn as ga,Jt as ha,Ne as ia,Oo as ja,Se as ka,jo as la,ha as ma,ya as na,he as oa,Xo as pa,be as qa,Ss as ra,dt as sa,se as ta,gn as ua,Pi as va,fe as wa,w as xa,Rt as ya,Ct as za,zt as Aa};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as j,c as v,d as O}from"./chunk-
|
|
1
|
+
import{b as j,c as v,d as O}from"./chunk-JPWRZ5SL.js";import{D as n,F as b,J as k,O as p,P as a,Q as u,U as h,W as T,X as F,a as A,t as P}from"./chunk-W56ZGEQQ.js";import{b as w}from"./chunk-ZJOX5HW4.js";import{b as I,c as g}from"./chunk-3KM5ZOW2.js";import{a as f}from"./chunk-BN7ZXAZJ.js";import{wb as S}from"./chunk-JLQRDFR5.js";import{b as o}from"./chunk-FZCGRIOM.js";import{b as x}from"./chunk-YTUUU33R.js";import{e as d}from"./chunk-IWTNUJGY.js";import{e as _,g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var R=o.object({path:p().describe("The absolute path of the file that the instructions were written to."),format:o.literal("markdown").describe("The file holds the instructions in Markdown, not a JSON result.")}).strict(),c=f({name:"AppSecurityInstructionsResult",schema:o.union([o.object({status:o.literal("success"),app:a,resultsDirectory:p().describe("The absolute path of the results directory that the instructions use. It may not exist yet: the instructions start by running check, which creates it."),instructions:u}).strict(),R]).describe("The instructions and the app they are for. With --write, only the file they were written to."),definitions:{AppSecurityApp:a,AppSecurityInstructions:u,AppSecurityInstructionsFile:R}});function C(r,t,e){if(e==="json"){S(c.encode(W(r,t)));return}O(r,t.delivery)}function W(r,{selection:t,delivery:e}){if(e.writePath)return{path:h(e.writePath),format:"markdown"};let{resultsDirectory:s}=P(t.appDirectory,n(t));return{status:"success",app:T(t),resultsDirectory:h(s),instructions:F(r,e)}}var l=_(x(),1);var m=class r extends w{static summary="Provide app security check instructions to a coding agent.";static descriptionWithMarkdown="Prints the complete workflow that a coding agent should follow to review app security check results.\n\nBy default, the instructions are printed to stdout. Use `--copy` to copy them to the clipboard or `--write` to write them to a file. Standalone instructions always start by running `shopify app security check`; only that invocation's generated review pack is trusted as workflow input.";static get jsonOutputSchema(){return c}static description=this.descriptionWithoutMarkdown();static flags={...I,...A,copy:l.Flags.boolean({description:"Copy the instructions to the clipboard instead of printing them. With --json, the result still includes them.",default:!1,exclusive:["write"],env:"SHOPIFY_FLAG_APP_SECURITY_INSTRUCTIONS_COPY"}),write:l.Flags.string({description:"Write the instructions to a file instead of printing them. With --json, stdout contains only the absolute path and Markdown format of the written file.",exclusive:["copy"],parse:async t=>d(t),env:"SHOPIFY_FLAG_APP_SECURITY_INSTRUCTIONS_WRITE"}),...g};async run(){let{flags:t}=await this.parse(r),e=await b({path:t.path,config:t.config,clientId:t["client-id"],withoutAppConfig:t["without-app-config"],allowPrompts:!1}),s=j({appDirectory:e.appDirectory,resultsKey:n(e),commands:k(e,t.path)}),y={copy:t.copy,writePath:t.write};await v(s,y),C(s,{selection:e,delivery:y},t.json?"json":"text")}};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b}from"./chunk-
|
|
1
|
+
import{b}from"./chunk-ZJOX5HW4.js";import{b as E}from"./chunk-3KM5ZOW2.js";import{R as F,S as N}from"./chunk-D2KIGKBI.js";import{S as C,Sa as w,la as O,yb as k}from"./chunk-JLQRDFR5.js";import{i as n}from"./chunk-B4OMIONW.js";import{k as R}from"./chunk-LHXFTFFM.js";import{b as U}from"./chunk-YTUUU33R.js";import{c as u,e as P,f as x,g,m as T,p as y}from"./chunk-IWTNUJGY.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{static description="Doctor test suite";context;assertions=[];registeredTests=[];async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let o of this.registeredTests){this.assertions=[];let s=Date.now();try{await o.fn(),e.push({name:o.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:o.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let o=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:o,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let o=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:o,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,o){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:o??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:o??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,o){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:o??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:o??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:o??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,o){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:o??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,o){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:o??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:o??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:o??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,o){this.assertions.push({description:o,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};var p=class extends m{static description="Tests the theme init command creates a valid theme structure";themeName="";themePath="";tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let t=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(t),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let t=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(t.map(e=>this.assertFile(u(this.themePath,e))))}),this.test("theme directories exist",async()=>{let t=["sections","snippets","assets","locales"];await Promise.all(t.map(e=>this.assertDirectory(u(this.themePath,e))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static description="Tests pushing a theme to the store creates an unpublished theme";static requiresStore=!0;tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let o=await this.run(e);this.assertSuccess(o);let s=this.assertJson(o,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(i){return{workingDirectory:i.path??y(),environment:i.environment,store:i.store,password:i.password,data:{}}}d();var a=i=>k(i),v;function J(i){v=i}function G(i){if(!v)return i;let t=/\/[^\s,)]+/g;return i.replace(t,e=>T(e,v))}function A(i,t){a(""),a(n.bold(n.cyan(`Suite: ${i}`))),a(n.dim(t))}function j(i){a(n.bold(n.blue(`Running: ${i}`)))}function q(i){let t=`(${(i.duration/1e3).toFixed(2)}s)`;if(i.status==="passed"){a(n.bold(n.green(`PASSED: ${i.name} ${n.dim(t)}`)));for(let e of I(i.assertions))a(e)}else if(i.status==="failed"){a(n.red(`FAILED: ${i.name} ${n.dim(t)}`));for(let e of I(i.assertions))a(e);i.error&&a(n.red(` Error: ${G(i.error.message)}`))}else a(n.yellow(`SKIPPED: ${i.name}`))}function S(i){let t=i.filter(h=>h.status==="passed").length,e=i.filter(h=>h.status==="failed").length,o=i.filter(h=>h.status==="skipped").length,s=i.length,r=i.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),o>0&&a(` Skipped: ${n.yellow(String(o))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(i){return i.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(i){let t=[],e=_(i);J(e.workingDirectory);for(let o of Y){let s=new o,r=o.description??"Test suite";A(o.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class i extends b{static description="Run all theme command doctor-release tests";static hidden=!0;static flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})};async run(){if(!R())return;let{flags:t}=await this.parse(i);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as a}from"./chunk-
|
|
1
|
+
import{h as a}from"./chunk-H6GYBLVQ.js";import{N as l}from"./chunk-GQLNG537.js";import{h}from"./chunk-M5VIFG2V.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();var i=["live","unpublished","development"];async function A(e,r){let t=await l(e,r);return d(t)}async function d(e,{allowEmpty:r=!1}={}){let t=e.storeFqdn,o=(await a(e)).filter(w);if(o.length===0&&!r)throw new h(`There are no themes in the ${t} store`);return o.sort(y)}function w(e){return i.includes(e.role)}function y(e,r){return i.indexOf(e.role)-i.indexOf(r.role)}u();function E(e,r,t,{allowEmpty:o=!1}={}){return T(e,r,t,o)??L(e,r,t,o)}function T(e,r,t,o){let n=t.role;if(!n)return;let s=`No themes on the store ${e} match the role "${n}"`;return p(r,f=>f.role===n).orThrow(s,o)}function L(e,r,t,o){return t.themeIdentifiers.flatMap(s=>{let f=`No themes on the store ${e} match the ID or name "${s}"`;return p(r,c=>`${c.id}`===s||c.name.toLowerCase()===s.toLowerCase()?!0:g(c.name.toLowerCase(),s.toLowerCase())).orThrow(f,o)})}function p(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:(o,n)=>{if(n)return[];throw new h(o)}}}var m=class{queryProps;constructor(r){this.queryProps=r}get role(){for(let r of i)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function g(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{i as a,A as b,d as c,E as d,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-43R5VGKT.js";import{b as p}from"./chunk-ZDQO6CNY.js";import{b as C}from"./chunk-YTUUU33R.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as L,g as u}from"./chunk-VKWPEFWQ.js";u();u();import{fileURLToPath as y}from"node:url";async function g(e){let{isDevelopment:o}=await import("./local-
|
|
1
|
+
import{a as h}from"./chunk-43R5VGKT.js";import{b as p}from"./chunk-ZDQO6CNY.js";import{b as C}from"./chunk-YTUUU33R.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as L,g as u}from"./chunk-VKWPEFWQ.js";u();u();import{fileURLToPath as y}from"node:url";async function g(e){let{isDevelopment:o}=await import("./local-OKPVB4NH.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-UDVUFKMD.js"),r=await import("./lib-VKSQ65BQ.js"),{run:s,flush:m,Errors:l,settings:f}=r.default??r;o()&&(f.debug=!0);try{let t=new n({root:y(e.moduleURL)});await t.load(),e.lazyCommandLoader&&t.setLazyCommandLoader(e.lazyCommandLoader);let a=e.argv??process.argv.slice(2),i=a.indexOf("--");if((i===-1?a:a.slice(0,i)).includes("--json-schema")||c(process.env.SHOPIFY_FLAG_JSON_SCHEMA)){let{printCommandJsonSchema:I}=await import("./command-json-schema-F5XF7XHL.js");await I(t,a,e.lazyCommandLoader);return}await s(a,t),await m()}catch(t){let{errorHandler:a}=await import("./error-handler-4GCXKC6I.js");await a(t);let i=t;return l.handle({...i,name:i?.name??"Error",message:i?.message??String(t),stack:i?.stack,skipOclifErrorHandling:!0})}}var d=L(C());async function O(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<22){let{renderError:s}=await import("./ui-VJTNGCS6.js");s({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function v(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[p.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function H(e,o=g,n=process.argv,r=process.env,s=process.versions){return v(e,n,r),e.runInCreateMode&&await w(e,n),b(n,r),await O(s),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function w(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-B3OW3PFQ.js"),{moduleDirectory:r}=await import("./path-3L2QRACZ.js"),l=(await n(r(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(t=>t.includes("init"))===-1){let t=o.findIndex(a=>a.match(new RegExp(`bin(\\/|\\\\)+(create-${l}|dev|run)`)))+1;o.splice(t,0,"init")}}var k={...h,"no-color":d.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:d.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output. May include sensitive data.",env:"SHOPIFY_FLAG_VERBOSE"})},U={json:d.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:p.json})},V={"auth-alias":d.Flags.string({description:"Alias of the Shopify account to use for authentication.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})},P=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return d.Flags.integer({min:1,max:65535,...e,description:o})};function D(e){let o=e.description?.trimEnd(),r=[o&&!o.endsWith(".")?`${o}.`:o,"Required if non interactive."].filter(Boolean).join(" ");return{...e,description:r,requiredIfNonInteractive:!0}}async function M(){let{cacheClear:e}=await import("./conf-store-5CBLWTOC.js");e()}export{H as a,k as b,U as c,V as d,P as e,D as f,M as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K,b as _,c as z,d as N,e as f,f as d,g as W,h as G,j as H}from"./chunk-
|
|
1
|
+
import{a as K,b as _,c as z,d as N,e as f,f as d,g as W,h as G,j as H}from"./chunk-QF5WKTPD.js";import{a as x}from"./chunk-C3RFAKWR.js";import{b as S,c as j}from"./chunk-ACA2BGAD.js";import{a as R}from"./chunk-VHZ6RL67.js";import{a as P}from"./chunk-NVKJ7ZLP.js";import{Ma as J,da as L}from"./chunk-U2T5HPRD.js";import{Ea as A,ta as U}from"./chunk-GQLNG537.js";import{b as D,c as v}from"./chunk-3KM5ZOW2.js";import{A as F}from"./chunk-D2KIGKBI.js";import{a as C}from"./chunk-BN7ZXAZJ.js";import{j as O,m as k,n as M}from"./chunk-M5VIFG2V.js";import{wb as s,xb as g}from"./chunk-JLQRDFR5.js";import{b as t}from"./chunk-FZCGRIOM.js";import{b as $}from"./chunk-YTUUU33R.js";import{g as T}from"./chunk-IWTNUJGY.js";import{e as Z,g as m}from"./chunk-VKWPEFWQ.js";m();m();var B=t.string().refine(T,"Expected an absolute native filesystem path"),Y=t.object({id:t.string().uuid().describe("The dashboard extension registration UUID, not a Shopify GID."),name:t.string(),type:t.string().min(1).describe("The upstream dashboard extension type."),directory:B.describe("The absolute local extension directory."),configurationPath:B.nullable().describe("The absolute local TOML path, or null when no TOML file exists in a kept directory."),changed:t.boolean().describe("Whether this import wrote the local extension TOML.")}).strict(),q=t.object({extensionId:t.string().uuid().nullable().describe("The registration UUID, or null for identifier persistence."),error:S}).strict(),n=C({name:"ImportDashboardExtensionsResult",schema:t.object({status:t.enum(["success","partial","skipped","cancelled"]),reason:t.enum(["no-extensions","directory-selection-cancelled"]).nullable(),extensions:t.array(Y).describe("Completed extension imports and kept local directories, in selection order."),errors:t.array(q).describe("Failed selected imports or identifier persistence."),identifiersUpdated:t.boolean().describe("Whether the extension identifier persistence step completed.")}).strict(),definitions:{ImportedDashboardExtension:Y,ExtensionImportFailure:q,...j.definitions}});var Q=Z($(),1);var E=class u extends R{static descriptionWithMarkdown="Import dashboard-managed extensions into your app.";static get jsonOutputSchema(){return n}static description=this.descriptionForHelp();static flags={...D,...P,...v,"client-id":Q.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]})};async run(){let{flags:o}=await this.parse(u),r=await J({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),a=await H({developerPlatformClient:r.developerPlatformClient,apiKey:r.remoteApp.apiKey,organizationId:r.remoteApp.organizationId,extensionTypes:N}),l=_(o.json?G(r.app,a):a);if(l.length===0)o.json?s(n.encode({status:"skipped",reason:"no-extensions",extensions:[],errors:[],identifiersUpdated:!1})):F({headline:["No extensions to migrate."]});else{let y=await z(l),i;try{if(i=await W({...r,extensions:a,extensionTypes:y.extensionTypes,buildExtensionConfig:y.buildExtensionConfig}),o.json&&i.status==="skipped")return s(n.encode({status:i.status,reason:i.reason,extensions:[],errors:[],identifiersUpdated:!1})),{app:r.app};o.json||K(i),await L({app:r.app,appApiKey:r.remoteApp.apiKey,extensionUuids:i.extensionUuids,command:"import-extensions"})}catch(e){if(!o.json)throw e instanceof d?e.originalError:e;let I=e instanceof d?e.originalError:e;if(e instanceof f||e instanceof d){let p=await e.completedImports();if(e instanceof d&&p.extensions.length===0)throw e.originalError;let h=e instanceof f&&p.failures.length===0;if(s(n.encode({status:h?"cancelled":"partial",reason:h?"directory-selection-cancelled":null,extensions:b(p.extensions),errors:p.failures.map(({extension:V,error:X})=>({extensionId:V.uuid,error:x(X)})),identifiersUpdated:!1})),h)throw await g(),e;e instanceof f&&(I=p.failures[0].error)}else if(i)s(n.encode({status:"partial",reason:null,extensions:b(i.extensions),errors:[{extensionId:null,error:x(e)}],identifiersUpdated:!1}));else throw e;let c=await k(I),w=M(c)?"unexpected_error":"expected_error";throw await U({config:this.config,errorMessage:c instanceof Error?c.message:void 0,exitMode:w}),await A(c,w),await g(),new O}o.json&&s(n.encode({status:"success",reason:null,extensions:b(i.extensions),errors:[],identifiersUpdated:!0}))}return{app:r.app}}};function b(u){return u.map(({extension:o,directory:r,configurationPath:a,changed:l})=>({id:o.uuid,name:o.title,type:o.type,directory:r,configurationPath:a,changed:l}))}export{E as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as r}from"./chunk-33ZE3DRQ.js";import{b as a}from"./chunk-ZJOX5HW4.js";import{d as t}from"./chunk-3KM5ZOW2.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var e=class extends a{static baseFlags={...a.baseFlags,...t};environmentsFilename(){return r.appEnvironments}};export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-N57Y7THE.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as L}from"./chunk-
|
|
1
|
+
import{b as L}from"./chunk-ZJOX5HW4.js";import{I as g,t as f,w as p,x as d,y as h,z as S}from"./chunk-GQLNG537.js";import{j as r}from"./chunk-MHR5OHT5.js";import{b as O,c as b,f as F}from"./chunk-3KM5ZOW2.js";import{E as w,K as y}from"./chunk-D2KIGKBI.js";import{a as m}from"./chunk-BN7ZXAZJ.js";import{Ab as I,wb as A}from"./chunk-JLQRDFR5.js";import{b as n}from"./chunk-FZCGRIOM.js";import{b as j}from"./chunk-YTUUU33R.js";import{e as C,g as i}from"./chunk-VKWPEFWQ.js";i();i();var a=m({name:"AuthLoginResult",schema:n.object({status:n.literal("success"),alias:n.string()}).strict()});i();var c="NEW_LOGIN";function _(s,e){let t=[],o=s[e];if(o)for(let[l,x]of Object.entries(o))t.push({label:x.identity.alias??l,value:l});return t}async function q(){let s=await g({},{forceNewSession:!0}),e=await d(s.userId);if(!e){let t=await y({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await h(s.userId,t),t}return e}async function E(){let s=await p(),e=await f(),t=[];return s&&t.push(..._(s,e)),t.length>0&&t.push({label:"Log in with a different account",value:c}),t}async function N(s){if(s){let o=await S(s);if(o)return r(o),s}let e=await E(),t=c;return e.length>0&&(t=await w({message:"Which account would you like to use?",choices:e})),t===c?q():(r(t),e.find(o=>o.value===t)?.label??t)}var v=C(j(),1);var u=class s extends L{static descriptionWithMarkdown="Logs you in to your Shopify account.";static description=this.descriptionForHelp();static flags={...O,...b,alias:F(v.Flags.string({description:"Alias of an existing session you want to use.",env:"SHOPIFY_FLAG_AUTH_ALIAS"}))};static get jsonOutputSchema(){return a}async run(){let{flags:e}=await this.parse(s),t=await N(e.alias);e.json?A(a.encode({status:"success",alias:t})):I(`Current account: ${t}.`)}};export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-64G5TGFF.js";import{a as e}from"./chunk-TAWCKJKP.js";import{a as o}from"./chunk-Y55T4IIQ.js";import{b as i}from"./chunk-ZJOX5HW4.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static description="View all the available UI kit components";static hiddenAliases=["kitchen-sink all"];static hidden=!0;async run(){await o(),await e(),await s()}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as y,d as N,e as x,f as oe}from"./chunk-
|
|
1
|
+
import{c as y,d as N,e as x,f as oe}from"./chunk-CLUUA3HX.js";import{a as te,c as re}from"./chunk-AUE7LM32.js";import{a as q,c as V,e as O,f as U,h as W,i as G,m as _,p as Q,q as X,r as z,s as H,u as ee}from"./chunk-DZKFP6H2.js";import{a as Z}from"./chunk-VHZ6RL67.js";import{a as K,b as Y}from"./chunk-NVKJ7ZLP.js";import{b as ue}from"./chunk-GQLNG537.js";import{b as F,c as J}from"./chunk-3KM5ZOW2.js";import{A as w,B,C,J as j,a as $,z as T}from"./chunk-D2KIGKBI.js";import{h,k as I}from"./chunk-M5VIFG2V.js";import{Cb as P,Sa as M,la as L,qb as p,sb as d,ta as S,wb as g}from"./chunk-JLQRDFR5.js";import{e as R}from"./chunk-IWTNUJGY.js";import{e as le,g as f}from"./chunk-VKWPEFWQ.js";f();f();async function pe(o,e){if(o)return o.join(`
|
|
2
2
|
`);if(e){if(!await M(e))throw new h(d`Variable file not found at ${p.path(e)}. Please check the path and try again.`);return L(e,{encoding:"utf8"})}else return}async function ne(o){let{remoteApp:e,store:a,query:n,variables:s,variableFile:t,watch:r=!1,version:i}=o,{adminSession:l,version:u}=await j({title:d`Authenticating`,task:async()=>{let E=await te(e,a.shopDomain),k=await U({adminSession:E,userSpecifiedVersion:i,minimumDefaultVersion:q});return{adminSession:E,version:k}},renderOptions:{stdout:process.stderr}}),c=await pe(s,t);return de(n,c),re(n,a),{adminSession:l,version:u,query:n,variablesJsonl:c,watch:r}}async function ae(o){let{adminSession:e,version:a,query:n,variablesJsonl:s,watch:t}=o,r=O(n)?await G({adminSession:e,query:n,variablesJsonl:s,version:a}):await W({adminSession:e,query:n,version:a});if(r?.userErrors?.length||!r?.bulkOperation)return{store:e.storeFqdn,apiVersion:a,query:n,operation:r?.bulkOperation??null,userErrors:r?.userErrors??[],watchAborted:!1};let i=new $,l=t?await X(e,r.bulkOperation.id,i.signal,()=>i.abort()):await Q(e,r.bulkOperation.id),u=t&&!i.signal.aborted&&l.status==="COMPLETED"&&l.url?await z(l.url):void 0;return{store:e.storeFqdn,apiVersion:a,query:n,operation:l,userErrors:[],watchAborted:i.signal.aborted,results:u}}function de(o,e){if(O(o)&&!e)throw new h(d`Bulk mutations require variables. Provide a JSONL file with ${p.yellow("--variable-file")} or individual JSON objects with ${p.yellow("--variables")}.`);if(!O(o)&&e)throw new h(d`The ${p.yellow("--variables")} and ${p.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}f();f();var m=le(ue(),1);function ie(o,e){let a=(0,m.parse)(e),n=new Map(a.definitions.filter(r=>r.kind===m.Kind.FRAGMENT_DEFINITION).map(r=>[r.name.value,r])),s=(0,m.getOperationAST)(a),t=s?.operation==="mutation"?A(s.selectionSet,n).flatMap(r=>r.selectionSet?A(r.selectionSet,n).filter(i=>i.name.value==="userErrors").map(i=>[r.alias?.value??r.name.value,i.alias?.value??i.name.value]):[]):[];return o.trim().split(`
|
|
3
3
|
`).filter(r=>r.trim().length>0).some(r=>{let i;try{i=JSON.parse(r)}catch(l){if(l instanceof SyntaxError)return!1;throw l}return Array.isArray(i.errors)&&i.errors.length>0?!0:t.some(([l,u])=>{let c=i.data?.[l]?.[u];return Array.isArray(c)&&c.length>0})})}function A(o,e,a=[]){return o.selections.flatMap(n=>{if(n.kind===m.Kind.FIELD)return[n];if(n.kind===m.Kind.INLINE_FRAGMENT)return A(n.selectionSet,e,a);let s=n.name.value,t=e.get(s);return t&&!a.includes(s)?A(t.selectionSet,e,[...a,s]):[]})}async function se(o,e){let{format:a,watch:n,outputFile:s}=e,{operation:t,userErrors:r,watchAborted:i,results:l}=o;if(!t&&r.length===0){let u={headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."};throw a==="json"?P(`${u.headline} ${u.body}`):B(u),new I("Bulk operation response returned null with no error message.")}if(a==="json"){if(r.length||t&&["FAILED","CANCELED","EXPIRED"].includes(t.status)){let b=new h("Bulk operation failed.");throw b.details={...N(o),operation:t?x(t):null,userErrors:r},b}if(!t)throw new I("Bulk operation response returned no operation.");let u=t.type==="MUTATION"&&l!==void 0&&ie(l,o.query),c=u?"partial":"success";i&&(c="cancelled"),u&&(process.exitCode=1);let E=n&&!i&&t.type==="QUERY"&&t.status==="COMPLETED"&&String(t.objectCount)==="0"&&!t.url,k=l??(E?"":void 0);if(s&&k===void 0&&!i)throw new h("No results are available to write to the output file.");if(s&&k!==void 0){let b=R(s);await S(b,k),g(y.encode({path:b,format:"jsonl"}))}else g(y.encode({...N(o),status:c,...i?{reason:"watch-aborted"}:{},operation:x(t),...l===void 0?{}:{resultsJsonl:l}}));return}if(r.length){C({headline:"Error creating bulk operation.",body:{list:{items:r.map(u=>u.field?`${u.field.join(".")}: ${u.message}`:u.message)}}});return}t&&(i?T({headline:`Bulk operation ${t.id} is still running in the background.`,body:v(t.id)}):n||["FAILED","CANCELED","EXPIRED"].includes(t.status)?await ce(t,l,s):w({headline:"Bulk operation is running.",body:v(t.id),customSections:[{body:[{list:{items:[d`ID: ${p.cyan(t.id)}`.value]}}]}]}))}async function ce(o,e,a){let n=_(o).value,t=[{body:[{list:{items:[d`ID: ${p.cyan(o.id)}`.value,d`Status: ${p.yellow(o.status)}`.value,d`Created at: ${p.gray(String(o.createdAt))}`.value,...o.completedAt?[d`Completed at: ${p.gray(String(o.completedAt))}`.value]:[]]}}]}];switch(o.status){case"CREATED":w({headline:"Bulk operation started.",body:v(o.id),customSections:t});break;case"RUNNING":w({headline:"Bulk operation is running.",body:v(o.id),customSections:t});break;case"COMPLETED":if(e===void 0)w({headline:n,customSections:t});else{let r=H(e);a?await S(a,e):g(e),r?B({headline:"Bulk operation completed with errors.",body:a?`Results written to ${a}. Check file for error details.`:"Check results for error details.",customSections:t}):w({headline:n,body:a?[`Results written to ${a}`]:void 0,customSections:t})}break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":C({headline:n,customSections:t});break}}function v(o){return[`Monitor its progress with:
|
|
4
4
|
`,{command:`shopify app bulk status --id=${V(o)}`}]}var D=class o extends Z{static summary="Execute bulk operations.";static descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.\n\n Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).\n\n Use [`bulk status`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.\n\n With `--watch`, completed results are written as JSONL to stdout or `--output-file`. With `--json`, stdout contains one result object with operation details and downloaded JSONL in `resultsJsonl`. With `--json --output-file`, stdout contains only an absolute file receipt with `path` and `format`.";static description=this.descriptionForHelp();static flags={...F,...J,...K,...Y};static get jsonOutputSchema(){return y}async run(){let{flags:e}=await this.parse(o),{query:a,appContextResult:n,store:s}=await ee(e),t=e.json?"json":"text",r=await ne({remoteApp:n.remoteApp,store:s,query:a,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,...e.version&&{version:e.version}});oe("Starting bulk operation.",{organization:n.organization,remoteApp:n.remoteApp,storeFqdn:s.shopDomain,version:r.version},t);let i=await ae(r);return await se(i,{format:t,watch:e.watch??!1,outputFile:e["output-file"]}),{app:n.app}}};export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as f,c as r,d as h}from"./chunk-
|
|
1
|
+
import{b as f,c as r,d as h}from"./chunk-MGHPF7HU.js";import{a as l}from"./chunk-VHZ6RL67.js";import{a as c}from"./chunk-NVKJ7ZLP.js";import{Ma as m}from"./chunk-U2T5HPRD.js";import{b as d}from"./chunk-3KM5ZOW2.js";import{yb as e}from"./chunk-JLQRDFR5.js";import{i as n}from"./chunk-B4OMIONW.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var s=class g extends l{static summary="Watch and prints out changes to an app.";static hidden=!0;static flags={...d,...c};async run(){let{flags:t}=await this.parse(g),{app:o}=await m({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),i=new h(o);return await i.start(),e(`Watching for changes in ${o.name}...`),i.onEvent(async({app:y,extensionEvents:u,startTime:w,path:x})=>{e(`\u{1F195} Event [${f(w)}ms]`),e(` \u{1F4C2} ${x}`),u.forEach(a=>{switch(a.type){case r.Created:e(` \u2705 Extension created - ${n.green(a.extension.handle)}`);break;case r.Deleted:e(` \u274C Extension deleted: ${n.red(a.extension.handle)}`);break;case r.Updated:e(` \u{1F504} Updated: ${n.yellow(a.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:o}}};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,f as v,g as C}from"./chunk-
|
|
1
|
+
import{c as i,f as v,g as C}from"./chunk-S4LOWCGS.js";import{a as T}from"./chunk-VGSH52JM.js";import{a as F}from"./chunk-NVKJ7ZLP.js";import{Na as S,e as w}from"./chunk-U2T5HPRD.js";import{b as y,c as g}from"./chunk-3KM5ZOW2.js";import{A as l,y as d}from"./chunk-D2KIGKBI.js";import{c as f}from"./chunk-LEHBZKK3.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{wb as h}from"./chunk-JLQRDFR5.js";import{b as s,h as m}from"./chunk-FZCGRIOM.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();e();import{resolve as O}from"node:path";async function b(o,t){return await w(o,t),{status:"success",function:{handle:o.configuration.handle??null,name:o.name,directory:O(o.directory)}}}e();var n=u({name:"FunctionTypegenResult",schema:s.object({status:s.literal("success"),function:i}).strict(),definitions:{Function:i}});e();function j(o,t){t?h(n.encode(o)):l({headline:"GraphQL types generated successfully."})}var a=class o extends T{static get jsonOutputSchema(){return n}static summary="Generate GraphQL types for a function.";static descriptionWithMarkdown="Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";static description=this.descriptionForHelp();static flags={...y,...F,...v,...g};async run(){let{flags:t}=await this.parse(o),{app:r}=await S({directory:t.path,userProvidedConfigName:t.config}),p=await C(r,t.path),c=async(x,J)=>{let G=await b(p,{stdout:x,stderr:J,app:r});j(G,t.json)};return t.json?await m({outputMode:"json",sink:f},()=>d({processes:[{prefix:p.localIdentifier,action:c}],showTimestamps:!1})):await c(process.stdout,process.stderr),{app:r}}};export{a};
|