shopify 4.9.0 → 4.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-H2ANKZ2S.js +1 -0
- package/dist/analytics-Q6HJRPRX.js +1 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +14 -0
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-246AZCDT.js +1 -0
- package/dist/{chunk-VZUHMW5E.js → chunk-2NMICU24.js} +1 -1
- package/dist/{chunk-Y5ZN62VF.js → chunk-2P5DUPT7.js} +1 -1
- package/dist/{chunk-SGBLCVUX.js → chunk-2R2PKQQV.js} +1 -1
- package/dist/{chunk-BL5JWD3Y.js → chunk-2VDCTMLY.js} +1 -1
- package/dist/{chunk-ECEOBSGD.js → chunk-2X3HYG4B.js} +1 -1
- package/dist/{chunk-23K3B23N.js → chunk-3ATOVFLZ.js} +1 -1
- package/dist/{chunk-L5XWYTHY.js → chunk-3E3MCY5O.js} +3 -3
- package/dist/{chunk-S7536EWZ.js → chunk-3EEH3A27.js} +1 -1
- package/dist/{chunk-YJWNM4XO.js → chunk-3F42A3XV.js} +2 -2
- package/dist/{chunk-ZUVAHONX.js → chunk-3NRGGEGU.js} +1 -1
- package/dist/{chunk-CSRNHTHO.js → chunk-3NUQGW57.js} +1 -1
- package/dist/{chunk-72HS7MHV.js → chunk-3U2MYUWG.js} +1 -1
- package/dist/{chunk-PXXTSW6I.js → chunk-3ZL4TDTH.js} +1 -1
- package/dist/{chunk-2W6M7YDY.js → chunk-4565O5TG.js} +1 -1
- package/dist/{chunk-5HONV6NQ.js → chunk-46U6C6C6.js} +1 -1
- package/dist/{chunk-E5ND6RBL.js → chunk-4QEALPWD.js} +1 -1
- package/dist/{chunk-QJST4LZX.js → chunk-4S2WKMLJ.js} +1 -1
- package/dist/{chunk-N56BJ3F7.js → chunk-4TF7ER72.js} +1 -1
- package/dist/{chunk-6RBCFXJT.js → chunk-525BMYNR.js} +1 -1
- package/dist/{chunk-OASB6XPV.js → chunk-55QTRPZ2.js} +1 -1
- package/dist/{chunk-SXPWOYLT.js → chunk-5BO5HCN6.js} +1 -1
- package/dist/{chunk-GDQLA5NB.js → chunk-5JW2EYSE.js} +1 -1
- package/dist/{chunk-PBBZNGS4.js → chunk-5TQOMAJS.js} +1 -1
- package/dist/{chunk-CACPRKUF.js → chunk-65I35VBS.js} +1 -1
- package/dist/{chunk-D3K42KBL.js → chunk-6H3HVSO5.js} +1 -1
- package/dist/{chunk-3DMDSAWK.js → chunk-6NLGZGYE.js} +1 -1
- package/dist/{chunk-DKJPE42V.js → chunk-6SO5GA6P.js} +1 -1
- package/dist/{chunk-VFP3PUGZ.js → chunk-7ARGLS6W.js} +3 -3
- package/dist/chunk-7E4MJCVE.js +10 -0
- package/dist/{chunk-OG7SF4FU.js → chunk-7EDXMGBQ.js} +1 -1
- package/dist/{chunk-YAH5WFYR.js → chunk-7GJYJ6DU.js} +1 -1
- package/dist/{chunk-LV2IWYGL.js → chunk-7IRPE3M5.js} +1 -1
- package/dist/{chunk-OETFY7FE.js → chunk-7MMPQMU7.js} +1 -1
- package/dist/{chunk-BOFCBTX7.js → chunk-7ZNR4YL4.js} +1 -1
- package/dist/{chunk-NTVEJYKI.js → chunk-AKP4QAGL.js} +1 -1
- package/dist/{chunk-I4FGM6UH.js → chunk-ANHSOQTZ.js} +1 -1
- package/dist/{chunk-77B77IGP.js → chunk-AVOSD4NV.js} +1 -1
- package/dist/{chunk-TJJVX7CU.js → chunk-B477XHLZ.js} +1 -1
- package/dist/{chunk-7DRKDQRT.js → chunk-BK4VCXDD.js} +1 -1
- package/dist/{chunk-55PABKRC.js → chunk-BLBJT7BM.js} +1 -1
- package/dist/{chunk-YBQKJHZW.js → chunk-BLCR7BXU.js} +1 -1
- package/dist/{chunk-53U6XS3J.js → chunk-BPVXYM6G.js} +1 -1
- package/dist/{chunk-WPUQTUDX.js → chunk-BVR3GF2L.js} +1 -1
- package/dist/{chunk-MRVQ6XRW.js → chunk-BVVYKX4D.js} +1 -1
- package/dist/{chunk-XTYSJIZY.js → chunk-C4GEP3CX.js} +1 -1
- package/dist/{chunk-RHNFWHFY.js → chunk-CDIKRQ6M.js} +1 -1
- package/dist/{chunk-LSWFHTJT.js → chunk-CGH5Y6XE.js} +1 -1
- package/dist/{chunk-44QTWXOJ.js → chunk-CHRFYG6W.js} +1 -1
- package/dist/{chunk-B4RPJYDH.js → chunk-CNAMKKAK.js} +1 -1
- package/dist/{chunk-PGTKKP2B.js → chunk-D2S566HF.js} +1 -1
- package/dist/{chunk-MVVHISCR.js → chunk-DGOBYP74.js} +1 -1
- package/dist/{chunk-NYABB6XW.js → chunk-DH5E6NM3.js} +1 -1
- package/dist/{chunk-LOTGSNS5.js → chunk-DTGIMRBX.js} +1 -1
- package/dist/chunk-DV77BSKW.js +1 -0
- package/dist/{chunk-YQQHBFMA.js → chunk-E64OFJHF.js} +1 -1
- package/dist/{chunk-N4DE5H65.js → chunk-EGJQEKAO.js} +1 -1
- package/dist/{chunk-7Y4X5I6N.js → chunk-EJY4LA2S.js} +1 -1
- package/dist/{chunk-LYPNQFWX.js → chunk-ELJ34WWD.js} +1 -1
- package/dist/{chunk-5BLXN5WU.js → chunk-ELQ5NPPB.js} +1 -1
- package/dist/{chunk-XFZDFDZV.js → chunk-EMKLN75K.js} +1 -1
- package/dist/{chunk-QTEWTPAQ.js → chunk-EMRUM6AA.js} +1 -1
- package/dist/{chunk-4XSYMLQG.js → chunk-EP5HIGAL.js} +1 -1
- package/dist/{chunk-IWML2HLC.js → chunk-ER7ZTF26.js} +1 -1
- package/dist/{chunk-VFO5OYQ4.js → chunk-EXKTQF26.js} +1 -1
- package/dist/{chunk-FW5HGFSZ.js → chunk-EZ5F4ZFY.js} +3 -3
- package/dist/{chunk-3AASYIOA.js → chunk-FICC6IFE.js} +1 -1
- package/dist/{chunk-QSKOR3ED.js → chunk-FNKTF2OF.js} +1 -1
- package/dist/{chunk-6GA56I3E.js → chunk-FQKURDZR.js} +1 -1
- package/dist/{chunk-SDFO7P2M.js → chunk-FU4UVINZ.js} +1 -1
- package/dist/{chunk-CHLSNYF7.js → chunk-G627WGIC.js} +2 -2
- package/dist/{chunk-FL34EOXG.js → chunk-GPJJA3FX.js} +1 -1
- package/dist/{chunk-PXD2WJOI.js → chunk-GS52MX5F.js} +1 -1
- package/dist/{chunk-ZPCCSPAE.js → chunk-HKZ75UKL.js} +1 -1
- package/dist/chunk-HVU3D3ZU.js +275 -0
- package/dist/{chunk-BPIQ4YTW.js → chunk-HYC3JXR4.js} +1 -1
- package/dist/{chunk-JOJRABPY.js → chunk-HZJHGHLN.js} +1 -1
- package/dist/{chunk-NF7MOA4K.js → chunk-I2LILWDI.js} +1 -1
- package/dist/{chunk-JA2QZ635.js → chunk-I3J63RFV.js} +1 -1
- package/dist/{chunk-GALDYSEX.js → chunk-I55L6FOM.js} +1 -1
- package/dist/{chunk-5HEBS5DG.js → chunk-IESHPQLC.js} +1 -1
- package/dist/{chunk-ET2CGROE.js → chunk-IGE4Y5SE.js} +1 -1
- package/dist/{chunk-QILWHHAQ.js → chunk-IJLD5UYC.js} +1 -1
- package/dist/{chunk-IISE7SBT.js → chunk-IOS4IDZ2.js} +1 -1
- package/dist/{chunk-HSZC2LBB.js → chunk-IQIUFTR6.js} +1 -1
- package/dist/{chunk-WU7MSL3I.js → chunk-J66WAKXN.js} +1 -1
- package/dist/{chunk-BJOJNAKH.js → chunk-J7ZG6SO3.js} +1 -1
- package/dist/{chunk-PK4ID32C.js → chunk-JAX56OYG.js} +1 -1
- package/dist/{chunk-R757TSQ6.js → chunk-JAY7AGAG.js} +1 -1
- package/dist/{chunk-SJARQZVN.js → chunk-JCKA3O5A.js} +1 -1
- package/dist/{chunk-YD66PU3Y.js → chunk-JCO2SDDR.js} +1 -1
- package/dist/{chunk-TOLPNBZK.js → chunk-JFBCE4HN.js} +1 -1
- package/dist/{chunk-OM243CQ6.js → chunk-JJHJYBPQ.js} +1 -1
- package/dist/{chunk-Z35PUKKP.js → chunk-JKWB7WTO.js} +1 -1
- package/dist/{chunk-ASUARYJD.js → chunk-JLGXJHPX.js} +1 -1
- package/dist/{chunk-TSLZNTFM.js → chunk-JUCOIXG5.js} +1 -1
- package/dist/{chunk-HSTNTHWM.js → chunk-JUVJNIEA.js} +1 -1
- package/dist/{chunk-GJJBOCKD.js → chunk-JWDR66AS.js} +1 -1
- package/dist/chunk-KOYBR5MV.js +1 -0
- package/dist/{chunk-7IGMIDKK.js → chunk-KPNUSDCW.js} +1 -1
- package/dist/{chunk-7ZSN2QT5.js → chunk-KY36HSIB.js} +1 -1
- package/dist/{chunk-2OHSGC4Q.js → chunk-KYBZ2MBA.js} +1 -1
- package/dist/{chunk-74HXMIDM.js → chunk-LIQSNIB3.js} +1 -1
- package/dist/{chunk-KLYJDAP6.js → chunk-LWF4EV22.js} +1 -1
- package/dist/{chunk-3T2WMZHC.js → chunk-M7QFZQ23.js} +1 -1
- package/dist/{chunk-KVROYIUQ.js → chunk-MHZSSRHP.js} +1 -1
- package/dist/{chunk-TNXZWQZU.js → chunk-MIP2Y34N.js} +1 -1
- package/dist/{chunk-WCAGYCT7.js → chunk-MP5NZL7C.js} +1 -1
- package/dist/{chunk-5RL6DKWR.js → chunk-MQZPASSP.js} +1 -1
- package/dist/{chunk-3ZK5JZLY.js → chunk-MW3HFOPD.js} +1 -1
- package/dist/{chunk-EYSZRIUL.js → chunk-N4AR2B6D.js} +1 -1
- package/dist/{chunk-UFU2LGFK.js → chunk-NDMISEDF.js} +1 -1
- package/dist/{chunk-CPFAATMO.js → chunk-NLKO2J7T.js} +1 -1
- package/dist/{chunk-VDDNDA5K.js → chunk-NS4FUSSK.js} +1 -1
- package/dist/{chunk-PZHE37Z4.js → chunk-OCQZ2ULI.js} +1 -1
- package/dist/{chunk-4A7FPJVT.js → chunk-OERMQ2FP.js} +1 -1
- package/dist/{chunk-T234RERA.js → chunk-OIQVPTNQ.js} +1 -1
- package/dist/{chunk-G7OIACY5.js → chunk-OMEWUFUL.js} +1 -1
- package/dist/{chunk-O6E7YL7N.js → chunk-OXN2DID2.js} +1 -1
- package/dist/{chunk-IBTQO3JD.js → chunk-P2MVR6CG.js} +107 -107
- package/dist/{chunk-E75DJTAF.js → chunk-P6TOIMMF.js} +1 -1
- package/dist/{chunk-6IL3B5Z5.js → chunk-PFIQR7XS.js} +1 -1
- package/dist/{chunk-2KLXRVGQ.js → chunk-PG6XEOYF.js} +38 -38
- package/dist/{chunk-Q34PKJRR.js → chunk-PGE4HGLA.js} +1 -1
- package/dist/{chunk-ZHJ6KA43.js → chunk-PI6FLLDD.js} +1 -1
- package/dist/{chunk-HDQXFGYG.js → chunk-PIZDYS7T.js} +60 -60
- package/dist/{chunk-Q45XAEG2.js → chunk-PQCALXSD.js} +1 -1
- package/dist/{chunk-G54BKNIX.js → chunk-PQH4U2XV.js} +1 -1
- package/dist/{chunk-ZSJXZCAW.js → chunk-PQMKPXFV.js} +1 -1
- package/dist/{chunk-LQLFMDVD.js → chunk-PV5C6Q2P.js} +1 -1
- package/dist/{chunk-CMICT4XI.js → chunk-PYILLIGT.js} +1 -1
- package/dist/{chunk-55NKAIIT.js → chunk-Q26ES5T3.js} +1 -1
- package/dist/{chunk-DGMRL5DQ.js → chunk-Q4TZD2M6.js} +1 -1
- package/dist/{chunk-QAXFCAOV.js → chunk-Q555FV2X.js} +1 -1
- package/dist/{chunk-YX5GRXRS.js → chunk-Q7PF4VKI.js} +23 -23
- package/dist/{chunk-PVOWU77O.js → chunk-QA2NOPXG.js} +1 -1
- package/dist/{chunk-5XO6PAMV.js → chunk-QLHPTMIH.js} +1 -1
- package/dist/{chunk-7QQPAT4L.js → chunk-QMJZFKKU.js} +1 -1
- package/dist/{chunk-3SG5EJFC.js → chunk-QN6SITWN.js} +1 -1
- package/dist/{chunk-JROJL6RV.js → chunk-R43LXE66.js} +1 -1
- package/dist/chunk-R6IJRVVM.js +70 -0
- package/dist/{chunk-XBSWZ6BT.js → chunk-RAQP66LR.js} +1 -1
- package/dist/{chunk-Z3XIZMEM.js → chunk-RBPMV3KB.js} +1 -1
- package/dist/{chunk-SKRUMRB4.js → chunk-RCYQPOJW.js} +88 -88
- package/dist/{chunk-ZSVR5NEO.js → chunk-RDO5IWB5.js} +1 -1
- package/dist/{chunk-A54V5UCD.js → chunk-RGZCV56L.js} +1 -1
- package/dist/{chunk-ZVDFCUJT.js → chunk-RW2MONAS.js} +1 -1
- package/dist/{chunk-2LZQM5JG.js → chunk-RY6TZDVV.js} +1 -1
- package/dist/{chunk-2YRVHJEY.js → chunk-SDHDDNKM.js} +1 -1
- package/dist/{chunk-AD4S2VEI.js → chunk-SHBB5GST.js} +1 -1
- package/dist/{chunk-JWDUSMCA.js → chunk-SQIESCOJ.js} +1 -1
- package/dist/{chunk-I7GYNNCU.js → chunk-SRDKLZ4O.js} +1 -1
- package/dist/{chunk-QQN4PJZD.js → chunk-SWNY3RUM.js} +1 -1
- package/dist/{chunk-RCIU7NHA.js → chunk-SYNCIFJ6.js} +1 -1
- package/dist/{chunk-C6FZII5S.js → chunk-SZ2JOXTG.js} +1 -1
- package/dist/{chunk-AS2O62JX.js → chunk-T3JUBPBU.js} +1 -1
- package/dist/{chunk-TO7TXDLU.js → chunk-T6TYF72N.js} +1 -1
- package/dist/{chunk-5BYVVXGD.js → chunk-TEASB2WU.js} +1 -1
- package/dist/{chunk-6DHY67FO.js → chunk-THW6UDZH.js} +1 -1
- package/dist/{chunk-22LJALHJ.js → chunk-TPPBEVNQ.js} +1 -1
- package/dist/chunk-TQ7MHGY4.js +1 -0
- package/dist/{chunk-LQ7ENG4V.js → chunk-TQ7URMGS.js} +1 -1
- package/dist/{chunk-ADW7ECNU.js → chunk-TUE67I2F.js} +1 -1
- package/dist/{chunk-P3Z5RLVV.js → chunk-TWS34WUT.js} +1 -1
- package/dist/{chunk-QBGSSUJP.js → chunk-U5L2P36D.js} +1 -1
- package/dist/{chunk-ZO4IBP4B.js → chunk-UB2LAIXS.js} +1 -1
- package/dist/{chunk-4Y22EM45.js → chunk-UMSO6MOI.js} +1 -1
- package/dist/{chunk-Q3O3AFZT.js → chunk-UOKX3AME.js} +1 -1
- package/dist/{chunk-2Q3WIH7S.js → chunk-UVC3IXM3.js} +1 -1
- package/dist/chunk-UWHAOGO4.js +4 -0
- package/dist/{chunk-OBYY45BX.js → chunk-UYRXUGLY.js} +1 -1
- package/dist/{chunk-JTPVSO6Y.js → chunk-VXGXK66W.js} +1 -1
- package/dist/{chunk-JQKB3D37.js → chunk-VZLEYZLX.js} +1 -1
- package/dist/{chunk-2YFB3PTV.js → chunk-W56I6HOT.js} +1 -1
- package/dist/{chunk-7HDJBEBP.js → chunk-WINVPFT5.js} +1 -1
- package/dist/{chunk-SDJNAUU6.js → chunk-WNE2MZAZ.js} +1 -1
- package/dist/{chunk-OEZATTOS.js → chunk-WXT5AKZV.js} +1 -1
- package/dist/{chunk-W7CBJNXD.js → chunk-WZEKBD7B.js} +1 -1
- package/dist/{chunk-IUZZWXJG.js → chunk-X6HLGOIV.js} +1 -1
- package/dist/{chunk-4WACZNFF.js → chunk-XE5QH4D7.js} +1 -1
- package/dist/{chunk-XCNJL7ES.js → chunk-XRJ2GQ24.js} +1 -1
- package/dist/{chunk-3WVEL423.js → chunk-XTKXBQVA.js} +1 -1
- package/dist/{chunk-6ILP6QCH.js → chunk-YIV3CWED.js} +1 -1
- package/dist/{chunk-GVRFO4CV.js → chunk-YKYJOUV7.js} +1 -1
- package/dist/{chunk-DYA5UUXL.js → chunk-YXKMPCFH.js} +1 -1
- package/dist/{chunk-NGN7U2UF.js → chunk-Z57YWHOE.js} +1 -1
- package/dist/{chunk-4TQFTZVD.js → chunk-Z5SFLTH6.js} +1 -1
- package/dist/{chunk-QWDJRSJJ.js → chunk-ZJ4H3XEL.js} +1 -1
- package/dist/{chunk-FCULF3JA.js → chunk-ZZ7SOJHH.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-Y3N2NUZN.js → command-json-schema-HYYJSZAH.js} +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-5ZA3ILWV.js → conf-store-CDZ5YSQM.js} +1 -1
- package/dist/{custom-oclif-loader-VQKMCXNH.js → custom-oclif-loader-NVOK22CJ.js} +1 -1
- package/dist/{deprecations-PFQXWNF6.js → deprecations-33DG6ZUL.js} +1 -1
- package/dist/dist-DODCXJ2A.js +1 -0
- package/dist/dist-YXMAKIFS.js +1 -0
- package/dist/environments-KBRQNE4R.js +1 -0
- package/dist/{error-FBSXLW22.js → error-V77H2UYX.js} +1 -1
- package/dist/error-handler-JY3ZKE2G.js +1 -0
- package/dist/{fs-ZLV5W4TV.js → fs-SKH3XZU7.js} +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +1 -1
- package/dist/is-global-2G4BLF7H.js +1 -0
- package/dist/{json-error-2BL3UZ7H.js → json-error-WSMAL66C.js} +1 -1
- package/dist/lib-55QUD4AJ.js +1 -0
- package/dist/lib-PH52G55H.js +1 -0
- package/dist/lib-TYM5B75S.js +1 -0
- package/dist/{local-KAZJAYLX.js → local-G2Z24BHM.js} +1 -1
- package/dist/{metadata-M3ZE24WB.js → metadata-Y3RKC4P2.js} +1 -1
- package/dist/{morph-42EXMN3K.js → morph-BABFBRSW.js} +1 -1
- package/dist/{node-package-manager-RVPONQBY.js → node-package-manager-A7HTBJKY.js} +1 -1
- package/dist/notifications-system-E64OSVXF.js +1 -0
- package/dist/os-7VQXVZWF.js +1 -0
- package/dist/{output-SDE274Y5.js → output-ZFFHJGNK.js} +1 -1
- package/dist/system-ZLITSFDC.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-ISACCMJN.js +1 -0
- package/dist/ui-YSFALYSL.js +1 -0
- package/dist/upgrade-I4JTR4LA.js +1 -0
- package/dist/version-AOVO47AW.js +1 -0
- package/dist/version-LQV54JBC.js +1 -0
- package/dist/{workerd-WRW4ZUYM.js → workerd-RNDPF36Q.js} +1 -1
- package/oclif.manifest.json +2 -2
- package/package.json +8 -8
- package/dist/analytics-QK4RFCB6.js +0 -1
- package/dist/analytics-R6I5APDB.js +0 -1
- package/dist/chunk-7Y7AZRL3.js +0 -10
- package/dist/chunk-F3TMLDLC.js +0 -1
- package/dist/chunk-GQZPGTG7.js +0 -278
- package/dist/chunk-RGIUP4FW.js +0 -1
- package/dist/chunk-SW5EWGBJ.js +0 -12
- package/dist/chunk-TMV37ENR.js +0 -64
- package/dist/chunk-WXV35TPE.js +0 -1
- package/dist/chunk-YGFEUXKQ.js +0 -1
- package/dist/chunk-ZOYSMJ27.js +0 -1
- package/dist/dist-4X53WJBQ.js +0 -1
- package/dist/dist-5M2V3YCM.js +0 -1
- package/dist/environments-3RUZ7F4Q.js +0 -1
- package/dist/error-handler-D5BURRJ7.js +0 -1
- package/dist/is-global-GZ5CIXQA.js +0 -1
- package/dist/lib-AD2G3QH3.js +0 -1
- package/dist/lib-VEVNMHDE.js +0 -1
- package/dist/lib-ZQW4E7QU.js +0 -1
- package/dist/notifications-system-MYEMV7JF.js +0 -1
- package/dist/os-DRUILZZR.js +0 -1
- package/dist/system-5FQ3L5PA.js +0 -1
- package/dist/typescript-5R4Y7PXE.js +0 -1
- package/dist/ui-TEZZM7SE.js +0 -1
- package/dist/upgrade-3PIVJYBL.js +0 -1
- package/dist/version-FMWTVLMF.js +0 -1
- package/dist/version-IAMVSP7U.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as se}from"./chunk-N4DE5H65.js";import{a as ne,b as re,h as oe}from"./chunk-4Y22EM45.js";import{E as ee,_ as ie}from"./chunk-SKRUMRB4.js";import{a as q,d as X}from"./chunk-YTJ3EPD3.js";import{i as A,k as te}from"./chunk-FCULF3JA.js";import{Xa as Z,qa as Y}from"./chunk-YJWNM4XO.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();var ve=/^gid:\/\/shopify\/Shop\/(\d+)$/,De=/^\d+$/,ae=250,Re=new Set(ne),Be=new Set(re);function ue(i,e){let o=[],t=[],n=new Map;for(let s of e){let f=Ae(s.shopId),l=!0;if(f){let L=n.get(f);L===void 0?n.set(f,s.sourceRow):(o.push({row:s.sourceRow,field:"shop_id",message:`Duplicate shop ID; first seen on row ${L}`}),l=!1)}else o.push({row:s.sourceRow,field:"shop_id",message:"Shop ID must be a positive numeric ID or gid://shopify/Shop/<id>"}),l=!1;if(i==="unschedule"){l&&f&&t.push({action:i,shopId:f});continue}let h=s.targetPlanHandle?.trim(),w=s.priceBehavior?.trim(),S=s.notification?.trim(),O=S?.length?S:"WHEN_REQUIRED";h||(o.push({row:s.sourceRow,field:"target_plan_handle",message:"Target plan handle is required"}),l=!1),fe(w)||(o.push({row:s.sourceRow,field:"price_behavior",message:"Price behavior must be HONOR_BILLING_PRICE or PLAN_PRICE"}),l=!1),le(O)||(o.push({row:s.sourceRow,field:"notification",message:"Notification must be OPT_OUT or WHEN_REQUIRED"}),l=!1),l&&f&&h&&fe(w)&&le(O)&&t.push({action:i,shopId:f,targetPlanHandle:h,priceBehavior:w,notification:O})}if(o.length>0)return{ok:!1,errors:o};let r=[...t].sort((s,f)=>s.shopId<f.shopId?-1:s.shopId>f.shopId?1:0),a=ce(i,r);return{ok:!0,plan:{action:i,rows:r,batches:Le(i,r),canonicalInput:a,inputDigest:de(a)}}}function Ae(i){let e=i?.trim();if(!e)return;let o=De.test(e)?e:ve.exec(e)?.[1];if(o===void 0)return;let t=BigInt(o);return t>0?`gid://shopify/Shop/${t}`:void 0}function fe(i){return i!==void 0&&Re.has(i)}function le(i){return Be.has(i)}function ce(i,e){return JSON.stringify({version:1,action:i,rows:e})}function Le(i,e){let o=[];for(let t=0;t<e.length;t+=ae){let n=e.slice(t,t+ae),r=ce(i,n);o.push({index:o.length,rows:n,canonicalPayload:r,payloadDigest:de(r)})}return o}function de(i){return q(i).toString("hex")}d();d();d();d();d();var c=class i extends Error{constructor(e,o,t,...n){Array.isArray(o)&&(o=o.join(" ").trim()),super(o),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let r of n)for(let a in r){let s=r[a];this[a]=Buffer.isBuffer(s)?s.toString(t.encoding):s==null?s:JSON.parse(JSON.stringify(s))}}};d();var M=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var z=function(i){let e=[];for(let o=0,t=i.length;o<t;o++){let n=i[o];if(n==null||n===!1)e[o]={disabled:!0};else if(typeof n=="string"||typeof n=="number")e[o]={name:`${n}`};else if(M(n)){if(typeof n.name!="string")throw new c("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${o}`,"when column is an object literal"]);e[o]=n}else throw new c("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(n)} at position ${o}`])}return e};d();d();var Q=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let o=this.length+e.length;if(o>=this.size&&(this.resize(),o>=this.size))throw Error("INVALID_BUFFER_STATE");let t=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{let o=this.length++;o===this.size&&this.resize();let t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,o)}}append(e){let o=this.length++;o===this.size&&this.resize(),this.buf[o]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let o=Buffer.allocUnsafe(this.size);this.buf.copy(o,0,0,e),this.buf=o}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},H=Q;var _e=function(i){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((t,n)=>{let r=Buffer.from(String.fromCharCode(n),i.encoding);return n!==63&&r.length===1&&r[0]===63||t.push(r),t},[]),o=new Uint8Array(256);for(let t of e)o[t[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new H(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter?i.delimiter.map(t=>t.length):[],i.delimiter_auto?1:0,i.quote!==null?i.quote.length:0,...e.map(t=>t.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new H(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(t=>t.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:o}};d();d();var me=function(i){return i.replace(/([A-Z])/g,function(e,o){return"_"+o.toLowerCase()})};var T=function(i){let e={};for(let t in i)e[me(t)]=i[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new c("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new c("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new c("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){let n=Date.parse(t);return isNaN(n)?t:new Date(n)};else if(typeof e.cast_date!="function")throw new c("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=z(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new c("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!M(e.delimiter_auto))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!M(e.delimiter_auto.preferred))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(t,n)=>(t.total-t.std)*(n.preferred[t.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let o=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(t){if(typeof t=="string"&&(t=Buffer.from(t,e.encoding)),!Buffer.isBuffer(t)||t.length===0)throw new c("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${o}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new c("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new c("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new c("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,n){if(typeof t!="string"&&!Buffer.isBuffer(t))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=Buffer.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};d();var he=function(i,e){e||({delimiter_auto:e}=T({delimiter_auto:!0})),typeof i=="string"&&(i=Buffer.from(i)),Buffer.isBuffer(i)&&(i=(n=>{let r=[],a=j({delimiter:[]}),s=h=>r.push(h),f=()=>{},l=a.parse(n,!0,s,f);if(l!==void 0)throw l;return r})(i));let o=Array(127).fill().map(()=>({lines:[]}));i.map(([n],r)=>{for(let a=0,s=n.length;a<s;a++){let f=n.charCodeAt(a);o[f].lines[r]===void 0&&(o[f].lines[r]=0),o[f].lines[r]++}}),o.map((n,r)=>{n.char_code=r,n.std=Te(n.lines),n.total=n.lines.reduce((a,s)=>a+s,0),n.preferred=!!e.preferred[r],n.score=e.score(n,e)});let t=o.reduce((n,r)=>n.score>r.score?n:r,{});return String.fromCharCode(t.char_code)},Te=function(i){let e=i.length;if(e===0)return 0;let o=i.reduce((t,n)=>t+n)/e;return Math.sqrt(i.map(t=>Math.pow(t-o,2)).reduce((t,n)=>t+n)/e)};var pe=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},$e=13,Me=10,$={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},j=function(i={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},o=T(i);return{info:e,original_options:i,options:o,state:_e(o),__needMoreData:function(t,n,r){if(r)return!1;let{encoding:a,escape:s,quote:f}=this.options,{quoting:l,needMoreDataSize:h,recordDelimiterMaxLength:w}=this.state,S=n-t-1,O=Math.max(h,w===0?Buffer.from(`\r
|
|
1
|
+
import{b as se}from"./chunk-EGJQEKAO.js";import{a as ne,b as re,h as oe}from"./chunk-UMSO6MOI.js";import{E as ee,_ as ie}from"./chunk-RCYQPOJW.js";import{a as q,d as X}from"./chunk-YTJ3EPD3.js";import{i as A,k as te}from"./chunk-ZZ7SOJHH.js";import{Xa as Z,qa as Y}from"./chunk-3F42A3XV.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();var ve=/^gid:\/\/shopify\/Shop\/(\d+)$/,De=/^\d+$/,ae=250,Re=new Set(ne),Be=new Set(re);function ue(i,e){let o=[],t=[],n=new Map;for(let s of e){let f=Ae(s.shopId),l=!0;if(f){let L=n.get(f);L===void 0?n.set(f,s.sourceRow):(o.push({row:s.sourceRow,field:"shop_id",message:`Duplicate shop ID; first seen on row ${L}`}),l=!1)}else o.push({row:s.sourceRow,field:"shop_id",message:"Shop ID must be a positive numeric ID or gid://shopify/Shop/<id>"}),l=!1;if(i==="unschedule"){l&&f&&t.push({action:i,shopId:f});continue}let h=s.targetPlanHandle?.trim(),w=s.priceBehavior?.trim(),S=s.notification?.trim(),O=S?.length?S:"WHEN_REQUIRED";h||(o.push({row:s.sourceRow,field:"target_plan_handle",message:"Target plan handle is required"}),l=!1),fe(w)||(o.push({row:s.sourceRow,field:"price_behavior",message:"Price behavior must be HONOR_BILLING_PRICE or PLAN_PRICE"}),l=!1),le(O)||(o.push({row:s.sourceRow,field:"notification",message:"Notification must be OPT_OUT or WHEN_REQUIRED"}),l=!1),l&&f&&h&&fe(w)&&le(O)&&t.push({action:i,shopId:f,targetPlanHandle:h,priceBehavior:w,notification:O})}if(o.length>0)return{ok:!1,errors:o};let r=[...t].sort((s,f)=>s.shopId<f.shopId?-1:s.shopId>f.shopId?1:0),a=ce(i,r);return{ok:!0,plan:{action:i,rows:r,batches:Le(i,r),canonicalInput:a,inputDigest:de(a)}}}function Ae(i){let e=i?.trim();if(!e)return;let o=De.test(e)?e:ve.exec(e)?.[1];if(o===void 0)return;let t=BigInt(o);return t>0?`gid://shopify/Shop/${t}`:void 0}function fe(i){return i!==void 0&&Re.has(i)}function le(i){return Be.has(i)}function ce(i,e){return JSON.stringify({version:1,action:i,rows:e})}function Le(i,e){let o=[];for(let t=0;t<e.length;t+=ae){let n=e.slice(t,t+ae),r=ce(i,n);o.push({index:o.length,rows:n,canonicalPayload:r,payloadDigest:de(r)})}return o}function de(i){return q(i).toString("hex")}d();d();d();d();d();var c=class i extends Error{constructor(e,o,t,...n){Array.isArray(o)&&(o=o.join(" ").trim()),super(o),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let r of n)for(let a in r){let s=r[a];this[a]=Buffer.isBuffer(s)?s.toString(t.encoding):s==null?s:JSON.parse(JSON.stringify(s))}}};d();var M=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var z=function(i){let e=[];for(let o=0,t=i.length;o<t;o++){let n=i[o];if(n==null||n===!1)e[o]={disabled:!0};else if(typeof n=="string"||typeof n=="number")e[o]={name:`${n}`};else if(M(n)){if(typeof n.name!="string")throw new c("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${o}`,"when column is an object literal"]);e[o]=n}else throw new c("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(n)} at position ${o}`])}return e};d();d();var Q=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let o=this.length+e.length;if(o>=this.size&&(this.resize(),o>=this.size))throw Error("INVALID_BUFFER_STATE");let t=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{let o=this.length++;o===this.size&&this.resize();let t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,o)}}append(e){let o=this.length++;o===this.size&&this.resize(),this.buf[o]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let o=Buffer.allocUnsafe(this.size);this.buf.copy(o,0,0,e),this.buf=o}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},H=Q;var _e=function(i){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((t,n)=>{let r=Buffer.from(String.fromCharCode(n),i.encoding);return n!==63&&r.length===1&&r[0]===63||t.push(r),t},[]),o=new Uint8Array(256);for(let t of e)o[t[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new H(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter?i.delimiter.map(t=>t.length):[],i.delimiter_auto?1:0,i.quote!==null?i.quote.length:0,...e.map(t=>t.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new H(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(t=>t.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:o}};d();d();var me=function(i){return i.replace(/([A-Z])/g,function(e,o){return"_"+o.toLowerCase()})};var T=function(i){let e={};for(let t in i)e[me(t)]=i[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new c("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new c("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new c("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){let n=Date.parse(t);return isNaN(n)?t:new Date(n)};else if(typeof e.cast_date!="function")throw new c("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=z(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new c("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!M(e.delimiter_auto))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!M(e.delimiter_auto.preferred))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(t,n)=>(t.total-t.std)*(n.preferred[t.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let o=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(t){if(typeof t=="string"&&(t=Buffer.from(t,e.encoding)),!Buffer.isBuffer(t)||t.length===0)throw new c("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${o}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new c("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new c("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new c("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,n){if(typeof t!="string"&&!Buffer.isBuffer(t))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=Buffer.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};d();var he=function(i,e){e||({delimiter_auto:e}=T({delimiter_auto:!0})),typeof i=="string"&&(i=Buffer.from(i)),Buffer.isBuffer(i)&&(i=(n=>{let r=[],a=j({delimiter:[]}),s=h=>r.push(h),f=()=>{},l=a.parse(n,!0,s,f);if(l!==void 0)throw l;return r})(i));let o=Array(127).fill().map(()=>({lines:[]}));i.map(([n],r)=>{for(let a=0,s=n.length;a<s;a++){let f=n.charCodeAt(a);o[f].lines[r]===void 0&&(o[f].lines[r]=0),o[f].lines[r]++}}),o.map((n,r)=>{n.char_code=r,n.std=Te(n.lines),n.total=n.lines.reduce((a,s)=>a+s,0),n.preferred=!!e.preferred[r],n.score=e.score(n,e)});let t=o.reduce((n,r)=>n.score>r.score?n:r,{});return String.fromCharCode(t.char_code)},Te=function(i){let e=i.length;if(e===0)return 0;let o=i.reduce((t,n)=>t+n)/e;return Math.sqrt(i.map(t=>Math.pow(t-o,2)).reduce((t,n)=>t+n)/e)};var pe=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},$e=13,Me=10,$={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},j=function(i={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},o=T(i);return{info:e,original_options:i,options:o,state:_e(o),__needMoreData:function(t,n,r){if(r)return!1;let{encoding:a,escape:s,quote:f}=this.options,{quoting:l,needMoreDataSize:h,recordDelimiterMaxLength:w}=this.state,S=n-t-1,O=Math.max(h,w===0?Buffer.from(`\r
|
|
2
2
|
`,a).length:w,l?(s===null?0:s.length)+f.length:0,l?f.length+w:0);return S<O},parse:function(t,n,r,a){let{bom:s,comment_no_infix:f,delimiter_auto:l,encoding:h,from_line:w,ltrim:S,max_record_size:O,raw:L,relax_quotes:I,rtrim:E,skip_empty_lines:y,to:g,to_line:p}=this.options,{comment:x,escape:C,quote:N,record_delimiter:F}=this.options,{bomSkipped:Ne,delimiterDiscovered:Ee,delimiterBufPrevious:V,rawBuffer:xe,escapeIsQuote:Ce}=this.state;if(!Ee&&l){let m;if(V===void 0?m=t:V!==void 0&&t===void 0?m=V:m=Buffer.concat([V,t]),t=void 0,n||m.length>l.size)this.options.delimiter=[Buffer.from(he(m,this.options.delimiter_auto))],this.state.previousBuf=m,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=m;return}}let{previousBuf:P}=this.state,_;if(P===void 0)if(t===void 0){a();return}else _=t;else P!==void 0&&t===void 0?_=P:_=Buffer.concat([P,t]);if(Ne===!1)if(s===!1)this.state.bomSkipped=!0;else if(_.length<3){if(n===!1){this.state.previousBuf=_;return}}else{for(let m in $)if($[m].compare(_,0,$[m].length)===0){let D=$[m].length;this.state.bufBytesStart+=D,_=_.slice(D);let k=T({...this.original_options,encoding:m});for(let b in k)this.options[b]=k[b];({comment:x,escape:C,quote:N}=this.options);break}this.state.bomSkipped=!0}let U=_.length,u;for(u=0;u<U&&!this.__needMoreData(u,U,n);u++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),p!==-1&&this.info.lines>p){this.state.stop=!0,a();return}this.state.quoting===!1&&F.length===0&&this.__autoDiscoverRecordDelimiter(_,u)&&(F=this.options.record_delimiter);let m=_[u];if(L===!0&&xe.append(m),(m===$e||m===Me)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(C!==null&&this.state.quoting===!0&&this.__isEscape(_,u,m)&&u+C.length<U)if(Ce){if(this.__isQuote(_,u+C.length)){this.state.escaping=!0,u+=C.length-1;continue}}else{this.state.escaping=!0,u+=C.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(_,u))if(this.state.quoting===!0){let b=_[u+N.length],R=E&&this.__isCharTrimable(_,u+N.length),v=x!==null&&this.__compareBytes(x,_,u+N.length,b),B=this.__isDelimiter(_,u+N.length,b),J=F.length===0?this.__autoDiscoverRecordDelimiter(_,u+N.length):this.__isRecordDelimiter(b,_,u+N.length);if(C!==null&&this.__isEscape(_,u,m)&&this.__isQuote(_,u+C.length))u+=C.length-1;else if(!b||B||J||v||R){this.state.quoting=!1,this.state.wasQuoting=!0,u+=N.length-1;continue}else if(I===!1){let W=this.__error(new c("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(b)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(W!==void 0)return W}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),u+=N.length-1}else if(this.state.field.length!==0){if(I===!1){let b=this.__infoField(),R=Object.keys($).map(B=>$[B].equals(this.state.field.toString())?B:!1).filter(Boolean)[0],v=this.__error(new c("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(b.column)} at line ${b.lines}, value is ${JSON.stringify(this.state.field.toString(h))}`,R?`(${R} bom)`:void 0],this.options,b,{field:this.state.field}));if(v!==void 0)return v}}else{this.state.quoting=!0,u+=N.length-1;continue}if(this.state.quoting===!1){let b=this.__isRecordDelimiter(m,_,u);if(b!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=w){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),u+=b-1;continue}if(y===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,u+=b-1;continue}this.info.bytes=this.state.bufBytesStart+u;let B=this.__onField();if(B!==void 0)return B;this.info.bytes=this.state.bufBytesStart+u+b;let J=this.__onRecord(r);if(J!==void 0)return J;if(g!==-1&&this.info.records>=g){this.state.stop=!0,a();return}}this.state.commenting=!1,u+=b-1;continue}if(this.state.commenting)continue;if(x!==null&&(f===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(x,_,u,m)!==0){this.state.commenting=!0;continue}let R=this.__isDelimiter(_,u,m);if(R!==0){this.info.bytes=this.state.bufBytesStart+u;let v=this.__onField();if(v!==void 0)return v;u+=R-1;continue}}}if(this.state.commenting===!1&&O!==0&&this.state.record_length+this.state.field.length>O)return this.__error(new c("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${O}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let D=S===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(_,u),k=E===!1||this.state.wasQuoting===!1;if(D===!0&&k===!0)this.state.field.append(m);else{if(E===!0&&!this.__isCharTrimable(_,u))return this.__error(new c("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));D===!1&&(u+=this.__isCharTrimable(_,u)-1);continue}}if(n===!0)if(this.state.quoting===!0){let m=this.__error(new c("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(m!==void 0)return m}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+u;let m=this.__onField();if(m!==void 0)return m;let D=this.__onRecord(r);if(D!==void 0)return D}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=u,this.state.previousBuf=_.slice(u);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(t){let{columns:n,group_columns_by_name:r,encoding:a,info:s,from:f,relax_column_count:l,relax_column_count_less:h,relax_column_count_more:w,raw:S,skip_records_with_empty_values:O}=this.options,{enabled:L,record:I}=this.state;if(L===!1)return this.__resetRecord();let E=I.length;if(n===!0){if(O===!0&&pe(I)){this.__resetRecord();return}return this.__firstLineToColumns(I)}if(n===!1&&this.info.records===0&&(this.state.expectedRecordLength=E),E!==this.state.expectedRecordLength){let y=n===!1?new c("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:I}):new c("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${n.length},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:I});if(l===!0||h===!0&&E<this.state.expectedRecordLength||w===!0&&E>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=y;else{let g=this.__error(y);if(g)return g}}if(O===!0&&pe(I)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,f===1||this.info.records>=f){let{objname:y}=this.options;if(n!==!1){let g={};for(let p=0,x=I.length;p<x;p++)n[p]===void 0||n[p].disabled||(r===!0&&Object.hasOwn(g,n[p].name)?Array.isArray(g[n[p].name])?g[n[p].name]=g[n[p].name].concat(I[p]):g[n[p].name]=[g[n[p].name],I[p]]:Object.defineProperty(g,n[p].name,{value:I[p],enumerable:!0,writable:!0,configurable:!0}));if(S===!0||s===!0){let p=Object.assign({record:g},S===!0?{raw:this.state.rawBuffer.toString(a)}:{},s===!0?{info:this.__infoRecord()}:{}),x=this.__push(y===void 0?p:[g[y],p],t);if(x)return x}else{let p=this.__push(y===void 0?g:[g[y],g],t);if(p)return p}}else if(S===!0||s===!0){let g=Object.assign({record:I},S===!0?{raw:this.state.rawBuffer.toString(a)}:{},s===!0?{info:this.__infoRecord()}:{}),p=this.__push(y===void 0?g:[I[y],g],t);if(p)return p}else{let g=this.__push(y===void 0?I:[I[y],I],t);if(g)return g}}this.__resetRecord()},__firstLineToColumns:function(t){let{firstLineToHeaders:n}=this.state;try{let r=n===void 0?t:n.call(null,t);if(!Array.isArray(r))return this.__error(new c("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(r)}`],this.options,this.__infoField(),{headers:r}));let a=z(r);this.state.expectedRecordLength=a.length,this.options.columns=a,this.__resetRecord();return}catch(r){return r}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:t,encoding:n,rtrim:r,max_record_size:a}=this.options,{enabled:s,wasQuoting:f}=this.state;if(s===!1)return this.__resetField();let l=this.state.field.toString(n);if(r===!0&&f===!1&&(l=l.trimRight()),t===!0){let[h,w]=this.__cast(l);if(h!==void 0)return h;l=w}this.state.record.push(l),a!==0&&typeof l=="string"&&(this.state.record_length+=l.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(t,n){let{on_record:r}=this.options;if(r!==void 0){let a=this.__infoRecord();try{t=r.call(null,t,a)}catch(s){return s}if(t==null)return}this.info.bytes_records+=this.info.bytes,n(t)},__cast:function(t){let{columns:n,relax_column_count:r}=this.options;if(Array.isArray(n)===!0&&r&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let s=this.__infoField();return[void 0,this.state.castField.call(null,t,s)]}catch(s){return[s]}if(this.__isFloat(t))return[void 0,parseFloat(t)];if(this.options.cast_date!==!1){let s=this.__infoField();return[void 0,this.options.cast_date.call(null,t,s)]}return[void 0,t]},__compareBytes:function(t,n,r,a){if(t[0]!==a)return 0;let s=t.length;for(let f=1;f<s;f++)if(t[f]!==n[r+f])return 0;return s},__isCharTrimable:function(t,n){let{timchars:r,timcharFirstBytes:a}=this.state,s=t[n];if(s===void 0||a[s]===0)return 0;e:for(let f=0;f<r.length;f++){let l=r[f];for(let h=0;h<l.length;h++)if(l[h]!==t[n+h])continue e;return l.length}return 0},__isDelimiter:function(t,n,r){let{delimiter:a,ignore_last_delimiters:s}=this.options;if(s===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(s!==!1&&typeof s=="number"&&this.state.record.length===s-1)return 0;e:for(let f=0;f<a.length;f++){let l=a[f];if(l[0]===r){for(let h=1;h<l.length;h++)if(l[h]!==t[n+h])continue e;return l.length}}return 0},__isEscape:function(t,n,r){let{escape:a}=this.options;if(a===null)return!1;let s=a.length;if(a[0]===r){for(let f=0;f<s;f++)if(a[f]!==t[n+f])return!1;return!0}return!1},__isFloat:function(t){return t-parseFloat(t)+1>=0},__isQuote:function(t,n){let{quote:r}=this.options;if(r===null)return!1;let a=r.length;for(let s=0;s<a;s++)if(r[s]!==t[n+s])return!1;return!0},__isRecordDelimiter:function(t,n,r){let{record_delimiter:a}=this.options,s=a.length;e:for(let f=0;f<s;f++){let l=a[f],h=l.length;if(l[0]===t){for(let w=1;w<h;w++)if(l[w]!==n[r+w])continue e;return l.length}}return 0},__autoDiscoverRecordDelimiter:function(t,n){let{encoding:r}=this.options,a=[Buffer.from(`\r
|
|
3
3
|
`,r),Buffer.from(`
|
|
4
4
|
`,r),Buffer.from("\r",r)];e:for(let s=0;s<a.length;s++){let f=a[s].length;for(let l=0;l<f;l++)if(a[s][l]!==t[n+l])continue e;return this.options.record_delimiter.push(a[s]),this.state.recordDelimiterMaxLength=a[s].length,a[s].length}return 0},__error:function(t){let{encoding:n,raw:r,skip_records_with_error:a}=this.options,s=typeof t=="string"?new Error(t):t;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(s,r?this.state.rawBuffer.toString(n):void 0)}catch(f){return f}return}else return s},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:t,raw:n,encoding:r}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:t===!0,index:this.state.record.length,raw:n?this.state.rawBuffer.toString(r):void 0}},__infoField:function(){let{columns:t}=this.options,n=Array.isArray(t),r=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:r,column:n===!0?t.length>this.state.record.length?t[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var ge=function(i,e={}){typeof i=="string"&&(i=Buffer.from(i));let o=e&&e.objname?Object.create(null):[],t=j(e),n=s=>{t.options.objname===void 0?o.push(s):o[s[0]]=s[1]},r=()=>{},a=t.parse(i,!0,n,r);if(a!==void 0)throw a;return o};var Ve=["shop_id","target_plan_handle","price_behavior","notification"],Pe={schedule:["shop_id","target_plan_handle","price_behavior"],unschedule:["shop_id"]};function be(i,e){if(i.trim()==="")return{ok:!1,errors:[{message:"The CSV is empty"}]};let o=[],t;try{t=ge(i,{bom:!0,columns:r=>(o=r,r),info:!0,skip_empty_lines:!0,trim:!0})}catch(r){if(!(r instanceof c))throw r;return{ok:!1,errors:[{message:`Invalid CSV: ${r.message}`}]}}let n=ke(o,e);return n.length>0?{ok:!1,errors:n}:t.length===0?{ok:!1,errors:[{message:"The CSV must contain at least one data row"}]}:{ok:!0,rows:t.map(({record:r,info:a})=>Je(r,a.lines,e))}}function ke(i,e){let o=[],t=new Set(Ve),n=new Set;for(let r of i)n.has(r)?o.push({field:r,message:`Duplicate CSV header: ${r}`}):n.add(r),t.has(r)||o.push({field:r,message:`Unknown CSV header: ${r}`});for(let r of Pe[e])i.includes(r)||o.push({field:r,message:`Missing required CSV header: ${r}`});return o}function Je(i,e,o){return o==="unschedule"?{sourceRow:e,shopId:i.shop_id}:{sourceRow:e,shopId:i.shop_id,...i.target_plan_handle===void 0?{}:{targetPlanHandle:i.target_plan_handle},...i.price_behavior===void 0?{}:{priceBehavior:i.price_behavior},...i.notification===void 0?{}:{notification:i.notification}}}d();var we={fileExists:Z,readFile:Y,readStdin:ie};async function G(i,e=we){let o={...we,...e};if(i!=="-"){if(!await o.fileExists(i))throw new A(`CSV file not found: ${i}`);try{return await o.readFile(i)}catch(n){if(n instanceof A)throw n;let r=n instanceof Error?n.message:String(n);throw new A(`Couldn't read CSV file ${i}: ${r}`)}}let t=await o.readStdin();if(t===void 0||t==="")throw new A("Provide --input <path> or pipe CSV data to stdin.");return t}async function Ie(i,e,o){let t=o?await G(e,o):await G(e),n=be(t,i);return n.ok?ue(i,n.rows):n}d();d();var qe="shopify-subscription-migration:v1";function ye(){return X()}function Oe({appIdentifier:i,action:e,invocationId:o,canonicalBatchPayload:t}){let n=JSON.stringify({namespace:qe,appIdentifier:i,action:e,invocationId:o,canonicalBatchPayload:t});return q(n).toString("hex")}var K=class extends Error{batchIndex;constructor(e){super(`Migration submission batch ${e} returned neither an operation nor user errors`),this.name="MigrationSubmissionProtocolError",this.batchIndex=e}};async function Se({clientId:i,plan:e,invocationId:o=ye(),createOperation:t=oe}){let n={clientId:i,action:e.action,inputDigest:e.inputDigest,total:e.rows.length,operations:[]};for(let r of e.batches){let a=Oe({appIdentifier:i,action:e.action,invocationId:o,canonicalBatchPayload:r.canonicalPayload}),s=await t({clientId:i,idempotencyKey:a,migrations:r.rows.map(ze)});if(s.operation&&n.operations.push({batchIndex:r.index,batchPayloadDigest:r.payloadDigest,operation:s.operation}),s.userErrors.length>0)return{status:"failed",submission:n,failure:{type:"submission",batchIndex:r.index,userErrors:s.userErrors}};if(!s.operation)throw new K(r.index)}return{status:"success",submission:n}}function ze(i){return i.action==="unschedule"?{shopId:i.shopId,action:{cancelMigration:!0}}:{shopId:i.shopId,action:{scheduleMigration:je(i)}}}function je({targetPlanHandle:i,priceBehavior:e,notification:o}){return{targetPlanHandle:i,priceBehavior:e,notification:o}}async function ni(i){let e=await Ie(i.action,i.input);if(!e.ok)throw new A(Ue(e.errors));if(!i.skipConfirmation&&!await ee({message:`${i.action==="schedule"?"Schedule":"Unschedule"} ${e.plan.rows.length} subscriptions?`}))throw new te;let o=await Se({clientId:i.clientId,plan:e.plan});if(o.status==="failed"||!i.watch)return o;i.onSubmissionAccepted?.(o.submission);let t=await se({clientId:i.clientId,operationIds:o.submission.operations.map(({operation:a})=>a.id)}),n=Fe(o.submission,t),r=n.operations.filter(({operation:a})=>a.status==="FAILED").map(({operation:a})=>a.id);return r.length===0?{status:"success",submission:n}:{status:"failed",submission:n,failure:{type:"operations",operationIds:r}}}function Fe(i,e){let o=new Map(e.map(t=>[t.id,t]));return{...i,operations:i.operations.map(t=>({...t,operation:o.get(t.operation.id)??t.operation}))}}function Ue(i){return i.map(e=>{let o=[e.row===void 0?void 0:`row ${e.row}`,e.field].filter(t=>t!==void 0).join(", ");return o?`${o}: ${e.message}`:e.message}).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as xy}from"./chunk-P3Z5RLVV.js";import{A as zy,B as hi,C as Oy,D as zn,E as Ay,F as Ly,G as ja,H as qy,I as $a,J as Wy,K as ls,L as r0,M as Hy,N as Ba,O as cs,P as ds,Q as On,R as Uy,S as ln,T as Va,U as Ga,V as $,W as i0,X as o0,a as Y,aa as qu,b as La,c as ky,d as Nn,e as Te,f as qa,g as Cy,h as Ty,i as _y,j as Ey,k as Ry,l as as,m as Dy,n as Wa,o as J,p as Ha,q as Fy,r as Ua,s as Jt,t as Py,u as G,v as dt,w as Dr,x as My,y as Iy,z as Ny}from"./chunk-IBTQO3JD.js";import{b as Sy}from"./chunk-DGMRL5DQ.js";import{a as Vt,b as ee,c as w,d as wy,e as Gt,f as Kt,g as h}from"./chunk-VKWPEFWQ.js";var Ui=w(ht=>{"use strict";h();Object.defineProperty(ht,"__esModule",{value:!0});ht.stringArray=ht.array=ht.func=ht.error=ht.number=ht.string=ht.boolean=void 0;function s0(n){return n===!0||n===!1}ht.boolean=s0;function jy(n){return typeof n=="string"||n instanceof String}ht.string=jy;function a0(n){return typeof n=="number"||n instanceof Number}ht.number=a0;function l0(n){return n instanceof Error}ht.error=l0;function c0(n){return typeof n=="function"}ht.func=c0;function $y(n){return Array.isArray(n)}ht.array=$y;function d0(n){return $y(n)&&n.every(e=>jy(e))}ht.stringArray=d0});var cp=w(B=>{"use strict";h();Object.defineProperty(B,"__esModule",{value:!0});B.Message=B.NotificationType9=B.NotificationType8=B.NotificationType7=B.NotificationType6=B.NotificationType5=B.NotificationType4=B.NotificationType3=B.NotificationType2=B.NotificationType1=B.NotificationType0=B.NotificationType=B.RequestType9=B.RequestType8=B.RequestType7=B.RequestType6=B.RequestType5=B.RequestType4=B.RequestType3=B.RequestType2=B.RequestType1=B.RequestType=B.RequestType0=B.AbstractMessageSignature=B.ParameterStructures=B.ResponseError=B.ErrorCodes=void 0;var ui=Ui(),By;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(By=B.ErrorCodes||(B.ErrorCodes={}));var Wu=class n extends Error{constructor(e,t,r){super(t),this.code=ui.number(e)?e:By.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};B.ResponseError=Wu;var Rt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};B.ParameterStructures=Rt;Rt.auto=new Rt("auto");Rt.byPosition=new Rt("byPosition");Rt.byName=new Rt("byName");var _e=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Rt.auto}};B.AbstractMessageSignature=_e;var Hu=class extends _e{constructor(e){super(e,0)}};B.RequestType0=Hu;var Uu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType=Uu;var ju=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType1=ju;var $u=class extends _e{constructor(e){super(e,2)}};B.RequestType2=$u;var Bu=class extends _e{constructor(e){super(e,3)}};B.RequestType3=Bu;var Vu=class extends _e{constructor(e){super(e,4)}};B.RequestType4=Vu;var Gu=class extends _e{constructor(e){super(e,5)}};B.RequestType5=Gu;var Ku=class extends _e{constructor(e){super(e,6)}};B.RequestType6=Ku;var Ju=class extends _e{constructor(e){super(e,7)}};B.RequestType7=Ju;var Xu=class extends _e{constructor(e){super(e,8)}};B.RequestType8=Xu;var Yu=class extends _e{constructor(e){super(e,9)}};B.RequestType9=Yu;var Qu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType=Qu;var Zu=class extends _e{constructor(e){super(e,0)}};B.NotificationType0=Zu;var ep=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType1=ep;var tp=class extends _e{constructor(e){super(e,2)}};B.NotificationType2=tp;var np=class extends _e{constructor(e){super(e,3)}};B.NotificationType3=np;var rp=class extends _e{constructor(e){super(e,4)}};B.NotificationType4=rp;var ip=class extends _e{constructor(e){super(e,5)}};B.NotificationType5=ip;var op=class extends _e{constructor(e){super(e,6)}};B.NotificationType6=op;var sp=class extends _e{constructor(e){super(e,7)}};B.NotificationType7=sp;var ap=class extends _e{constructor(e){super(e,8)}};B.NotificationType8=ap;var lp=class extends _e{constructor(e){super(e,9)}};B.NotificationType9=lp;var h0;(function(n){function e(i){let o=i;return o&&ui.string(o.method)&&(ui.string(o.id)||ui.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ui.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ui.string(o.id)||ui.number(o.id)||o.id===null)}n.isResponse=r})(h0=B.Message||(B.Message={}))});var hp=w(tr=>{"use strict";h();var Vy;Object.defineProperty(tr,"__esModule",{value:!0});tr.LRUCache=tr.LinkedMap=tr.Touch=void 0;var gt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(gt=tr.Touch||(tr.Touch={}));var Ka=class{constructor(){this[Vy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=gt.None){let r=this._map.get(e);if(r)return t!==gt.None&&this.touch(r,t),r.value}set(e,t,r=gt.None){let i=this._map.get(e);if(i)i.value=t,r!==gt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case gt.None:this.addItemLast(i);break;case gt.First:this.addItemFirst(i);break;case gt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(Vy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==gt.First&&t!==gt.Last)){if(t===gt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===gt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};tr.LinkedMap=Ka;var dp=class extends Ka{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=gt.AsNew){return super.get(e,t)}peek(e){return super.get(e,gt.None)}set(e,t){return super.set(e,t,gt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};tr.LRUCache=dp});var Gy=w(hs=>{"use strict";h();Object.defineProperty(hs,"__esModule",{value:!0});hs.Disposable=void 0;var u0;(function(n){function e(t){return{dispose:t}}n.create=e})(u0=hs.Disposable||(hs.Disposable={}))});var Fr=w(mp=>{"use strict";h();Object.defineProperty(mp,"__esModule",{value:!0});var up;function pp(){if(up===void 0)throw new Error("No runtime abstraction layer installed");return up}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");up=t}n.install=e})(pp||(pp={}));mp.default=pp});var ji=w(pi=>{"use strict";h();Object.defineProperty(pi,"__esModule",{value:!0});pi.Emitter=pi.Event=void 0;var p0=Fr(),m0;(function(n){let e={dispose(){}};n.None=function(){return e}})(m0=pi.Event||(pi.Event={}));var fp=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,p0.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ja=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new fp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pi.Emitter=Ja;Ja._noop=function(){}});var Ya=w(mi=>{"use strict";h();Object.defineProperty(mi,"__esModule",{value:!0});mi.CancellationTokenSource=mi.CancellationToken=void 0;var f0=Fr(),g0=Ui(),gp=ji(),bp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:gp.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:gp.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||g0.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(bp=mi.CancellationToken||(mi.CancellationToken={}));var b0=Object.freeze(function(n,e){let t=(0,f0.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Xa=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?b0:(this._emitter||(this._emitter=new gp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},vp=class{get token(){return this._token||(this._token=new Xa),this._token}cancel(){this._token?this._token.cancel():this._token=bp.Cancelled}dispose(){this._token?this._token instanceof Xa&&this._token.dispose():this._token=bp.None}};mi.CancellationTokenSource=vp});var Ky=w($i=>{"use strict";h();Object.defineProperty($i,"__esModule",{value:!0});$i.SharedArrayReceiverStrategy=$i.SharedArraySenderStrategy=void 0;var v0=Ya(),us;(function(n){n.Continue=0,n.Cancelled=1})(us||(us={}));var yp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=us.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,us.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};$i.SharedArraySenderStrategy=yp;var wp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===us.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Sp=class{constructor(e){this.token=new wp(e)}cancel(){}dispose(){}},xp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new v0.CancellationTokenSource:new Sp(t)}};$i.SharedArrayReceiverStrategy=xp});var Cp=w(Qa=>{"use strict";h();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.Semaphore=void 0;var y0=Fr(),kp=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,y0.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Qa.Semaphore=kp});var Jy=w(nr=>{"use strict";h();Object.defineProperty(nr,"__esModule",{value:!0});nr.ReadableStreamMessageReader=nr.AbstractMessageReader=nr.MessageReader=void 0;var _p=Fr(),Bi=Ui(),Tp=ji(),w0=Cp(),S0;(function(n){function e(t){let r=t;return r&&Bi.func(r.listen)&&Bi.func(r.dispose)&&Bi.func(r.onError)&&Bi.func(r.onClose)&&Bi.func(r.onPartialMessage)}n.is=e})(S0=nr.MessageReader||(nr.MessageReader={}));var Za=class{constructor(){this.errorEmitter=new Tp.Emitter,this.closeEmitter=new Tp.Emitter,this.partialMessageEmitter=new Tp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Bi.string(e.message)?e.message:"unknown"}`)}};nr.AbstractMessageReader=Za;var Ep;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,_p.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(Ep||(Ep={}));var Rp=class extends Za{constructor(e,t){super(),this.readable=e,this.options=Ep.fromOptions(t),this.buffer=(0,_p.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new w0.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_p.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};nr.ReadableStreamMessageReader=Rp});var Zy=w(rr=>{"use strict";h();Object.defineProperty(rr,"__esModule",{value:!0});rr.WriteableStreamMessageWriter=rr.AbstractMessageWriter=rr.MessageWriter=void 0;var Xy=Fr(),ps=Ui(),x0=Cp(),Yy=ji(),k0="Content-Length: ",Qy=`\r
|
|
1
|
+
import{v as xy}from"./chunk-TWS34WUT.js";import{A as Iy,B as Ny,C as zy,D as hi,E as Oy,F as zn,G as Ay,H as Ly,I as ja,J as qy,K as $a,L as Wy,M as ls,N as r0,O as Hy,P as Ba,Q as cs,R as ds,S as On,T as Uy,U as ln,V as Va,W as Ga,X as $,Y as i0,Z as o0,b as Y,d as La,da as qu,e as ky,f as Nn,g as Te,h as qa,i as Cy,j as Ty,k as _y,l as Ey,m as Ry,n as as,o as Dy,p as Wa,q as J,r as Ha,s as Fy,t as Ua,u as Jt,v as Py,w as G,x as dt,y as Dr,z as My}from"./chunk-P2MVR6CG.js";import{b as Sy}from"./chunk-Q4TZD2M6.js";import{a as Vt,b as ee,c as w,d as wy,e as Gt,f as Kt,g as h}from"./chunk-VKWPEFWQ.js";var Ui=w(ht=>{"use strict";h();Object.defineProperty(ht,"__esModule",{value:!0});ht.stringArray=ht.array=ht.func=ht.error=ht.number=ht.string=ht.boolean=void 0;function s0(n){return n===!0||n===!1}ht.boolean=s0;function jy(n){return typeof n=="string"||n instanceof String}ht.string=jy;function a0(n){return typeof n=="number"||n instanceof Number}ht.number=a0;function l0(n){return n instanceof Error}ht.error=l0;function c0(n){return typeof n=="function"}ht.func=c0;function $y(n){return Array.isArray(n)}ht.array=$y;function d0(n){return $y(n)&&n.every(e=>jy(e))}ht.stringArray=d0});var cp=w(B=>{"use strict";h();Object.defineProperty(B,"__esModule",{value:!0});B.Message=B.NotificationType9=B.NotificationType8=B.NotificationType7=B.NotificationType6=B.NotificationType5=B.NotificationType4=B.NotificationType3=B.NotificationType2=B.NotificationType1=B.NotificationType0=B.NotificationType=B.RequestType9=B.RequestType8=B.RequestType7=B.RequestType6=B.RequestType5=B.RequestType4=B.RequestType3=B.RequestType2=B.RequestType1=B.RequestType=B.RequestType0=B.AbstractMessageSignature=B.ParameterStructures=B.ResponseError=B.ErrorCodes=void 0;var ui=Ui(),By;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(By=B.ErrorCodes||(B.ErrorCodes={}));var Wu=class n extends Error{constructor(e,t,r){super(t),this.code=ui.number(e)?e:By.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};B.ResponseError=Wu;var Rt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};B.ParameterStructures=Rt;Rt.auto=new Rt("auto");Rt.byPosition=new Rt("byPosition");Rt.byName=new Rt("byName");var _e=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Rt.auto}};B.AbstractMessageSignature=_e;var Hu=class extends _e{constructor(e){super(e,0)}};B.RequestType0=Hu;var Uu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType=Uu;var ju=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType1=ju;var $u=class extends _e{constructor(e){super(e,2)}};B.RequestType2=$u;var Bu=class extends _e{constructor(e){super(e,3)}};B.RequestType3=Bu;var Vu=class extends _e{constructor(e){super(e,4)}};B.RequestType4=Vu;var Gu=class extends _e{constructor(e){super(e,5)}};B.RequestType5=Gu;var Ku=class extends _e{constructor(e){super(e,6)}};B.RequestType6=Ku;var Ju=class extends _e{constructor(e){super(e,7)}};B.RequestType7=Ju;var Xu=class extends _e{constructor(e){super(e,8)}};B.RequestType8=Xu;var Yu=class extends _e{constructor(e){super(e,9)}};B.RequestType9=Yu;var Qu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType=Qu;var Zu=class extends _e{constructor(e){super(e,0)}};B.NotificationType0=Zu;var ep=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType1=ep;var tp=class extends _e{constructor(e){super(e,2)}};B.NotificationType2=tp;var np=class extends _e{constructor(e){super(e,3)}};B.NotificationType3=np;var rp=class extends _e{constructor(e){super(e,4)}};B.NotificationType4=rp;var ip=class extends _e{constructor(e){super(e,5)}};B.NotificationType5=ip;var op=class extends _e{constructor(e){super(e,6)}};B.NotificationType6=op;var sp=class extends _e{constructor(e){super(e,7)}};B.NotificationType7=sp;var ap=class extends _e{constructor(e){super(e,8)}};B.NotificationType8=ap;var lp=class extends _e{constructor(e){super(e,9)}};B.NotificationType9=lp;var h0;(function(n){function e(i){let o=i;return o&&ui.string(o.method)&&(ui.string(o.id)||ui.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ui.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ui.string(o.id)||ui.number(o.id)||o.id===null)}n.isResponse=r})(h0=B.Message||(B.Message={}))});var hp=w(tr=>{"use strict";h();var Vy;Object.defineProperty(tr,"__esModule",{value:!0});tr.LRUCache=tr.LinkedMap=tr.Touch=void 0;var gt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(gt=tr.Touch||(tr.Touch={}));var Ka=class{constructor(){this[Vy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=gt.None){let r=this._map.get(e);if(r)return t!==gt.None&&this.touch(r,t),r.value}set(e,t,r=gt.None){let i=this._map.get(e);if(i)i.value=t,r!==gt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case gt.None:this.addItemLast(i);break;case gt.First:this.addItemFirst(i);break;case gt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(Vy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==gt.First&&t!==gt.Last)){if(t===gt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===gt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};tr.LinkedMap=Ka;var dp=class extends Ka{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=gt.AsNew){return super.get(e,t)}peek(e){return super.get(e,gt.None)}set(e,t){return super.set(e,t,gt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};tr.LRUCache=dp});var Gy=w(hs=>{"use strict";h();Object.defineProperty(hs,"__esModule",{value:!0});hs.Disposable=void 0;var u0;(function(n){function e(t){return{dispose:t}}n.create=e})(u0=hs.Disposable||(hs.Disposable={}))});var Fr=w(mp=>{"use strict";h();Object.defineProperty(mp,"__esModule",{value:!0});var up;function pp(){if(up===void 0)throw new Error("No runtime abstraction layer installed");return up}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");up=t}n.install=e})(pp||(pp={}));mp.default=pp});var ji=w(pi=>{"use strict";h();Object.defineProperty(pi,"__esModule",{value:!0});pi.Emitter=pi.Event=void 0;var p0=Fr(),m0;(function(n){let e={dispose(){}};n.None=function(){return e}})(m0=pi.Event||(pi.Event={}));var fp=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,p0.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ja=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new fp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pi.Emitter=Ja;Ja._noop=function(){}});var Ya=w(mi=>{"use strict";h();Object.defineProperty(mi,"__esModule",{value:!0});mi.CancellationTokenSource=mi.CancellationToken=void 0;var f0=Fr(),g0=Ui(),gp=ji(),bp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:gp.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:gp.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||g0.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(bp=mi.CancellationToken||(mi.CancellationToken={}));var b0=Object.freeze(function(n,e){let t=(0,f0.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Xa=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?b0:(this._emitter||(this._emitter=new gp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},vp=class{get token(){return this._token||(this._token=new Xa),this._token}cancel(){this._token?this._token.cancel():this._token=bp.Cancelled}dispose(){this._token?this._token instanceof Xa&&this._token.dispose():this._token=bp.None}};mi.CancellationTokenSource=vp});var Ky=w($i=>{"use strict";h();Object.defineProperty($i,"__esModule",{value:!0});$i.SharedArrayReceiverStrategy=$i.SharedArraySenderStrategy=void 0;var v0=Ya(),us;(function(n){n.Continue=0,n.Cancelled=1})(us||(us={}));var yp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=us.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,us.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};$i.SharedArraySenderStrategy=yp;var wp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===us.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Sp=class{constructor(e){this.token=new wp(e)}cancel(){}dispose(){}},xp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new v0.CancellationTokenSource:new Sp(t)}};$i.SharedArrayReceiverStrategy=xp});var Cp=w(Qa=>{"use strict";h();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.Semaphore=void 0;var y0=Fr(),kp=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,y0.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Qa.Semaphore=kp});var Jy=w(nr=>{"use strict";h();Object.defineProperty(nr,"__esModule",{value:!0});nr.ReadableStreamMessageReader=nr.AbstractMessageReader=nr.MessageReader=void 0;var _p=Fr(),Bi=Ui(),Tp=ji(),w0=Cp(),S0;(function(n){function e(t){let r=t;return r&&Bi.func(r.listen)&&Bi.func(r.dispose)&&Bi.func(r.onError)&&Bi.func(r.onClose)&&Bi.func(r.onPartialMessage)}n.is=e})(S0=nr.MessageReader||(nr.MessageReader={}));var Za=class{constructor(){this.errorEmitter=new Tp.Emitter,this.closeEmitter=new Tp.Emitter,this.partialMessageEmitter=new Tp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Bi.string(e.message)?e.message:"unknown"}`)}};nr.AbstractMessageReader=Za;var Ep;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,_p.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(Ep||(Ep={}));var Rp=class extends Za{constructor(e,t){super(),this.readable=e,this.options=Ep.fromOptions(t),this.buffer=(0,_p.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new w0.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_p.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};nr.ReadableStreamMessageReader=Rp});var Zy=w(rr=>{"use strict";h();Object.defineProperty(rr,"__esModule",{value:!0});rr.WriteableStreamMessageWriter=rr.AbstractMessageWriter=rr.MessageWriter=void 0;var Xy=Fr(),ps=Ui(),x0=Cp(),Yy=ji(),k0="Content-Length: ",Qy=`\r
|
|
2
2
|
`,C0;(function(n){function e(t){let r=t;return r&&ps.func(r.dispose)&&ps.func(r.onClose)&&ps.func(r.onError)&&ps.func(r.write)}n.is=e})(C0=rr.MessageWriter||(rr.MessageWriter={}));var el=class{constructor(){this.errorEmitter=new Yy.Emitter,this.closeEmitter=new Yy.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${ps.string(e.message)?e.message:"unknown"}`)}};rr.AbstractMessageWriter=el;var Dp;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,Xy.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,Xy.default)().applicationJson.encoder}}n.fromOptions=e})(Dp||(Dp={}));var Fp=class extends el{constructor(e,t){super(),this.writable=e,this.options=Dp.fromOptions(t),this.errorCount=0,this.writeSemaphore=new x0.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(k0,r.byteLength.toString(),Qy),i.push(Qy),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};rr.WriteableStreamMessageWriter=Fp});var ew=w(tl=>{"use strict";h();Object.defineProperty(tl,"__esModule",{value:!0});tl.AbstractMessageBuffer=void 0;var T0=13,_0=10,E0=`\r
|
|
3
3
|
`,Pp=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let c=this._chunks[r];for(i=0;i<c.length;){switch(c[i]){case T0:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case _0:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=c.byteLength,r++}if(t!==4)return;let s=this._read(o+i),a=new Map,l=this.toString(s,"ascii").split(E0);if(l.length<2)return a;for(let c=0;c<l.length-2;c++){let d=l[c],p=d.indexOf(":");if(p===-1)throw new Error("Message header must separate key and value using :");let m=d.substr(0,p),g=d.substr(p+1).trim();a.set(e?m.toLowerCase():m,g)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};tl.AbstractMessageBuffer=Pp});var aw=w(j=>{"use strict";h();Object.defineProperty(j,"__esModule",{value:!0});j.createMessageConnection=j.ConnectionOptions=j.MessageStrategy=j.CancellationStrategy=j.CancellationSenderStrategy=j.CancellationReceiverStrategy=j.RequestCancellationReceiverStrategy=j.IdCancellationReceiverStrategy=j.ConnectionStrategy=j.ConnectionError=j.ConnectionErrors=j.LogTraceNotification=j.SetTraceNotification=j.TraceFormat=j.TraceValues=j.Trace=j.NullLogger=j.ProgressType=j.ProgressToken=void 0;var tw=Fr(),Me=Ui(),X=cp(),nw=hp(),ms=ji(),Mp=Ya(),gs;(function(n){n.type=new X.NotificationType("$/cancelRequest")})(gs||(gs={}));var rw;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(rw=j.ProgressToken||(j.ProgressToken={}));var fs;(function(n){n.type=new X.NotificationType("$/progress")})(fs||(fs={}));var Ip=class{constructor(){}};j.ProgressType=Ip;var Np;(function(n){function e(t){return Me.func(t)}n.is=e})(Np||(Np={}));j.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var ge;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(ge=j.Trace||(j.Trace={}));var R0;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(R0=j.TraceValues||(j.TraceValues={}));(function(n){function e(r){if(!Me.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(ge=j.Trace||(j.Trace={}));var cn;(function(n){n.Text="text",n.JSON="json"})(cn=j.TraceFormat||(j.TraceFormat={}));(function(n){function e(t){return Me.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(cn=j.TraceFormat||(j.TraceFormat={}));var iw;(function(n){n.type=new X.NotificationType("$/setTrace")})(iw=j.SetTraceNotification||(j.SetTraceNotification={}));var zp;(function(n){n.type=new X.NotificationType("$/logTrace")})(zp=j.LogTraceNotification||(j.LogTraceNotification={}));var nl;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(nl=j.ConnectionErrors||(j.ConnectionErrors={}));var Vi=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};j.ConnectionError=Vi;var ow;(function(n){function e(t){let r=t;return r&&Me.func(r.cancelUndispatched)}n.is=e})(ow=j.ConnectionStrategy||(j.ConnectionStrategy={}));var Lp;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(Lp=j.IdCancellationReceiverStrategy||(j.IdCancellationReceiverStrategy={}));var sw;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(sw=j.RequestCancellationReceiverStrategy||(j.RequestCancellationReceiverStrategy={}));var Op;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Mp.CancellationTokenSource}});function e(t){return Lp.is(t)||sw.is(t)}n.is=e})(Op=j.CancellationReceiverStrategy||(j.CancellationReceiverStrategy={}));var Ap;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(gs.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Me.func(r.sendCancellation)&&Me.func(r.cleanup)}n.is=e})(Ap=j.CancellationSenderStrategy||(j.CancellationSenderStrategy={}));var qp;(function(n){n.Message=Object.freeze({receiver:Op.Message,sender:Ap.Message});function e(t){let r=t;return r&&Op.is(r.receiver)&&Ap.is(r.sender)}n.is=e})(qp=j.CancellationStrategy||(j.CancellationStrategy={}));var Wp;(function(n){function e(t){let r=t;return r&&Me.func(r.handleMessage)}n.is=e})(Wp=j.MessageStrategy||(j.MessageStrategy={}));var D0;(function(n){function e(t){let r=t;return r&&(qp.is(r.cancellationStrategy)||ow.is(r.connectionStrategy)||Wp.is(r.messageStrategy))}n.is=e})(D0=j.ConnectionOptions||(j.ConnectionOptions={}));var dn;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(dn||(dn={}));function F0(n,e,t,r){let i=t!==void 0?t:j.NullLogger,o=0,s=0,a=0,l="2.0",c,d=new Map,p,m=new Map,g=new Map,S,F=new nw.LinkedMap,P=new Map,I=new Set,x=new Map,y=ge.Off,R=cn.Text,O,W=dn.New,ke=new ms.Emitter,Fe=new ms.Emitter,jt=new ms.Emitter,Mt=new ms.Emitter,Tt=new ms.Emitter,_t=r&&r.cancellationStrategy?r.cancellationStrategy:qp.Message;function Pn(v){if(v===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+v.toString()}function ci(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function $t(){return"not-"+(++s).toString()}function It(v,D){X.Message.isRequest(D)?v.set(Pn(D.id),D):X.Message.isResponse(D)?v.set(ci(D.id),D):v.set($t(),D)}function Er(v){}function Bt(){return W===dn.Listening}function Mn(){return W===dn.Closed}function Ye(){return W===dn.Disposed}function Rr(){(W===dn.New||W===dn.Listening)&&(W=dn.Closed,Fe.fire(void 0))}function is(v){ke.fire([v,void 0,void 0])}function Ai(v){ke.fire(v)}n.onClose(Rr),n.onError(is),e.onClose(Rr),e.onError(Ai);function Li(){S||F.size===0||(S=(0,tw.default)().timer.setImmediate(()=>{S=void 0,Nu()}))}function qi(v){X.Message.isRequest(v)?zu(v):X.Message.isNotification(v)?Au(v):X.Message.isResponse(v)?Ou(v):Aa(v)}function Nu(){if(F.size===0)return;let v=F.shift();try{let D=r?.messageStrategy;Wp.is(D)?D.handleMessage(v,qi):qi(v)}finally{Li()}}let di=v=>{try{if(X.Message.isNotification(v)&&v.method===gs.type.method){let D=v.params.id,z=Pn(D),U=F.get(z);if(X.Message.isRequest(U)){let be=r?.connectionStrategy,ze=be&&be.cancelUndispatched?be.cancelUndispatched(U,Er):void 0;if(ze&&(ze.error!==void 0||ze.result!==void 0)){F.delete(z),x.delete(D),ze.id=U.id,K(ze,v.method,Date.now()),e.write(ze).catch(()=>i.error("Sending response for canceled message failed."));return}}let Ce=x.get(D);if(Ce!==void 0){Ce.cancel(),Et(v);return}else I.add(D)}It(F,v)}finally{Li()}};function zu(v){if(Ye())return;function D(ce,Pe,fe){let Ve={jsonrpc:l,id:v.id};ce instanceof X.ResponseError?Ve.error=ce.toJson():Ve.result=ce===void 0?null:ce,K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}function z(ce,Pe,fe){let Ve={jsonrpc:l,id:v.id,error:ce.toJson()};K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}function U(ce,Pe,fe){ce===void 0&&(ce=null);let Ve={jsonrpc:l,id:v.id,result:ce};K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}De(v);let Ce=d.get(v.method),be,ze;Ce&&(be=Ce.type,ze=Ce.handler);let Ae=Date.now();if(ze||c){let ce=v.id??String(Date.now()),Pe=Lp.is(_t.receiver)?_t.receiver.createCancellationTokenSource(ce):_t.receiver.createCancellationTokenSource(v);v.id!==null&&I.has(v.id)&&Pe.cancel(),v.id!==null&&x.set(ce,Pe);try{let fe;if(ze)if(v.params===void 0){if(be!==void 0&&be.numberOfParams!==0){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines ${be.numberOfParams} params but received none.`),v.method,Ae);return}fe=ze(Pe.token)}else if(Array.isArray(v.params)){if(be!==void 0&&be.parameterStructures===X.ParameterStructures.byName){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,Ae);return}fe=ze(...v.params,Pe.token)}else{if(be!==void 0&&be.parameterStructures===X.ParameterStructures.byPosition){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,Ae);return}fe=ze(v.params,Pe.token)}else c&&(fe=c(v.method,v.params,Pe.token));let Ve=fe;fe?Ve.then?Ve.then(ft=>{x.delete(ce),D(ft,v.method,Ae)},ft=>{x.delete(ce),ft instanceof X.ResponseError?z(ft,v.method,Ae):ft&&Me.string(ft.message)?z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${ft.message}`),v.method,Ae):z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Ae)}):(x.delete(ce),D(fe,v.method,Ae)):(x.delete(ce),U(fe,v.method,Ae))}catch(fe){x.delete(ce),fe instanceof X.ResponseError?D(fe,v.method,Ae):fe&&Me.string(fe.message)?z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${fe.message}`),v.method,Ae):z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Ae)}}else z(new X.ResponseError(X.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,Ae)}function Ou(v){if(!Ye())if(v.id===null)v.error?i.error(`Received response message without id: Error is:
|
|
4
4
|
${JSON.stringify(v.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let D=v.id,z=P.get(D);if(Z_(v,z),z!==void 0){P.delete(D);try{if(v.error){let U=v.error;z.reject(new X.ResponseError(U.code,U.message,U.data))}else if(v.result!==void 0)z.resolve(v.result);else throw new Error("Should never happen.")}catch(U){U.message?i.error(`Response handler '${z.method}' failed with message: ${U.message}`):i.error(`Response handler '${z.method}' failed unexpectedly.`)}}}}function Au(v){if(Ye())return;let D,z;if(v.method===gs.type.method){let U=v.params.id;I.delete(U),Et(v);return}else{let U=m.get(v.method);U&&(z=U.handler,D=U.type)}if(z||p)try{if(Et(v),z)if(v.params===void 0)D!==void 0&&D.numberOfParams!==0&&D.parameterStructures!==X.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${D.numberOfParams} params but received none.`),z();else if(Array.isArray(v.params)){let U=v.params;v.method===fs.type.method&&U.length===2&&rw.is(U[0])?z({token:U[0],value:U[1]}):(D!==void 0&&(D.parameterStructures===X.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),D.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${D.numberOfParams} params but received ${U.length} arguments`)),z(...U))}else D!==void 0&&D.parameterStructures===X.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),z(v.params);else p&&p(v.method,v.params)}catch(U){U.message?i.error(`Notification handler '${v.method}' failed with message: ${U.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else jt.fire(v)}function Aa(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,g as c,i as p,j as f}from"./chunk-
|
|
1
|
+
import{b as a,g as c,i as p,j as f}from"./chunk-JAY7AGAG.js";import{l as h}from"./chunk-ZZ7SOJHH.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{adminSession;themeId;constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-KOYBR5MV.js";import{a as k}from"./chunk-VXGXK66W.js";import{$ as F,Ha as x,Y as I,Z as E}from"./chunk-PG6XEOYF.js";import{b as R}from"./chunk-Q4TZD2M6.js";import{B as v,H as h,z as g}from"./chunk-RCYQPOJW.js";import{d as w}from"./chunk-PQH4U2XV.js";import{k as A}from"./chunk-ZZ7SOJHH.js";import{b as y}from"./chunk-I3J63RFV.js";import{e as b,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function P(n){let{developerPlatformClient:e,app:l,remoteApp:o}=n,{extensionIdentifiersBreakdown:r,versionDetails:s}=await I(e,o,n.version),i=E({localApp:l,versionAppModules:s.appModuleVersions,activeAppVersion:await e.activeAppVersion(o)});if(!await F({configExtensionIdentifiersBreakdown:i,extensionIdentifiersBreakdown:r,appTitle:o.title,release:!0,allowUpdates:n.force||n.allowUpdates,allowDeletes:n.force||n.allowDeletes}))throw new A;let d=[{title:"Releasing version",task:async m=>{m.appRelease=await e.release({app:o,version:{versionId:s.uuid,appVersionId:s.id}})}}],{appRelease:{appRelease:p}}=await h(d),c=[{link:{label:s.versionTag??void 0,url:s.location}},s.message?`
|
|
2
2
|
${s.message}`:""];if(p.userErrors&&p.userErrors.length>0){let m=p.userErrors?.map(_=>_.message).join(", ");v({headline:"Version couldn't be released.",body:[...c,`${c.length>0?`
|
|
3
3
|
|
|
4
4
|
`:""}${m}`]})}else g({headline:"Version released to users.",body:c})}var t=b(y(),1);var f=class n extends C{static summary="Release an app version.";static usage="app release --version <version>";static descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";static description=this.descriptionForHelp();static flags={...R,...k,"allow-updates":t.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments. Required in non-interactive environments unless --allow-deletes is provided.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":t.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates. Required in non-interactive environments unless --allow-updates is provided.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:t.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};static nonTTYFlagRequirements(){return[{flags:["allow-updates","allow-deletes"]}]}async run(){let{flags:e}=await this.parse(n),l=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let o=e["allow-updates"],r=e["allow-deletes"],s=!!(o&&r),{app:i,remoteApp:u,developerPlatformClient:d}=await x({directory:e.path,clientId:l,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:i,remoteApp:u,developerPlatformClient:d,force:s,allowUpdates:o,allowDeletes:r,version:e.version}),{app:i}}};export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as h,E as e,F as r,J as o,K as s,n}from"./chunk-
|
|
1
|
+
import{D as h,E as e,F as r,J as o,K as s,n}from"./chunk-RCYQPOJW.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Aa as f,Cb as e,Eb as r,Nb as n,Xa as o,ya as d}from"./chunk-
|
|
1
|
+
import{Aa as f,Cb as e,Eb as r,Nb as n,Xa as o,ya as d}from"./chunk-3F42A3XV.js";import{d as i}from"./chunk-3VYOLEQE.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
|
|
2
2
|
*`)),t}export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-OMEWUFUL.js";import{b as y,c as P,d as b}from"./chunk-SHBB5GST.js";import{a as F}from"./chunk-246AZCDT.js";import{a as m}from"./chunk-VXGXK66W.js";import{Ia as x}from"./chunk-PG6XEOYF.js";import{b as d,c as h}from"./chunk-Q4TZD2M6.js";import{F as g,M as l}from"./chunk-RCYQPOJW.js";import{Nb as n}from"./chunk-3F42A3XV.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./chunk-
|
|
1
|
+
import{j as m}from"./chunk-3E3MCY5O.js";import{a as k,b as G}from"./chunk-LIQSNIB3.js";import{f as H}from"./chunk-PQH4U2XV.js";import{i as u}from"./chunk-ZZ7SOJHH.js";import{Aa as x,Cb as p,Eb as l,Nb as h,Sa as R,Ta as T,oa as g,ya as y}from"./chunk-3F42A3XV.js";import{d as $,i as b}from"./chunk-3VYOLEQE.js";import{g as w}from"./chunk-VKWPEFWQ.js";w();var d=class extends Error{constructor(t,e,o){super(`The request to GitHub API URL ${t} failed with status code ${e} and the following error message: ${o.message}`)}};async function A(i,t,e={filter:()=>!0}){h(l`Getting the latest release of GitHub repository ${i}/${t}...`);let o=`https://api.github.com/repos/${i}/${t}/releases`,r=await m(o);try{let s=await r.text(),n=JSON.parse(s);if(r.status!==200)throw new d(o,r.status,n);return n.find(e.filter)}catch(s){throw s instanceof SyntaxError?new u(`Received invalid response from GitHub API (HTTP ${r.status}).`,"The response could not be parsed as JSON. The service may be temporarily unavailable. Please try again."):s}}function B(i){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(i);if(!t){let S=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return G(new Error(`Parsing the url ${i} failed. Supported formats are ${S.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",o=e==="github"?"github.com":e,r=t[4],s=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),a=t[7],f=a?`#${a}`:"",c=`git@${o}:${r}/${s}`,P=`https://${o}/${r}/${s}`,v=["https:/",o,r,s,n].join("/").concat(f);return k({full:v,site:o,user:r,name:s,ref:a,subDirectory:n,ssh:c,http:P})}function I(i){let t=new URL(i),e=t.hash?t.hash.slice(1):void 0,[o,r,s,...n]=t.pathname.split("/"),a=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${r}/${s}`,branch:e,filePath:a}}async function q(i,t,e,o){let r=`https://github.com/${i}/releases/download/${t}/${e}`;return H("cmd_all_timing_network_ms")(async()=>{h(l`Downloading ${p.link(e,r)}`),await g(async s=>{let n=$(s,e),a;try{if(a=await m(r,void 0,"slow-request"),!a.ok)throw new u(`Failed to download ${e}: ${a.statusText}`)}catch(c){throw new u(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let f=await a.arrayBuffer();await y(n,Buffer.from(f)),await T(n,493),await x(b(o)),await R(n,o)}),h(l`${p.successIcon()} Successfully downloaded ${p.path(o)}`)})}export{A as a,B as b,I as c,q as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Cn}from"./chunk-AAK376RT.js";import{a as Du}from"./chunk-P2OI2P2M.js";import{a as Ys}from"./chunk-636CTEW7.js";import{a as Ks,c as Xs,d as Ti,g as ju,k as Di,l as Ve,m as Lu,n as Au,o as xu,p as Su,q as qu,r as Fu,s as Ru,t as Nu,u as Tu}from"./chunk-TR4OWSEX.js";import{b as Cu,c as kt}from"./chunk-ZGASBRSQ.js";import{b as Pu}from"./chunk-I5A6BPCP.js";import{a as Ou}from"./chunk-CX5CC6P5.js";import{a as Iu}from"./chunk-ET2CGROE.js";import{a as $,c as m,e as W,g as u}from"./chunk-VKWPEFWQ.js";var N=m(V=>{"use strict";u();Object.defineProperty(V,"__esModule",{value:!0});V.pickBy=ku;V.compact=Mu;V.uniqBy=Hu;V.last=Bu;V.sortBy=Uu;V.castArray=Wu;V.isProd=Vu;V.maxBy=Gu;V.sumBy=zu;V.capitalize=Ju;V.isTruthy=Ku;V.isNotFalsy=Xu;V.uniq=Yu;V.mapValues=Zu;V.mergeNestedObjects=ed;function ku(n,e){return Object.entries(n).reduce((t,[i,r])=>(e(r)&&(t[i]=r),t),{})}function Mu(n){return n.filter(e=>!!e)}function Hu(n,e){return n.filter((t,i)=>{let r=e(t);return!n.some((s,o)=>o>i&&e(s)===r)})}function Bu(n){if(n)return n.at(-1)}function ki(n,e){if(n=n===void 0?0:n,e=e===void 0?0:e,Array.isArray(n)&&Array.isArray(e)){if(n.length===0&&e.length===0)return 0;let t=ki(n[0],e[0]);return t!==0?t:ki(n.slice(1),e.slice(1))}return n<e?-1:n>e?1:0}function Uu(n,e){return n.sort((t,i)=>ki(e(t),e(i)))}function Wu(n){return n===void 0?[]:Array.isArray(n)?n:[n]}function Vu(){return!["development","test"].includes(process.env.NODE_ENV??"")}function Gu(n,e){if(n.length!==0)return n.reduce((t,i)=>{let r=e(i),s=e(t);return r>s?i:t})}function zu(n,e){return n.reduce((t,i)=>t+e(i),0)}function Ju(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function Ku(n){return["1","true","y","yes"].includes(n.toLowerCase())}function Xu(n){return!["0","false","n","no"].includes(n.toLowerCase())}function Yu(n){return[...new Set(n)].sort()}function Zu(n,e){return Object.entries(n).reduce((t,[i,r])=>(t[i]=e(r,i),t),{})}function Qu(n,e){return e.split(".").reduce((t,i)=>t?.[i],n)}function ed(n,e){return Object.fromEntries(n.flatMap(t=>Object.entries(Qu(t,e)??{})).reverse())}});var we=m(Ce=>{"use strict";u();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fileExists=Ce.dirExists=void 0;Ce.readJson=Zs;Ce.safeReadJson=sd;Ce.existsSync=od;var td=$("node:fs"),Bi=$("node:fs/promises"),nd=N(),id=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No directory found at ${n}`)}if(!e.isDirectory())throw new Error(`${n} exists but is not a directory`);return n};Ce.dirExists=id;var rd=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No file found at ${n}`)}if(!e.isFile())throw new Error(`${n} exists but is not a file`);return n};Ce.fileExists=rd;var Hi=class extends Map{set(e,t){return((0,nd.isProd)()??!1)&&super.set(e,t),this}},Mi=new Hi;async function Zs(n,e=!0){if(e&&Mi.has(n))return JSON.parse(Mi.get(n));let t=await(0,Bi.readFile)(n,"utf8");return Mi.set(n,t),JSON.parse(t)}async function sd(n,e=!0){try{return await Zs(n,e)}catch{}}function od(n){return(0,td.existsSync)(n)}});var eo=m(X=>{"use strict";u();Object.defineProperty(X,"__esModule",{value:!0});X.string=X.url=X.file=X.directory=X.integer=X.boolean=void 0;X.custom=Ge;var ad=$("node:url"),Qs=we(),cd=N();function Ge(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],type:"option"})}X.boolean=Ge({parse:async n=>!!n&&(0,cd.isNotFalsy)(n)});X.integer=Ge({async parse(n,e,t){if(!/^-?\d+$/.test(n))throw new Error(`Expected an integer but received: ${n}`);let i=Number.parseInt(n,10);if(t.min!==void 0&&i<t.min)throw new Error(`Expected an integer greater than or equal to ${t.min} but received: ${n}`);if(t.max!==void 0&&i>t.max)throw new Error(`Expected an integer less than or equal to ${t.max} but received: ${n}`);return i}});X.directory=Ge({async parse(n,e,t){return t.exists?(0,Qs.dirExists)(n):n}});X.file=Ge({async parse(n,e,t){return t.exists?(0,Qs.fileExists)(n):n}});X.url=Ge({async parse(n){try{return new ad.URL(n)}catch{throw new Error(`Expected a valid url but received: ${n}`)}}});var ld=Ge({});X.string=ld});var to=m((Db,ud)=>{ud.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.11.14",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"ansi-escapes":"^4.3.2",ansis:"^3.17.0","clean-stack":"^3.0.1","cli-spinners":"^2.9.2",debug:"^4.4.3",ejs:"^3.1.10","get-package-type":"^0.1.0","indent-string":"^4.0.0","is-wsl":"^2.2.0",lilconfig:"^3.1.3",minimatch:"^10.2.5",semver:"^7.8.1","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.17","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^19","@eslint/compat":"^1.4.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","@oclif/prettier-config":"^0.2.1","@oclif/test":"^4","@types/benchmark":"^2.1.5","@types/chai":"^4.3.16","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/debug":"^4.1.13","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@types/picomatch":"^4.0.3","@types/pnpapi":"^0.0.5","@types/sinon":"^17.0.3","@types/supports-color":"^8.1.3","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.5.0","chai-as-promised":"^7.1.2",commitlint:"^19","cross-env":"^7.0.3",eslint:"^9","eslint-config-oclif":"^6","eslint-config-prettier":"^10",husky:"^9.1.7","lint-staged":"^15",madge:"^6.1.0",mocha:"^11.7.5",nyc:"^15.1.0",prettier:"^3.8.3",shx:"^0.4.0",sinon:"^18","ts-node":"^10.9.2",tsd:"^0.33.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",exports:{".":"./lib/index.js","./args":"./lib/args.js","./command":"./lib/command.js","./config":"./lib/config/index.js","./errors":"./lib/errors/index.js","./execute":"./lib/execute.js","./flags":"./lib/flags.js","./flush":"./lib/flush.js","./handle":"./lib/errors/handle.js","./help":"./lib/help/index.js","./hooks":"./lib/interfaces/hooks.js","./interfaces":"./lib/interfaces/index.js","./logger":"./lib/logger.js","./package.json":"./package.json","./parser":"./lib/parser/index.js","./performance":"./lib/performance.js","./run":"./lib/main.js","./settings":"./lib/settings.js","./util/ids":"./lib/util/ids.js","./ux":"./lib/ux/index.js"},repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky","test:circular-deps":"yarn build && madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts" --parallel'},types:"lib/index.d.ts"}});var fe=m(Wi=>{"use strict";u();Object.defineProperty(Wi,"__esModule",{value:!0});var dd=$("node:fs"),fd=$("node:path"),Ui=class n extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return n.instance||(n.instance=new n),n.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:to().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,dd.readFileSync)((0,fd.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};Wi.default=Ui});var Q=m(Ne=>{"use strict";u();var hd=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getLogger=no;Ne.makeDebug=md;Ne.setLogger=yd;Ne.clearLoggers=_d;var pd=hd(kt()),Gi="oclif";function jn(n=Gi){let e=(0,pd.default)(n);return{child:(t,i)=>jn(`${n}${i??":"}${t}`),debug:e,error:(t,...i)=>jn(`${n}:error`).debug(t,...i),info:e,namespace:n,trace:e,warn:e}}var je=new Map;function no(n){let e=je.get("root");if(e||Vi(jn(Gi)),e=je.get("root"),n){let t=je.get(n);if(t)return t;let i=e.child(n);return je.set(n,i),i}return e}function gd(n){return typeof n.child=="function"&&typeof n.debug=="function"&&typeof n.error=="function"&&typeof n.info=="function"&&typeof n.trace=="function"&&typeof n.warn=="function"&&typeof n.namespace=="string"}function Vi(n){je.has(n.namespace)||je.has("root")||(gd(n)?(je.set(n.namespace,n),je.set("root",n)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function md(n){return(e,...t)=>no(n).debug(e,...t)}function yd(n){n&&typeof n!="string"&&"logger"in n&&n.logger?Vi(n.logger):Vi(jn(Gi))}function _d(){je.clear()}});var Mt=m(dt=>{"use strict";u();Object.defineProperty(dt,"__esModule",{value:!0});dt.stderr=dt.stdout=void 0;var ut=$("node:util"),wd=(n,...e)=>{!n&&e?console.log((0,ut.format)(...e)):n?console.log(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.log()};dt.stdout=wd;var bd=(n,...e)=>{!n&&e?console.error((0,ut.format)(...e)):n?console.error(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.error()};dt.stderr=bd});var Ie=m(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});In.settings=void 0;globalThis.oclif||(globalThis.oclif={});In.settings=globalThis.oclif});var ht=m(ft=>{"use strict";u();Object.defineProperty(ft,"__esModule",{value:!0});ft.errtermwidth=ft.stdtermwidth=void 0;var vd=Ie();function io(n){if(!n.isTTY)return 80;let e=n.getWindowSize()[0];return e<1?80:e<40?40:e}var ro=Number.parseInt(process.env.OCLIF_COLUMNS,10)||vd.settings.columns;ft.stdtermwidth=ro||io(process.stdout);ft.errtermwidth=ro||io(process.stderr)});var so=m(Ln=>{"use strict";u();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.STANDARD_ANSI=void 0;Ln.STANDARD_ANSI=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"]});var ao=m(zi=>{"use strict";u();Object.defineProperty(zi,"__esModule",{value:!0});zi.supportsColor=Ed;var oo=Cu();function Ed(){return!!oo.stdout&&!!oo.stderr}});var oe=m(pt=>{"use strict";u();var $d=pt&&pt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pt,"__esModule",{value:!0});pt.colorize=Cd;pt.parseTheme=lo;var Ji=$d(Ve()),Od=so(),Pd=ao();function co(n){return Od.STANDARD_ANSI.includes(n)}function Cd(n,e){if(!n||!(0,Pd.supportsColor)())return e;if(co(n))return Ji.default[n](e);if(n.startsWith("#"))return Ji.default.hex(n)(e);if(n.startsWith("rgb")){let[t,i,r]=n.slice(4,-1).split(",").map(s=>Number.parseInt(s.trim(),10));return Ji.default.rgb(t,i,r)(e)}return e}function lo(n){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,typeof t=="string"?jd(t):lo(t)]).filter(([e,t])=>t))}function jd(n){return n.startsWith("#")||n.startsWith("rgb")||co(n)?n:void 0}});var ze=m(Te=>{"use strict";u();var An=Te&&Te.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Te,"__esModule",{value:!0});Te.CLIError=void 0;Te.addOclifExitCode=fo;var Id=An(Xs()),Ki=An(Ti()),Ld=An(Di()),Ad=An(fe()),xd=ht(),Sd=Ie(),uo=oe();function fo(n,e){return"oclif"in n||(n.oclif={}),n.oclif.exit=e?.exit===void 0?Ad.default.getInstance().get("exitCodes")?.default??2:e.exit,n}var Ht=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,t={}){super(e instanceof Error?e.message:e),fo(this,t),this.code=t.code,this.suggestions=t.suggestions}get bang(){try{return(0,uo.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Id.default)(super.stack,{pretty:!0})}render(){if(Sd.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,Ld.default)(e,xd.errtermwidth-6,{hard:!0,trim:!1}),e=(0,Ki.default)(e,3),e=(0,Ki.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,Ki.default)(e,1),e}};Te.CLIError=Ht;(function(n){class e extends n{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,uo.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}n.Warn=e})(Ht||(Te.CLIError=Ht={}))});var Sn=m(gt=>{"use strict";u();var po=gt&>.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gt,"__esModule",{value:!0});gt.applyPrettyPrintOptions=Rd;gt.default=Dd;var xn=po(Ti()),qd=po(Di()),Fd=ht(),ho=Ie();function Rd(n,e){let t=["message","code","ref","suggestions"];for(let i of t)!(i in n)&&e[i]&&(n[i]=e[i]);return n}var Nd=n=>{let e="Try this:";if(!n||n.length===0)return;if(n.length===1)return`${e} ${n[0]}`;let t=n.map(i=>`* ${i}`).join(`
|
|
1
|
+
import{a as Cn}from"./chunk-AAK376RT.js";import{a as Du}from"./chunk-P2OI2P2M.js";import{a as Ys}from"./chunk-636CTEW7.js";import{a as Ks,c as Xs,d as Ti,g as ju,k as Di,l as Ve,m as Lu,n as Au,o as xu,p as Su,q as qu,r as Fu,s as Ru,t as Nu,u as Tu}from"./chunk-TR4OWSEX.js";import{b as Cu,c as kt}from"./chunk-ZGASBRSQ.js";import{b as Pu}from"./chunk-I5A6BPCP.js";import{a as Ou}from"./chunk-CX5CC6P5.js";import{a as Iu}from"./chunk-IGE4Y5SE.js";import{a as $,c as m,e as W,g as u}from"./chunk-VKWPEFWQ.js";var N=m(V=>{"use strict";u();Object.defineProperty(V,"__esModule",{value:!0});V.pickBy=ku;V.compact=Mu;V.uniqBy=Hu;V.last=Bu;V.sortBy=Uu;V.castArray=Wu;V.isProd=Vu;V.maxBy=Gu;V.sumBy=zu;V.capitalize=Ju;V.isTruthy=Ku;V.isNotFalsy=Xu;V.uniq=Yu;V.mapValues=Zu;V.mergeNestedObjects=ed;function ku(n,e){return Object.entries(n).reduce((t,[i,r])=>(e(r)&&(t[i]=r),t),{})}function Mu(n){return n.filter(e=>!!e)}function Hu(n,e){return n.filter((t,i)=>{let r=e(t);return!n.some((s,o)=>o>i&&e(s)===r)})}function Bu(n){if(n)return n.at(-1)}function ki(n,e){if(n=n===void 0?0:n,e=e===void 0?0:e,Array.isArray(n)&&Array.isArray(e)){if(n.length===0&&e.length===0)return 0;let t=ki(n[0],e[0]);return t!==0?t:ki(n.slice(1),e.slice(1))}return n<e?-1:n>e?1:0}function Uu(n,e){return n.sort((t,i)=>ki(e(t),e(i)))}function Wu(n){return n===void 0?[]:Array.isArray(n)?n:[n]}function Vu(){return!["development","test"].includes(process.env.NODE_ENV??"")}function Gu(n,e){if(n.length!==0)return n.reduce((t,i)=>{let r=e(i),s=e(t);return r>s?i:t})}function zu(n,e){return n.reduce((t,i)=>t+e(i),0)}function Ju(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function Ku(n){return["1","true","y","yes"].includes(n.toLowerCase())}function Xu(n){return!["0","false","n","no"].includes(n.toLowerCase())}function Yu(n){return[...new Set(n)].sort()}function Zu(n,e){return Object.entries(n).reduce((t,[i,r])=>(t[i]=e(r,i),t),{})}function Qu(n,e){return e.split(".").reduce((t,i)=>t?.[i],n)}function ed(n,e){return Object.fromEntries(n.flatMap(t=>Object.entries(Qu(t,e)??{})).reverse())}});var we=m(Ce=>{"use strict";u();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fileExists=Ce.dirExists=void 0;Ce.readJson=Zs;Ce.safeReadJson=sd;Ce.existsSync=od;var td=$("node:fs"),Bi=$("node:fs/promises"),nd=N(),id=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No directory found at ${n}`)}if(!e.isDirectory())throw new Error(`${n} exists but is not a directory`);return n};Ce.dirExists=id;var rd=async n=>{let e;try{e=await(0,Bi.stat)(n)}catch{throw new Error(`No file found at ${n}`)}if(!e.isFile())throw new Error(`${n} exists but is not a file`);return n};Ce.fileExists=rd;var Hi=class extends Map{set(e,t){return((0,nd.isProd)()??!1)&&super.set(e,t),this}},Mi=new Hi;async function Zs(n,e=!0){if(e&&Mi.has(n))return JSON.parse(Mi.get(n));let t=await(0,Bi.readFile)(n,"utf8");return Mi.set(n,t),JSON.parse(t)}async function sd(n,e=!0){try{return await Zs(n,e)}catch{}}function od(n){return(0,td.existsSync)(n)}});var eo=m(X=>{"use strict";u();Object.defineProperty(X,"__esModule",{value:!0});X.string=X.url=X.file=X.directory=X.integer=X.boolean=void 0;X.custom=Ge;var ad=$("node:url"),Qs=we(),cd=N();function Ge(n){return(e={})=>({parse:async(t,i,r)=>t,...n,...e,input:[],type:"option"})}X.boolean=Ge({parse:async n=>!!n&&(0,cd.isNotFalsy)(n)});X.integer=Ge({async parse(n,e,t){if(!/^-?\d+$/.test(n))throw new Error(`Expected an integer but received: ${n}`);let i=Number.parseInt(n,10);if(t.min!==void 0&&i<t.min)throw new Error(`Expected an integer greater than or equal to ${t.min} but received: ${n}`);if(t.max!==void 0&&i>t.max)throw new Error(`Expected an integer less than or equal to ${t.max} but received: ${n}`);return i}});X.directory=Ge({async parse(n,e,t){return t.exists?(0,Qs.dirExists)(n):n}});X.file=Ge({async parse(n,e,t){return t.exists?(0,Qs.fileExists)(n):n}});X.url=Ge({async parse(n){try{return new ad.URL(n)}catch{throw new Error(`Expected a valid url but received: ${n}`)}}});var ld=Ge({});X.string=ld});var to=m((Db,ud)=>{ud.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.11.14",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"ansi-escapes":"^4.3.2",ansis:"^3.17.0","clean-stack":"^3.0.1","cli-spinners":"^2.9.2",debug:"^4.4.3",ejs:"^3.1.10","get-package-type":"^0.1.0","indent-string":"^4.0.0","is-wsl":"^2.2.0",lilconfig:"^3.1.3",minimatch:"^10.2.5",semver:"^7.8.1","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.17","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^19","@eslint/compat":"^1.4.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","@oclif/prettier-config":"^0.2.1","@oclif/test":"^4","@types/benchmark":"^2.1.5","@types/chai":"^4.3.16","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/debug":"^4.1.13","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@types/picomatch":"^4.0.3","@types/pnpapi":"^0.0.5","@types/sinon":"^17.0.3","@types/supports-color":"^8.1.3","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.5.0","chai-as-promised":"^7.1.2",commitlint:"^19","cross-env":"^7.0.3",eslint:"^9","eslint-config-oclif":"^6","eslint-config-prettier":"^10",husky:"^9.1.7","lint-staged":"^15",madge:"^6.1.0",mocha:"^11.7.5",nyc:"^15.1.0",prettier:"^3.8.3",shx:"^0.4.0",sinon:"^18","ts-node":"^10.9.2",tsd:"^0.33.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",exports:{".":"./lib/index.js","./args":"./lib/args.js","./command":"./lib/command.js","./config":"./lib/config/index.js","./errors":"./lib/errors/index.js","./execute":"./lib/execute.js","./flags":"./lib/flags.js","./flush":"./lib/flush.js","./handle":"./lib/errors/handle.js","./help":"./lib/help/index.js","./hooks":"./lib/interfaces/hooks.js","./interfaces":"./lib/interfaces/index.js","./logger":"./lib/logger.js","./package.json":"./package.json","./parser":"./lib/parser/index.js","./performance":"./lib/performance.js","./run":"./lib/main.js","./settings":"./lib/settings.js","./util/ids":"./lib/util/ids.js","./ux":"./lib/ux/index.js"},repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky","test:circular-deps":"yarn build && madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts" --parallel'},types:"lib/index.d.ts"}});var fe=m(Wi=>{"use strict";u();Object.defineProperty(Wi,"__esModule",{value:!0});var dd=$("node:fs"),fd=$("node:path"),Ui=class n extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return n.instance||(n.instance=new n),n.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:to().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,dd.readFileSync)((0,fd.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};Wi.default=Ui});var Q=m(Ne=>{"use strict";u();var hd=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getLogger=no;Ne.makeDebug=md;Ne.setLogger=yd;Ne.clearLoggers=_d;var pd=hd(kt()),Gi="oclif";function jn(n=Gi){let e=(0,pd.default)(n);return{child:(t,i)=>jn(`${n}${i??":"}${t}`),debug:e,error:(t,...i)=>jn(`${n}:error`).debug(t,...i),info:e,namespace:n,trace:e,warn:e}}var je=new Map;function no(n){let e=je.get("root");if(e||Vi(jn(Gi)),e=je.get("root"),n){let t=je.get(n);if(t)return t;let i=e.child(n);return je.set(n,i),i}return e}function gd(n){return typeof n.child=="function"&&typeof n.debug=="function"&&typeof n.error=="function"&&typeof n.info=="function"&&typeof n.trace=="function"&&typeof n.warn=="function"&&typeof n.namespace=="string"}function Vi(n){je.has(n.namespace)||je.has("root")||(gd(n)?(je.set(n.namespace,n),je.set("root",n)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function md(n){return(e,...t)=>no(n).debug(e,...t)}function yd(n){n&&typeof n!="string"&&"logger"in n&&n.logger?Vi(n.logger):Vi(jn(Gi))}function _d(){je.clear()}});var Mt=m(dt=>{"use strict";u();Object.defineProperty(dt,"__esModule",{value:!0});dt.stderr=dt.stdout=void 0;var ut=$("node:util"),wd=(n,...e)=>{!n&&e?console.log((0,ut.format)(...e)):n?console.log(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.log()};dt.stdout=wd;var bd=(n,...e)=>{!n&&e?console.error((0,ut.format)(...e)):n?console.error(typeof n=="string"?(0,ut.format)(n,...e):(0,ut.format)(...n,...e)):console.error()};dt.stderr=bd});var Ie=m(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});In.settings=void 0;globalThis.oclif||(globalThis.oclif={});In.settings=globalThis.oclif});var ht=m(ft=>{"use strict";u();Object.defineProperty(ft,"__esModule",{value:!0});ft.errtermwidth=ft.stdtermwidth=void 0;var vd=Ie();function io(n){if(!n.isTTY)return 80;let e=n.getWindowSize()[0];return e<1?80:e<40?40:e}var ro=Number.parseInt(process.env.OCLIF_COLUMNS,10)||vd.settings.columns;ft.stdtermwidth=ro||io(process.stdout);ft.errtermwidth=ro||io(process.stderr)});var so=m(Ln=>{"use strict";u();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.STANDARD_ANSI=void 0;Ln.STANDARD_ANSI=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"]});var ao=m(zi=>{"use strict";u();Object.defineProperty(zi,"__esModule",{value:!0});zi.supportsColor=Ed;var oo=Cu();function Ed(){return!!oo.stdout&&!!oo.stderr}});var oe=m(pt=>{"use strict";u();var $d=pt&&pt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pt,"__esModule",{value:!0});pt.colorize=Cd;pt.parseTheme=lo;var Ji=$d(Ve()),Od=so(),Pd=ao();function co(n){return Od.STANDARD_ANSI.includes(n)}function Cd(n,e){if(!n||!(0,Pd.supportsColor)())return e;if(co(n))return Ji.default[n](e);if(n.startsWith("#"))return Ji.default.hex(n)(e);if(n.startsWith("rgb")){let[t,i,r]=n.slice(4,-1).split(",").map(s=>Number.parseInt(s.trim(),10));return Ji.default.rgb(t,i,r)(e)}return e}function lo(n){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,typeof t=="string"?jd(t):lo(t)]).filter(([e,t])=>t))}function jd(n){return n.startsWith("#")||n.startsWith("rgb")||co(n)?n:void 0}});var ze=m(Te=>{"use strict";u();var An=Te&&Te.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Te,"__esModule",{value:!0});Te.CLIError=void 0;Te.addOclifExitCode=fo;var Id=An(Xs()),Ki=An(Ti()),Ld=An(Di()),Ad=An(fe()),xd=ht(),Sd=Ie(),uo=oe();function fo(n,e){return"oclif"in n||(n.oclif={}),n.oclif.exit=e?.exit===void 0?Ad.default.getInstance().get("exitCodes")?.default??2:e.exit,n}var Ht=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,t={}){super(e instanceof Error?e.message:e),fo(this,t),this.code=t.code,this.suggestions=t.suggestions}get bang(){try{return(0,uo.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Id.default)(super.stack,{pretty:!0})}render(){if(Sd.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,Ld.default)(e,xd.errtermwidth-6,{hard:!0,trim:!1}),e=(0,Ki.default)(e,3),e=(0,Ki.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,Ki.default)(e,1),e}};Te.CLIError=Ht;(function(n){class e extends n{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,uo.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}n.Warn=e})(Ht||(Te.CLIError=Ht={}))});var Sn=m(gt=>{"use strict";u();var po=gt&>.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gt,"__esModule",{value:!0});gt.applyPrettyPrintOptions=Rd;gt.default=Dd;var xn=po(Ti()),qd=po(Di()),Fd=ht(),ho=Ie();function Rd(n,e){let t=["message","code","ref","suggestions"];for(let i of t)!(i in n)&&e[i]&&(n[i]=e[i]);return n}var Nd=n=>{let e="Try this:";if(!n||n.length===0)return;if(n.length===1)return`${e} ${n[0]}`;let t=n.map(i=>`* ${i}`).join(`
|
|
2
2
|
`);return`${e}
|
|
3
3
|
${(0,xn.default)(t,2)}`};function Td(n){return!!n&&"name"in n&&"message"in n}function Dd(n){let e=[],t=n,i=!1;for(;Td(t);){if(ho.settings.debug&&t.stack)e.push(`${i?"Caused by: ":""}${t.stack}`);else{let{bang:r,code:s,message:o,name:a,ref:l,suggestions:d}=t,f=o?`${a||"Error"}: ${o}`:void 0,c=s?`Code: ${s}`:void 0,p=Nd(d),h=l?`Reference: ${l}`:void 0,y=[f,c,p,h].filter(Boolean).join(`
|
|
4
4
|
`),g=`${i?"Caused by: ":""}${y}`;g=(0,qd.default)(g,Fd.errtermwidth-6,{hard:!0,trim:!1}),ho.settings.debug||(g=(0,xn.default)(g,3),g=(0,xn.default)(g,1,{includeEmptyLines:!0,indent:r||""}),g=(0,xn.default)(g,1)),e.push(g)}i=!0,t=t.cause??null}return e.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-PQH4U2XV.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{J as g,L as c,M as C,h as m,t as f}from"./chunk-
|
|
1
|
+
import{J as g,L as c,M as C,h as m,t as f}from"./chunk-Q7PF4VKI.js";import{z as h}from"./chunk-RCYQPOJW.js";import{Ib as p,ya as l}from"./chunk-3F42A3XV.js";import{q as d}from"./chunk-3VYOLEQE.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();import E from"clipboardy";var I="{{SCAN_CONTEXT}}",y="<the findings document from step 4>",N={posix:"bash",powershell:"powershell",cmd:"bat"};function r(e){return`\`${e.replace(/`/g,"'")}\``}function w(e,n){return`\`\`\`${N[n]}
|
|
2
2
|
${e}
|
|
3
3
|
\`\`\``}function _(e,n){let t=w(c(e,n),n),i=`replacing \`${e.stdinPlaceholder}\` with the file's path`,o=C(e,y,n);if(o===void 0)return`cmd.exe can't pipe multi-line text inline, so write the document to a file and redirect it to \`record\`, ${i}:
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-2X3HYG4B.js";import{a as d}from"./chunk-YY6TFARF.js";import{a as v}from"./chunk-ELJ34WWD.js";import{p as u}from"./chunk-JAY7AGAG.js";import{p as f,v as p}from"./chunk-TWS34WUT.js";import{b as c,f as m}from"./chunk-Q4TZD2M6.js";import{E as l,z as s}from"./chunk-RCYQPOJW.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,4 +1,4 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
1
|
+
import{b as h}from"./chunk-EZ5F4ZFY.js";import{Aa as c,Ga as g,ya as u}from"./chunk-3F42A3XV.js";import{d as f,q as p}from"./chunk-3VYOLEQE.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
2
|
* ${$}
|
|
3
3
|
*${D}
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-
|
|
1
|
+
import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-G627WGIC.js";import{a as aA}from"./chunk-PG6XEOYF.js";import{c as tA,e as rA}from"./chunk-DH5E6NM3.js";import{O as pCe,b as mCe,j as R4,u as tf,v as vI}from"./chunk-3E3MCY5O.js";import{a as jF}from"./chunk-TQ7MHGY4.js";import{d as b}from"./chunk-RCYQPOJW.js";import{d as $F}from"./chunk-WXT5AKZV.js";import{i as eA}from"./chunk-ZZ7SOJHH.js";import{Nb as b7}from"./chunk-3F42A3XV.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var uA=m(Vi=>{"use strict";o();var bCe=b();function sA(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e1(){}var Gi={d:{f:e1,r:function(){throw Error(sA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},yCe=Symbol.for("react.portal");function ICe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rf=bCe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function k4(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gi;Vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(sA(299));return ICe(e,t,null,r)};Vi.flushSync=function(e){var t=rf.T,r=Gi.p;try{if(rf.T=null,Gi.p=2,e)return e()}finally{rf.T=t,Gi.p=r,Gi.d.f()}};Vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gi.d.C(e,t))};Vi.prefetchDNS=function(e){typeof e=="string"&&Gi.d.D(e)};Vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Gi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):r==="script"&&Gi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=k4(t.as,t.crossOrigin);Gi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gi.d.M(e)};Vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin);Gi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=k4(t.as,t.crossOrigin);Gi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gi.d.m(e)};Vi.requestFormReset=function(e){Gi.d.r(e)};Vi.unstable_batchedUpdates=function(e,t){return e(t)};Vi.useFormState=function(e,t,r){return rf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return rf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var dA=m(Yi=>{"use strict";o();process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(y){return""+y}function r(y,S,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(w);var M=!1}catch{M=!0}return M&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object"),t(w)),{$$typeof:f,key:w==null?null:""+w,children:y,containerInfo:S,implementation:E}}function a(y,S){if(y==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function n(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":'something with type "'+typeof y+'"'}function i(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":typeof y=="string"?JSON.stringify(y):typeof y=="number"?"`"+y+"`":'something with type "'+typeof y+'"'}function u(){var y=I.H;return y===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
2
2
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
3
3
|
2. You might be breaking the Rules of Hooks
|
|
4
4
|
3. You might have more than one copy of React in the same app
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ia as r}from"./chunk-
|
|
1
|
+
import{Ia as r}from"./chunk-PG6XEOYF.js";import{a}from"./chunk-525BMYNR.js";import{q as i}from"./chunk-3VYOLEQE.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var c=3e3;async function n(o){let t;try{if(a.getAllPublicMetadata().api_key!==void 0)return;await Promise.race([r({directory:o,skipPrompts:!0}),new Promise(l=>{t=setTimeout(l,c)})])}catch{}finally{t&&clearTimeout(t)}}var m=async()=>(await n(i()),a.getAllPublicMetadata()),f=m;export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as u,c as m}from"./chunk-
|
|
1
|
+
import{b as u,c as m}from"./chunk-Q4TZD2M6.js";import{b as h}from"./chunk-EZ5F4ZFY.js";import{N as i}from"./chunk-RCYQPOJW.js";import{a as n}from"./chunk-MQZPASSP.js";import{Ib as p,b as s}from"./chunk-3F42A3XV.js";import{b as g}from"./chunk-I3J63RFV.js";import{e as S,g as e}from"./chunk-VKWPEFWQ.js";e();e();async function f(t){let r=new URLSearchParams;return r.append("search",t??""),{url:`https://shopify.dev/docs?${r.toString()}`}}e();e();var o=n({name:"SearchResult",schema:s.object({url:s.string().url()})});async function l(t,r){r==="json"?p(o.encode(t)):await i(t.url)}var d=S(g(),1),a=class t extends h{static descriptionWithMarkdown="Search shopify.dev for the most relevant content matching a query. Best for discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static description=this.descriptionForHelp();static usage="search [query]";static examples=[`# open the search modal on Shopify.dev
|
|
2
2
|
shopify search
|
|
3
3
|
|
|
4
4
|
# search for a term on Shopify.dev
|