@shopify/cli 4.8.3 → 4.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-M4OC7RPG.js +1 -0
- package/dist/{analytics-VCJLTHBI.js → analytics-RGIJMP4U.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-7W7RGEII.js → chunk-2HW6VRJT.js} +1 -1
- package/dist/{chunk-OSMT4BVT.js → chunk-2HYR6EUD.js} +1 -1
- package/dist/{chunk-JKWKFDP7.js → chunk-2IRRFPEY.js} +1 -1
- package/dist/{chunk-FYVFGKCJ.js → chunk-2SL443J6.js} +1 -1
- package/dist/{chunk-5QCSJYJ4.js → chunk-2VJ6NBPV.js} +1 -1
- package/dist/{chunk-ALDLKZJW.js → chunk-2WATX3XV.js} +1 -1
- package/dist/{chunk-EQ7HQXEK.js → chunk-2ZROBXJX.js} +1 -1
- package/dist/{chunk-BV4K7JX5.js → chunk-3CZ7DKE5.js} +1 -1
- package/dist/{chunk-NG5FY45G.js → chunk-3DIRCEXA.js} +1 -1
- package/dist/{chunk-YKHDUKFK.js → chunk-3DT4NS4S.js} +1 -1
- package/dist/{chunk-77QBDEU4.js → chunk-3IQ6WXDD.js} +1 -1
- package/dist/{chunk-TNYPQ2UL.js → chunk-43FRAUV6.js} +3 -3
- package/dist/chunk-44QD4QNO.js +1 -0
- package/dist/{chunk-PUGAY4JP.js → chunk-4DLRS7MT.js} +3 -3
- package/dist/{chunk-34YS3IUO.js → chunk-4F3XYIEY.js} +1 -1
- package/dist/{chunk-F4S4ITHP.js → chunk-4HOJJCZ6.js} +1 -1
- package/dist/{chunk-Z6MS5OET.js → chunk-4OMKKYFC.js} +1 -1
- package/dist/{chunk-ZRFOMQ2L.js → chunk-4ZTRKEA2.js} +1 -1
- package/dist/{chunk-WXDINLQ6.js → chunk-5DMFEDKY.js} +1 -1
- package/dist/{chunk-CRSAEF22.js → chunk-5Z6EW3FA.js} +1 -1
- package/dist/{chunk-QGYETVYA.js → chunk-66G2HJ2A.js} +1 -1
- package/dist/{chunk-NTV746FL.js → chunk-66HW6J57.js} +1 -1
- package/dist/{chunk-6ECS5KDX.js → chunk-67QK26HI.js} +1 -1
- package/dist/{chunk-RIWEYVNK.js → chunk-6A3TDSON.js} +1 -1
- package/dist/{chunk-XNMDPOYU.js → chunk-6B727IUY.js} +1 -1
- package/dist/{chunk-T3IMDY72.js → chunk-6C5AVMKR.js} +3 -3
- package/dist/{chunk-AURREHRU.js → chunk-6CR2EEZ3.js} +1 -1
- package/dist/{chunk-Z3JINOCM.js → chunk-6P5FGN6P.js} +1 -1
- package/dist/chunk-6QADNGH4.js +6 -0
- package/dist/{chunk-F3FHSS7N.js → chunk-6V6UNUMM.js} +1 -1
- package/dist/chunk-6XLFFOPK.js +1 -0
- package/dist/{chunk-MQM3PRVN.js → chunk-74CYT3VX.js} +1 -1
- package/dist/{chunk-CM4QZI6V.js → chunk-7FVCUY54.js} +1 -1
- package/dist/{chunk-2NHLSPBM.js → chunk-7KLPRSQR.js} +1 -1
- package/dist/{chunk-ASBTWQJO.js → chunk-7LZ34C4S.js} +1 -1
- package/dist/{chunk-GK23CIPB.js → chunk-7VQBIGJB.js} +1 -1
- package/dist/{chunk-YJCNZGPY.js → chunk-A3U7JDUC.js} +1 -1
- package/dist/{chunk-J6BXYZRY.js → chunk-A3V2A2I4.js} +1 -1
- package/dist/{chunk-GSYVQPMP.js → chunk-A5U4KKNV.js} +1 -1
- package/dist/{chunk-7YBBERPS.js → chunk-AIILEPSK.js} +1 -1
- package/dist/{chunk-34EOYW4N.js → chunk-APUYMORT.js} +1 -1
- package/dist/{chunk-2E3JUVRC.js → chunk-AQPOPSQ7.js} +1 -1
- package/dist/{chunk-T5I2LEDJ.js → chunk-AU7GNCOK.js} +1 -1
- package/dist/{chunk-ULIXS6H7.js → chunk-BAWBC66R.js} +1 -1
- package/dist/{chunk-E767ITG2.js → chunk-BG7QQU23.js} +1 -1
- package/dist/{chunk-KIPKRAUB.js → chunk-BHJ3TGS7.js} +1 -1
- package/dist/{chunk-TWTZLWO7.js → chunk-BHTHUKHU.js} +1 -1
- package/dist/{chunk-3D3IYIZ7.js → chunk-BV62ZERJ.js} +1 -1
- package/dist/{chunk-46ISGKTW.js → chunk-BYX7SQPM.js} +1 -1
- package/dist/{chunk-EIEPBDNX.js → chunk-C4Y7PQDQ.js} +1 -1
- package/dist/{chunk-LUSG2EHB.js → chunk-CBMX6XI7.js} +1 -1
- package/dist/{chunk-C2AA5NVP.js → chunk-CFQ5G2QS.js} +1 -1
- package/dist/{chunk-IAURXPUJ.js → chunk-CNK3ZO2B.js} +4 -4
- package/dist/{chunk-M7YZJWY3.js → chunk-CP56F5UR.js} +1 -1
- package/dist/{chunk-4ZMWIIJV.js → chunk-CSOCXWP6.js} +98 -92
- package/dist/{chunk-NKSLEPE2.js → chunk-CVW2HMQO.js} +1 -1
- package/dist/{chunk-6TPUTSNR.js → chunk-D6LQ56XT.js} +1 -1
- package/dist/{chunk-I7XKF22Z.js → chunk-D6QTOQEJ.js} +1 -1
- package/dist/{chunk-GKRGXRD4.js → chunk-DDZEYA2I.js} +1 -1
- package/dist/{chunk-TEHDOYO2.js → chunk-DH3DMUE2.js} +1 -1
- package/dist/{chunk-CNDB4VEM.js → chunk-DO4SRE4M.js} +1 -1
- package/dist/{chunk-E2IUEX5H.js → chunk-DUNE3INK.js} +1 -1
- package/dist/{chunk-BQTD7UV2.js → chunk-DZZORIWL.js} +1 -1
- package/dist/{chunk-BIV3GWMB.js → chunk-EJJPEWSB.js} +1 -1
- package/dist/{chunk-TBC5FH2W.js → chunk-EQ2PD2ZA.js} +1 -1
- package/dist/{chunk-4XZJKSDD.js → chunk-ERBXXVOZ.js} +1 -1
- package/dist/{chunk-NS7QRCJF.js → chunk-FGRW7GT4.js} +1 -1
- package/dist/{chunk-CYSB5AJJ.js → chunk-FRRA5MI2.js} +1 -1
- package/dist/{chunk-PYCGZSME.js → chunk-FRVRTOTF.js} +1 -1
- package/dist/{chunk-CF3PBTFV.js → chunk-FW3RORD7.js} +1 -1
- package/dist/{chunk-B3GLHLAQ.js → chunk-FY47X4NG.js} +1 -1
- package/dist/{chunk-SVO2M3F5.js → chunk-G2YTINLI.js} +1 -1
- package/dist/{chunk-7YDT5AOW.js → chunk-GGPMDCCB.js} +1 -1
- package/dist/{chunk-RVEAQUUF.js → chunk-GINXNPAR.js} +1 -1
- package/dist/{chunk-DDWJRJWW.js → chunk-GJHBAOGJ.js} +1 -1
- package/dist/{chunk-BR3GYG2H.js → chunk-GTAYTMCP.js} +1 -1
- package/dist/{chunk-FKW62ZUV.js → chunk-H2HR2AQE.js} +1 -1
- package/dist/{chunk-GO4KOSHA.js → chunk-H7TDIRIU.js} +1 -1
- package/dist/{chunk-JGSHB34D.js → chunk-HINK4QAR.js} +1 -1
- package/dist/{chunk-G52SCW6W.js → chunk-HXVUDGLH.js} +1 -1
- package/dist/{chunk-56362WJR.js → chunk-HYM3HBDG.js} +1 -1
- package/dist/{chunk-VTKZJ6MD.js → chunk-HYPY5WH6.js} +1 -1
- package/dist/{chunk-AQJEA33T.js → chunk-IHEBV2KO.js} +1 -1
- package/dist/{chunk-HEABWGTV.js → chunk-IHH5XTPV.js} +1 -1
- package/dist/{chunk-3DXA7B3Y.js → chunk-JJJIRCQP.js} +1 -1
- package/dist/{chunk-N34YKDEK.js → chunk-JQPPLSFT.js} +1 -1
- package/dist/{chunk-5QNB6464.js → chunk-JWHQPDOK.js} +1 -1
- package/dist/{chunk-OZJBUWZK.js → chunk-JXG2T76F.js} +1 -1
- package/dist/{chunk-BR5CFKIN.js → chunk-K2DP5Z76.js} +1 -1
- package/dist/{chunk-B52JFWYO.js → chunk-KUZ5Z6HM.js} +1 -1
- package/dist/{chunk-3X7XO4LN.js → chunk-KWQGJ3VC.js} +1 -1
- package/dist/{chunk-AU2OGZBS.js → chunk-KZU727AL.js} +1 -1
- package/dist/{chunk-YSOLGBU3.js → chunk-L2DCUVZV.js} +1 -1
- package/dist/{chunk-RPM2BFMN.js → chunk-L3JBKCAS.js} +1 -1
- package/dist/{chunk-HG63NM4M.js → chunk-L3M7PTHU.js} +1 -1
- package/dist/{chunk-MF2PINFC.js → chunk-L4LDNEFK.js} +1 -1
- package/dist/{chunk-2AFQC53K.js → chunk-LAMTFOVF.js} +1 -1
- package/dist/{chunk-LOSBZZHU.js → chunk-LBA6FGKC.js} +1 -1
- package/dist/{chunk-ZC7FWXYM.js → chunk-LEW5IJK6.js} +1 -1
- package/dist/{chunk-UCP6UA7M.js → chunk-LX5UXWZ7.js} +1 -1
- package/dist/{chunk-XBL6HWDC.js → chunk-M7VQLMSW.js} +1 -1
- package/dist/{chunk-RAJX2CQP.js → chunk-MBRFIXCU.js} +1 -1
- package/dist/{chunk-VEXW766J.js → chunk-MYLMGH7Y.js} +1 -1
- package/dist/{chunk-I44E5KLI.js → chunk-NBXXTQWA.js} +1 -1
- package/dist/{chunk-VCJ252CK.js → chunk-NDT3F2PR.js} +1 -1
- package/dist/{chunk-QIGFVVLB.js → chunk-NHOF2IN6.js} +1 -1
- package/dist/{chunk-2C27YWUC.js → chunk-NKC3K3XP.js} +1 -1
- package/dist/chunk-O72SHE3Q.js +7 -0
- package/dist/chunk-OAG72Q2O.js +1 -0
- package/dist/{chunk-SUQF2LM7.js → chunk-OPOPO7DG.js} +1 -1
- package/dist/{chunk-MI5HPOXV.js → chunk-OUA6EOLX.js} +1 -1
- package/dist/{chunk-CSNXCRPY.js → chunk-OY6L7J53.js} +1 -1
- package/dist/{chunk-DGZCOTKZ.js → chunk-OYCAYEQE.js} +1 -1
- package/dist/{chunk-65DQFHSH.js → chunk-PGWQHSDV.js} +1 -1
- package/dist/{chunk-777JJJYW.js → chunk-PM3HRKPR.js} +1 -1
- package/dist/{chunk-BO45JVQ3.js → chunk-PNNW7YQG.js} +1 -1
- package/dist/{chunk-ETHKJFFN.js → chunk-POMWFTBD.js} +1 -1
- package/dist/{chunk-RM3XC2IX.js → chunk-QKTBYAUD.js} +1 -1
- package/dist/{chunk-PERAXNOY.js → chunk-QVO5CAJN.js} +2 -2
- package/dist/{chunk-E6DIK7Z7.js → chunk-QXR5DJC2.js} +1 -1
- package/dist/{chunk-O4ZMMPEP.js → chunk-QZEDYQVT.js} +1 -1
- package/dist/{chunk-BU4EGAMH.js → chunk-R3GLEZSE.js} +1 -1
- package/dist/{chunk-DE3HBSUU.js → chunk-RDS2WYQH.js} +1 -1
- package/dist/{chunk-SLZ6UMVV.js → chunk-RHBLXZGU.js} +1 -1
- package/dist/{chunk-6QDI53VP.js → chunk-RHNZA4IL.js} +1 -1
- package/dist/{chunk-HHWZV7CG.js → chunk-RIM7FNP3.js} +1 -1
- package/dist/{chunk-HPGQGIPA.js → chunk-S5H5U3PR.js} +1 -1
- package/dist/{chunk-KLI5Z5RC.js → chunk-SCLGMVNB.js} +1 -1
- package/dist/{chunk-EIASA32Z.js → chunk-SPNM3GES.js} +1 -1
- package/dist/{chunk-SYJXM2RN.js → chunk-SVYHWGMI.js} +1 -1
- package/dist/{chunk-AWTBC3MC.js → chunk-T4V7KOGJ.js} +3 -3
- package/dist/{chunk-PZH4WAOO.js → chunk-TA2M37OB.js} +1 -1
- package/dist/{chunk-4CLJ6W23.js → chunk-TAY7HU7X.js} +2 -2
- package/dist/{chunk-KSSPT7G5.js → chunk-TCFGEOE4.js} +12 -12
- package/dist/{chunk-SASKWPDJ.js → chunk-U6URYCC6.js} +1 -1
- package/dist/{chunk-MPO2T5YQ.js → chunk-UJBMY5WR.js} +1 -1
- package/dist/{chunk-SZ2V5WT6.js → chunk-UPGRXCFS.js} +1 -1
- package/dist/{chunk-6NO44HAQ.js → chunk-V2GLAK2W.js} +1 -1
- package/dist/{chunk-O2YFSYDR.js → chunk-V4774HTF.js} +1 -1
- package/dist/{chunk-XCTRPBWM.js → chunk-VBICZDA4.js} +1 -1
- package/dist/{chunk-T7BQYKKT.js → chunk-VDGTHMIQ.js} +1 -1
- package/dist/{chunk-3U7O3PMX.js → chunk-VETLNJ56.js} +1 -1
- package/dist/{chunk-UU3VUYVX.js → chunk-VG3YVCZW.js} +1 -1
- package/dist/chunk-VJ5YOXKL.js +1 -0
- package/dist/{chunk-5VBEPL4S.js → chunk-W4SGAPPR.js} +1 -1
- package/dist/{chunk-PXM3ENVN.js → chunk-W4SQE6NR.js} +1 -1
- package/dist/{chunk-OI3MNE72.js → chunk-WAJRWCZY.js} +1 -1
- package/dist/{chunk-WKC5HDMY.js → chunk-WGFGWDWP.js} +1 -1
- package/dist/{chunk-UI75K6AX.js → chunk-WGUCRVII.js} +1 -1
- package/dist/{chunk-U5APMZGT.js → chunk-WY7QF7VU.js} +1 -1
- package/dist/{chunk-HZASAGTU.js → chunk-X4V2CD2H.js} +1 -1
- package/dist/{chunk-AHJT2Z7G.js → chunk-XHXKPRF5.js} +1 -1
- package/dist/{chunk-WE72MX7V.js → chunk-XKHKXUQY.js} +1 -1
- package/dist/chunk-XOYICV6P.js +1 -0
- package/dist/{chunk-HLLMMIIM.js → chunk-XRJCD3AO.js} +1 -1
- package/dist/{chunk-XSFF6KEB.js → chunk-XWXAFJFC.js} +1 -1
- package/dist/{chunk-QCMGYBFD.js → chunk-XYUTD6IU.js} +1 -1
- package/dist/{chunk-5YSO5HRH.js → chunk-Y4BBTWM5.js} +1 -1
- package/dist/{chunk-LZSDOB4O.js → chunk-YHTONNIZ.js} +1 -1
- package/dist/{chunk-6ZGCTTAD.js → chunk-YNFXYVYN.js} +1 -1
- package/dist/{chunk-BAUHOB76.js → chunk-Z2HN5L6G.js} +1 -1
- package/dist/{chunk-ZBMPFLOH.js → chunk-Z5KYKXMH.js} +1 -1
- package/dist/{chunk-RFORHGOR.js → chunk-ZAH6QID2.js} +1 -1
- package/dist/{chunk-PXAYMXQN.js → chunk-ZCNNJCTQ.js} +1 -1
- package/dist/chunk-ZVA5F4QC.js +272 -0
- package/dist/{chunk-ERMLZF2C.js → chunk-ZVJD6CUY.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/doctor/instructions.js +1 -1
- package/dist/cli/commands/app/doctor.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-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/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/command-registry.js +1 -1
- package/dist/{conf-store-F4NCJPWK.js → conf-store-H3UAVGN5.js} +1 -1
- package/dist/configs/all.yml +8 -5
- package/dist/configs/recommended.yml +8 -5
- package/dist/data/objects.json +487 -75
- package/dist/data/shopify_system_translations.json +8 -7
- package/dist/data/tags.json +23 -0
- package/dist/{deprecations-PX5KIFDO.js → deprecations-TEUM7CML.js} +1 -1
- package/dist/dist-62I5X3FS.js +1 -0
- package/dist/dist-YHZ5BTYD.js +1 -0
- package/dist/{environments-TLO674UK.js → environments-LAFWOQWO.js} +1 -1
- package/dist/{error-YLDXWEC5.js → error-6ZCGAC5E.js} +1 -1
- package/dist/error-handler-JNCW56EC.js +1 -0
- package/dist/{fs-CDN2NZJC.js → fs-QEWOWUPQ.js} +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{is-global-KBYTYD3Y.js → is-global-UYMEAGDR.js} +1 -1
- package/dist/{local-IBYCFEVA.js → local-Z4ZEMWE4.js} +1 -1
- package/dist/{metadata-LOCKHSUF.js → metadata-ZCQMB5AB.js} +1 -1
- package/dist/{node-package-manager-ESOHDRPJ.js → node-package-manager-HMOTOBDS.js} +1 -1
- package/dist/notifications-system-RT3CY6LZ.js +1 -0
- package/dist/os-G6KDPJMC.js +1 -0
- package/dist/{output-OAORC6TH.js → output-BJCZYDNG.js} +1 -1
- package/dist/{system-VNXEM5E7.js → system-T4H2ISV6.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-CIZHMGKK.js → ui-4MQSY5IN.js} +1 -1
- package/dist/upgrade-4234MIYJ.js +1 -0
- package/dist/version-FRSRSCRX.js +1 -0
- package/dist/{version-JJYR4NOL.js → version-RF7QQXRX.js} +1 -1
- package/dist/{workerd-JWZNKSHU.js → workerd-7E4H2DM3.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/analytics-AL5WLCEC.js +0 -1
- package/dist/chunk-3CFHLIBD.js +0 -7
- package/dist/chunk-4EHFK2OI.js +0 -1
- package/dist/chunk-BJ3JF35I.js +0 -6
- package/dist/chunk-ENEPD4BS.js +0 -1
- package/dist/chunk-EWKIFVW3.js +0 -273
- package/dist/chunk-NNCLTG6A.js +0 -1
- package/dist/chunk-PJH3JJEQ.js +0 -1
- package/dist/chunk-RV4UQZ2W.js +0 -1
- package/dist/dist-WO24PYXH.js +0 -1
- package/dist/dist-X7YIFLSP.js +0 -1
- package/dist/error-handler-SY45FR6A.js +0 -1
- package/dist/notifications-system-EMCOAF3T.js +0 -1
- package/dist/os-XLJNYIZF.js +0 -1
- package/dist/upgrade-AIZVY3E5.js +0 -1
- package/dist/version-CNIDTUMV.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as se}from"./chunk-MPO2T5YQ.js";import{a as ne,b as re,h as oe}from"./chunk-BIV3GWMB.js";import{a as q,d as X}from"./chunk-IAURXPUJ.js";import{E as ee,_ as ie}from"./chunk-T3IMDY72.js";import{h as A,j as te}from"./chunk-4EHFK2OI.js";import{Ta as Z,ma as Y}from"./chunk-TNYPQ2UL.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-UJBMY5WR.js";import{a as ne,b as re,h as oe}from"./chunk-EJJPEWSB.js";import{a as q,d as X}from"./chunk-CNK3ZO2B.js";import{E as ee,_ as ie}from"./chunk-6C5AVMKR.js";import{h as A,j as te}from"./chunk-OAG72Q2O.js";import{Ta as Z,ma as Y}from"./chunk-43FRAUV6.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 +1 @@
|
|
|
1
|
-
import{h as l}from"./chunk-
|
|
1
|
+
import{h as l}from"./chunk-GTAYTMCP.js";import{T as c}from"./chunk-CNK3ZO2B.js";import{h as u}from"./chunk-OAG72Q2O.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s=["live","unpublished","development"];async function x(e,r){let t=await c(e,r);return p(t)}async function p(e){let r=e.storeFqdn,t=(await l(e)).filter(d);if(t.length===0)throw new u(`There are no themes in the ${r} store`);return t.sort(w)}function d(e){return s.includes(e.role)}function w(e,r){return s.indexOf(e.role)-s.indexOf(r.role)}i();function b(e,r,t){return y(e,r,t)??T(e,r,t)}function y(e,r,t){let o=t.role;if(!o)return;let n=`No themes on the store ${e} match the role "${o}"`;return m(r,h=>h.role===o).orThrow(n)}function T(e,r,t){return t.themeIdentifiers.flatMap(n=>{let h=`No themes on the store ${e} match the ID or name "${n}"`;return m(r,f=>`${f.id}`===n||f.name.toLowerCase()===n.toLowerCase()?!0:L(f.name.toLowerCase(),n.toLowerCase())).orThrow(h)})}function m(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new u(o)}}}var a=class{queryProps;constructor(r){this.queryProps=r}get role(){for(let r of s)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function L(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{s as a,x as b,p as c,b as d,a as e};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as g}from"./chunk-
|
|
1
|
+
import{b as g}from"./chunk-K2DP5Z76.js";import{b as y}from"./chunk-4DLRS7MT.js";import{r as u}from"./chunk-CNK3ZO2B.js";import{h as r}from"./chunk-OAG72Q2O.js";import{a as R}from"./chunk-CTNBSUVU.js";import{ua as l,wa as m,wb as v,xb as w}from"./chunk-43FRAUV6.js";import{f as p,i as h}from"./chunk-773TIA5M.js";import{e as A,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",L="X-Shopify-Surface",E="cli",F=["shopify.dev"];async function S(t,e){let c;try{c=new URL(t)}catch{throw new r(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new r(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await u(t,{headers:{Accept:U,[L]:E}});if(!i.ok)throw new r(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let f=await i.text();if(e){let o=p(e);await m(h(o)),await l(o,f),w(`Saved ${t} to ${o}`);return}v(f)}var n=A(R(),1),a=class t extends y{static description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. For finding the relevant pieces of content across shopify.dev instead, use `doc search`.";static examples=[`# fetch the Markdown version of a Shopify.dev page
|
|
2
2
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli`,`# save the document to a file instead of printing it
|
|
3
3
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --output docs/shopify-cli.md`];static flags={...g,url:n.Flags.string({description:"The shopify.dev URL to fetch.",env:"SHOPIFY_FLAG_URL",required:!0}),output:n.Flags.string({description:"Write the document to this file path instead of printing it to stdout.",env:"SHOPIFY_FLAG_OUTPUT"})};async run(){let{flags:e}=await this.parse(t);await S(e.url,e.output)}};export{a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-W4SGAPPR.js";import{a as p}from"./chunk-MYLMGH7Y.js";import{f as c,o as v}from"./chunk-GTAYTMCP.js";import{p as l,v as d}from"./chunk-DO4SRE4M.js";import{b as s,f as h}from"./chunk-K2DP5Z76.js";import{z as a}from"./chunk-6C5AVMKR.js";import{a as w}from"./chunk-CTNBSUVU.js";import{e as F,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function u(e,n){let m=e.name??await c("New name for the theme"),i=await f(n,{header:"Select a theme to rename",filter:{theme:e.theme,development:e.development,live:e.live}});await v(i.id,{name:m},n),a({body:[...e.environment?[{subdued:`Environment: ${e.environment}
|
|
2
2
|
|
|
3
3
|
`}]:[],"The theme",...p(i),"was renamed to",`'${m}'`]})}var t=F(w(),1);var o=class extends d{static summary="Renames an existing theme.";static descriptionWithMarkdown=`Renames a theme in your store.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I}from"./chunk-CTNBSUVU.js";import{b as l}from"./chunk-DPNZWBT5.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as h,g as s}from"./chunk-VKWPEFWQ.js";s();s();import{fileURLToPath as L}from"node:url";async function m(e){let{isDevelopment:o}=await import("./local-
|
|
1
|
+
import{a as I}from"./chunk-CTNBSUVU.js";import{b as l}from"./chunk-DPNZWBT5.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as h,g as s}from"./chunk-VKWPEFWQ.js";s();s();import{fileURLToPath as L}from"node:url";async function m(e){let{isDevelopment:o}=await import("./local-Z4ZEMWE4.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-BWAMUFQ4.js"),t=await import("./lib-2BR2WN7L.js"),{run:i,flush:p,Errors:d,settings:f}=t.default??t;o()&&(f.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await i(e.argv,r),await p()}catch(r){let{errorHandler:u}=await import("./error-handler-JNCW56EC.js");return await u(r),d.handle(r)}}var a=h(I());async function C(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<22){let{renderError:i}=await import("./ui-4MQSY5IN.js");i({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function y(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[l.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function F(e,o=m,n=process.argv,t=process.env,i=process.versions){return y(e,n,t),e.runInCreateMode&&await g(e,n),b(n,t),await C(i),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function g(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-HMOTOBDS.js"),{moduleDirectory:t}=await import("./path-MBXP7ZIC.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(u=>u.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var R={"no-color":a.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:a.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output. May include sensitive data.",env:"SHOPIFY_FLAG_VERBOSE"})},S={json:a.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:l.json})},E={"auth-alias":a.Flags.string({description:"Alias of the Shopify account to use for authentication.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})},A=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return a.Flags.integer({min:1,max:65535,...e,description:o})};function j(e){let o=e.description?.trimEnd(),t=[o&&!o.endsWith(".")?`${o}.`:o,"Required if non interactive."].filter(Boolean).join(" ");return{...e,description:t,requiredIfNonInteractive:!0}}async function U(){let{cacheClear:e}=await import("./conf-store-H3UAVGN5.js");e()}export{F as a,R as b,S as c,E as d,A as e,j as f,U as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-JJJIRCQP.js";import{a as r,b as c}from"./chunk-VBICZDA4.js";import{d as s}from"./chunk-EJJPEWSB.js";import{a}from"./chunk-VJ5YOXKL.js";import{wa as n}from"./chunk-CVW2HMQO.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class d extends a{static hidden=!0;static summary="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.";static descriptionWithMarkdown="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.\n\nWhen `--input` is omitted, the command reads CSV data from stdin. Use `--input <path>` to read from a file. `--input -` is also supported as an explicit stdin path.\n\n- Required CSV columns: `shop_id`, `target_plan_handle`, and `price_behavior`.\n- Optional CSV column: `notification`.\n- Example header: `shop_id,target_plan_handle,price_behavior,notification`.\n- Example row: `123456789,pro,HONOR_BILLING_PRICE,WHEN_REQUIRED`.\n\n`price_behavior` must be `HONOR_BILLING_PRICE` or `PLAN_PRICE`. `notification` can be `OPT_OUT` or `WHEN_REQUIRED` and defaults to `WHEN_REQUIRED` when omitted or blank.\n\nValidation is atomic: the command submits no operations unless the entire CSV is valid. Valid rows are submitted in batches of 250 shops. Preserve every operation GID printed by the command so you can check or cancel the submitted operations.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.\n\nUse `--force` to skip confirmation and immediately submit every valid row. With `--watch`, human-readable output shows accepted identifiers before polling begins, then displays operation progress and the final outcome. With `--json --watch`, the command outputs one structured JSON document after every operation reaches a terminal status.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --input migrations.csv --force","cat migrations.csv | <%= config.bin %> <%= command.id %> --force","<%= config.bin %> <%= command.id %> --input migrations.csv --path ../my-app --config staging --force --json","<%= config.bin %> <%= command.id %> --input migrations.csv --client-id <client-id> --force","<%= config.bin %> <%= command.id %> --input - --force --watch"];static flags={...s};async run(){let{flags:i}=await this.parse(d),{app:m,remoteApp:l}=await n({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),u=await p({action:"schedule",input:i.input??"-",clientId:l.apiKey,skipConfirmation:i.force,watch:i.watch,...i.watch&&!i.json?{onSubmissionAccepted:r}:{}}),e=c(u,{json:i.json,watch:i.watch});return e!==0&&(process.exitCode=e),{app:m}}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-OPOPO7DG.js";import{b as e}from"./chunk-4DLRS7MT.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static description="View the UI kit components that display static output";static hidden=!0;async run(){await o()}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l}from"./chunk-
|
|
1
|
+
import{c as l}from"./chunk-VBICZDA4.js";import{e as u,j as m}from"./chunk-EJJPEWSB.js";import{a as d}from"./chunk-VJ5YOXKL.js";import{wa as p}from"./chunk-CVW2HMQO.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var a=class extends Error{operationId;constructor(t){super(`Migration cancellation for ${t} returned neither an operation nor user errors`),this.name="MigrationCancellationProtocolError",this.operationId=t}};async function f({clientId:i,operationIds:t,cancelOperation:n=m}){return{outcomes:await Promise.all(t.map(async o=>{let e=await n({clientId:i,operationId:o});if(e.userErrors.length>0)return{status:"failed",operationId:o,operation:e.operation,userErrors:e.userErrors};if(!e.operation)throw new a(o);return{status:"success",operationId:o,operation:e.operation}}))}}var s=class i extends d{static hidden=!0;static summary="Cancels app subscription migration operations.";static descriptionWithMarkdown="Cancels app subscription migration operations.\n\nCanceling stops additional unprocessed shops, but does not undo shops that have already been scheduled or migrated. Use `unschedule` for reversible schedules.\n\nRepeat `--id` to cancel every operation GID returned by a multi-batch submission. Use `--json` to output the resulting operation states and per-shop results as structured JSON.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --id <operation-id>","<%= config.bin %> <%= command.id %> --path ../my-app --config staging --id <operation-id-1> --id <operation-id-2>","<%= config.bin %> <%= command.id %> --client-id <client-id> --id <operation-id> --json"];static flags={...u};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:c}=await p({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o=await f({clientId:c.apiKey,operationIds:t.id}),e=l(o,{json:t.json});return e!==0&&(process.exitCode=e),{app:n}}};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u,c as d}from"./chunk-
|
|
1
|
+
import{b as u,c as d}from"./chunk-VETLNJ56.js";import{a as c}from"./chunk-6XLFFOPK.js";import{a as e}from"./chunk-GINXNPAR.js";import{e as n,xa as p}from"./chunk-CVW2HMQO.js";import{b as i}from"./chunk-K2DP5Z76.js";import{z as s}from"./chunk-6C5AVMKR.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var r=class f extends c{static summary="Generate GraphQL types for a function.";static descriptionWithMarkdown="Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";static description=this.descriptionWithoutMarkdown();static flags={...i,...e,...u};async run(){let{flags:t}=await this.parse(f),{app:o}=await p({directory:t.path,userProvidedConfigName:t.config}),m=await d(o,t.path);return await n(m,{stdout:process.stdout,stderr:process.stderr,app:o}),s({headline:"GraphQL types generated successfully."}),{app:o}}};export{r as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o}from"./chunk-
|
|
1
|
+
import{g as o}from"./chunk-K2DP5Z76.js";import{b as s}from"./chunk-4DLRS7MT.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static description="Clear the CLI cache, used to store some API responses and handle notifications status";static hidden=!0;async run(){await o()}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-FY47X4NG.js";import{c as I,i as _,n as k}from"./chunk-OY6L7J53.js";import{a as O}from"./chunk-WAJRWCZY.js";import{b as S,m as b}from"./chunk-GTAYTMCP.js";import{j as g,k as T,l as L,p as R,v as q}from"./chunk-DO4SRE4M.js";import{b as E}from"./chunk-K2DP5Z76.js";import{Aa as x}from"./chunk-CNK3ZO2B.js";import{a as v}from"./chunk-XOYICV6P.js";import{h as a}from"./chunk-OAG72Q2O.js";import{a as V}from"./chunk-CTNBSUVU.js";import{Ab as c,qb as l,sb as d,xb as o}from"./chunk-43FRAUV6.js";import{e as U,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var m=class extends O{context="REPL";constructor(t){super(t),this.themeId=g()}async create(t,n){let s=await super.create(t,n);return await this.uploadThemeAssets(s),s}async findOrCreate(){let t=await this.fetch();if(!t){let n=`Liquid Console (${v})`;t=await this.create(S,n)}return t}setTheme(t){T(t)}removeTheme(){L()}async uploadThemeAssets(t){let n=[{key:"config/settings_data.json",value:"{}"},{key:"config/settings_schema.json",value:"[]"},{key:"snippets/eval.liquid",value:""},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"sections/announcement-bar.liquid",value:""},{key:"templates/index.json",value:JSON.stringify({sections:{announcement:{type:"announcement-bar",settings:{}}},order:["announcement"]})}];await b(t.id,n,this.adminSession)}};r();r();async function A(e){return await G(e)??await $(e)??await H(e)??await Y(e)??void 0}async function G(e){c(`Evaluating snippet - ${e.snippet}`);let t=`{ "type": "display", "value": {{ ${e.snippet} | json }} }`,n=await f({...e,snippet:t}),s=await n.text();return C(n.status,s)?K(s):void 0}async function $(e){c(`Evaluating context - ${e.snippet}`);let t=`{ "type": "context", "value": "{% ${e.snippet.replace(/"/g,'\\"')} %}" }`,n=await f({...e,snippet:t}),s=await n.text();C(n.status,s)&&e.replSession.push(JSON.parse(t))}async function H(e){if(c(`Evaluating assignment context - ${e.snippet}`),re(e.snippet))return e.snippet=`assign ${e.snippet}`,o(d`${l.gray(`> ${e.snippet}`)}`),$(e)}async function Y(e){c(`Evaluating syntax error - ${e.snippet}`);let t="";if(Q(e.snippet)||(t=await(await f({...e,snippet:`{{ ${e.snippet} }}`})).text()),h(t)||(t=await(await f({...e,snippet:`{% ${e.snippet} %}`})).text()),h(t)){let n=t.replace(/ \(snippets\/eval line \d+\)/,"");z(e.snippet,n)}}function z(e,t){if(t.includes("Unknown tag")){o(d`${l.errorText(`Unknown object, property, tag, or filter: '${e}'`)}`);return}let n=j(t);n&&o(d`${l.errorText(n)}`)}async function f(e){let t=B(e);e.url.startsWith("/")||(e.url=`/${e.url}`);let n=await _(e.themeSession,{method:"GET",path:e.url,query:[],themeId:e.themeId,sectionId:"announcement-bar",headers:{},replaceTemplates:{"sections/announcement-bar.liquid":"{% render 'eval' %}","snippets/eval.liquid":`
|
|
2
2
|
${t}
|
|
3
3
|
`}});return X(n)&&te(),Z(n)&&ne(),ee(n)&&se(),n}function B(e){return`[${[...e.replSession.map(n=>JSON.stringify(n)),e.snippet].join(",").replace(/\\"/g,'"')}]`}function K(e){let t=j(e);if(t)return JSON.parse(t)?.find(s=>s.type==="display")?.value}function j(e){let t=e.split(`
|
|
4
4
|
`).slice(1,-1);if(t.length!==0)return t.join("")}function h(e){return e.includes("Liquid syntax error")}function Q(e){return/^\s*assign\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function X(e){return e.status===401||e.status===403}function Z(e){return e.status===430||e.status===429}function ee(e){return e.headers.get("server-timing")?.includes('pageType;desc="404"')??!1}function te(){throw new a("Session expired. Please initiate a new one.")}function ne(){throw new a("Evaluations limit reached. Try again later.")}function se(){throw new a("Page not found. Please provide a valid --url value!")}function re(e){return/^\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function C(e,t){return e===200&&!h(t)}r();function F(e){if(N(e)){o("Object can't be printed, but you can access its fields. Read more at https://shopify.dev/docs/api/liquid.");return}if(e==null){M("null");return}let t=JSON.stringify(e,null,2);M(t)}function N(e){if(Array.isArray(e))return e.length>0?N(e[0]):!1;if(e&&typeof e=="object"){let n=e.error;return typeof n=="string"&&n.includes("json not allowed for this object")}return!1}function M(e){return o(d`${l.cyan(e)}`)}import{createInterface as oe}from"readline";var ie=`Liquid Console doesn't support Liquid delimiters such as '{{ ... }}' or '{% ... %}'.
|