shopify 4.9.2 → 4.9.4
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-APDNTBDE.js +1 -0
- package/dist/analytics-LX52KYSE.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-JKWB7WTO.js → chunk-2PDVBGQH.js} +1 -1
- package/dist/{chunk-3ZL4TDTH.js → chunk-2YVSZFXJ.js} +1 -1
- package/dist/{chunk-BLCR7BXU.js → chunk-35WQTGN3.js} +1 -1
- package/dist/chunk-37BGAWAW.js +2 -0
- package/dist/chunk-3C4WVKSO.js +6 -0
- package/dist/{chunk-46U6C6C6.js → chunk-3G2ZQ2EF.js} +1 -1
- package/dist/{chunk-JAY7AGAG.js → chunk-3LHE4GIX.js} +1 -1
- package/dist/{chunk-3E3MCY5O.js → chunk-3V4VL3SD.js} +3 -3
- package/dist/{chunk-2P5DUPT7.js → chunk-43URS56H.js} +1 -1
- package/dist/{chunk-525BMYNR.js → chunk-45SZ5PSE.js} +1 -1
- package/dist/{chunk-RCYQPOJW.js → chunk-47IQIIFX.js} +91 -91
- package/dist/{chunk-PV5C6Q2P.js → chunk-4ES7BJEK.js} +1 -1
- package/dist/{chunk-C4GEP3CX.js → chunk-4IFY7V7W.js} +1 -1
- package/dist/{chunk-J7ZG6SO3.js → chunk-4JGWKUJN.js} +1 -1
- package/dist/{chunk-3EEH3A27.js → chunk-4O5GQ3DS.js} +1 -1
- package/dist/{chunk-JWDR66AS.js → chunk-4O7LK5RG.js} +1 -1
- package/dist/{chunk-RBPMV3KB.js → chunk-4OCVXE5Y.js} +1 -1
- package/dist/{chunk-CHRFYG6W.js → chunk-4TFJ5RW7.js} +1 -1
- package/dist/{chunk-UOKX3AME.js → chunk-4TZCRMBJ.js} +1 -1
- package/dist/{chunk-EZ5F4ZFY.js → chunk-4ZNBEMRT.js} +3 -3
- package/dist/chunk-5BGUKF7L.js +1 -0
- package/dist/{chunk-LIQSNIB3.js → chunk-5BTLE67Z.js} +1 -1
- package/dist/{chunk-6NLGZGYE.js → chunk-5JIJDUXX.js} +1 -1
- package/dist/{chunk-WINVPFT5.js → chunk-66YRAUWX.js} +1 -1
- package/dist/{chunk-JCO2SDDR.js → chunk-67EBF76X.js} +1 -1
- package/dist/{chunk-5BO5HCN6.js → chunk-6A4H3HPY.js} +1 -1
- package/dist/{chunk-BVR3GF2L.js → chunk-6HPUOCFF.js} +1 -1
- package/dist/chunk-6IDEDOXW.js +2 -0
- package/dist/{chunk-ANHSOQTZ.js → chunk-6IMHGT7F.js} +1 -1
- package/dist/{chunk-4QEALPWD.js → chunk-6MC2BEW4.js} +1 -1
- package/dist/chunk-6YDLNP4G.js +15 -0
- package/dist/{chunk-BPVXYM6G.js → chunk-73D5O7A3.js} +1 -1
- package/dist/{chunk-EMKLN75K.js → chunk-7556AIVG.js} +1 -1
- package/dist/{chunk-IQIUFTR6.js → chunk-7A3RW2VM.js} +1 -1
- package/dist/{chunk-EGJQEKAO.js → chunk-7HNRK2CR.js} +1 -1
- package/dist/{chunk-G627WGIC.js → chunk-7HWMURCW.js} +2 -2
- package/dist/{chunk-3NRGGEGU.js → chunk-7SJHVJ3W.js} +1 -1
- package/dist/{chunk-MQZPASSP.js → chunk-7VAKNVFD.js} +1 -1
- package/dist/{chunk-KPNUSDCW.js → chunk-A2VCTDKH.js} +1 -1
- package/dist/{chunk-JCKA3O5A.js → chunk-ALK66U3O.js} +1 -1
- package/dist/{chunk-MP5NZL7C.js → chunk-AMLCWRHU.js} +1 -1
- package/dist/{chunk-AVOSD4NV.js → chunk-AVMNIZAJ.js} +1 -1
- package/dist/{chunk-IJLD5UYC.js → chunk-AYIU6Z4C.js} +1 -1
- package/dist/{chunk-T3JUBPBU.js → chunk-B3M3KIOU.js} +1 -1
- package/dist/{chunk-ER7ZTF26.js → chunk-BIWG3FQQ.js} +1 -1
- package/dist/{chunk-YKYJOUV7.js → chunk-BOE2ST6J.js} +1 -1
- package/dist/chunk-BQ3U3CQV.js +1 -0
- package/dist/{chunk-FICC6IFE.js → chunk-BVB3DTNE.js} +1 -1
- package/dist/{chunk-55QTRPZ2.js → chunk-C6IBY7NW.js} +1 -1
- package/dist/{chunk-E64OFJHF.js → chunk-CLD3NZYD.js} +1 -1
- package/dist/{chunk-PFIQR7XS.js → chunk-CQF5NDTJ.js} +1 -1
- package/dist/{chunk-X6HLGOIV.js → chunk-CVFPY2SH.js} +1 -1
- package/dist/{chunk-OERMQ2FP.js → chunk-D3KFKT4D.js} +1 -1
- package/dist/{chunk-3NUQGW57.js → chunk-DEF2G7S4.js} +1 -1
- package/dist/{chunk-I55L6FOM.js → chunk-DMDLJRLW.js} +1 -1
- package/dist/{chunk-EMRUM6AA.js → chunk-DMNWSUKV.js} +1 -1
- package/dist/{chunk-PQH4U2XV.js → chunk-DSS4ECIH.js} +1 -1
- package/dist/{chunk-WXT5AKZV.js → chunk-DYPZX7MW.js} +1 -1
- package/dist/{chunk-R43LXE66.js → chunk-EMH7OHCW.js} +1 -1
- package/dist/{chunk-UB2LAIXS.js → chunk-ENQXB532.js} +1 -1
- package/dist/{chunk-Q7PF4VKI.js → chunk-EO4YJFMY.js} +62 -51
- package/dist/{chunk-KY36HSIB.js → chunk-F3PZGSOY.js} +1 -1
- package/dist/chunk-FEQHCE2E.js +3 -0
- package/dist/{chunk-QMJZFKKU.js → chunk-FK7GA4QQ.js} +1 -1
- package/dist/{chunk-OCQZ2ULI.js → chunk-FO2R6KHG.js} +1 -1
- package/dist/{chunk-WNO2V53C.js → chunk-FOAV642V.js} +1 -1
- package/dist/{chunk-QA2NOPXG.js → chunk-FQL2WEKX.js} +1 -1
- package/dist/{chunk-3ATOVFLZ.js → chunk-G7JW4UIM.js} +1 -1
- package/dist/{chunk-BLBJT7BM.js → chunk-GE4MLO3C.js} +1 -1
- package/dist/{chunk-OIQVPTNQ.js → chunk-GM4EFJJF.js} +1 -1
- package/dist/chunk-GN66BRYF.js +1 -0
- package/dist/{chunk-XTKXBQVA.js → chunk-GPRZYFDE.js} +1 -1
- package/dist/{chunk-SYNCIFJ6.js → chunk-GSE6FXZU.js} +1 -1
- package/dist/{chunk-OXN2DID2.js → chunk-GZ7VGCVW.js} +1 -1
- package/dist/{chunk-HKZ75UKL.js → chunk-HASIOUH2.js} +1 -1
- package/dist/chunk-HILYTMVA.js +1 -0
- package/dist/{chunk-SWNY3RUM.js → chunk-HJHS23Q3.js} +1 -1
- package/dist/{chunk-SQIESCOJ.js → chunk-HLPAVELJ.js} +1 -1
- package/dist/{chunk-YIV3CWED.js → chunk-HPM3HF7A.js} +1 -1
- package/dist/{chunk-HZJHGHLN.js → chunk-HQJ62PII.js} +1 -1
- package/dist/{chunk-JJHJYBPQ.js → chunk-HQY6JM6G.js} +1 -1
- package/dist/{chunk-7ARGLS6W.js → chunk-HSYMUYEZ.js} +1 -1
- package/dist/{chunk-IESHPQLC.js → chunk-I5PQZRYM.js} +1 -1
- package/dist/{chunk-M7QFZQ23.js → chunk-IDKRJ2F4.js} +1 -1
- package/dist/{chunk-I2LILWDI.js → chunk-IGDVKRB4.js} +1 -1
- package/dist/chunk-IPZ6LUJV.js +4 -0
- package/dist/{chunk-NLKO2J7T.js → chunk-J4J2YXH3.js} +1 -1
- package/dist/{chunk-CNAMKKAK.js → chunk-J4NBPC57.js} +1 -1
- package/dist/chunk-J6LQR2F6.js +7 -0
- package/dist/{chunk-UYRXUGLY.js → chunk-JYGZD4HM.js} +1 -1
- package/dist/{chunk-CDIKRQ6M.js → chunk-K3HUQLIC.js} +1 -1
- package/dist/{chunk-GPJJA3FX.js → chunk-K7D53KSJ.js} +1 -1
- package/dist/{chunk-UMSO6MOI.js → chunk-KQFA5YTT.js} +1 -1
- package/dist/{chunk-MW3HFOPD.js → chunk-KTD7VLHL.js} +1 -1
- package/dist/chunk-L4DFMMOI.js +1 -0
- package/dist/{chunk-7IRPE3M5.js → chunk-LJIJEGND.js} +1 -1
- package/dist/{chunk-D2S566HF.js → chunk-LJZTSQRD.js} +1 -1
- package/dist/{chunk-7EDXMGBQ.js → chunk-LKXFHYLI.js} +1 -1
- package/dist/{chunk-6H3HVSO5.js → chunk-LLPB6JN5.js} +1 -1
- package/dist/{chunk-UVC3IXM3.js → chunk-LOWSU4BB.js} +1 -1
- package/dist/{chunk-7MMPQMU7.js → chunk-LWU5TKNA.js} +1 -1
- package/dist/{chunk-PI6FLLDD.js → chunk-LYIXRMQJ.js} +1 -1
- package/dist/{chunk-DTGIMRBX.js → chunk-MCNK5SJ6.js} +1 -1
- package/dist/{chunk-GS52MX5F.js → chunk-MJZSSCGD.js} +1 -1
- package/dist/{chunk-65I35VBS.js → chunk-MMQZO2W2.js} +1 -1
- package/dist/{chunk-MIP2Y34N.js → chunk-MUM34KUM.js} +1 -1
- package/dist/{chunk-YXKMPCFH.js → chunk-MW3IMZJ5.js} +1 -1
- package/dist/{chunk-HYC3JXR4.js → chunk-MW3JKGJH.js} +1 -1
- package/dist/{chunk-WZEKBD7B.js → chunk-N55MSO3X.js} +5 -5
- package/dist/{chunk-PQMKPXFV.js → chunk-N5AZZYQA.js} +1 -1
- package/dist/{chunk-P2MVR6CG.js → chunk-NCRWOW6F.js} +1 -1
- package/dist/{chunk-MHZSSRHP.js → chunk-NCVGCVQ5.js} +1 -1
- package/dist/{chunk-ELQ5NPPB.js → chunk-NGSEF3UX.js} +1 -1
- package/dist/{chunk-3U2MYUWG.js → chunk-NT4A37HG.js} +1 -1
- package/dist/{chunk-Q4TZD2M6.js → chunk-NU5WLZ6Y.js} +1 -1
- package/dist/{chunk-TEASB2WU.js → chunk-NYYXH2SX.js} +1 -1
- package/dist/{chunk-RAQP66LR.js → chunk-O5FFMTJE.js} +1 -1
- package/dist/{chunk-2VDCTMLY.js → chunk-OE3HSNSE.js} +1 -1
- package/dist/{chunk-RY6TZDVV.js → chunk-ONF7XXEL.js} +1 -1
- package/dist/{chunk-5TQOMAJS.js → chunk-PB5ZZET5.js} +1 -1
- package/dist/{chunk-2NMICU24.js → chunk-PFXNBHQQ.js} +1 -1
- package/dist/{chunk-RGZCV56L.js → chunk-PG4S5HJJ.js} +1 -1
- package/dist/{chunk-Z5SFLTH6.js → chunk-PHG4DASY.js} +1 -1
- package/dist/{chunk-VXGXK66W.js → chunk-PO5T44H3.js} +1 -1
- package/dist/{chunk-ZJ4H3XEL.js → chunk-PP4VCR4Y.js} +1 -1
- package/dist/{chunk-RDO5IWB5.js → chunk-PVAZCZSY.js} +1 -1
- package/dist/chunk-PWS4VFSD.js +1 -0
- package/dist/{chunk-T6TYF72N.js → chunk-Q2XLIWG4.js} +1 -1
- package/dist/{chunk-ZZ7SOJHH.js → chunk-Q37WAD6F.js} +1 -1
- package/dist/{chunk-Q26ES5T3.js → chunk-Q43LBSPT.js} +1 -1
- package/dist/{chunk-VZLEYZLX.js → chunk-QAJZUJR5.js} +1 -1
- package/dist/{chunk-2X3HYG4B.js → chunk-QO5RNGWA.js} +1 -1
- package/dist/chunk-QPQS2YU3.js +1 -0
- package/dist/{chunk-Q555FV2X.js → chunk-QTLGMJDW.js} +1 -1
- package/dist/{chunk-ELJ34WWD.js → chunk-QUXQM3S3.js} +1 -1
- package/dist/{chunk-SRDKLZ4O.js → chunk-R3KSOCMB.js} +1 -1
- package/dist/{chunk-NS4FUSSK.js → chunk-R74WHKHH.js} +1 -1
- package/dist/chunk-R7YJNDXW.js +1 -0
- package/dist/chunk-RJSQMKKS.js +1 -0
- package/dist/{chunk-DGOBYP74.js → chunk-RK2V6OIJ.js} +1 -1
- package/dist/{chunk-U5L2P36D.js → chunk-RSC5NQAT.js} +1 -1
- package/dist/{chunk-4565O5TG.js → chunk-RUHQNF2W.js} +1 -1
- package/dist/{chunk-7ZNR4YL4.js → chunk-RXTLNUPF.js} +1 -1
- package/dist/{chunk-PGE4HGLA.js → chunk-S36VGP37.js} +1 -1
- package/dist/{chunk-KYBZ2MBA.js → chunk-SNE4RHM4.js} +1 -1
- package/dist/{chunk-BVVYKX4D.js → chunk-SQAS5RVZ.js} +1 -1
- package/dist/{chunk-AKP4QAGL.js → chunk-SZI6G247.js} +1 -1
- package/dist/{chunk-LWF4EV22.js → chunk-TFXUDHCP.js} +1 -1
- package/dist/{chunk-THW6UDZH.js → chunk-TPHHQAUD.js} +1 -1
- package/dist/{chunk-JLGXJHPX.js → chunk-TVCWDEVS.js} +1 -1
- package/dist/{chunk-2R2PKQQV.js → chunk-UEBUGSBT.js} +1 -1
- package/dist/{chunk-TPPBEVNQ.js → chunk-UIC7K2HX.js} +1 -1
- package/dist/{chunk-PG6XEOYF.js → chunk-UNHT4ZFP.js} +1 -1
- package/dist/{chunk-JUCOIXG5.js → chunk-UQ6ALA3Y.js} +1 -1
- package/dist/{chunk-EP5HIGAL.js → chunk-UU6BRRYS.js} +1 -1
- package/dist/{chunk-3F42A3XV.js → chunk-UWI76E2L.js} +3 -3
- package/dist/{chunk-EXKTQF26.js → chunk-VGBUN3CZ.js} +1 -1
- package/dist/{chunk-J66WAKXN.js → chunk-VMNOSVPT.js} +1 -1
- package/dist/{chunk-JAX56OYG.js → chunk-VNFUCH6T.js} +1 -1
- package/dist/{chunk-NDMISEDF.js → chunk-VS7QVU3Z.js} +1 -1
- package/dist/{chunk-XE5QH4D7.js → chunk-W4KE7AO6.js} +1 -1
- package/dist/{chunk-W56I6HOT.js → chunk-WEPO4J2F.js} +1 -1
- package/dist/{chunk-QN6SITWN.js → chunk-WEXOA4C4.js} +1 -1
- package/dist/{chunk-DH5E6NM3.js → chunk-WLWHCUPZ.js} +1 -1
- package/dist/{chunk-WNE2MZAZ.js → chunk-XGKCPD6W.js} +1 -1
- package/dist/{chunk-CGH5Y6XE.js → chunk-XNPUZRWP.js} +1 -1
- package/dist/{chunk-PYILLIGT.js → chunk-XNVOKAF2.js} +1 -1
- package/dist/{chunk-EJY4LA2S.js → chunk-XSMCQLJW.js} +1 -1
- package/dist/chunk-XUUIBSLW.js +1 -0
- package/dist/{chunk-RW2MONAS.js → chunk-XWQM2NZ2.js} +1 -1
- package/dist/{chunk-TWS34WUT.js → chunk-Y3PY5LP7.js} +1 -1
- package/dist/{chunk-FU4UVINZ.js → chunk-Y62EMOQA.js} +1 -1
- package/dist/{chunk-PQCALXSD.js → chunk-Y743UVBS.js} +1 -1
- package/dist/{chunk-OMEWUFUL.js → chunk-YBSX53QP.js} +1 -1
- package/dist/{chunk-7GJYJ6DU.js → chunk-YHCP326A.js} +1 -1
- package/dist/{chunk-B477XHLZ.js → chunk-YHESTFMZ.js} +1 -1
- package/dist/{chunk-R6IJRVVM.js → chunk-YPCXVZ2N.js} +1 -1
- package/dist/{chunk-HVU3D3ZU.js → chunk-YT27FIQN.js} +2 -2
- package/dist/{chunk-N4AR2B6D.js → chunk-YTR5JHNJ.js} +1 -1
- package/dist/{chunk-SHBB5GST.js → chunk-YYA5VGDW.js} +1 -1
- package/dist/{chunk-XRJ2GQ24.js → chunk-Z6X2GT6Q.js} +1 -1
- package/dist/{chunk-FNKTF2OF.js → chunk-ZEBMW5KS.js} +1 -1
- package/dist/{chunk-SZ2JOXTG.js → chunk-ZEE32UH6.js} +1 -1
- package/dist/{chunk-4S2WKMLJ.js → chunk-ZTICX3AO.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/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-HYYJSZAH.js → command-json-schema-SS4GDJTQ.js} +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-CDZ5YSQM.js → conf-store-54YJCIDK.js} +1 -1
- package/dist/{custom-oclif-loader-NVOK22CJ.js → custom-oclif-loader-3UBH7Q7R.js} +1 -1
- package/dist/{deprecations-33DG6ZUL.js → deprecations-ZX7ZKF6L.js} +1 -1
- package/dist/dist-JMNE7MP6.js +1 -0
- package/dist/dist-M2AXGBOL.js +1 -0
- package/dist/{environment-ZUTBXY7U.js → environment-RSUK27TA.js} +1 -1
- package/dist/environments-KD2IDYPG.js +1 -0
- package/dist/{error-V77H2UYX.js → error-AA6LW3PN.js} +1 -1
- package/dist/error-handler-4VW3AV2G.js +1 -0
- package/dist/{fs-SKH3XZU7.js → fs-4QZCAEP7.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 +1 -1
- package/dist/{is-global-2G4BLF7H.js → is-global-FKG327CG.js} +1 -1
- package/dist/{json-error-WSMAL66C.js → json-error-32ETFU3V.js} +1 -1
- package/dist/{local-G2Z24BHM.js → local-R3UAQN7T.js} +1 -1
- package/dist/{metadata-Y3RKC4P2.js → metadata-JWJG4JV4.js} +1 -1
- package/dist/{node-package-manager-A7HTBJKY.js → node-package-manager-M4XHUTQR.js} +1 -1
- package/dist/notifications-system-QVM2JWKB.js +1 -0
- package/dist/{os-7VQXVZWF.js → os-FEHBQQKP.js} +1 -1
- package/dist/{output-ZFFHJGNK.js → output-2LS5AOAH.js} +1 -1
- package/dist/{path-6YMSTSWG.js → path-CPAYTWQW.js} +1 -1
- package/dist/system-TMD2LYZM.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-YSFALYSL.js → ui-FNPICAAH.js} +1 -1
- package/dist/upgrade-YYPP5VZY.js +1 -0
- package/dist/version-OX3MORI6.js +1 -0
- package/dist/version-P7D5ME4Z.js +1 -0
- package/dist/{workerd-RNDPF36Q.js → workerd-TKVRZK2F.js} +1 -1
- package/oclif.manifest.json +37 -13
- package/package.json +7 -7
- package/dist/analytics-H2ANKZ2S.js +0 -1
- package/dist/analytics-Q6HJRPRX.js +0 -1
- package/dist/chunk-246AZCDT.js +0 -1
- package/dist/chunk-3VYOLEQE.js +0 -2
- package/dist/chunk-5JW2EYSE.js +0 -15
- package/dist/chunk-6SO5GA6P.js +0 -2
- package/dist/chunk-BK4VCXDD.js +0 -1
- package/dist/chunk-DV77BSKW.js +0 -1
- package/dist/chunk-FQKURDZR.js +0 -6
- package/dist/chunk-IOS4IDZ2.js +0 -3
- package/dist/chunk-JUVJNIEA.js +0 -1
- package/dist/chunk-KOYBR5MV.js +0 -1
- package/dist/chunk-P6TOIMMF.js +0 -1
- package/dist/chunk-QLHPTMIH.js +0 -1
- package/dist/chunk-SDHDDNKM.js +0 -4
- package/dist/chunk-TQ7MHGY4.js +0 -1
- package/dist/chunk-TUE67I2F.js +0 -7
- package/dist/chunk-YTJ3EPD3.js +0 -1
- package/dist/chunk-Z57YWHOE.js +0 -1
- package/dist/dist-DODCXJ2A.js +0 -1
- package/dist/dist-YXMAKIFS.js +0 -1
- package/dist/environments-KBRQNE4R.js +0 -1
- package/dist/error-handler-JY3ZKE2G.js +0 -1
- package/dist/notifications-system-E64OSVXF.js +0 -1
- package/dist/system-ZLITSFDC.js +0 -1
- package/dist/upgrade-I4JTR4LA.js +0 -1
- package/dist/version-AOVO47AW.js +0 -1
- package/dist/version-LQV54JBC.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b}from"./chunk-
|
|
1
|
+
import{b}from"./chunk-R3KSOCMB.js";import{j as c,l as f,o as T}from"./chunk-LYIXRMQJ.js";import{a as F}from"./chunk-QUXQM3S3.js";import{p as y,v as O}from"./chunk-Y3PY5LP7.js";import{b as I}from"./chunk-NU5WLZ6Y.js";import{k as v,oa as w}from"./chunk-3V4VL3SD.js";import{z as S}from"./chunk-47IQIIFX.js";import{i as a}from"./chunk-Q37WAD6F.js";import{Kb as _,Ya as l,qa as u}from"./chunk-UWI76E2L.js";import{b as A}from"./chunk-I3J63RFV.js";import{e as x,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function P({session:e,overridesContent:r,themeId:t}){w("theme-preview:create");let m=`${f(e)}/theme_preview.json?preview_theme_id=${t}`,o=await c(e,{headers:{"Content-Type":"application/json"}}),i=await v(m,{method:"POST",body:r,headers:o});if(!i.ok)throw new a(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let n=await J(i);return w("theme-preview:create"),n}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:s}){w("theme-preview:update");let o=`${f(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(s)}`,i=await c(e,{headers:{"Content-Type":"application/json"}}),n=await v(o,{method:"POST",body:r,headers:i});if(!n.ok)throw new a(`Theme preview request failed with status ${n.status}: ${n.statusText}`);let E=await J(n);return w("theme-preview:update"),E}async function J(e){let r=await e.json();if(r.error)throw new a(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new a("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new a(`Override file not found: ${e.overrideJson}`);let r=await u(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let n=i instanceof Error?i.message:String(i);throw new a(`Failed to parse override file: ${e.overrideJson}`,n)}let s=await T(e.themeId,e.adminSession,e.password),m=JSON.stringify(t),o=e.previewIdentifier?await g({session:s,overridesContent:m,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:s,overridesContent:m,themeId:e.themeId});e.json?_(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):S({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var p=x(A(),1);var h=class extends O{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={...I,...y,theme:p.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:p.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":p.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:p.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:p.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};static multiEnvironmentsFlags=null;async command(r,t){let s=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:s.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,b as c,c as d}from"./chunk-
|
|
1
|
+
import{a as p,b as c,c as d}from"./chunk-YYA5VGDW.js";import{a as r}from"./chunk-PWS4VFSD.js";import{a as n}from"./chunk-PO5T44H3.js";import{Ha as s}from"./chunk-UNHT4ZFP.js";import{b as a}from"./chunk-NU5WLZ6Y.js";import{b as y}from"./chunk-I3J63RFV.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var f=g(y(),1);var o=class m extends r{static summary="Fetch the latest GraphQL schema for a function.";static descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";static description=this.descriptionForHelp();static flags={...a,...n,...c,stdout:f.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};async run(){let{flags:t}=await this.parse(m),{app:e,developerPlatformClient:h,organization:l}=await s({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),u=await d(e,t.path);return await p({app:e,extension:u,stdout:t.stdout,developerPlatformClient:h,orgId:l.id}),{app:e}}};export{o as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Nb as d}from"./chunk-
|
|
1
|
+
import{Nb as d}from"./chunk-UWI76E2L.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();import{spawn as m}from"child_process";function b(n=process.pid,s="SIGTERM",e=!0,i){$(n,s,e,i??(t=>{t&&d(`Failed to kill process ${n}: ${t}`)}))}function $(n,s,e,i){let o=typeof n=="number"?n.toString():n;if(!/^\d+$/.test(o)){i(new Error("pid must be a number"));return}let t={};t[o]=[];let r=new Set;switch(r.add(o),process.platform){case"win32":{m("taskkill",["/pid",o,"/T","/F"]).on("close",f=>{f===0?i():i(new Error(`taskkill exited with code ${f}`))});break}case"darwin":h(o,t,r,function(c){return m("pgrep",["-lfP",c])},function(){k(t,s,o,e,i)});break;default:h(o,t,r,function(c){return m("ps",["-o","pid command","--no-headers","--ppid",c])},function(){k(t,s,o,e,i)});break}}function k(n,s,e,i,o){let t=new Set;try{Object.keys(n).forEach(function(r){n[r].forEach(function(c){t.has(c)||(w(c,s),t.add(c))}),r===e&&i&&!t.has(r)&&(w(r,s),t.add(r))})}catch(r){o(r);return}o()}function w(n,s){try{process.kill(parseInt(n,10),s)}catch(e){if(e.code!=="ESRCH")throw e}}function h(n,s,e,i,o){let t=i(n),r="";t.stdout?.on("data",function(f){let a=f.toString("ascii");r+=a});let c=f=>{if(e.delete(n),f!==0){if(e.size===0){o();return}return}r.trim().split(`
|
|
2
2
|
`).forEach(function(a){let l=a.match(/^(\d+)\s(.*)$/);if(l){let u=l[1],E=l[2];s[n].push(u),s[u]=[],d(`Killing process ${u}: ${E}`),e.add(u),h(u,s,e,i,o)}})};t.on("close",c)}export{b as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Q,b as W,c as X}from"./chunk-
|
|
1
|
+
import{a as Q,b as W,c as X}from"./chunk-7A3RW2VM.js";import{a as L,c as P,e as f,f as M,h as T,i as q,m as V,p as F,q as U,r as j,s as z,u as H}from"./chunk-BVB3DTNE.js";import{a as _}from"./chunk-PWS4VFSD.js";import{a as G,b as J}from"./chunk-PO5T44H3.js";import{b as N}from"./chunk-NU5WLZ6Y.js";import{A as v,B as E,I as D,a as $,y as g,z as u}from"./chunk-47IQIIFX.js";import{i as m,l as R}from"./chunk-Q37WAD6F.js";import{Cb as r,Eb as s,Ib as x,Xa as I,qa as C,ya as S}from"./chunk-UWI76E2L.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();async function te(t,e){if(t)return t.join(`
|
|
2
2
|
`);if(e){if(!await I(e))throw new m(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return C(e,{encoding:"utf8"})}else return}async function Y(t){let{organization:e,remoteApp:i,store:n,query:o,variables:p,variableFile:b,outputFile:O,watch:Z=!1,version:ee}=t,{adminSession:d,version:k}=await D({title:s`Authenticating`,task:async()=>{let a=await Q(i,n.shopDomain),l=await M({adminSession:a,userSpecifiedVersion:ee,minimumDefaultVersion:L});return{adminSession:a,version:l}},renderOptions:{stdout:process.stderr}}),B=await te(p,b);ae(o,B),X(o,n),g({headline:"Starting bulk operation.",body:[{list:{items:W({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:k})}}]});let w=f(o)?await q({adminSession:d,query:o,variablesJsonl:B,version:k}):await T({adminSession:d,query:o,version:k});if(w?.userErrors?.length){E({headline:"Error creating bulk operation.",body:{list:{items:w.userErrors.map(a=>a.field?`${a.field.join(".")}: ${a.message}`:a.message)}}});return}let y=w?.bulkOperation;if(y)if(Z){let a=new $,l=await U(d,y.id,a.signal,()=>a.abort());a.signal.aborted?g({headline:`Bulk operation ${l.id} is still running in the background.`,body:h(l.id)}):await K(l,O)}else{let a=await F(d,y.id);["FAILED","CANCELED","EXPIRED"].includes(a.status)?await K(a,O):u({headline:"Bulk operation is running.",body:h(a.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(a.id)}`.value]}}]}]})}else throw v({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new R("Bulk operation response returned null with no error message.")}async function K(t,e){let i=V(t).value,o=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":u({headline:"Bulk operation started.",body:h(t.id),customSections:o});break;case"RUNNING":u({headline:"Bulk operation is running.",body:h(t.id),customSections:o});break;case"COMPLETED":if(t.url){let p=await j(t.url),b=z(p);e?await S(e,p):x(p),b?v({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:o}):u({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:o})}else u({headline:i,customSections:o});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":E({headline:i,customSections:o});break}}function ae(t,e){if(f(t)&&!e)throw new m(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!f(t)&&e)throw new m(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function h(t){return[`Monitor its progress with:
|
|
3
3
|
`,{command:`shopify app bulk status --id=${P(t)}`}]}var A=class t extends _{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.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-RJSQMKKS.js";import{a as v}from"./chunk-R3KSOCMB.js";import{d as f}from"./chunk-QO5RNGWA.js";import{a as m}from"./chunk-BOE2ST6J.js";import{a as u}from"./chunk-QUXQM3S3.js";import{p as c,v as p}from"./chunk-Y3PY5LP7.js";import{b as h,e as d}from"./chunk-NU5WLZ6Y.js";import{ra as l}from"./chunk-3V4VL3SD.js";import{b as F}from"./chunk-I3J63RFV.js";import{e as _,g as a}from"./chunk-VKWPEFWQ.js";a();var t=_(F(),1);var s=class extends p{static get requiresSyncAnalytics(){return!0}static summary="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";static descriptionWithMarkdown=`
|
|
2
2
|
Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.
|
|
3
3
|
|
|
4
4
|
This command returns the following information:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as m}from"./chunk-
|
|
1
|
+
import{T as m}from"./chunk-47IQIIFX.js";import{i as c}from"./chunk-Q37WAD6F.js";import{Cb as l,Eb as n,Nb as a}from"./chunk-UWI76E2L.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();import{createServer as d}from"net";var u=new Set;async function P(o,t){if(o&&await g(o))return a(n`Port ${o.toString()} is free`),o;a(n`Getting a random port...`);let r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);for(let e=0;e<(t?.maxTries??5)&&u.has(r);e++)r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${r}`)}`),u.add(r),r}async function g(o){return new Promise(t=>{let r=d();r.unref(),r.once("error",()=>t(!1));try{r.listen(o,"localhost",()=>{r.close(()=>t(!0))})}catch(e){if(!(e instanceof RangeError))throw e;t(!1)}})}function f(){return new Promise((o,t)=>{let r=d();r.unref(),r.once("error",t),r.listen(0,"localhost",()=>{let e=r.address();if(e&&typeof e=="object"){let i=e.port;r.close(()=>o(i))}else r.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(o,t=5,r=1){let e=1;for(;;)try{return await o()}catch(i){if(e++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(r);else throw new c(i.message)}}export{P as a,g as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-QO5RNGWA.js";import{a as u}from"./chunk-BOE2ST6J.js";import{a as v,b as f}from"./chunk-YY6TFARF.js";import{a as y}from"./chunk-QUXQM3S3.js";import{p as d,v as c}from"./chunk-Y3PY5LP7.js";import{b as p}from"./chunk-NU5WLZ6Y.js";import{N as m,y as s}from"./chunk-47IQIIFX.js";import{b as E}from"./chunk-I3J63RFV.js";import{e as T,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function F(t,e){let r=new u(t),g=(await(e.development?r.find():r.fetch()))?.id,n=await y(t,{header:"Select a theme to open",filter:{live:e.live,theme:e.development?`${g}`:e.theme}}),l=v(n,t),a=f(n,t);s({body:["Preview information for theme",...w(n),`
|
|
2
2
|
|
|
3
3
|
`,{list:{items:[{link:{label:"Preview your theme",url:l}},{link:{label:"Customize your theme at the theme editor",url:a}}]}}]}),e.editor?await m(a):await m(l)}var o=T(E(),1);var h=class extends c{static summary="Opens the preview of your remote theme.";static descriptionWithMarkdown=`Returns links that let you preview the specified theme. The following links are returned:
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as n}from"./chunk-
|
|
1
|
+
import{o as n}from"./chunk-3C4WVKSO.js";import{H as s}from"./chunk-47IQIIFX.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function c(e){await s([{title:"Installing dependencies",task:async()=>{await n({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as N}from"./chunk-LFOBYEWG.js";import{C as E}from"./chunk-
|
|
1
|
+
import{b as N}from"./chunk-LFOBYEWG.js";import{C as E}from"./chunk-3V4VL3SD.js";import{V as j}from"./chunk-47IQIIFX.js";import{a as O}from"./chunk-73D5O7A3.js";import{b}from"./chunk-HILYTMVA.js";import{d as _}from"./chunk-DSS4ECIH.js";import{i as f}from"./chunk-Q37WAD6F.js";import{Cb as d,Eb as h,Ib as S,da as T}from"./chunk-UWI76E2L.js";import{d as P}from"./chunk-UEBUGSBT.js";import{b as A}from"./chunk-I3J63RFV.js";import{a as w}from"./chunk-JD5P5RAJ.js";import{e as C,g as F}from"./chunk-VKWPEFWQ.js";F();var l=C(A()),g=class extends l.Command{static baseFlags={"json-schema":l.Flags.boolean({description:"Print the command's JSON schemas.",env:"SHOPIFY_FLAG_JSON_SCHEMA"})};static descriptionWithMarkdown;static get jsonOutputSchema(){}static get requiresSyncAnalytics(){return!1}static nonTTYFlagRequirements(e){return[]}static descriptionForHelp(){let e=(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)');return W(e,this.jsonOutputSchema)}static descriptionWithoutMarkdown(){return this.descriptionForHelp()}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(e){e.skipOclifErrorHandling=!0;let{errorHandler:t}=await import("./error-handler-4VW3AV2G.js");return await t(e,this.config),l.Errors.handle(e)}async _run(){return O(this.argv,()=>super._run())}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),N(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:t}=await import("./error-handler-4VW3AV2G.js");await t(this.config)}await Y(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:e}=await import("./notifications-system-QVM2JWKB.js");return await e(),super.init()}showNpmFlagWarning(){let e=this.constructor;Object.keys(e.flags||{}).map(r=>`npm_config_${T(r).replace(/^no_/,"")}`).some(r=>process.env[r]!==void 0)&&import("./ui-FNPICAAH.js").then(({renderWarning:r})=>{r({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){w(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(S(`
|
|
2
2
|
SHOPIFY_CLI_TIMESTAMP_START
|
|
3
3
|
{ "timestamp": ${Date.now()} }
|
|
4
4
|
SHOPIFY_CLI_TIMESTAMP_END
|
|
@@ -7,7 +7,7 @@ import{b as N}from"./chunk-LFOBYEWG.js";import{C as E}from"./chunk-3E3MCY5O.js";
|
|
|
7
7
|
|
|
8
8
|
${d.cyan(i)}
|
|
9
9
|
|
|
10
|
-
${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(e){let t=this.constructor,n={...t.baseFlags,...t.flags},r=Object.entries(n).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),i=(t.nonTTYFlagRequirements?.(e)??[]).filter(a=>a.when?.(e)??!0);return[...r,...i]}async resultWithEnvironment(e,t,n){let r=e.flags,i=this.environmentsFilename();if(!i)return e;let{environmentFilePath:a}=await import("./environments-
|
|
10
|
+
${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(e){let t=this.constructor,n={...t.baseFlags,...t.flags},r=Object.entries(n).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),i=(t.nonTTYFlagRequirements?.(e)??[]).filter(a=>a.when?.(e)??!0);return[...r,...i]}async resultWithEnvironment(e,t,n){let r=e.flags,i=this.environmentsFilename();if(!i)return e;let{environmentFilePath:a}=await import("./environments-KD2IDYPG.js"),o=await a(i,{from:r.path}),m=[];r.environment&&(m=Array.isArray(r.environment)?r.environment:[r.environment]);let u=m.length>0;if(!o&&!u||u&&m.length>1)return e;let{environment:c,isDefaultEnvironment:p}=await this.loadEnvironmentForCommand(r.path,i,m[0]);if(!c||p&&!$(t?.flags,"environment"))return e;let v=await super.parse(M(t),n),y=await super.parse(t,[...n??this.argv,...R(c,t,v),...p?["--environment","default"]:[]]);return q(v.flags,y.flags,p?"default":m[0],c),y}async loadEnvironmentForCommand(e,t,n){let{loadEnvironment:r}=await import("./environments-KD2IDYPG.js");return n?{environment:await r(n,t,{from:e}),isDefaultEnvironment:!1}:{environment:await r("default",t,{from:e,silent:!0}),isDefaultEnvironment:!0}}};async function I(s){await _(()=>({cmd_all_verbose:s.verbose,cmd_all_path_override:s.path!==void 0,cmd_all_path_override_hash:s.path===void 0?void 0:b(s.path)}))}function q(s,e,t,n){let r={};for(let[a,o]of Object.entries(e)){let m=Object.prototype.hasOwnProperty.call(s,a),u=Object.prototype.hasOwnProperty.call(n,a);if(!m&&u){let c=a==="password"?`********${o.substr(-4)}`:o;r[a]=c}}if(Object.keys(r).length===0)return;let i=Object.entries(r).map(([a,o])=>`${a}: ${o}`);import("./ui-FNPICAAH.js").then(({renderInfo:a})=>{a({headline:["Using applicable flags from",{userInput:t},"environment:"],body:[{list:{items:i}}]})})}function M(s){return s?.flags?{...s,flags:Object.fromEntries(Object.entries(s.flags).map(([e,t])=>{let n={...t};return delete n.default,[e,n]}))}:s}function R(s,e,t){let n=[];for(let[r,i]of Object.entries(s)){let a=$(e?.flags,r),o=t.flags&&Object.prototype.hasOwnProperty.call(t.flags,r);if(a&&!o)if(typeof i=="boolean")if(i)n.push(`--${r}`);else throw new f(h`Environments can only specify true for boolean flags. Attempted to set ${d.yellow(r)} to false.`);else Array.isArray(i)?i.forEach(m=>n.push(`--${r}`,`${m}`)):n.push(`--${r}`,`${i}`)}return n}function $(s,e){return!!s&&Object.prototype.hasOwnProperty.call(s,e)}function W(s,e){if(!e)return s;let t=`Use \`--json-schema\` to print the result, error, and event schemas.
|
|
11
11
|
|
|
12
12
|
Output from \`--json\` conforms to the \`${e.name}\` schema.
|
|
13
13
|
|
|
@@ -16,5 +16,5 @@ ${JSON.stringify(e.jsonSchema,null,2)}
|
|
|
16
16
|
\`\`\``;return[s,t].filter(Boolean).join(`
|
|
17
17
|
|
|
18
18
|
`)}async function Y(s){let e=Array.from(s.plugins.values()),t=["@shopify/app","@shopify/plugin-cloudflare"],n=e.filter(i=>t.includes(i.name));if(n.length>0){let i=n.map(o=>` - shopify plugins remove ${o.name}`).join(`
|
|
19
|
-
`),{renderWarning:a}=await import("./ui-
|
|
19
|
+
`),{renderWarning:a}=await import("./ui-FNPICAAH.js");a({headline:`Unsupported plugins detected: ${n.map(o=>o.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
|
|
20
20
|
${i}`]})}let r=e.filter(i=>!t.includes(i.name));s.plugins=new Map(r.map(i=>[i.name,i]))}var K=g;export{M as a,K as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as i}from"./chunk-I3J63RFV.js";import{e,g as n}from"./chunk-VKWPEFWQ.js";n();var o=e(i(),1),t=["high","medium","low","none"],s={blocking:o.Flags.custom({description:"The minimum finding severity that causes a non-zero exit code: high, medium, or low. Defaults to none, which never fails on findings.",options:t,default:"none",env:"SHOPIFY_FLAG_APP_SECURITY_BLOCKING"})()};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as i,i as t}from"./chunk-
|
|
1
|
+
import{h as i,i as t}from"./chunk-Q37WAD6F.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();var o=e=>new a(e),s=e=>new u(e),a=class{value;constructor(r){this.value=r}isErr(){return!1}doOnOk(r){return r(this.value),o(this.value)}valueOrBug(){return this.value}valueOrAbort(){return this.value}map(r){return o(r(this.value))}mapError(r){return o(this.value)}},u=class{error;constructor(r){this.error=r}isErr(){return!0}doOnOk(r){return s(this.error)}valueOrBug(){throw this.error}valueOrAbort(){if(this.error instanceof i)throw this.error;if(this.error instanceof Error){let r=new t(this.error.message);throw r.stack=this.error.stack,r}else throw new t(`${this.error}`)}map(r){return s(this.error)}mapError(r){return s(r(this.error))}};export{o as a,s as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ur}from"./chunk-5BO5HCN6.js";import{b as Tr}from"./chunk-HZJHGHLN.js";import{a as _r}from"./chunk-7MMPQMU7.js";import{a as Cr}from"./chunk-JJHJYBPQ.js";import{a as Ir}from"./chunk-HKZ75UKL.js";import{a as gr}from"./chunk-J66WAKXN.js";import{a as wr}from"./chunk-3NUQGW57.js";import{a as yr,b as vr,c as Pr,d as xr}from"./chunk-YIV3CWED.js";import{a as Rr}from"./chunk-JUCOIXG5.js";import{a as Er}from"./chunk-CHRFYG6W.js";import{a as br}from"./chunk-TUE67I2F.js";import{a as Ar}from"./chunk-PV5C6Q2P.js";import{a as Sr}from"./chunk-OXN2DID2.js";import{a as ar}from"./chunk-W56I6HOT.js";import{a as lr}from"./chunk-KPNUSDCW.js";import{a as pr}from"./chunk-TPPBEVNQ.js";import{a as dr}from"./chunk-JWDR66AS.js";import{g as ur}from"./chunk-AKP4QAGL.js";import{a as Xe}from"./chunk-U5L2P36D.js";import{c as Je,m as Ze}from"./chunk-PI6FLLDD.js";import{a as mr}from"./chunk-IESHPQLC.js";import{a as fr}from"./chunk-BVR3GF2L.js";import{a as cr}from"./chunk-3U2MYUWG.js";import{b as ir,g as _e,j as Qe}from"./chunk-JAY7AGAG.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-QA2NOPXG.js";import{d as hr}from"./chunk-4S2WKMLJ.js";import{a as nr,b as sr,c as ao,d as io,e as rt,f as co,g as fo}from"./chunk-5TQOMAJS.js";import{a as M,b as Ye}from"./chunk-RBPMV3KB.js";import{a as Xt,b as Zt,d as Ae,f as er,m as Te,n as H,s as q,u as tr,v as rr,w as or}from"./chunk-Q7BOSHWX.js";import{a as Jt}from"./chunk-G627WGIC.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-MHZSSRHP.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as vo,k as Po,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as Ao,x as To,z as nt}from"./chunk-BLBJT7BM.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-EJY4LA2S.js";import{a as Lr}from"./chunk-UOKX3AME.js";import{a as Xr}from"./chunk-R43LXE66.js";import{a as Jr}from"./chunk-KOYBR5MV.js";import{a as kr}from"./chunk-VXGXK66W.js";import{Ha as Qr,I as Br,K as Kr,M as Z,W as jr,X as zr,ha as Yr,i as $r,j as W,k as Mr,o as Dr,t as et,u as Or,v as Nr,w as qr,x as Wr,y as Hr,ya as Ie,z as Gr,za as ke}from"./chunk-PG6XEOYF.js";import{B as Fr,la as Vr,p as Ce,u as ie}from"./chunk-PQCALXSD.js";import{d as Yt}from"./chunk-OERMQ2FP.js";import{a as K}from"./chunk-525BMYNR.js";import{b as Qt,e as Re}from"./chunk-Q4TZD2M6.js";import{J as It,V as J,X as kt,c as Rt,h as At,j as Tt,m as _t,na as Lt,o as Ct,p as we,u as ye}from"./chunk-3E3MCY5O.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as ze,V as Kt,X as jt,a as Ut,d as ve,e as k,f as $,h as Pe,i as xe,j as Ft,k as Dt,l as Ot,m as Nt,n as qt,o as F,p as Wt,q as je,r as Ve,s as Ht,t as Gt,y as Ee}from"./chunk-RCYQPOJW.js";import{b as Ke,d as Et,f as bt,i as St}from"./chunk-YTJ3EPD3.js";import{a as In}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-PQH4U2XV.js";import{i as A,l as X}from"./chunk-ZZ7SOJHH.js";import{a as _o}from"./chunk-T6TYF72N.js";import{Aa as fe,Cb as P,Eb as b,Ia as vt,Kb as B,Nb as g,Ob as C,Ra as he,T as Be,Xa as D,_a as ge,db as Pt,gb as xt,qa as L,ya as me}from"./chunk-3F42A3XV.js";import{e as Vt,g as zt}from"./chunk-2R2PKQQV.js";import{b as Cn}from"./chunk-I3J63RFV.js";import{a as ft}from"./chunk-JD5P5RAJ.js";import{d as S,f as Ge,g as ht,i as ue,j as gt,k as de,o as wt,p as yt}from"./chunk-3VYOLEQE.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,Ln='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Co(t,e,r=Date.now()){for(;await $n(t,e,r););}async function $n(t,e,r){let o=await _e(t,e);if(!o||Mn(o,r))throw new A(Ln);return await ae(3),o.processing}function Mn(t,e){return t.processing&&Date.now()-e>=kn}var Fn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",Dn="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",st=3,Le=class extends cr{context="App Ext. Host";devPreview;constructor(e,r={devPreview:!1}){super(e),this.themeId=yr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??=this.devPreview?await this.createHostTheme():await this.create(),e}setTheme(e){vr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Fn};for(let o=0;o<st;o++){g(`Attempt ${o}/${st}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Qe(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Co(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${st} retries. Creating theme using fallback theme zip`);let r=await Qe({...e,src:Dn},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new X(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var On={"theme:init":gr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":wr,"theme:list":xr,"theme:metafields:pull":Rr,"theme:open":Er,"theme:package":br,"theme:profile":Sr,"theme:publish":Ur,"theme:preview":Ar,"theme:pull":Tr,"theme:push":_r,"theme:rename":Cr,"theme:share":Ir},ka=On;async function Io(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([It(t.storeFqdn),Wn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),y=h?await Xe(t.storePassword,l,u):void 0,m=await qn(c,t.theme),f=m.id.toString();return Ee({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:Nn,options:{theme:m,adminSession:c,storefrontPassword:y,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var Nn=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await ur(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function qn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await _e(parseInt(e,10),t);else{let o=new Le(t,{devPreview:!0});await be([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new A("Could not find or create a host theme for theme app extensions");return r}async function Wn(t){return t.developerPlatformClient?.clientName===Vr.AppManagement?`https://${await we()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await Ct()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Hn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function ko(t,e){let r=await Hn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Gn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Gn(t,e,r,o,n){let s;try{s=await L(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new Error(i)}}p();function $e(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var at=".js.map";async function te(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await ko(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Bn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=Lo(t.configuration.metafields)),{assets:{main:ce(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await he(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:$e(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Bn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),ce(s)){let a=await Kn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l="metafields"in i?Lo(i.metafields??[]):void 0,u={...i,...l?{metafields:l}:{},surface:ke(c),root:{url:`${e}/${c}`},resource:d||{url:""}},h=a?.[c];if(!h)return u;let m=await Jn(h,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...u,...m}}))}return s}async function Kn(t){try{let e=S(t,"manifest.json"),r=await L(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function jn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let y=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[y.name]:y}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await Me(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function Vn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await he(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await Me("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Yn({target:t,url:e,extension:r,resolver:o},n,s){let a=await Me(n,`${t}/${n}`,s,e,r,o);return await Qn(t,s,r,o),{assets:{[a.name]:a}}}async function Qn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await D(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Jn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Xn(o,n)?zn(e,n):Zn(o,n)?Yn(e,o,n):es(o,n)?Vn(e,o,n):jn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Lo(t){return t.map(e=>({namespace:e.namespace,key:e.key,...e.owner_type===void 0?{}:{ownerType:e.owner_type.replaceAll("_","")}}))}function ce(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Me(t,e,r,o,n,s,a){let i=`${e}${de(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await he(S(n.directory,a??r))??0}}function Xn(t,e){return t==="intents"&&Array.isArray(e)}function Zn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function es(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as ts}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function $o(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:ao(t.storeFqdn,t.apiKey),mobileUrl:co(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>te(n,e,t,r&&it(r,n.devUUID))))}}function it(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var Fe=class extends ts{options;rawPayload;assetResolvers;constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=J(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(ce(n.extensionPoints)&&ce(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=J(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?J(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return J(o,i)}return J(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await te(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},it(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await te(e,r,this.options,it(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(le.Update,e)}};p();p();var j;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(j||(j={}));function Mo(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,rs(t,e)))}}function rs(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${P.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",is(t,e))}}function os(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?P.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var ns={debug:t=>P.gray(t),warn:t=>P.yellow(t),error:t=>P.errorText(t)};function ss({type:t,message:e}){let r=os(e);switch(t){case"debug":case"warn":case"error":return b`${ns[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function as(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ss(t))})}function is(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
|
|
1
|
+
import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ur}from"./chunk-6A4H3HPY.js";import{b as Tr}from"./chunk-HQJ62PII.js";import{a as _r}from"./chunk-LWU5TKNA.js";import{a as Cr}from"./chunk-HQY6JM6G.js";import{a as Ir}from"./chunk-HASIOUH2.js";import{a as gr}from"./chunk-VMNOSVPT.js";import{a as wr}from"./chunk-DEF2G7S4.js";import{a as yr,b as vr,c as Pr,d as xr}from"./chunk-HPM3HF7A.js";import{a as Rr}from"./chunk-UQ6ALA3Y.js";import{a as Er}from"./chunk-4TFJ5RW7.js";import{a as br}from"./chunk-J6LQR2F6.js";import{a as Ar}from"./chunk-4ES7BJEK.js";import{a as Sr}from"./chunk-GZ7VGCVW.js";import{a as ar}from"./chunk-WEPO4J2F.js";import{a as lr}from"./chunk-A2VCTDKH.js";import{a as pr}from"./chunk-UIC7K2HX.js";import{a as dr}from"./chunk-4O7LK5RG.js";import{g as ur}from"./chunk-SZI6G247.js";import{a as Xe}from"./chunk-RSC5NQAT.js";import{c as Je,m as Ze}from"./chunk-LYIXRMQJ.js";import{a as mr}from"./chunk-I5PQZRYM.js";import{a as fr}from"./chunk-6HPUOCFF.js";import{a as cr}from"./chunk-NT4A37HG.js";import{b as ir,g as _e,j as Qe}from"./chunk-3LHE4GIX.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-FQL2WEKX.js";import{d as hr}from"./chunk-ZTICX3AO.js";import{a as nr,b as sr,c as ao,d as io,e as rt,f as co,g as fo}from"./chunk-PB5ZZET5.js";import{a as M,b as Ye}from"./chunk-4OCVXE5Y.js";import{a as Xt,b as Zt,d as Ae,f as er,m as Te,n as H,s as q,u as tr,v as rr,w as or}from"./chunk-Q7BOSHWX.js";import{a as Jt}from"./chunk-7HWMURCW.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-NCVGCVQ5.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as vo,k as Po,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as Ao,x as To,z as nt}from"./chunk-GE4MLO3C.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-XSMCQLJW.js";import{a as Lr}from"./chunk-4TZCRMBJ.js";import{a as Xr}from"./chunk-EMH7OHCW.js";import{a as Jr}from"./chunk-PWS4VFSD.js";import{a as kr}from"./chunk-PO5T44H3.js";import{Ha as Qr,I as Br,K as Kr,M as Z,W as jr,X as zr,ha as Yr,i as $r,j as W,k as Mr,o as Dr,t as et,u as Or,v as Nr,w as qr,x as Wr,y as Hr,ya as Ie,z as Gr,za as ke}from"./chunk-UNHT4ZFP.js";import{B as Fr,la as Vr,p as Ce,u as ie}from"./chunk-Y743UVBS.js";import{d as Yt}from"./chunk-D3KFKT4D.js";import{a as K}from"./chunk-45SZ5PSE.js";import{b as Qt,e as Re}from"./chunk-NU5WLZ6Y.js";import{J as It,V as J,X as kt,c as Rt,h as At,j as Tt,m as _t,na as Lt,o as Ct,p as we,u as ye}from"./chunk-3V4VL3SD.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as ze,V as Kt,X as jt,a as Ut,d as ve,e as k,f as $,h as Pe,i as xe,j as Ft,k as Dt,l as Ot,m as Nt,n as qt,o as F,p as Wt,q as je,r as Ve,s as Ht,t as Gt,y as Ee}from"./chunk-47IQIIFX.js";import{b as Ke,d as Et,f as bt,i as St}from"./chunk-HILYTMVA.js";import{a as In}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-DSS4ECIH.js";import{i as A,l as X}from"./chunk-Q37WAD6F.js";import{a as _o}from"./chunk-Q2XLIWG4.js";import{Aa as fe,Cb as P,Eb as b,Ia as vt,Kb as B,Nb as g,Ob as C,Ra as he,T as Be,Xa as D,_a as ge,db as Pt,gb as xt,qa as L,ya as me}from"./chunk-UWI76E2L.js";import{e as Vt,g as zt}from"./chunk-UEBUGSBT.js";import{b as Cn}from"./chunk-I3J63RFV.js";import{a as ft}from"./chunk-JD5P5RAJ.js";import{c as S,e as Ge,f as ht,h as ue,i as gt,j as de,n as wt,o as yt}from"./chunk-6IDEDOXW.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,Ln='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Co(t,e,r=Date.now()){for(;await $n(t,e,r););}async function $n(t,e,r){let o=await _e(t,e);if(!o||Mn(o,r))throw new A(Ln);return await ae(3),o.processing}function Mn(t,e){return t.processing&&Date.now()-e>=kn}var Fn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",Dn="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",st=3,Le=class extends cr{context="App Ext. Host";devPreview;constructor(e,r={devPreview:!1}){super(e),this.themeId=yr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??=this.devPreview?await this.createHostTheme():await this.create(),e}setTheme(e){vr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Fn};for(let o=0;o<st;o++){g(`Attempt ${o}/${st}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Qe(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Co(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${st} retries. Creating theme using fallback theme zip`);let r=await Qe({...e,src:Dn},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new X(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var On={"theme:init":gr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":wr,"theme:list":xr,"theme:metafields:pull":Rr,"theme:open":Er,"theme:package":br,"theme:profile":Sr,"theme:publish":Ur,"theme:preview":Ar,"theme:pull":Tr,"theme:push":_r,"theme:rename":Cr,"theme:share":Ir},ka=On;async function Io(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([It(t.storeFqdn),Wn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),y=h?await Xe(t.storePassword,l,u):void 0,m=await qn(c,t.theme),f=m.id.toString();return Ee({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:Nn,options:{theme:m,adminSession:c,storefrontPassword:y,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var Nn=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await ur(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function qn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await _e(parseInt(e,10),t);else{let o=new Le(t,{devPreview:!0});await be([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new A("Could not find or create a host theme for theme app extensions");return r}async function Wn(t){return t.developerPlatformClient?.clientName===Vr.AppManagement?`https://${await we()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await Ct()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Hn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function ko(t,e){let r=await Hn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Gn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Gn(t,e,r,o,n){let s;try{s=await L(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new Error(i)}}p();function $e(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var at=".js.map";async function te(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await ko(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Bn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=Lo(t.configuration.metafields)),{assets:{main:ce(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await he(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:$e(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Bn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),ce(s)){let a=await Kn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l="metafields"in i?Lo(i.metafields??[]):void 0,u={...i,...l?{metafields:l}:{},surface:ke(c),root:{url:`${e}/${c}`},resource:d||{url:""}},h=a?.[c];if(!h)return u;let m=await Jn(h,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...u,...m}}))}return s}async function Kn(t){try{let e=S(t,"manifest.json"),r=await L(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function jn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let y=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[y.name]:y}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await Me(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function Vn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await he(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await Me("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Yn({target:t,url:e,extension:r,resolver:o},n,s){let a=await Me(n,`${t}/${n}`,s,e,r,o);return await Qn(t,s,r,o),{assets:{[a.name]:a}}}async function Qn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await D(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Jn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Xn(o,n)?zn(e,n):Zn(o,n)?Yn(e,o,n):es(o,n)?Vn(e,o,n):jn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Lo(t){return t.map(e=>({namespace:e.namespace,key:e.key,...e.owner_type===void 0?{}:{ownerType:e.owner_type.replaceAll("_","")}}))}function ce(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Me(t,e,r,o,n,s,a){let i=`${e}${de(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await he(S(n.directory,a??r))??0}}function Xn(t,e){return t==="intents"&&Array.isArray(e)}function Zn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function es(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as ts}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function $o(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:ao(t.storeFqdn,t.apiKey),mobileUrl:co(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>te(n,e,t,r&&it(r,n.devUUID))))}}function it(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var Fe=class extends ts{options;rawPayload;assetResolvers;constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=J(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(ce(n.extensionPoints)&&ce(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=J(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?J(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return J(o,i)}return J(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await te(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},it(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await te(e,r,this.options,it(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(le.Update,e)}};p();p();var j;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(j||(j={}));function Mo(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,rs(t,e)))}}function rs(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${P.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",is(t,e))}}function os(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?P.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var ns={debug:t=>P.gray(t),warn:t=>P.yellow(t),error:t=>P.errorText(t)};function ss({type:t,message:e}){let r=os(e);switch(t){case"debug":case"warn":case"error":return b`${ns[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function as(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ss(t))})}function is(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
|
|
2
2
|
${P.json(s)}
|
|
3
3
|
`,e.stdout),n===j.Update){let a=e.payloadStore.getRawPayload().app.apiKey,i=s.app?.apiKey;if(s.app){if(a!==i)return;e.payloadStore.updateApp(s.app)}s.extensions&&e.payloadStore.updateExtensions(s.extensions)}else if(n===j.Dispatch){let a=cs(o,e);Do(t,a,e)}else n===j.Log&&as(s,e)}}function Fo(t,e){return r=>{let o={event:j.Update,version:e.manifestVersion,data:{...e.payloadStore.getRawPayloadFilteredByExtensionIds(r)}};g(b`Sending websocket update event to the websocket clients:
|
|
4
4
|
${P.json(o)}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as g,g as h}from"./chunk-
|
|
1
|
+
import{c as g,g as h}from"./chunk-KQFA5YTT.js";import{a as m}from"./chunk-PWS4VFSD.js";import{Ha as d}from"./chunk-UNHT4ZFP.js";import{i as f}from"./chunk-Q37WAD6F.js";import{Ib as s}from"./chunk-UWI76E2L.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var v=250,c=class extends Error{constructor(){super("Migratable subscriptions were not found"),this.name="MigratableSubscriptionsNotFoundError"}},l=class extends Error{constructor(t){super(t),this.name="MigrationListProtocolError"}};async function*b({clientId:i,status:t,getPage:n=h}){let e=new Set,a;for(;;){let p=await n({clientId:i,first:v,after:a,status:t});if(p===null)throw new c;if(yield p.subscriptions,!p.pageInfo.hasNextPage)return;let{endCursor:o}=p.pageInfo;if(o===null||o.trim()==="")throw new l("Migratable subscription page has no cursor for its next page");if(e.has(o))throw new l(`Migratable subscription pagination repeated cursor: ${o}`);e.add(o),a=o}}r();var w="shop_id,status,manual_subscription_name,manual_subscription_price_amount,manual_subscription_price_currency_code,manual_subscription_interval,target_plan_handle,notification_kind,notification_opt_out_deadline,notification_sent_at,price_behavior,effective_date,last_failure_reason";function y(i){return JSON.stringify({schemaVersion:1,subscriptions:i},null,2)}async function _({pages:i,json:t}){t?s(y(await S(i))):await C(i)}async function S(i){let t=[];for await(let n of i)t.push(...n);return t}async function C(i){let t=!1;for await(let n of i){let e=x(n);t?e.length>0&&s(e.join(`
|
|
2
2
|
`)):(s([w,...e].join(`
|
|
3
3
|
`)),t=!0)}t||s(w)}function x(i){return i.map(t=>[t.shopId,t.status,t.manualSubscriptionName,t.manualSubscriptionPrice?.amount,t.manualSubscriptionPrice?.currencyCode,t.manualSubscriptionInterval,t.targetPlanHandle,t.notification?.kind,t.notification?.optOutDeadline,t.notification?.sentAt,t.priceBehavior,t.effectiveDate,t.lastFailureReason].map(E).join(","))}function E(i){let t=i??"";return/[",\r\n]/.test(t)?`"${t.replaceAll('"','""')}"`:t}var u=class i extends m{static summary="Lists app subscriptions eligible for migration.";static descriptionWithMarkdown="Lists every app subscription eligible for migration.\n\nBy default, the command writes CSV to stdout, streaming each page of results as it arrives. If a later page fails, the rows already written remain valid CSV. Use `--json` to fetch all pages first and then write a single versioned JSON envelope to stdout. Use shell redirection to save either format, for example `shopify app subscription-migrations list > subscriptions.csv` or `shopify app subscription-migrations list --json > subscriptions.json`.\n\nUse `--status` to filter subscriptions by migration status. Supported values are `UNSCHEDULED`, `SCHEDULED`, and `MIGRATED`.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --status SCHEDULED > scheduled-subscriptions.csv","<%= config.bin %> <%= command.id %> --json","<%= config.bin %> <%= command.id %> --json > subscriptions.json","<%= config.bin %> <%= command.id %> --client-id <client-id> > subscriptions.csv"];static flags={...g};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:e}=await d({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});try{let a=b({clientId:e.apiKey,status:t.status});await _({pages:a,json:t.json})}catch(a){throw a instanceof c?new f("App not found"):a}return{app:n}}};export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-B3M3KIOU.js";import{a}from"./chunk-ONF7XXEL.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var r=class extends a{static hidden=!0;static flags={...a.flags};static baseFlags={...a.baseFlags};async run(){return e({from:"app import-extensions",to:"app import dashboard-extensions"}),super.run()}};export{r as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-QO5RNGWA.js";import{a as d}from"./chunk-YY6TFARF.js";import{a as v}from"./chunk-QUXQM3S3.js";import{p as u}from"./chunk-3LHE4GIX.js";import{p as f,v as p}from"./chunk-Y3PY5LP7.js";import{b as c,f as m}from"./chunk-NU5WLZ6Y.js";import{E as l,z as s}from"./chunk-47IQIIFX.js";import{b as g}from"./chunk-I3J63RFV.js";import{e as w,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function b(o,t,i){let e=await v(o,{header:"Select a theme to publish",filter:{development:!1,live:!1,theme:t.theme}}),h=d({...e,role:"live"},o);!t.force&&!i&&!await l({message:`Do you want to make '${e.name}' the new live theme on ${o.storeFqdn}?`,confirmationMessage:`Yes, make '${e.name}' the new live theme`,cancellationMessage:"No, cancel publish"})||(await u(e.id,o),s({headline:t.environment?`Environment: ${t.environment}`:void 0,body:["The theme",...y(e),"is now live at",{link:{label:h,url:h}},{char:"."}]}))}var n=w(g(),1);var a=class extends p{static summary="Set a remote theme as the live theme.";static descriptionWithMarkdown=`Publishes an unpublished theme from your theme library.
|
|
2
2
|
|
|
3
3
|
If no theme ID is specified, then you're prompted to select the theme that you want to publish from the list of themes in your store.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-BOE2ST6J.js";import{a as I,b as w}from"./chunk-YY6TFARF.js";import{a as _}from"./chunk-QUXQM3S3.js";import{f as a,g as l,p as S,v as b}from"./chunk-Y3PY5LP7.js";import{b as T,c as g}from"./chunk-NU5WLZ6Y.js";import{oa as s,ra as p}from"./chunk-3V4VL3SD.js";import{y as f}from"./chunk-47IQIIFX.js";import{d as m}from"./chunk-DYPZX7MW.js";import{i as v}from"./chunk-Q37WAD6F.js";import{Ib as c}from"./chunk-UWI76E2L.js";import{b as x}from"./chunk-I3J63RFV.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();function A(t,e){return{theme:{id:t.id,name:t.name,role:t.role,shop:e.storeFqdn,preview_url:I(t,e),editor_url:w(t,e)}}}function D(t){let{platform:e,arch:n}=m(),o=a(),r=null;return o&&(r=Number(l())||null),{store:o??"Not configured",development_theme_id:r,cli_version:t.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version}}async function O(t,e){let n;if(e.development)n=await new E(t).findOrCreate();else{let o={filter:{theme:e.theme}};n=await _(t,o)}return n?A(n,t):void 0}async function y(t){return[M(),await j(t)]}function M(){let t=a()??"Not configured",e=l();return p(`theme-command:info:dev-theme-loaded:${e}`),N("Theme Configuration",[["Store",t],["Development Theme ID",e?`#${e}`:{subdued:"Not set"}]])}async function j(t){let{platform:e,arch:n}=m();return N("Tooling and System",[["Shopify CLI",t.cliVersion],["OS",`${e}-${n}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}function N(t,e){return{title:t,body:{tabularData:e,firstColumnSubdued:!0}}}async function F(t,e){let n=Object.entries(t.theme).map(([o,r])=>{if(o==="editor_url"||o==="preview_url"){let C=String(r),$=o==="editor_url"?"Open in Theme Editor":"Preview Theme";return[u(o),{link:{url:C,label:$}}]}else return o==="id"?[u(o),`#${r}`]:[u(o),`${r}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function u(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var d=L(x(),1);var h=class extends b{static description="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";static flags={...T,...g,...S,development:d.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,n){if(s("theme-command:info"),e.theme||e.development){let o=await O(n,e);if(!o)throw new v("Theme not found!");if(e.json)return c(JSON.stringify(o,null,2));let r=await F(o,e);f(r)}else{if(e.json)return c(JSON.stringify(D({cliVersion:this.config.version}),null,2));let o=await y({cliVersion:this.config.version});f({customSections:o})}s("theme-command:info")}};export{h as a};
|
|
@@ -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 j=/^[/\\]{2}/,z=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,A=/^[A-Za-z]:$/,v=/^\/([A-Za-z]:)?$/,$="/";var m=function(e){if(e.length===0)return".";e=f(e);let n=e.match(j),t=l(e),s=e[e.length-1]==="/";return e=P(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=P(n,!t),t&&!l(n)?`/${n}`:n.length>0?n:"."};function P(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 z.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(v,"$1").split("/"),s=u(n).replace(v,"$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},_=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 T}from"url";function X(...e){return x(...e)}function G(e){return m(e)}function J(...e){return u(...e)}function M(e,n){return p(e,n)}function I(e){return l(e)}function O(e){return d(e)}function q(e,n){return g(e,n)}function H(e){return h(e)}function K(e){return _(e)}function w(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 Q(e,n=D()){let t=w(e,n),s=p(n,e),r=s.split("/").filter(o=>o==="..").length;return t==="/"||s===""||r>2?e:s}function Y(e,n){let t=p(e,n);return!t.startsWith("..")&&!I(t)}function ee(e){return O(T(e))}function D(){return m(process.env.INIT_CWD||process.cwd())}function te(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 ne(e=process.argv){let n=e.indexOf("--"),t=n===-1?e:e.slice(0,n);return t.includes("--json")||t.includes("-j")}function se(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{$ as a,x as b,X as c,G as d,J as e,M as f,I as g,O as h,q as i,H as j,K as k,w as l,Q as m,Y as n,ee as o,D as p,te as q,ne as r,se as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as J}from"./chunk-
|
|
1
|
+
import{c as J}from"./chunk-FEQHCE2E.js";import{b as k}from"./chunk-7HWMURCW.js";import{a as re}from"./chunk-NYYXH2SX.js";import{a as ae}from"./chunk-PWS4VFSD.js";import{a as z}from"./chunk-PO5T44H3.js";import{Ha as ne,I as ee,K as te,d as Q,e as Z}from"./chunk-UNHT4ZFP.js";import{q as F,s as X,t as K}from"./chunk-Y743UVBS.js";import{a as T}from"./chunk-45SZ5PSE.js";import{b as H,f as I}from"./chunk-NU5WLZ6Y.js";import{C as $,p as b,x as G,y as _}from"./chunk-3C4WVKSO.js";import{A as q,D as Y,F as V,H as O,J as W,z as U}from"./chunk-47IQIIFX.js";import{e as E}from"./chunk-HILYTMVA.js";import{i as u}from"./chunk-Q37WAD6F.js";import{$ as f,Aa as w,Ca as v,Db as P,Sa as D,Xa as h,Ya as j,_a as L,ca as S,oa as g,ua as N}from"./chunk-UWI76E2L.js";import{f as B}from"./chunk-UEBUGSBT.js";import{b as ge}from"./chunk-I3J63RFV.js";import{c as p,m as R}from"./chunk-6IDEDOXW.js";import{e as xe,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function ie(e,t,r,n={}){let{templates:a,groupOrder:i}=await e.templateSpecifications(t,n);return{templates:a.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}d();d();async function oe(e,t){let r=e?.path??"",n=p(t,r);if(!await h(n))throw new u(`
|
|
2
2
|
The extension is not available for ${e?.value}`);return n}async function se({name:e,app:t}){let r=S(e),n=p(t.directory,K.extensions.directoryName,r);if(await h(n))throw new u(`
|
|
3
3
|
A directory with this name (${r}) already exists.
|
|
4
4
|
Choose a new name for your extension.`);return await w(n),await N(p(n,F.lockFile)),n}function A(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function ce(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,n=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),a=await se({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:a,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:n,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await J({repoUrl:o,destination:c,shallow:!0})})};return await we(s),{directory:R(a),extensionTemplate:e.extensionTemplate}}async function we(e){try{switch(e.type){case"theme":await Pe(e);break;case"function":await ke(e);break;default:await Fe(e);break}let t=p(e.directory,F.lockFile);await v(t)}catch(t){throw await ve(e.directory),e.project.packageManager==="pnpm"&&Ee(t)?new u("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:P(e.project.packageManager,"shopify app generate extension")},"again."]]):t}}async function ve(e){try{await v(e,{maxRetries:10,retryDelay:100})}catch{q({headline:["Couldn't remove",{filePath:e},{char:"."}],body:"Delete this directory manually before generating an extension with the same name."})}}function Ee(e){return e instanceof Error&&e.message.includes("ERR_PNPM_IGNORED_BUILDS")}async function Pe({directory:e,url:t,type:r,name:n,extensionFlavor:a,onGetTemplateRepository:i}){return g(async s=>{let o=await M(t,a,s,i);await k(o,e,{name:n,type:r,uid:E(f(n))})})}async function ke({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let m=await M(t,i,l,s);await k(m,e,{name:a,handle:f(a),flavor:i?.value,uid:E(f(a))})}),o==="javascript"){let l=le(i?.value??"rust");await pe(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{n.usesWorkspaces&&await b({packageManager:n.packageManager,directory:n.directory});let l=Te(o);await _(l,{packageManager:n.packageManager,type:"prod",directory:n.usesWorkspaces?e:n.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await Z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await O(c)}async function Fe({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[{title:"Generating extension",task:async()=>{let l=le(i?.value??"vanilla-js");await g(async m=>{let y=await M(t,i,m,s);await k(y,e,{srcFileExtension:l,name:a,handle:f(a),flavor:i?.value??"",uid:E(f(a))})}),o==="javascript"&&await pe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=n.packageManager;if(n.usesWorkspaces)A(i?.value)==="javascript"&&await b({packageManager:l,directory:n.directory});else{await be(n.directory,i?.value);let m=p(e,"package.json"),y=await _e(m);await _(y,{packageManager:l,type:"prod",directory:n.directory}),await v(m)}}}];c.push({title:"Update shared type definition",task:async()=>{await te(r)}}),await O(c)}function le(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 Te(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${Q}.0.0`}),t}async function pe(e,t,r="*"){let n=await L(p(e,"src",r)),a=[];for(let i of n)a.push(D(i,`${i}.${t}`));await Promise.all(a)}async function be(e,t){t==="typescript-react"&&await $(e,{"@types/react":X.reactTypes})}async function _e(e){if(!await h(e))return[];let t=await G(e);return Object.entries(t?.dependencies??{}).map(([r,n])=>({name:r,version:n}))}async function M(e,t,r,n){let a=p(r,"download");return await w(a),await n(e,a),oe(t,a)}d();function Oe(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 Ie=async e=>{let t=e.extensionTemplates,r=e.templateType,n=e.extensionFlavor;if(!r){if(n&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(n))),t.length===0)throw new u("You have reached the limit for the number of extensions you can create.");r=await V({message:"Type of extension?",choices:Oe(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let a=t.find(c=>c.identifier===r),i=e.name||await de(e.directory,a.defaultName),s=e.extensionFlavor??await Ae(a);return{extensionTemplate:a,extensionContent:{name:i,flavor:s}}};async function de(e,t,r=1){let n=t.includes(" ")?" ":"-",a=r<=1?t:`${t}${n}${r}`,i=p(e,f(a));return j(i)?de(e,t,r+1):W({message:"Name your extension:",defaultValue:a})}async function Ae(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:Y({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ue=Ie;async function Me(e){let{app:t,developerPlatformClient:r,remoteApp:n,specifications:a,template:i}=e,s=a.map(he=>he.identifier),{templates:o,groupOrder:c}=await ie(r,n,s,{requestedTemplate:i}),l=await Ce(o,c,a,t,e),m=await ue(l);await Se(m,i);let y=Ne(m,t,e,r),ye=await ce(y);De(ye,e.project.packageManager)}async function Ce(e,t,r,n,a){let i=await Ge(a.template,n,e,r);je(i,a.flavor);let{validTemplates:s,templatesOverlimit:o}=Re(e,r,n);return{templateType:i?.identifier,name:a.name,extensionFlavor:a.flavor,directory:p(a.directory,"extensions"),app:n,extensionTemplates:s??[],unavailableExtensions:o??[],reset:a.reset,groupOrder:t}}function Re(e,t,r){return re(e,a=>!me(r,t,a)?"validTemplates":"templatesOverlimit")}function me(e,t,r){let n=r.type,a=t.find(s=>s.identifier===n||s.externalIdentifier===n);return e.extensionsForType({identifier:n,externalIdentifier:n}).length>=(a?.registrationLimit??1)}async function Se(e,t){let{extensionContent:r}=e;return T.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Ne(e,t,r,n){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:n}}function De(e,t){let r=Le(e.extensionTemplate,e.directory,t);U(r)}function je(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(n=>n.value);if(!r.includes(t))throw new u("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Le(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:P(r,"shopify app dev")}]),e.supportLinks[0]&&n.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),n}async function Ge(e,t,r,n){if(!e)return;let a=r.find(i=>i.identifier===e);if(!a){let i=await B(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new u(`Unknown extension type: ${e}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-YBSX53QP.js";import{b as y,c as P,d as b}from"./chunk-YYA5VGDW.js";import{a as F}from"./chunk-GN66BRYF.js";import{a as m}from"./chunk-PO5T44H3.js";import{Ia as x}from"./chunk-UNHT4ZFP.js";import{b as d,c as h}from"./chunk-NU5WLZ6Y.js";import{F as g,M as l}from"./chunk-47IQIIFX.js";import{Nb as n}from"./chunk-UWI76E2L.js";import{b as _}from"./chunk-I3J63RFV.js";import{e as U,g as u}from"./chunk-VKWPEFWQ.js";u();var i=U(_(),1);var a="_start",s=class w extends F{static summary="Run a function locally for testing.";static descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";static description=this.descriptionForHelp();static flags={...d,...m,...y,...h,input:i.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:i.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"}),profile:i.Flags.boolean({description:"Generate a WebAssembly performance profile for the function run. The profile can be viewed in Speedscope.",env:"SHOPIFY_FLAG_PROFILE"})};async run(){let{flags:t}=await this.parse(w),o=a,{app:p}=await x({directory:t.path,userProvidedConfigName:t.config}),e=await P(p,t.path);if(t.export!==void 0)n(`Using export ${t.export} from the --export flag.`),o=t.export;else if(e.configuration.targeting!==void 0&&e.configuration.targeting.length>0){let r=e.configuration.targeting;if(r.length>1&&l({})){let O=r.map(f=>({label:f.target,value:f.export||a}));o=await g({message:"Which target would you like to execute?",choices:O})}else o=r?.[0]?.export||a,n(`Using export '${o}'. Use the --export flag or an interactive terminal to select a different export.`)}else n(`No targeting information found. Using the default export '${o}'. Use the --export flag or an interactive terminal to select a different export.`);let c=e?.configuration.targeting?.[0]?.input_query,T=c&&`${e?.directory}/${c}`,A=await b(e,t.path,t["client-id"],t.reset,t.config);return await v({functionExtension:e,json:t.json,inputPath:t.input,export:o,stdin:"inherit",schemaPath:A,queryPath:T,profile:t.profile}),{app:p}}};export{s as a};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{b as h}from"./chunk-4ZNBEMRT.js";import{Aa as c,Ga as g,ya as u}from"./chunk-UWI76E2L.js";import{c as f,p}from"./chunk-6IDEDOXW.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var d=f(p(),"/docs-shopify.dev/commands"),m=class extends h{static description="Generate CLI commands documentation";static hidden=!0;async run(){let a=this.config.commands;await g(d),await c(d);let o=a.sort((e,i)=>e.id.length-i.id.length).filter(e=>!b(e)).map(e=>{let i=k(e);return N(e,i)});await Promise.all(o)}},C=["commands","help","plugins"];function b(t){return t.hidden?(C.push(t.id),!0):t.pluginType==="user"?!0:C.some(a=>t.id.startsWith(`${a}:`))}function k(t){let a=t.id.replace(/[:]/g," "),s=t.id.replace(/[:]/g,"-"),o=t.id.replace(/[:-]/g,"");return{commandName:a,fileName:s,interfaceName:o}}async function N(t,{commandName:a,fileName:s,interfaceName:o}){let e=Object.keys(t.flags).map(r=>{let n=t.flags[r];if(!n||n.hidden)return;let $=n.description??"",w=n.char?`-${n.char}, `:"",y=n.type==="option"?"string":"''",v=n.type==="option"?" <value>":"",x=n.required?"":"?",D=n.env!==void 0?` @environment ${n.env}`:"";return` /**
|
|
2
|
+
* ${$}
|
|
3
|
+
*${D}
|
|
4
|
+
*/
|
|
5
|
+
'${w}--${r}${v}'${x}: ${y}`}).filter(r=>r&&r?.length>0).join(`
|
|
6
|
+
|
|
7
|
+
`),i=`// This is an autogenerated file. Don't edit this file manually.
|
|
8
|
+
/**
|
|
9
|
+
* The following flags are available for the \`${a}\` command:
|
|
10
|
+
* @publicDocs
|
|
11
|
+
*/
|
|
12
|
+
export interface ${o} {
|
|
13
|
+
${e}
|
|
14
|
+
}
|
|
15
|
+
`;await c(`${d}/interfaces`),await u(`${d}/interfaces/${s}.interface.ts`,i)}export{m as a,k as b,N as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as p}from"./chunk-
|
|
1
|
+
import{k as p}from"./chunk-HILYTMVA.js";import{a as i}from"./chunk-7VAKNVFD.js";import{Gb as g,Kb as a,Nb as v,Ob as h,Sb as C,lb as u,mb as d,nb as e,ob as c,pb as f,qb as m,sb as r}from"./chunk-UWI76E2L.js";import{g as E}from"./chunk-UEBUGSBT.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u}from"./chunk-
|
|
1
|
+
import{d as u}from"./chunk-D3KFKT4D.js";import{A as c}from"./chunk-47IQIIFX.js";import{e as s}from"./chunk-DSS4ECIH.js";import{db as d}from"./chunk-UWI76E2L.js";import{p as m}from"./chunk-6IDEDOXW.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c}from"./chunk-
|
|
1
|
+
import{e as c}from"./chunk-BVB3DTNE.js";import{N as s}from"./chunk-3V4VL3SD.js";import{i as p,l as a}from"./chunk-Q37WAD6F.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as y}from"./chunk-
|
|
1
|
+
import{i as y}from"./chunk-KQFA5YTT.js";import{I as O,y as w}from"./chunk-47IQIIFX.js";import{i as d}from"./chunk-Q37WAD6F.js";import{Eb as m,Ib as S}from"./chunk-UWI76E2L.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();function h(t){return t.map(M).join(" \xB7 ")}function $(t,r){if(r){S(JSON.stringify({schemaVersion:1,operations:t},null,2));return}w({headline:"Subscription migration operations.",body:t.map(M)})}function M(t){return`${t.id}: ${t.status} (${t.results.edges.length}/${t.total} settled)`}i();i();var T=1e3,A=new Set(["COMPLETED","FAILED","CANCELED"]);async function E({clientId:t,operationIds:r,getOperation:s=y,pollIntervalMs:p=T,sleep:u=C,onUpdate:c}){let f=new Map,l=new Map,g=!0,a=[...r];for(;a.length>0;){let e=await Promise.all(a.map(async o=>{let n=await s({clientId:t,operationId:o});if(!n)throw new d(`Migration operation not found: ${o}`);return{operationId:o,operation:n}})),L=e.some(({operationId:o,operation:n})=>l.get(o)!==JSON.stringify(n));for(let{operationId:o,operation:n}of e)f.set(o,n),l.set(o,JSON.stringify(n));if(c&&(g||L)){let o=r.map(n=>f.get(n));await c(o)}g=!1,a=e.filter(({operation:o})=>!A.has(o.status)).map(({operationId:o})=>o),a.length>0&&await u(p)}return r.map(e=>f.get(e))}async function C(t){await new Promise(r=>setTimeout(r,t))}async function U({clientId:t,operationIds:r,waitForOperations:s=E}){return O({title:m`Polling subscription migration operations`,task:p=>s({clientId:t,operationIds:r,onUpdate:u=>p(m`${h(u)}`)}),renderOptions:{stdout:process.stderr}})}export{$ as a,U as b};
|