@shopify/cli 4.9.5 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-Q6QDIDYT.js +1 -0
- package/dist/analytics-VKKJNJ62.js +1 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +7 -0
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/assets/hydrogen/vite/package.json +3 -4
- package/dist/assets/hydrogen/vite/vite.config.js +3 -3
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-MZL6VM3W.js → chunk-24NUJTIH.js} +1 -1
- package/dist/chunk-2CMEKSI7.js +1 -0
- package/dist/chunk-2DID73ML.js +1 -0
- package/dist/chunk-2ORRV7GH.js +1 -0
- package/dist/chunk-2VSNFOKD.js +1 -0
- package/dist/chunk-335BUVBP.js +1 -0
- package/dist/{chunk-PT3OZEBI.js → chunk-3A3DZVEJ.js} +1 -1
- package/dist/chunk-3C6VLJ5D.js +319 -0
- package/dist/{chunk-LCMDVUVO.js → chunk-3G4HJO72.js} +30 -30
- package/dist/chunk-3LVCG4JB.js +1 -0
- package/dist/chunk-43KLFFP7.js +1 -0
- package/dist/{chunk-QLHPTMIH.js → chunk-43R5VGKT.js} +1 -1
- package/dist/chunk-46MSIQ6Z.js +1 -0
- package/dist/chunk-4ARCB6DT.js +1 -0
- package/dist/chunk-4C2DAX5T.js +1 -0
- package/dist/chunk-4CRBTSVP.js +2 -0
- package/dist/chunk-4GCI2YCZ.js +8 -0
- package/dist/chunk-4GOJQKY5.js +1 -0
- package/dist/chunk-4RDFMBRG.js +9 -0
- package/dist/chunk-4SS6DXC7.js +5 -0
- package/dist/{chunk-Z4DESIR5.js → chunk-4TI7U2PN.js} +1 -1
- package/dist/{chunk-7BWSN3SG.js → chunk-52FDK2LC.js} +1 -1
- package/dist/chunk-53BG3NLH.js +3 -0
- package/dist/{chunk-LD6ZCTZ3.js → chunk-5B76DT7X.js} +1 -1
- package/dist/{chunk-YN4FSUFF.js → chunk-5NEGOQT6.js} +1 -1
- package/dist/{chunk-PFXDXD5O.js → chunk-5OMJFPQW.js} +1 -1
- package/dist/chunk-5TB52UUV.js +2 -0
- package/dist/chunk-5UWMXOHM.js +7 -0
- package/dist/chunk-6BNKBCCU.js +1 -0
- package/dist/chunk-6DXP7PQ7.js +1 -0
- package/dist/chunk-6PUU6ZNQ.js +1 -0
- package/dist/chunk-7GHSE7SG.js +1 -0
- package/dist/{chunk-5O7JTVO2.js → chunk-7IFE4UQY.js} +1 -1
- package/dist/chunk-7LAKWAKX.js +25 -0
- package/dist/chunk-7MVWDCI3.js +1 -0
- package/dist/chunk-7NSK77WG.js +3 -0
- package/dist/chunk-7QUZWCJZ.js +3 -0
- package/dist/chunk-7RPFJZLP.js +1 -0
- package/dist/{chunk-35NTERVR.js → chunk-7UOA4DI7.js} +2 -2
- package/dist/chunk-7WPUV7GY.js +6 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/{chunk-SEXH4EP5.js → chunk-ACA2BGAD.js} +1 -1
- package/dist/chunk-AJMDF3QC.js +1 -0
- package/dist/{chunk-CEQ5S3HH.js → chunk-AXC2MHHO.js} +1 -1
- package/dist/{chunk-5GFVMGAZ.js → chunk-AYL6KBPE.js} +1 -1
- package/dist/chunk-BAHIL37I.js +1 -0
- package/dist/{chunk-S6A7TMR4.js → chunk-BCYTZ7LM.js} +1 -1
- package/dist/{chunk-4VS7YD53.js → chunk-BJPDJIS4.js} +1 -1
- package/dist/{chunk-AJMJQA4J.js → chunk-BN7ZXAZJ.js} +1 -1
- package/dist/chunk-BVSKBX7T.js +16 -0
- package/dist/chunk-BWRNXCVN.js +4 -0
- package/dist/{chunk-ANG44FIF.js → chunk-C3KEDG33.js} +1 -1
- package/dist/{chunk-4BXQTW5G.js → chunk-C7V755IT.js} +1 -1
- package/dist/chunk-CCMDZX35.js +7 -0
- package/dist/chunk-CCQNP5YR.js +1 -0
- package/dist/chunk-CEIJKJOF.js +11 -0
- package/dist/chunk-CIK5BF7V.js +1 -0
- package/dist/{chunk-YIZAQABE.js → chunk-CVVQQLCF.js} +1 -1
- package/dist/chunk-CW2T7EOQ.js +1 -0
- package/dist/chunk-CZ22VZDA.js +376 -0
- package/dist/{chunk-VSFZEGIK.js → chunk-D7NB7YR6.js} +1 -1
- package/dist/{chunk-2VGPNRHH.js → chunk-DFQ4WTET.js} +2 -2
- package/dist/chunk-DJAZBPYA.js +3 -0
- package/dist/chunk-DNMXVMJM.js +47 -0
- package/dist/{chunk-G362JEAV.js → chunk-EGCWR5AS.js} +1 -1
- package/dist/{chunk-7LB6DPB6.js → chunk-EITIW5OX.js} +1 -1
- package/dist/chunk-EMSF57ZB.js +1 -0
- package/dist/{chunk-2II4W4ZF.js → chunk-EXFBZPZS.js} +1 -1
- package/dist/chunk-FDXHQZTO.js +26 -0
- package/dist/{chunk-YLCYRG2T.js → chunk-FFHH5LOR.js} +1 -1
- package/dist/{chunk-KOS53Z7E.js → chunk-FNLECT7B.js} +1 -1
- package/dist/{chunk-MTBABHUB.js → chunk-FWB3GLMW.js} +1 -1
- package/dist/chunk-FZCGRIOM.js +1 -0
- package/dist/{chunk-ND6O6KT6.js → chunk-G6ZMSWEU.js} +1 -1
- package/dist/chunk-GAMC2BNY.js +7 -0
- package/dist/chunk-GB6E3ATN.js +4 -0
- package/dist/chunk-GCNA3HXH.js +8 -0
- package/dist/{chunk-PIGERIRY.js → chunk-GFVKTWFT.js} +1 -1
- package/dist/chunk-GQNOVEKP.js +2 -0
- package/dist/{chunk-WGO2GC6I.js → chunk-GRGFA26K.js} +1 -1
- package/dist/chunk-GXORLBVN.js +2 -0
- package/dist/{chunk-HB4YI2PF.js → chunk-H4V55Y3Z.js} +118 -118
- package/dist/chunk-HCZG7YJ6.js +16 -0
- package/dist/chunk-HF4NDEX3.js +1 -0
- package/dist/chunk-HIRTL45Q.js +1 -0
- package/dist/chunk-I4OVLRQR.js +1 -0
- package/dist/{chunk-RUDHGUIM.js → chunk-I6FRVYGE.js} +1 -1
- package/dist/chunk-IEQ4UOH3.js +4 -0
- package/dist/{chunk-PIZDYS7T.js → chunk-IILLQOUC.js} +60 -60
- package/dist/{chunk-LG6DGIFX.js → chunk-IQVRP7CT.js} +1 -1
- package/dist/{chunk-5VRB3FBD.js → chunk-IUP7POIE.js} +1 -1
- package/dist/chunk-IUTZIN2T.js +10 -0
- package/dist/chunk-IWEKM5Y3.js +1 -0
- package/dist/chunk-IWTNUJGY.js +2 -0
- package/dist/chunk-J6TW43TG.js +1 -0
- package/dist/chunk-JDR6UVZA.js +8 -0
- package/dist/{chunk-NHE46R6C.js → chunk-JEA3C7ON.js} +1 -1
- package/dist/chunk-JOJV5E2K.js +1 -0
- package/dist/chunk-JYMDWR25.js +1 -0
- package/dist/{chunk-EAVD3OH2.js → chunk-KDPQXURV.js} +1 -1
- package/dist/{chunk-DO5YFMTJ.js → chunk-KGRIYAMA.js} +1 -1
- package/dist/chunk-KJQDS5HI.js +1 -0
- package/dist/chunk-KKPOOIE4.js +2 -0
- package/dist/{chunk-4IAGBAQD.js → chunk-KSDU4YOB.js} +1 -1
- package/dist/chunk-L7MSPGDS.js +5 -0
- package/dist/{chunk-JPFHPVIO.js → chunk-LDU5T3DN.js} +1 -1
- package/dist/chunk-LHKVXJPX.js +1 -0
- package/dist/{chunk-VG5ZDVDQ.js → chunk-LMQGNECW.js} +86 -200
- package/dist/{chunk-TQ7URMGS.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-LVLAOBJM.js +103 -0
- package/dist/chunk-LWCTKI4Z.js +18 -0
- package/dist/chunk-M3ACZWMR.js +1 -0
- package/dist/chunk-M4BVLMPH.js +31 -0
- package/dist/{chunk-WKVFVT3H.js → chunk-M5TGCSUK.js} +1 -1
- package/dist/chunk-M7LPHCP2.js +274 -0
- package/dist/{chunk-QBIYAMSH.js → chunk-MDRVCBDO.js} +1 -1
- package/dist/chunk-MR2AUT7Q.js +1 -0
- package/dist/chunk-MXJAH2GW.js +5 -0
- package/dist/{chunk-EO422KZZ.js → chunk-MYAIWSOO.js} +1 -1
- package/dist/{chunk-Y5VFOLNQ.js → chunk-N2RFDHRY.js} +1 -1
- package/dist/{chunk-7DSH4CRU.js → chunk-NB4BRW3H.js} +1 -1
- package/dist/chunk-NDKSG4CC.js +97 -0
- package/dist/chunk-NK2MGR6A.js +1 -0
- package/dist/chunk-NOH63WC6.js +12 -0
- package/dist/{chunk-3XAD2E55.js → chunk-OGWPS55W.js} +1 -1
- package/dist/chunk-OQ5CLM2H.js +4 -0
- package/dist/{chunk-MQ4WV4B6.js → chunk-OQU3HLAE.js} +1 -1
- package/dist/chunk-OVWUGAEU.js +11 -0
- package/dist/chunk-OX7UVDSU.js +6 -0
- package/dist/chunk-P33TONYG.js +1 -0
- package/dist/chunk-PEVIRAMR.js +6 -0
- package/dist/{chunk-LLNUIGHP.js → chunk-PGLWZMJU.js} +4 -4
- package/dist/chunk-PIAD3F6M.js +16 -0
- package/dist/chunk-PMHP57MH.js +20 -0
- package/dist/{chunk-XTOOTN4P.js → chunk-POKY4RWR.js} +1 -1
- package/dist/chunk-PSSYLJG4.js +2 -0
- package/dist/chunk-PYIICTLX.js +1 -0
- package/dist/chunk-PZUGDE7N.js +2 -0
- package/dist/{chunk-SUTVPAJF.js → chunk-Q2SZCZE7.js} +1 -1
- package/dist/{chunk-EZG5EB7D.js → chunk-Q2XRITUG.js} +1 -1
- package/dist/chunk-Q5MEFIMV.js +4 -0
- package/dist/chunk-Q66CI37F.js +7 -0
- package/dist/chunk-QFWWCZOI.js +1 -0
- package/dist/{chunk-TR4OWSEX.js → chunk-QFYLJVJW.js} +1 -1
- package/dist/chunk-QKVVJXWS.js +3 -0
- package/dist/chunk-QN3774QI.js +1 -0
- package/dist/chunk-R2BDABJD.js +213 -0
- package/dist/{chunk-RW3P3UMU.js → chunk-R7EMV77H.js} +2 -2
- package/dist/chunk-RFGEM5JC.js +3 -0
- package/dist/{chunk-HY6EXJBZ.js → chunk-RVQV6G5M.js} +1 -1
- package/dist/chunk-S67I4E7M.js +5 -0
- package/dist/chunk-SFPXYHHL.js +1 -0
- package/dist/{chunk-XPDHT3Z4.js → chunk-SFQEHDJY.js} +1 -1
- package/dist/chunk-SL3VBI62.js +3 -0
- package/dist/{chunk-5XTJ4OL4.js → chunk-SNNZ4U2W.js} +1 -1
- package/dist/chunk-T2IUXXCT.js +1 -0
- package/dist/chunk-TPSA4JN5.js +1 -0
- package/dist/chunk-TTEF7GTX.js +1 -0
- package/dist/{chunk-BAHM64B4.js → chunk-U25W35TX.js} +1 -1
- package/dist/chunk-UIQL5ZF3.js +1 -0
- package/dist/chunk-UK6576EO.js +1 -0
- package/dist/chunk-ULD7CIOY.js +4 -0
- package/dist/{chunk-65GNYRYR.js → chunk-UOS2XLGG.js} +2 -2
- package/dist/{chunk-VNG2I7NM.js → chunk-UVRKTMF7.js} +1 -1
- package/dist/{chunk-BD2L6YE5.js → chunk-UWMZ5CSB.js} +1 -1
- package/dist/chunk-UZROQRLX.js +2 -0
- package/dist/{chunk-5BGUKF7L.js → chunk-V75WUEFU.js} +1 -1
- package/dist/chunk-VB7YQMAM.js +5 -0
- package/dist/chunk-VHUD3CBC.js +3 -0
- package/dist/chunk-VMMUJN4T.js +17 -0
- package/dist/{chunk-T3UCIWRH.js → chunk-VW6QS7DO.js} +1 -1
- package/dist/chunk-VWH3VPYI.js +1 -0
- package/dist/{chunk-4TF7ER72.js → chunk-WBJ6ZHYH.js} +1 -1
- package/dist/chunk-WDFCOZAY.js +16 -0
- package/dist/chunk-WFWISGLS.js +1 -0
- package/dist/chunk-WGUOLSMG.js +1 -0
- package/dist/{chunk-VTOPYXHO.js → chunk-WJSUIUBW.js} +2 -2
- package/dist/{chunk-762IKULK.js → chunk-WMAFG2JD.js} +1 -1
- package/dist/chunk-X2H6I2WW.js +5 -0
- package/dist/{chunk-MWWULCLD.js → chunk-X7HVAVSZ.js} +1 -1
- package/dist/{chunk-MF7IHOM5.js → chunk-XBQDMGUN.js} +1 -1
- package/dist/chunk-XITZIDCL.js +18 -0
- package/dist/chunk-XKRJKUA7.js +1 -0
- package/dist/{chunk-K6FH5JSY.js → chunk-XM7YUXTF.js} +2 -2
- package/dist/chunk-XMODGI45.js +1 -0
- package/dist/{chunk-5NCWBBRW.js → chunk-XNNKLUTN.js} +1 -1
- package/dist/chunk-XTREQ4A2.js +1 -0
- package/dist/chunk-YGYEM6QO.js +1 -0
- package/dist/{chunk-XVFQ6CNO.js → chunk-YKS7MH3F.js} +9 -6
- package/dist/chunk-YTUDXZLN.js +1 -0
- package/dist/{chunk-I3J63RFV.js → chunk-YTUUU33R.js} +1 -1
- package/dist/chunk-YVVU4J5O.js +3 -0
- package/dist/{chunk-QUO4RD3W.js → chunk-YVY32DNA.js} +1 -1
- package/dist/chunk-Z5SILNH2.js +7 -0
- package/dist/chunk-ZAA2DXK5.js +5 -0
- package/dist/chunk-ZDQO6CNY.js +1 -0
- package/dist/chunk-ZGV3HNEV.js +1 -0
- package/dist/chunk-ZQDDRIBA.js +22 -0
- package/dist/{chunk-AODTY2BL.js → chunk-ZT5WFUKJ.js} +4 -4
- package/dist/chunk-ZYQ2XWC5.js +5 -0
- 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.d.ts +34 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +53 -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.d.ts +6 -6
- 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.d.ts +64 -0
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/services/commands/doc/fetch-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/fetch-result.js +22 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +2 -1
- package/dist/cli/services/commands/doc/fetch.js +2 -15
- package/dist/cli/services/commands/doc/search-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/search-result.js +14 -0
- package/dist/cli/services/commands/doc/search.d.ts +9 -1
- package/dist/cli/services/commands/doc/search.js +27 -2
- package/dist/cli/services/commands/doc/types.d.ts +107 -0
- package/dist/cli/services/commands/doc/types.js +47 -0
- package/dist/cli/services/commands/help/types.d.ts +6 -6
- package/dist/command-event-context-LFUZ7UCA.js +1 -0
- package/dist/command-json-schema-2UMKY7MY.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-RI3TL6I4.js +1 -0
- package/dist/custom-oclif-loader-IZCKN67O.js +1 -0
- package/dist/deprecations-IFVUXXDB.js +1 -0
- package/dist/dist-4H2B7BMN.js +1 -0
- package/dist/dist-QNWOGQN3.js +1 -0
- package/dist/{environment-RSUK27TA.js → environment-O7ECODHU.js} +1 -1
- package/dist/environments-CYMEN7NV.js +1 -0
- package/dist/error-IL6WQMSW.js +1 -0
- package/dist/error-handler-74HKA23T.js +1 -0
- package/dist/fs-AINFLJ2E.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.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 +13 -13
- package/dist/is-global-2VLKV46Q.js +1 -0
- package/dist/json-error-HZB5YIHV.js +1 -0
- package/dist/{lib-TYM5B75S.js → lib-PJHT4MKY.js} +1 -1
- package/dist/{lib-55QUD4AJ.js → lib-VKSQ65BQ.js} +1 -1
- package/dist/{lib-PH52G55H.js → lib-YEZOHXF3.js} +1 -1
- package/dist/{local-ZZGRGYUP.js → local-KOZETREJ.js} +1 -1
- package/dist/{metadata-YQNVKC2R.js → metadata-IBPHZB7N.js} +1 -1
- package/dist/{morph-BABFBRSW.js → morph-CRY35DIK.js} +1 -1
- package/dist/node-package-manager-DXSRNEDC.js +1 -0
- package/dist/notifications-system-XA3EBOGJ.js +1 -0
- package/dist/os-X73O7BAB.js +1 -0
- package/dist/out-B2GISN65.js +1 -0
- package/dist/output-3OYXK3Z5.js +1 -0
- package/dist/{path-CPAYTWQW.js → path-3L2QRACZ.js} +1 -1
- package/dist/system-JWYYT4PM.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-PCG5D6RZ.js +1 -0
- package/dist/upgrade-7U2TUNC4.js +1 -0
- package/dist/version-7DGU2KYH.js +1 -0
- package/dist/version-SXQTRBXB.js +1 -0
- package/dist/workerd-MQZ3NKJI.js +18 -0
- package/oclif.manifest.json +1664 -427
- package/package.json +8 -8
- package/dist/analytics-PBZEKUGU.js +0 -1
- package/dist/analytics-WVGBNFGK.js +0 -1
- package/dist/chunk-2EC5SUGK.js +0 -19
- package/dist/chunk-2QENUJVG.js +0 -1
- package/dist/chunk-2RONPKOD.js +0 -1
- package/dist/chunk-2WDJXERZ.js +0 -25
- package/dist/chunk-32NWVYUC.js +0 -1
- package/dist/chunk-32RRWGNS.js +0 -1
- package/dist/chunk-32VQQ6EU.js +0 -1
- package/dist/chunk-34RFTE5T.js +0 -4
- package/dist/chunk-35VQQKVX.js +0 -1
- package/dist/chunk-3N6NKC2U.js +0 -1
- package/dist/chunk-3Q5BAPQK.js +0 -7
- package/dist/chunk-42DMJGOW.js +0 -2
- package/dist/chunk-4CTTWXUX.js +0 -32
- package/dist/chunk-4HBKQUKY.js +0 -1
- package/dist/chunk-4MQXMIWQ.js +0 -7
- package/dist/chunk-5APLAJCB.js +0 -3
- package/dist/chunk-5AQNISGC.js +0 -1
- package/dist/chunk-5OM72O4N.js +0 -1
- package/dist/chunk-5SLKHURV.js +0 -1
- package/dist/chunk-62GA7XR3.js +0 -18
- package/dist/chunk-62LMVFR7.js +0 -1
- package/dist/chunk-6IDEDOXW.js +0 -2
- package/dist/chunk-72CBJYAG.js +0 -16
- package/dist/chunk-7E4MJCVE.js +0 -10
- package/dist/chunk-7HZU7CYS.js +0 -1
- package/dist/chunk-7Q4EKY3E.js +0 -3
- package/dist/chunk-7YXHILW4.js +0 -383
- package/dist/chunk-7Z6IX7MU.js +0 -1
- package/dist/chunk-A4XREDFZ.js +0 -1
- package/dist/chunk-AHNLGCHF.js +0 -5
- package/dist/chunk-ARRRFY6S.js +0 -4
- package/dist/chunk-BAP2CHI2.js +0 -1
- package/dist/chunk-BQWK222Q.js +0 -1
- package/dist/chunk-C3PXIZY3.js +0 -8
- package/dist/chunk-C6HGU77I.js +0 -1
- package/dist/chunk-CBFAU5AF.js +0 -5
- package/dist/chunk-COP2Q2YT.js +0 -1
- package/dist/chunk-CSWDRG3E.js +0 -1
- package/dist/chunk-CVBWEUWX.js +0 -1
- package/dist/chunk-D3NVUE65.js +0 -1
- package/dist/chunk-DCKRQZLE.js +0 -20
- package/dist/chunk-DYH3ZXJS.js +0 -15
- package/dist/chunk-EBX6DYDX.js +0 -2
- package/dist/chunk-EDRCFY3K.js +0 -16
- package/dist/chunk-EEAY7HFW.js +0 -317
- package/dist/chunk-EJMLNBZA.js +0 -275
- package/dist/chunk-EO3S2TFI.js +0 -2
- package/dist/chunk-EOIGDOUD.js +0 -7
- package/dist/chunk-EYKXHMEJ.js +0 -6
- package/dist/chunk-FHV2H3Z2.js +0 -12
- package/dist/chunk-FOAV642V.js +0 -1
- package/dist/chunk-FVTP7EO4.js +0 -46
- package/dist/chunk-FYIC4JHB.js +0 -26
- package/dist/chunk-GF36WNMH.js +0 -5
- package/dist/chunk-GJ3QUZO6.js +0 -1
- package/dist/chunk-GJZVUEMP.js +0 -11
- package/dist/chunk-GP6O7YRO.js +0 -20
- package/dist/chunk-GW424AJO.js +0 -7
- package/dist/chunk-GXSF6NCR.js +0 -1
- package/dist/chunk-GYVQIRBD.js +0 -1
- package/dist/chunk-H3ZPYOQV.js +0 -1
- package/dist/chunk-H7YSZKZ2.js +0 -1
- package/dist/chunk-HILYTMVA.js +0 -1
- package/dist/chunk-HMWQOQAQ.js +0 -2
- package/dist/chunk-HNSRF4SQ.js +0 -1
- package/dist/chunk-HTODXNY6.js +0 -3
- package/dist/chunk-IUYVJJKE.js +0 -9
- package/dist/chunk-JM2CQP64.js +0 -97
- package/dist/chunk-K4AF7A25.js +0 -1
- package/dist/chunk-KDV4WR5A.js +0 -4
- package/dist/chunk-KF7NL5YM.js +0 -8
- package/dist/chunk-KMJTO7CU.js +0 -103
- package/dist/chunk-KN3MUEWA.js +0 -4
- package/dist/chunk-KYB4JX76.js +0 -5
- package/dist/chunk-LJAU6YHF.js +0 -10
- package/dist/chunk-LMQOFVRC.js +0 -17
- package/dist/chunk-LQSD25YS.js +0 -3
- package/dist/chunk-M2HQFHNO.js +0 -1
- package/dist/chunk-M5WBYWSQ.js +0 -7
- package/dist/chunk-N47RQHEI.js +0 -2
- package/dist/chunk-NRG2WPSM.js +0 -1
- package/dist/chunk-O2CP7DQE.js +0 -1
- package/dist/chunk-O6FXUKI2.js +0 -2
- package/dist/chunk-OHJUEUSA.js +0 -1
- package/dist/chunk-OOKTWSGP.js +0 -4
- package/dist/chunk-OONMCK7X.js +0 -1
- package/dist/chunk-OWK2RI4O.js +0 -6
- package/dist/chunk-P2UEQJJ4.js +0 -5
- package/dist/chunk-QBJ74XPX.js +0 -18
- package/dist/chunk-QGFJOTOH.js +0 -4
- package/dist/chunk-RIO5HKD5.js +0 -1
- package/dist/chunk-S7EKUSO6.js +0 -3
- package/dist/chunk-SJ2ROSXG.js +0 -1
- package/dist/chunk-SNTRSP5K.js +0 -359
- package/dist/chunk-SYCN2GT2.js +0 -3
- package/dist/chunk-TBNEN73P.js +0 -1
- package/dist/chunk-TVI7TQ4C.js +0 -16
- package/dist/chunk-TYMYIUIQ.js +0 -1
- package/dist/chunk-UEQT7TA4.js +0 -1
- package/dist/chunk-UUM367NR.js +0 -5
- package/dist/chunk-V5FZRNXI.js +0 -1
- package/dist/chunk-VE35YELD.js +0 -1
- package/dist/chunk-WEICJ4GW.js +0 -1
- package/dist/chunk-WJJXJNNP.js +0 -3
- package/dist/chunk-XAQUXFN5.js +0 -1
- package/dist/chunk-XE6EUHSS.js +0 -2
- package/dist/chunk-XFEJS652.js +0 -16
- package/dist/chunk-XI4QEULN.js +0 -1
- package/dist/chunk-XP63T4KZ.js +0 -5
- package/dist/chunk-XRCAUZAZ.js +0 -8
- package/dist/chunk-XSRZWJIJ.js +0 -1
- package/dist/chunk-YFJELEVH.js +0 -1
- package/dist/chunk-YNJIDLI3.js +0 -7
- package/dist/chunk-YRX4E67D.js +0 -6
- package/dist/chunk-Z2NL6XQK.js +0 -6
- package/dist/chunk-Z6Z5DPKS.js +0 -1
- package/dist/chunk-ZOE6WXW6.js +0 -1
- package/dist/cli/commands/app/app-logs/sources.js +0 -1
- package/dist/command-json-schema-3RP5P43D.js +0 -1
- package/dist/conf-store-XORTWCKZ.js +0 -1
- package/dist/custom-oclif-loader-ZRYPPYIP.js +0 -1
- package/dist/deprecations-AZDMCRNN.js +0 -1
- package/dist/dist-DTBXLVHF.js +0 -1
- package/dist/dist-SOYIDACZ.js +0 -1
- package/dist/environments-L42SEHB4.js +0 -1
- package/dist/error-H6B5BHYC.js +0 -1
- package/dist/error-handler-JB752NKM.js +0 -1
- package/dist/fs-XHZY6MNM.js +0 -1
- package/dist/is-global-2NBDZWLC.js +0 -1
- package/dist/json-error-OHV2KQFY.js +0 -1
- package/dist/node-package-manager-LN2Y7FQ2.js +0 -1
- package/dist/notifications-system-HWJ3F44U.js +0 -1
- package/dist/os-MHOCCDIB.js +0 -1
- package/dist/out-53ABAVL7.js +0 -1
- package/dist/output-GILH4S6M.js +0 -1
- package/dist/system-6WYK24ET.js +0 -1
- package/dist/ui-RP6SVJUK.js +0 -1
- package/dist/upgrade-5G7FBJJV.js +0 -1
- package/dist/version-TOBC7X2C.js +0 -1
- package/dist/version-UIRCT6RC.js +0 -1
- package/dist/workerd-ARH2OCYL.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-X7HVAVSZ.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as O,n as W}from"./chunk-
|
|
1
|
+
import{l as O,n as W}from"./chunk-ZT5WFUKJ.js";import{T as v,a as S}from"./chunk-CZ22VZDA.js";import{f as y}from"./chunk-X7HVAVSZ.js";import{h as u,k as L}from"./chunk-2VSNFOKD.js";import{Bb as d,Sa as w,Ta as i,Va as D,_a as F,la as x,lb as B,qb as c,sb as s,ta as _}from"./chunk-LWCTKI4Z.js";import{c as r,h as k}from"./chunk-IWTNUJGY.js";import{a as I}from"./chunk-CX5CC6P5.js";import{e as R,g as f}from"./chunk-VKWPEFWQ.js";f();f();function b(e,n){try{return JSON.parse(e)}catch(a){let t=a instanceof Error?a.message:String(a),o=n?` from ${n}`:"";throw new u(`Failed to parse JSON${o}.
|
|
2
2
|
${t}`)}}var l=R(I(),1),N="yarn.lock",j="package-lock.json",$="pnpm-lock.yaml",C="bun.lockb",J="bun.lock",T="pnpm-workspace.yaml",we=[N,$,j,C,J],ye={yarn:[N],npm:[j],pnpm:[$],bun:[C,J],homebrew:[],unknown:[]},E=["yarn","npm","pnpm","bun","homebrew","unknown"],M=class extends u{constructor(){super("Unknown package manager")}},h=class extends u{constructor(n){super(s`The directory ${c.path(n)} doesn't have a package.json.`)}},P=class extends L{constructor(n){super(s`Couldn't find a a package.json traversing directories from ${c.path(n)}`)}};function V(e=process.env){let n=e.npm_config_user_agent;return["yarn","pnpm","bun","npm"].find(a=>n?.includes(a))??"unknown"}function U(e){return i(r(e,C))||i(r(e,J))}function G(e){switch(e){case"yarn":case"npm":case"pnpm":case"bun":return e;case"homebrew":case"unknown":return"npm"}}function K(e,n,...a){switch(e){case"npm":return{command:"npm",args:["exec","--",n,...a]};case"pnpm":return{command:"pnpm",args:["exec",n,...a]};case"yarn":return{command:"yarn",args:["run",n,...a]};case"bun":return{command:"bun",args:["x",n,...a]}}}async function A(e){let n=e;for(d(s`Looking for a lockfile in ${c.path(n)}...`);;){if(i(r(n,N)))return"yarn";if(i(r(n,$))||i(r(n,T)))return"pnpm";if(U(n))return"bun";if(i(r(n,j)))return"npm";let t=k(n);if(t===n)break;n=t}let a=V();return a!=="unknown"?a:"npm"}async function he(e,n,...a){let t=G(await A(e));return K(t,n,...a)}async function xe(e){let n=await D(r(e.directory,"**/package.json"),{ignore:[r(e.directory,"node_modules/**/package.json")],cwd:e.directory,onlyFiles:!0,deep:e.deep}),a=new S;try{await Promise.all(n.map(async t=>{let o=k(t);await z({directory:o,packageManager:e.packageManager,stdout:void 0,stderr:void 0,signal:a.signal,args:[]})}))}catch(t){throw a.abort(),t}}async function z(e){let n={cwd:e.directory,stdin:void 0,stdout:e.stdout,stderr:e.stderr,signal:e.signal},a=["install"];e.args&&(a=a.concat(e.args)),await y("cmd_all_timing_network_ms")(async()=>{await v(e.packageManager,a,n)})}async function ve(e){return(await m(e)).name}async function be(e){return(await m(e)).version}async function H(e){let n=await m(e),a=n.dependencies??{},t=n.devDependencies??{};return{...a,...t}}async function Me(e){let n=r(e,"package.json"),a=await m(n),t=r(e,T);return!!a.workspaces||w(t)}async function Pe(e,n,{cacheExpiryInHours:a=0}={}){let t=async()=>(d(s`Checking if there's a version of ${e} newer than ${n}`),ne(e)),o=`npm-package-${e}`,p;try{p=await O(o,t,a*3600*1e3)}catch{return}if(p&&new l.SemVer(n).compare(p)<0)return p}function Ne(e,n){let a=`npm-package-${e}`,t=W(a)?.value;if(t&&new l.SemVer(n).compare(t)<0)return t}function je(e,n){return(0,l.satisfies)(e,n)}async function m(e){if(!await w(e))throw new h(k(e));return b(await x(e),e)}async function Y(e,n){d(s`Adding the following dependencies if needed:
|
|
3
3
|
${c.json(e)}
|
|
4
4
|
With options:
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{c as ke}from"./chunk-UWMZ5CSB.js";import{a as Ie,c as Pe}from"./chunk-XM7YUXTF.js";import{b as ve}from"./chunk-R7EMV77H.js";import{a as ze}from"./chunk-ZGV3HNEV.js";import{Ha as je,M as Te,Ma as Ge,U as xe,W as Ce,Y as Fe,ea as _e,h as Ae,ha as $e}from"./chunk-3C6VLJ5D.js";import{C as Re,c as be,pa as Le,ua as Se}from"./chunk-WDFCOZAY.js";import{B as ee}from"./chunk-H4V55Y3Z.js";import{B as ne,D as se,E as pe,f as F,g as ie,i as oe,p as re}from"./chunk-IUP7POIE.js";import{e as J}from"./chunk-ZT5WFUKJ.js";import{a as E}from"./chunk-4C2DAX5T.js";import{b as ge,c as ye,f as we}from"./chunk-Q2SZCZE7.js";import{A as de,E as j,I as fe,z as me}from"./chunk-CZ22VZDA.js";import{b as le}from"./chunk-DFQ4WTET.js";import{a as M}from"./chunk-BN7ZXAZJ.js";import{d as ce}from"./chunk-X7HVAVSZ.js";import{h as d}from"./chunk-2VSNFOKD.js";import{Ba as T,Ia as W,Na as B,Sa as x,Ta as C,Ua as Z,Va as Q,_ as q,_a as X,ja as Y,jb as te,kb as ae,la as K,qb as g,ra as _,rb as L,sb as v,ta as $,va as V,wb as he}from"./chunk-LWCTKI4Z.js";import{b as h}from"./chunk-FZCGRIOM.js";import{f as ue}from"./chunk-3A3DZVEJ.js";import{b as Qe}from"./chunk-YTUUU33R.js";import{c as p,d as R,e as O,o as H,p as U}from"./chunk-IWTNUJGY.js";import{e as Ze,g as l}from"./chunk-VKWPEFWQ.js";l();l();var y={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},G=Object.keys(y),S=G.filter(e=>y[e].visible),Xe=["reactRouter","none"],Je=async e=>{let t=e.template,a=e.flavor,i={template:y.reactRouter.url};t??=await j({choices:Xe.map(r=>({label:y[r].label||r,value:r})),message:"Get started building your app:",defaultValue:G.find(r=>y[r].url===i.template)});let o={...e,template:t,templateType:P(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(o.templateType!=="custom"){let r=y[o.templateType];n=r.url,r.branches&&(a?s=r.branches.options[a]?.branch:s=await j({message:r.branches.prompt||"Choose a flavor:",choices:Object.entries(r.branches.options).map(([m,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),o.template=n||o.template||i.template,o.globalCLIResult=await ae(),o},Ne=Je;function P(e){return G.includes(e)}function De(e){return e!==void 0&&P(e)&&y[e].branches!==void 0}l();l();import{platform as et}from"os";async function Ee({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=E,delete e.dependencies["@shopify/app"],t){let i=await tt("cli");e.dependencies["@shopify/cli"]=i;let o={"@shopify/cli":i};e.overrides=e.overrides?{...e.overrides,...o}:o,e.resolutions=e.resolutions?{...e.resolutions,...o}:o}return e}async function tt(e){return`file:${await X(`packages/${e}`,{type:"directory",cwd:H(import.meta.url)})}`}async function Me({from:e,packageManager:t}){let a=et()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return re({directory:R(e),packageManager:t,args:a})}l();async function z(e,t){let i=(await Q([p(e,"**",".git"),p(e,"**",".github"),p(e,"**",".gitmodules"),p(e,"**",".cli-liquid-bypass"),p(e,"LICENSE*"),p(e,"**","frontend/LICENSE*"),p(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>T(s,{force:!0})),o=new Set(ie[t]),n=F.filter(s=>!o.has(s)).map(s=>{let r=p(e,s);if(C(r))return W(r)});return Promise.all([...i,...n])}async function at(e){let t=e.packageManager,a=q(e.name),i=p(e.directory,a),o=ke(e.template);await Oe(i,a),await it(i),me({body:["Initializing project with",{command:t},`
|
|
2
|
+
Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await Y(async r=>{let m=p(r,"download"),u=o.filePath?p(m,o.filePath):m,f=p(r,"app"),A=o.branch?`${o.baseURL}#${o.branch}`:o.baseURL;await V(m);let b=[{title:`Downloading template from ${A}`,task:async()=>{await Pe({repoUrl:A,destination:m,shallow:!0})}}];b.push({title:"Parsing liquid",task:async()=>{await ve(u,f,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let c=(await ne(f)).content;c.name=a,c.author=await le()??"",c.private=!0;let I=["extensions/*"].concat(ot(f));switch(t){case"npm":case"yarn":case"bun":c.workspaces=I;break;case"pnpm":{await rt(f,I),await _(p(f,".npmrc"),`auto-install-peers=true
|
|
3
|
+
`);break}case"homebrew":case"unknown":throw new oe}await Ee({packageJSON:c,local:e.local,directory:f,useGlobalCLI:e.useGlobalCLI}),await se(f,c)}}),e.postCloneActions.removeLockfilesFromGitignore&&b.push({title:"Removing lockfiles from .gitignore",task:async()=>{let c=p(f,".gitignore");if(await x(c)){let I=await K(c);F.forEach(We=>{let Be=new RegExp(`^${We.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");I=I.replace(Be,"")}),await $(c,I.trim())}}}),await ue()&&b.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let c=p(f,".npmrc");await _(c,`@shopify:registry=https://registry.npmjs.org
|
|
4
|
+
`)}});let D=!1;b.push({title:"Preparing project directory",task:async()=>{await Oe(i,a),D=!0,await B(f,i)}}),b.push({title:`Installing dependencies with ${t}`,task:async()=>{await Me({from:i,packageManager:t})}},{title:"Cleaning up",task:async()=>{await z(i,t)}},{title:"Initializing a Git repository...",task:async()=>{await Ie(i)}});try{await fe(b)}catch(c){throw D&&await T(i).catch(()=>{}),c}});let n;if(e.selectedAppOrNameResult.result==="new"){let r=await Te(i,e.name),m=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(m,r)}else n=e.selectedAppOrNameResult.app;return await je({directory:i,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1),{app:(await Ge({directory:i,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0})).app,remoteApp:n,projectName:a,packageManager:t,template:e.template}}async function Oe(e,t){if(await x(e))throw new d(`
|
|
5
|
+
A directory with this name (${t}) already exists.
|
|
6
|
+
Choose a new name for your app.`)}async function it(e){let t=new J({projectName:"shopify-cli-app"}),a=R(e);t.delete(a)}function ot(e){return["web","web/frontend"].filter(t=>C(p(e,t)))}async function rt(e,t){let a=p(e,"pnpm-workspace.yaml");if(await x(a))return;let i=t.map(o=>` - '${o}'`).join(`
|
|
7
|
+
`);await $(a,`packages:
|
|
8
|
+
${i}`)}var He=at;l();var Ue=h.string().regex(/^(?:\/|[A-Za-z]:[\\/]|\\\\)/),qe=h.object({id:h.string().regex(/^\d+$/).describe("The decimal App ID, not a Shopify GID."),name:h.string().min(1).describe("The name of the linked remote app."),clientId:h.string().min(1).describe("The client ID of the linked remote app."),organizationId:h.string().regex(/^\d+$/).describe("The decimal organization ID, not a Shopify GID."),directory:Ue.describe("The absolute filesystem path of the created app project."),configurationPath:Ue.describe("The absolute filesystem path of the linked app configuration.")}).strict(),k=M({name:"AppInitResult",schema:h.object({status:h.literal("success"),app:qe,packageManager:h.enum(["npm","yarn","pnpm","bun"]),template:h.string().url().describe("The selected GitHub template reference, including its branch and subpath.")}).strict(),definitions:{InitializedApp:qe}});l();function nt({app:e,remoteApp:t,packageManager:a,template:i}){return k.validate({status:"success",app:{id:t.id.startsWith("gid://shopify/App/")?be(t.id)??t.id:t.id,name:t.title,clientId:t.apiKey,organizationId:t.organizationId,directory:e.directory,configurationPath:e.configPath},packageManager:a,template:i})}function Ye(e,t=!1){if(t){he(k.encode(nt(e)));return}let{projectName:a,packageManager:i}=e;de({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:L(i,"shopify app generate extension")}],["To see your app, run",{command:L(i,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:L(i,"shopify app","--help")}]]})}l();function Ke(e){if(!e)return;let t=ee(e);if(t&&t.origin!=="https://github.com")throw new d("Only GitHub repository references are supported, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]");if(!t&&!P(e))throw new d(v`Only ${S.map(a=>v`${g.yellow(a)}`.value).join(", ")} template aliases are supported, please provide a valid URL`)}function Ve(e,t){if(!e){if(t)throw new d(v`The ${g.yellow("--flavor")} flag requires the ${g.yellow("--template")} flag to be set`);return}if(!t)return;if(!P(e))throw new d(v`The ${g.yellow("--flavor")} flag is not supported for custom templates`);let a=y[e];if(!a.branches)throw new d(v`The ${g.yellow(e)} template does not support flavors`);if(!a.branches.options[t])throw new d(v`Invalid option for ${g.yellow("--flavor")}\nThe ${g.yellow("--flavor")} flag for ${g.yellow(e)} accepts only ${Object.keys(a.branches.options).map(i=>v`${g.yellow(i)}`.value).join(", ")}`)}var w=Ze(Qe(),1);var N=class e extends ze{static get requiresSyncAnalytics(){return!0}static summary="Create a new app project";static get jsonOutputSchema(){return k}static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --name my-app --organization-id 123 --template reactRouter --flavor typescript","<%= config.bin %> <%= command.id %> --client-id 123 --template none"];static flags={...ge,...ye,name:w.Flags.string({char:"n",env:"SHOPIFY_FLAG_NAME",hidden:!1,description:"The name for the new app. When provided, skips the app selection prompt and creates a new app with this name. Required in non-interactive environments unless --client-id is provided."}),path:w.Flags.string({char:"p",env:"SHOPIFY_FLAG_PATH",parse:async t=>O(t),default:async()=>U(),hidden:!1}),template:we(w.Flags.string({description:`The app template. Accepts one of the following:
|
|
9
|
+
- <${S.join("|")}>
|
|
10
|
+
- Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]`,env:"SHOPIFY_FLAG_TEMPLATE"})),flavor:w.Flags.string({description:"Which flavor of the given template to use. Required in non-interactive environments when the selected template offers multiple flavors.",env:"SHOPIFY_FLAG_TEMPLATE_FLAVOR"}),"package-manager":w.Flags.string({char:"d",env:"SHOPIFY_FLAG_PACKAGE_MANAGER",hidden:!1,options:["npm","yarn","pnpm","bun"]}),local:w.Flags.boolean({char:"l",env:"SHOPIFY_FLAG_LOCAL",default:!1,hidden:!0}),"client-id":w.Flags.string({hidden:!1,description:"The Client ID of your app. Use this to automatically link your new project to an existing app. In non-interactive environments, provide this flag or both --name and --organization-id.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),"organization-id":w.Flags.string({hidden:!1,description:"The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/<organization-id>. Required in non-interactive environments unless --client-id is provided.",env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]})};static nonTTYFlagRequirements(){return[{flags:["name","client-id"]},{flags:["organization-id","client-id"]},{flags:["flavor"],when:t=>De(t.template)}]}async run(){let{flags:t}=await this.parse(e);if(Ke(t.template),Ve(t.template,t.flavor),t.name!==void 0&&t.name.trim()==="")throw new d("The --name flag can't be empty","Provide a valid app name, for example: --name my-app");let a=pe(t["package-manager"]),i=t.name??await st(t.path),o=Le();await o.session();let n=await Ne({template:t.template,flavor:t.flavor}),s,r;if(t["client-id"]){let u=await _e({apiKey:t["client-id"]});r=u.title,s={result:"existing",app:u}}else{let u;t["organization-id"]?u=await Se(t["organization-id"],o):u=await $e();let{organization:f,apps:A,hasMorePages:b}=await o.orgAndApps(u.id);s=await pt(t.name!==void 0,i,A,b,f,o),r=s.result==="new"?s.name:s.app.title}n.globalCLIResult.install&&await te(a),await ce(()=>({cmd_create_app_template:n.templateType,cmd_create_app_template_url:n.template}));let m=await He({name:r,selectedAppOrNameResult:s,packageManager:a,template:n.template,local:t.local,directory:t.path,useGlobalCLI:n.globalCLIResult.alreadyInstalled||n.globalCLIResult.install,developerPlatformClient:o,postCloneActions:{removeLockfilesFromGitignore:n.templateType!=="custom"}});return Ye(m,t.json),{app:m.app}}};async function st(e){for(let t=0;t<3;t++){let a=await Z({suffix:"app",directory:e});if(Re(a))return a}return""}async function pt(e,t,a,i,o,n){let s=a.length===0||e;if(s||(s=await Fe()),s)return{result:"new",name:e?t:await Ce(t),org:o};{let r=await xe(Ae(n,o.id),a,i);if(!r)throw new d("Unable to select an app: the selection prompt was interrupted.");let m=await n.appFromIdentifiers(r.apiKey);if(!m)throw new d(`App with id ${r.id} not found`);return{result:"existing",app:m}}}export{N as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as R}from"./chunk-LVLAOBJM.js";import{a as k}from"./chunk-KSDU4YOB.js";import{c as D}from"./chunk-PSSYLJG4.js";import{e as S}from"./chunk-QFWWCZOI.js";import{s as A}from"./chunk-5TB52UUV.js";import{r as v}from"./chunk-DJAZBPYA.js";import{a as E}from"./chunk-D7NB7YR6.js";import{N as g}from"./chunk-H4V55Y3Z.js";import{A as b,B as P,C}from"./chunk-CZ22VZDA.js";import{Bb as M,ua as O,wb as j}from"./chunk-LWCTKI4Z.js";import{b as e,i as T}from"./chunk-FZCGRIOM.js";import{c as u,e as h,g as y,p as w}from"./chunk-IWTNUJGY.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();import{resolve as x}from"node:path";var I=e.object({name:e.string(),category:e.string()}),L=e.object({key:e.string(),namespace:e.string(),name:e.string(),description:e.string().nullish(),type:I}),a={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",variant:"PRODUCTVARIANT",shop:"SHOP"},$=e.object(Object.fromEntries(Object.keys(a).map(t=>[t,e.array(L)]))),N=e.object({ownerType:e.string().describe("The upstream owner type, such as PRODUCT or COMPANY_LOCATION."),key:e.string(),namespace:e.string(),name:e.string(),description:e.string().nullable(),type:e.object({name:e.string().describe("The upstream metafield type, such as single_line_text_field."),category:e.string().describe("The upstream metafield category.")}).strict()}).strict(),F=S({name:"ThemeMetafieldsPullResult",schema:e.union([e.object({status:e.enum(["success","partial"]),changed:e.literal(!0),path:e.string().refine(y).describe("The absolute path of the native language-server metafields JSON artifact."),definitions:e.array(N).describe("All fetched definitions, flattened across owner types."),failedOwnerTypes:e.array(e.string()).describe("Upstream owner types whose fetch failed.")}).strict(),e.object({status:e.literal("skipped"),reason:e.literal("not-a-theme")}).strict()]),definitions:{MetafieldDefinition:N},project:t=>{let i=t;if(i.status==="failed")throw new Error("Failed downloads must use the fatal error envelope.");return i.status==="skipped"?i.reason==="cancelled"?{status:"cancelled"}:{status:"skipped",reason:i.reason}:{status:i.failedOwnerTypes.length?"partial":"success",changed:!0,path:x(i.path),definitions:Object.entries(i.definitions).flatMap(([r,o])=>o.map(n=>({ownerType:a[r],key:n.key,namespace:n.namespace,name:n.name,description:n.description??null,type:{name:n.type.name,category:n.type.category}}))),failedOwnerTypes:i.failedOwnerTypes}}});s();function _(t,i,r=!1){t.status==="downloaded"&&t.failedOwnerTypes.length>0&&M(`Failed to fetch metafield definitions for the following owner types: ${t.failedOwnerTypes.join(", ")}`),!r&&(i==="json"?(t.status==="failed"&&T({type:"diagnostic",level:"error",message:"Failed to fetch metafield definitions."}),j(F.encode(t))):t.status==="downloaded"?t.failedOwnerTypes.length>0?P({body:`Metafield definitions were partially downloaded. Failed owner types: ${t.failedOwnerTypes.join(", ")}.`}):b({body:"Metafield definitions have been successfully downloaded."}):t.status==="failed"&&C({body:"Failed to fetch metafield definitions.",nextSteps:["Check your network connection and try again.","Ensure you have the permission to fetch metafield definitions."],reference:[{link:{label:"Metafield Definition API",url:"https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinition"}}]}))}s();async function me(t){let i=await J(t);_(i,"text",t.silent)}async function J(t){k({verbose:t.verbose,noColor:t.noColor});let i=v({store:t.store}),r=await g(i,t.password);return U(r,{path:h(t.path??w()),force:t.force??!1})}async function U(t,i){let{force:r,path:o}=i;if(!await R(o)){if(process.env.SHOPIFY_LANGUAGE_SERVER==="1")return{status:"skipped",reason:"not-a-theme"};if(!await D(r))return{status:"skipped",reason:"cancelled"}}let n=[],f=[];for(let[l,c]of Object.entries(a))n.push(A(c,t).catch(m=>(f.push(c),[])).then(m=>({[l]:m})));let p=(await Promise.all(n)).reduce((l,c)=>({...l,...c})),d=Object.values(a).filter(l=>f.includes(l));return d.length===Object.values(a).length?{status:"failed",failedOwnerTypes:d}:{status:"downloaded",path:await G(o,p),definitions:p,failedOwnerTypes:d}}async function G(t,i){let r=await E(t),o=u(r,"metafields.json"),n=JSON.stringify(i,null,2);return O(o,n),o}export{F as a,_ as b,me as c,J as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g as c}from"./chunk-VKWPEFWQ.js";c();c();c();var E=/^[A-Za-z]:\//;function f(e=""){return e&&e.replace(/\\/g,"/").replace(E,n=>n.toUpperCase())}var $=/^[/\\]{2}/,j=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,A=/^[A-Za-z]:$/,_=/^\/([A-Za-z]:)?$/,z="/";var m=function(e){if(e.length===0)return".";e=f(e);let n=e.match($),t=l(e),s=e[e.length-1]==="/";return e=v(e,!t),e.length===0?t?"/":s?"./":".":(s&&(e+="/"),A.test(e)&&(e+="/"),n?t?`//${e}`:`//./${e}`:t&&!l(e)?`/${e}`:e)},x=function(...e){if(e.length===0)return".";let n;for(let t of e)t&&t.length>0&&(n===void 0?n=t:n+=`/${t}`);return n===void 0?".":m(n.replace(/\/\/+/g,"/"))};function R(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var u=function(...e){e=e.map(s=>f(s));let n="",t=!1;for(let s=e.length-1;s>=-1&&!t;s--){let r=s>=0?e[s]:R();!r||r.length===0||(n=`${r}/${n}`,t=l(r))}return n=v(n,!t),t&&!l(n)?`/${n}`:n.length>0?n:"."};function v(e,n){let t="",s=0,r=-1,o=0,a=null;for(let i=0;i<=e.length;++i){if(i<e.length)a=e[i];else{if(a==="/")break;a="/"}if(a==="/"){if(!(r===i-1||o===1))if(o===2){if(t.length<2||s!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let b=t.lastIndexOf("/");b===-1?(t="",s=0):(t=t.slice(0,b),s=t.length-1-t.lastIndexOf("/")),r=i,o=0;continue}else if(t.length>0){t="",s=0,r=i,o=0;continue}}n&&(t+=t.length>0?"/..":"..",s=2)}else t.length>0?t+=`/${e.slice(r+1,i)}`:t=e.slice(r+1,i),s=i-r-1;r=i,o=0}else a==="."&&o!==-1?++o:o=-1}return t}var l=function(e){return j.test(e)};var S=/.(\.[^./]+)$/,h=function(e){let n=S.exec(f(e));return n&&n[1]||""},p=function(e,n){let t=u(e).replace(_,"$1").split("/"),s=u(n).replace(_,"$1").split("/");if(s[0][1]===":"&&t[0][1]===":"&&t[0]!==s[0])return s.join("/");let r=[...t];for(let o of r){if(s[0]!==o)break;t.shift(),s.shift()}return[...t.map(()=>".."),...s].join("/")},d=function(e){let n=f(e).replace(/\/$/,"").split("/").slice(0,-1);return n.length===1&&A.test(n[0])&&(n[0]+="/"),n.join("/")||(l(e)?"/":".")};var g=function(e,n){let t=f(e).split("/").pop();return n&&t.endsWith(n)?t.slice(0,-n.length):t},P=function(e){let n=f(e).split("/").shift()||"/",t=g(e),s=h(t);return{root:n,dir:d(e),base:t,ext:s,name:t.slice(0,t.length-s.length)}};import{fileURLToPath as I}from"url";import{relative as T,isAbsolute as O,sep as W}from"node:path";function q(...e){return x(...e)}function H(e){return m(e)}function K(...e){return u(...e)}function Q(e,n){return p(e,n)}function w(e){return l(e)}function D(e){return d(e)}function Y(e,n){return g(e,n)}function ee(e){return h(e)}function te(e){return P(e)}function N(e,n){let t=e.split(/\/+|\\+/),s=n.split(/\/+|\\+/),r=0;for(;r<t.length&&r<s.length&&t[r]===s[r];)r++;return r>1?t.slice(0,r).join("/"):"/"}function ne(e,n=C()){let t=N(e,n),s=p(n,e),r=s.split("/").filter(o=>o==="..").length;return t==="/"||s===""||r>2?e:s}function se(e,n,t={native:!1}){if(t.native){let r=T(e,n);return r!==".."&&!r.startsWith(`..${W}`)&&!O(r)}let s=p(e,n);return!s.startsWith("..")&&!w(s)}function re(e){return D(I(e))}function C(){return m(process.env.INIT_CWD||process.cwd())}function oe(e=process.argv){let n=e.indexOf("--path");if(n===-1)return e.find(r=>r.startsWith("--path="))?.split("=")[1];let t=e[n+1];if(!(!t||t.startsWith("-")))return t}function ie(e=process.argv){let n=e.indexOf("--"),t=n===-1?e:e.slice(0,n);return t.includes("--json")||t.includes("-j")}function ae(e,n){let t=e.replace(/\\/g,"/").split("/"),s=[],r=!1;for(let a of t)a===".."?(r=!0,s.pop()):a!=="."&&s.push(a);let o=s.join("/");return r&&n(`Warning: path '${e}' contains '..' traversal \u2014 sanitized to '${o||"."}'
|
|
2
|
+
`),o}export{z as a,x as b,q as c,H as d,K as e,Q as f,w as g,D as h,Y as i,ee as j,te as k,N as l,ne as m,se as n,re as o,C as p,oe as q,ie as r,ae as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as p}from"./chunk-335BUVBP.js";import{a as i}from"./chunk-BN7ZXAZJ.js";import{Bb as v,Cb as h,Gb as C,gb as c,hb as f,ub as g,yb as a}from"./chunk-LWCTKI4Z.js";import{e as u,f as d,g as e,h as m,j as r}from"./chunk-FZCGRIOM.js";import{g as E}from"./chunk-3A3DZVEJ.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function b(o){let n=JSON.stringify(e.parse(o));E()&&g("info",n),C("info",c,n)}function R(o,n){if(r()!==void 0)return n();let s=p(process.env,o)?"json":"text";return m({outputMode:s,sink:s==="json"?O:(l,S)=>{S?.alreadyRendered||x(l)}},n)}var T=i({name:"CommandEvent",schema:e,definitions:{CommandDiagnosticEvent:u,CommandProgressEvent:d}});function x(o){if(o.type==="progress"){a(o.message??o.operation);return}switch(o.level){case"debug":v(o.message);break;case"info":a(o.message);break;case"warning":h(o.message);break;case"error":f(o.message,"error");break}}function O(o){b(o)}export{R as a,T as b,O as c};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{c as ae}from"./chunk-XM7YUXTF.js";import{b as P}from"./chunk-R7EMV77H.js";import{a as fe}from"./chunk-XBQDMGUN.js";import{a as de}from"./chunk-ZGV3HNEV.js";import{a as ie}from"./chunk-FWB3GLMW.js";import{a as re}from"./chunk-XTREQ4A2.js";import{L as le,Ma as ue,N as me,d as ce,e as pe}from"./chunk-3C6VLJ5D.js";import{s as k,u as oe,v as se}from"./chunk-WDFCOZAY.js";import{a as F}from"./chunk-IQVRP7CT.js";import{C as B,p as O,x as W,y as S}from"./chunk-IUP7POIE.js";import{b as te,c as ne,f as A}from"./chunk-Q2SZCZE7.js";import{A as H,B as z,E as X,G as K,I as R,K as Q}from"./chunk-CZ22VZDA.js";import{e as b}from"./chunk-335BUVBP.js";import{a as G}from"./chunk-BN7ZXAZJ.js";import{h as d}from"./chunk-2VSNFOKD.js";import{Na as Y,Sa as x,Ta as J,Va as V,X as h,_ as U,ja as w,pa as q,rb as T,va as v,wb as ee,xa as E}from"./chunk-LWCTKI4Z.js";import{b as f}from"./chunk-FZCGRIOM.js";import{f as Z}from"./chunk-3A3DZVEJ.js";import{b as Se}from"./chunk-YTUUU33R.js";import{c as m,e as N,g as D,m as L,p as $}from"./chunk-IWTNUJGY.js";import{e as Oe,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();async function he(e,t,r,n={}){let{templates:a,groupOrder:i}=await e.templateSpecifications(t,n);return{templates:a.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}l();l();async function ye(e,t){let r=e?.path??"",n=m(t,r);if(!await x(n))throw new d(`
|
|
2
|
+
The extension is not available for ${e?.value}`);return n}async function xe({name:e,app:t}){let r=U(e),n=m(t.directory,se.extensions.directoryName,r);if(await x(n))throw new d(`
|
|
3
|
+
A directory with this name (${r}) already exists.
|
|
4
|
+
Choose a new name for your extension.`);return await v(n),await q(m(n,k.lockFile)),n}function C(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function ge(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,n=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),a=await xe({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:a,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:n,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,p)=>{await ae({repoUrl:o,destination:p,shallow:!0})})};return await Re(s),{directory:L(a),extensionTemplate:e.extensionTemplate}}async function Re(e){try{switch(e.type){case"theme":await Ie(e);break;case"function":await je(e);break;default:await Me(e);break}let t=m(e.directory,k.lockFile);await E(t)}catch(t){throw await Ae(e.directory),e.project.packageManager==="pnpm"&&Ce(t)?new d("Your extension couldn't be generated because pnpm blocked the build scripts of some of its dependencies.",null,[["Run",{command:"pnpm approve-builds"},"in your app directory to approve the build scripts."],["Run",{command:T(e.project.packageManager,"shopify app generate extension")},"again."]]):t}}async function Ae(e){try{await E(e,{maxRetries:10,retryDelay:100})}catch{z({headline:["Couldn't remove",{filePath:e},{char:"."}],body:"Delete this directory manually before generating an extension with the same name."})}}function Ce(e){return e instanceof Error&&e.message.includes("ERR_PNPM_IGNORED_BUILDS")}async function Ie({directory:e,url:t,type:r,name:n,extensionFlavor:a,onGetTemplateRepository:i}){return w(async s=>{let o=await I(t,a,s,i);await P(o,e,{name:n,type:r,uid:b(h(n))})})}async function je({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=C(i?.value),p=[];p.push({title:"Generating function extension",task:async()=>{if(await w(async c=>{let u=await I(t,i,c,s);await P(u,e,{name:a,handle:h(a),flavor:i?.value,uid:b(h(a))})}),o==="javascript"){let c=we(i?.value??"rust");await ve(e,c,"!(*.graphql)")}}}),o==="javascript"&&p.push({title:"Installing additional dependencies",task:async()=>{n.usesWorkspaces&&await O({packageManager:n.packageManager,directory:n.directory});let c=Ge(o);await S(c,{packageManager:n.packageManager,type:"prod",directory:n.usesWorkspaces?e:n.directory})}}),o==="javascript"&&p.push({title:"Building GraphQL types",task:async()=>{let c=re();try{await pe({directory:e,isJavaScript:!0},{...c,app:r})}finally{c.stdout!==process.stdout&&c.stdout.end(),c.stderr!==process.stderr&&c.stderr.end()}}}),await R(p)}async function Me({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=C(i?.value),p=[{title:"Generating extension",task:async()=>{let c=we(i?.value??"vanilla-js");await w(async u=>{let y=await I(t,i,u,s);await P(y,e,{srcFileExtension:c,name:a,handle:h(a),flavor:i?.value??"",uid:b(h(a))})}),o==="javascript"&&await ve(e,c)}},{title:"Installing dependencies",task:async()=>{let c=n.packageManager;if(n.usesWorkspaces)C(i?.value)==="javascript"&&await O({packageManager:c,directory:n.directory});else{await Ne(n.directory,i?.value);let u=m(e,"package.json"),y=await De(u);await S(y,{packageManager:c,type:"prod",directory:n.directory}),await E(u)}}}];p.push({title:"Update shared type definition",task:async()=>{await me(r)}}),await R(p)}function we(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function Ge(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${ce}.0.0`}),t}async function ve(e,t,r="*"){let n=await V(m(e,"src",r)),a=[];for(let i of n)a.push(Y(i,`${i}.${t}`));await Promise.all(a)}async function Ne(e,t){t==="typescript-react"&&await B(e,{"@types/react":oe.reactTypes})}async function De(e){if(!await x(e))return[];let t=await W(e);return Object.entries(t?.dependencies??{}).map(([r,n])=>({name:r,version:n}))}async function I(e,t,r,n){let a=m(r,"download");return await v(a),await n(e,a),ye(t,a)}l();function Le(e,t=[]){let r=[...e.map(a=>({label:a.name,value:a.identifier,group:a.group||"Other",sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(a=>({label:`${a.name} (limit reached)`,value:a.identifier,group:a.group||"Other",disabled:!0,sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER}))],n=(a,i)=>a.sortPriority===i.sortPriority?a.label.localeCompare(i.label):a.sortPriority-i.sortPriority;return r.sort(n)}var $e=async e=>{let t=e.extensionTemplates,r=e.templateType,n=e.extensionFlavor;if(!r){if(n&&(t=t.filter(p=>p.supportedFlavors.map(c=>c.value).includes(n))),t.length===0)throw new d("You have reached the limit for the number of extensions you can create.");r=await K({message:"Type of extension?",choices:Le(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let a=t.find(p=>p.identifier===r),i=e.name||await Ee(e.directory,a.defaultName),s=e.extensionFlavor??await Ue(a);return{extensionTemplate:a,extensionContent:{name:i,flavor:s}}};async function Ee(e,t,r=1){let n=t.includes(" ")?" ":"-",a=r<=1?t:`${t}${n}${r}`,i=m(e,h(a));return J(i)?Ee(e,t,r+1):Q({message:"Name your extension:",defaultValue:a})}async function Ue(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:X({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var be=$e;async function qe(e){let{app:t,developerPlatformClient:r,remoteApp:n,specifications:a,template:i}=e,s=a.map(_e=>_e.identifier),{templates:o,groupOrder:p}=await he(r,n,s,{requestedTemplate:i}),c=await Ye(o,p,a,t,e),u=await be(c);await Ve(u,i);let y=We(u,t,e,r),M=await ge(y);return{status:"success",extension:{directory:M.directory,extensionTemplate:M.extensionTemplate,name:u.extensionContent.name,flavor:u.extensionContent.flavor},packageManager:e.project.packageManager}}async function Ye(e,t,r,n,a){let i=await He(a.template,n,e,r);Be(i,a.flavor);let{validTemplates:s,templatesOverlimit:o}=Je(e,r,n);return{templateType:i?.identifier,name:a.name,extensionFlavor:a.flavor,directory:m(a.directory,"extensions"),app:n,extensionTemplates:s??[],unavailableExtensions:o??[],reset:a.reset,groupOrder:t}}function Je(e,t,r){return fe(e,a=>!Te(r,t,a)?"validTemplates":"templatesOverlimit")}function Te(e,t,r){let n=r.type,a=t.find(s=>s.identifier===n||s.externalIdentifier===n);return e.extensionsForType({identifier:n,externalIdentifier:n}).length>=(a?.registrationLimit??1)}async function Ve(e,t){let{extensionContent:r}=e;return F.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function We(e,t,r,n){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:n}}function Be(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(n=>n.value);if(!r.includes(t))throw new d("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}async function He(e,t,r,n){if(!e)return;let a=r.find(i=>i.identifier===e);if(!a){let i=await Z(),s=r.map(p=>p.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new d(`Unknown extension type: ${e}.
|
|
5
|
+
The following extension types are supported: ${s.join(", ")}`,o)}if(Te(t,n,a))throw new d(`Invalid extension type: ${e}`,`You have reached the limit of extension(s) of type ${a.type} per app`);return a}var Pe=qe;l();var ke=f.object({name:f.string().min(1).describe("The name selected for the generated extension."),type:f.string().min(1).describe("The extension type, such as function, theme, or ui_extension."),template:f.string().min(1).describe("The identifier of the selected extension template."),flavor:f.string().nullable().describe("The selected template flavor, or null when the template has no flavors."),directory:f.string().refine(D,"Expected an absolute filesystem path.").describe("The absolute native filesystem path of the generated extension directory.")}).strict(),_=G({name:"AppGenerateExtensionResult",schema:f.object({status:f.literal("success"),extension:ke}).strict(),definitions:{GeneratedExtension:ke}});l();function Fe(e,t=!1){let{extension:r,packageManager:n}=e;if(t){ee(_.encode({status:e.status,extension:{name:r.name,type:r.extensionTemplate.type,template:r.extensionTemplate.identifier,flavor:r.flavor??null,directory:N($(),r.directory)}}));return}H(ze(r.extensionTemplate,r.directory,n))}function ze(e,t,r){let n={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&n.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:T(r,"shopify app dev")}]),e.supportLinks[0]&&n.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),n}var g=Oe(Se(),1);var j=class e extends de{static summary="Generate a new app Extension.";static descriptionWithMarkdown=`Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).
|
|
6
|
+
|
|
7
|
+
Each new app extension is created in a folder under \`extensions/\`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.
|
|
8
|
+
`;static get jsonOutputSchema(){return _}static description=this.descriptionForHelp();static flags={...te,...ie,...ne,template:A(g.Flags.string({char:"t",hidden:!1,description:"Extension template",env:"SHOPIFY_FLAG_EXTENSION_TEMPLATE"})),name:A(g.Flags.string({char:"n",hidden:!1,description:"name of your Extension",env:"SHOPIFY_FLAG_NAME"})),"clone-url":g.Flags.string({hidden:!0,char:"u",description:"The Git URL to clone the function extensions templates from. Defaults to: https://github.com/Shopify/function-examples",env:"SHOPIFY_FLAG_CLONE_URL"}),flavor:g.Flags.string({hidden:!1,description:"Choose a starting template for your extension, where applicable. Required if non interactive when the selected extension template supports multiple flavors.",options:["vanilla-js","react","typescript","typescript-react","wasm","rust"],env:"SHOPIFY_FLAG_FLAVOR"})};async run(){let{flags:t}=await this.parse(e);await F.addPublicMetadata(()=>({cmd_scaffold_required_auth:!0,cmd_scaffold_template_custom:t["clone-url"]!==void 0,cmd_scaffold_type_owner:"@shopify/app"})),await le(t.path);let{app:r,project:n,specifications:a,remoteApp:i,developerPlatformClient:s}=await ue({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o=await Pe({directory:t.path,reset:t.reset,name:t.name,cloneUrl:t["clone-url"],template:t.template,flavor:t.flavor,app:r,project:n,specifications:a,remoteApp:i,developerPlatformClient:s});return Fe(o,t.json),{app:r}}};export{j as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as L,b as g,d as P,g as w}from"./chunk-
|
|
1
|
+
import{a as L,b as g,d as P,g as w}from"./chunk-3G4HJO72.js";import{a as A}from"./chunk-SFQEHDJY.js";import{t as G}from"./chunk-OGWPS55W.js";import{a as F}from"./chunk-ZGV3HNEV.js";import{a as S}from"./chunk-FWB3GLMW.js";import{p as l,u as d}from"./chunk-H4V55Y3Z.js";import{b as v,e as b}from"./chunk-Q2SZCZE7.js";import{O as u,a as c}from"./chunk-CZ22VZDA.js";import{Cb as y,qb as f,sb as h,yb as i}from"./chunk-LWCTKI4Z.js";import{b as q}from"./chunk-YTUUU33R.js";import{e as Q,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();import{randomBytes as x}from"crypto";function K(){return x(32).toString("hex")}function C(e){let r=new URL(`http://localhost:${e.port}/graphiql`);return r.searchParams.set("key",e.key),e.query&&r.searchParams.set("query",e.query),e.variables&&r.searchParams.set("variables",e.variables),e.apiVersion&&r.searchParams.set("api_version",e.apiVersion),r.toString()}async function I(e){let r=await A(e.port),t=g({stdout:e.stdout??process.stdout,port:r,storeFqdn:e.storeFqdn,tokenProvider:e.tokenProvider,key:e.key,appContext:e.appContext,protectMutations:e.protectMutations}),a=C({port:r,key:e.key,query:e.query,variables:e.variables,apiVersion:e.apiVersion});try{i(h`GraphiQL is running at ${f.link(a)}`),e.additionalReadyMessages?.forEach(s=>i(s)),i("Press Ctrl+C to stop."),await u(a)||y("Browser did not open automatically. Open the URL above manually."),await T(e.abortSignal)}finally{t.close()}}async function T(e){let r=new c,t=()=>r.abort();process.once("SIGINT",t);try{await new Promise(a=>{if(r.signal.aborted||e?.aborted){a();return}r.signal.addEventListener("abort",()=>a(),{once:!0}),e?.addEventListener("abort",()=>r.abort(),{once:!0})})}finally{process.removeListener("SIGINT",t)}}async function k(e){let r=e.remoteApp.apiSecretKeys[0]?.secret??"",t=L(void 0,r,e.store),a=w({apiKey:e.remoteApp.apiKey,apiSecret:r,storeFqdn:e.store}),m=await l(),s=P(e.store,e.remoteApp.apiKey,m);await I({port:e.port,storeFqdn:e.store,tokenProvider:a,key:t,appContext:{appName:e.remoteApp.title,appUrl:s,apiSecret:r},variables:e.variables,apiVersion:e.apiVersion,abortSignal:e.abortSignal})}var n=Q(q(),1),p=class e extends F{static summary="Open a local GraphiQL UI for your app and store.";static descriptionWithMarkdown=`Opens an authenticated Admin API GraphiQL UI for your app and selected store.
|
|
2
2
|
|
|
3
3
|
The app must be installed on the store.`;static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --port 9123"];static flags={...v,...S,store:n.Flags.string({char:"s",description:"The myshopify.com domain of the store to open GraphiQL against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async r=>d(r)}),port:b({description:"Local port for the GraphiQL server.",env:"SHOPIFY_FLAG_PORT"}),variables:n.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES"}),version:n.Flags.string({description:"The API version to use in GraphiQL. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})};async run(){let{flags:r}=await this.parse(e),{appContextResult:t,store:a}=await G(r);return await k({remoteApp:t.remoteApp,store:a.shopDomain,port:r.port,variables:r.variables,apiVersion:r.version}),{app:t.app}}};export{K as a,I as b,p as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-ZQDDRIBA.js";import{sa as r}from"./chunk-H4V55Y3Z.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static hidden=!0;async run(){await r()}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k}from"./chunk-QN3774QI.js";import{D as b,E as C,F as R,O as c,P as l,U as p,W as j,b as w,s as A,x as v,y as D}from"./chunk-LMQGNECW.js";import{b as f}from"./chunk-ZQDDRIBA.js";import{b as S,c as g}from"./chunk-Q2SZCZE7.js";import{A as y,z as d}from"./chunk-CZ22VZDA.js";import{a as m}from"./chunk-BN7ZXAZJ.js";import{wb as h}from"./chunk-LWCTKI4Z.js";import{b as o}from"./chunk-FZCGRIOM.js";import{b as T}from"./chunk-YTUUU33R.js";import{e as J,g as i}from"./chunk-VKWPEFWQ.js";i();i();var W={cleanResults:v,cleanAllResults:D};async function n(t,e=W){return{removed:t.all?await e.cleanAllResults(t.appDirectory):await e.cleanResults(t.selection.appDirectory,b(t.selection))}}i();i();var x=o.object({directory:c().describe("The absolute app directory.")}).strict(),a=m({name:"AppSecurityCleanResult",schema:o.object({status:o.literal("success"),changed:o.boolean().describe("Whether any results directory was removed."),app:o.union([l,x]).describe("The selected app. With --all, only its directory."),resultsDirectories:o.array(c()).describe("The absolute paths of the removed results directories, sorted. Empty when there was nothing to remove.")}).strict(),definitions:{AppSecurityApp:l,AppSecurityCleanAllApp:x}});function O(t,e,s){if(s==="json"){h(a.encode(I(t,e)));return}if(t.removed.length===0){let r=e.all?e.appDirectory:e.selection.appDirectory;d({headline:"No app security check results to remove.",body:["Nothing was found in",{filePath:A(r)}]})}else y({headline:"App security check results removed.",body:{list:{items:t.removed.map(r=>({filePath:r}))}}})}function I(t,e){return{status:"success",changed:t.removed.length>0,app:e.all?{directory:p(e.appDirectory)}:j(e.selection),resultsDirectories:t.removed.map(p)}}var P=J(T(),1);var u=class t extends f{static summary="Remove local app security check results.";static descriptionWithMarkdown="Deletes the results directory, `.shopify/app-security/<results key>/`, without asking. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. Other results directories are left alone. Prints each removed path.\n\nUse `--all` to delete every results directory under `.shopify/app-security/` instead. `--all` takes neither `--config` nor `--client-id`, and with `--without-app-config` it doesn't need `--client-id`.";static get jsonOutputSchema(){return a}static description=this.descriptionForHelp();static flags={...S,...w,...g,all:P.Flags.boolean({description:"Delete every results directory under .shopify/app-security/, not only the selected one.",exclusive:["config","client-id"]})};async run(){let{flags:e}=await this.parse(t),s={path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"]},r=e.all?{all:!0,appDirectory:await C(s)}:{all:!1,selection:await R({...s,allowPrompts:!1})};r.all||await k(r.selection,e.path);let F=await n(r);O(F,r,e.json?"json":"text")}};export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as s,c as i,d as n}from"./chunk-
|
|
1
|
+
import{a as s,c as i,d as n}from"./chunk-2ORRV7GH.js";import{b as e}from"./chunk-ZQDDRIBA.js";import{b as a,c as r}from"./chunk-Q2SZCZE7.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class u extends e{static summary="Check whether auto-upgrade is enabled, disabled, or not yet configured.";static descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
|
|
2
2
|
|
|
3
3
|
When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-EXFBZPZS.js";import{a as e}from"./chunk-7MVWDCI3.js";import{a as o}from"./chunk-Q66CI37F.js";import{b as i}from"./chunk-ZQDDRIBA.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};
|
|
@@ -0,0 +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-PZUGDE7N.js";import{a as x}from"./chunk-6BNKBCCU.js";import{b as S,c as j}from"./chunk-ACA2BGAD.js";import{a as R}from"./chunk-ZGV3HNEV.js";import{a as P}from"./chunk-FWB3GLMW.js";import{Ma as J,da as L}from"./chunk-3C6VLJ5D.js";import{Ea as A,ta as U}from"./chunk-H4V55Y3Z.js";import{b as D,c as v}from"./chunk-Q2SZCZE7.js";import{A as F}from"./chunk-CZ22VZDA.js";import{a as C}from"./chunk-BN7ZXAZJ.js";import{j as O,m as k,n as M}from"./chunk-2VSNFOKD.js";import{wb as s,xb as g}from"./chunk-LWCTKI4Z.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as N,b as $,c as g}from"./chunk-Q2XRITUG.js";import{j as D}from"./chunk-H4V55Y3Z.js";import{a as b,b as A}from"./chunk-GRGFA26K.js";import{T as p,U as k,a as T}from"./chunk-CZ22VZDA.js";import{k as P}from"./chunk-2VSNFOKD.js";import{Bb as u,Ha as I,Ka as O,N as y,Oa as F,Ta as h,wa as _,ya as U}from"./chunk-LWCTKI4Z.js";import{g as w}from"./chunk-3A3DZVEJ.js";import{c as m,h as l,i as x}from"./chunk-IWTNUJGY.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execFileSync as z}from"child_process";var H="2026.10.3",B=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,W={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},G={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},V={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:W,darwin:G,win32:V};function X(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return B+n}function Z(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function C(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=X(t,e),o=Z(r,t);if(h(o))try{let i=z(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!J(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await K(n,o);else if(t==="darwin")await tt(n,o);else if(t==="win32")await Q(n,o);else throw new Error(`Unsupported platform: ${t}`)}function J(r,t){let[e,n,o]=r.split(".").map(Number),[i,a,c]=t.split(".").map(Number);return e!==i?(e??0)>(i??0):n!==a?(n??0)>(a??0):(o??0)>(c??0)}async function K(r,t){await R(r,t),await F(t,"755")}async function Q(r,t){await R(r,t)}async function tt(r,t){await R(r,`${t}.tgz`);let e=x(`${t}.tgz`);await p("tar",["-xzf",e],{cwd:l(t)}),I(`${t}.tgz`),await U(`${l(t)}/cloudflared`,t)}async function R(r,t){h(l(t))||_(l(t));let e=Y.promisify(j),n=await D(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=O(t);return await e(n.body,o),t}import{Writable as rt}from"stream";import{fileURLToPath as et}from"url";var $t=$({provider:g,action:st}),nt=w()?.2:40,ot=5;async function st(r){try{let t=new E(r);return await t.startTunnel(),b(t)}catch(t){let e=new N("unknown",t.message);return A(e)}}var E=class{port;provider=g;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await C(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new T;let e=!1;if(t>=ot){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],i=!1,a;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=y(o).slice(-5).join(`
|
|
2
|
+
`);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},nt*1e3);let c=this,L=new rt({write(s,ft,M){if(u(s.toString()),e)return;a??=it(s),ut(s)&&(i=!0),i&&(a?(e=!0,c.currentStatus={status:"connected",url:a}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let S=at(s);S&&o.push(S),M()}});p(ct(),n,{stdout:L,stderr:L,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new P(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),w()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function it(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${dt()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function at(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${lt(r.toString())}`}function lt(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ut(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function ct(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(et(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-Q2SZCZE7.js";import{i as r}from"./chunk-B4OMIONW.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();function v(o){o.verbose&&(process.env[n.verbose.env]="true"),o.noColor&&(r.level=0,process.env.FORCE_COLOR="0")}export{v as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{b as S}from"./chunk-7GHSE7SG.js";import{qb as o,sb as r,wb as p}from"./chunk-LWCTKI4Z.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();function P(e){let t=Object.fromEntries(e.variables.map(({name:u,value:E})=>[u,E]));return r`
|
|
2
|
+
${o.green("SHOPIFY_API_KEY")}=${t.SHOPIFY_API_KEY??""}
|
|
3
|
+
${o.green("SHOPIFY_API_SECRET")}=${t.SHOPIFY_API_SECRET??""}
|
|
4
|
+
${o.green("SCOPES")}=${t.SCOPES??""}
|
|
5
|
+
`}function O(e,t){p(t==="json"?S.encode(e):P(e))}export{P as a,O as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-XNNKLUTN.js";import{a as t}from"./chunk-OQ5CLM2H.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a=class extends t{static hidden=!0;static flags={...t.flags};static baseFlags={...t.baseFlags};async run(){return r({from:"app import-custom-data-definitions",to:"app import custom-data-definitions"}),super.run()}};export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a}from"./chunk-5TB52UUV.js";import{N as l}from"./chunk-H4V55Y3Z.js";import{h}from"./chunk-2VSNFOKD.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};
|