@shopify/cli 4.1.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acorn-LOOAJL3S.js → acorn-7M27BPGP.js} +1 -1
- package/dist/analytics-JH64XI2J.js +1 -0
- package/dist/analytics-MEGKKFGF.js +1 -0
- package/dist/angular-DW5TQVCM.js +4 -0
- package/dist/{babel-URCL33XX.js → babel-I2RLWM7N.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chokidar-G4ONJSK4.js → chokidar-VDIVGBZH.js} +1 -1
- package/dist/chunk-25HJX3L2.js +5 -0
- package/dist/chunk-2EHBJWC6.js +26 -0
- package/dist/chunk-2GAFKG64.js +4 -0
- package/dist/chunk-2GU7OY3H.js +1 -0
- package/dist/{chunk-4IC626OL.js → chunk-2K7FGAT6.js} +1 -1
- package/dist/{chunk-PRVQAHWI.js → chunk-2O22LZKV.js} +1 -1
- package/dist/{chunk-NMBBTTIH.js → chunk-2RBIR3NM.js} +1 -1
- package/dist/chunk-2TMQG2UT.js +1 -0
- package/dist/chunk-2XZBQZ5R.js +7 -0
- package/dist/{chunk-Q4T2T2QE.js → chunk-33OHQUHZ.js} +1 -1
- package/dist/chunk-3AOQKI4B.js +1 -0
- package/dist/{chunk-OBEWZXOQ.js → chunk-3SPDFV5D.js} +1 -1
- package/dist/chunk-3YDYZ232.js +103 -0
- package/dist/chunk-4FFPTEKD.js +1 -0
- package/dist/chunk-4J32OHLY.js +1382 -0
- package/dist/chunk-4QTEPWEJ.js +283 -0
- package/dist/chunk-57PPQKJT.js +15 -0
- package/dist/{chunk-AGNMOFJS.js → chunk-5BKCIDMS.js} +1 -1
- package/dist/{chunk-JUVAGMIH.js → chunk-5C7HDTHJ.js} +1 -1
- package/dist/chunk-5FFHQTRC.js +4 -0
- package/dist/{chunk-2GK56X53.js → chunk-5FVB7JHP.js} +1 -1
- package/dist/{chunk-UYXEA3Y6.js → chunk-5H3VTG77.js} +1 -1
- package/dist/chunk-5O43334U.js +2 -0
- package/dist/chunk-5XDQ76DQ.js +1 -0
- package/dist/{chunk-PD5ZHJWI.js → chunk-636CTEW7.js} +1 -1
- package/dist/chunk-6JKGUQRD.js +1 -0
- package/dist/chunk-6KETAPWL.js +1 -0
- package/dist/{chunk-ULFWK45W.js → chunk-6LWOWDF4.js} +2 -2
- package/dist/chunk-7572RLUP.js +1 -0
- package/dist/chunk-762JWOWJ.js +5 -0
- package/dist/{chunk-IU2ZQ6TE.js → chunk-773TIA5M.js} +1 -1
- package/dist/{chunk-76R52ODR.js → chunk-7D45IAMQ.js} +1 -1
- package/dist/chunk-7FQFEB33.js +370 -0
- package/dist/chunk-7LV55VWE.js +1 -0
- package/dist/{chunk-QUTQDXSL.js → chunk-7UNQOKZW.js} +1 -1
- package/dist/chunk-A27NZMWB.js +1 -0
- package/dist/chunk-A4SBXDZB.js +14 -0
- package/dist/{chunk-4DCQNGUV.js → chunk-A5HKAMAC.js} +10 -10
- package/dist/{chunk-Z35BTAM6.js → chunk-AAK376RT.js} +1 -1
- package/dist/chunk-AERKD4TO.js +3 -0
- package/dist/{chunk-L2MGAEV3.js → chunk-ANBOLDON.js} +2 -2
- package/dist/{chunk-UJVH7FZS.js → chunk-AO3RFGNV.js} +1 -1
- package/dist/{chunk-KHSYW7I4.js → chunk-ATSMK66C.js} +1 -1
- package/dist/chunk-AU5EZQW7.js +5 -0
- package/dist/chunk-AVD3INWF.js +1 -0
- package/dist/chunk-AWEB5AQM.js +1 -0
- package/dist/chunk-AXNAGI32.js +1 -0
- package/dist/chunk-BL46CZ2M.js +2 -0
- package/dist/chunk-BQWK3C47.js +278 -0
- package/dist/chunk-CEHXOWA6.js +3 -0
- package/dist/{chunk-EKXY5COY.js → chunk-CFOXXOO2.js} +1 -1
- package/dist/{chunk-PIBY5DDZ.js → chunk-CRALWNNO.js} +1 -1
- package/dist/chunk-CV5EQGES.js +22 -0
- package/dist/chunk-CX5CC6P5.js +1 -0
- package/dist/chunk-DCLUZFT7.js +2 -0
- package/dist/{chunk-Q33IBIVJ.js → chunk-DNXYKGV2.js} +1 -1
- package/dist/chunk-DTIWUT2T.js +18 -0
- package/dist/{chunk-VICYNG2W.js → chunk-DYNH5SKT.js} +1 -1
- package/dist/chunk-DZQYG32N.js +2 -0
- package/dist/{chunk-FQWB2F75.js → chunk-E7DHELFH.js} +1 -1
- package/dist/chunk-EH7ZTFS4.js +613 -0
- package/dist/{chunk-P6XE4MH5.js → chunk-EJDWYASP.js} +1 -1
- package/dist/chunk-EKVTNWHM.js +1 -0
- package/dist/{chunk-6M3ZYNGO.js → chunk-ET2CGROE.js} +1 -1
- package/dist/chunk-EVZA2TCI.js +3 -0
- package/dist/{chunk-QSTEVZFQ.js → chunk-F3TMLDLC.js} +1 -1
- package/dist/chunk-FIYAECXH.js +28 -0
- package/dist/{chunk-WDC3KIZT.js → chunk-FKIVKNOV.js} +1 -1
- package/dist/chunk-FOFJBRSL.js +11 -0
- package/dist/chunk-FQ5ZZX2G.js +25 -0
- package/dist/chunk-G2LVUM7N.js +6 -0
- package/dist/chunk-G2OHWAY2.js +7 -0
- package/dist/chunk-G3JJLXPH.js +1 -0
- package/dist/chunk-G3RWLAOG.js +1 -0
- package/dist/chunk-G4OQABDT.js +836 -0
- package/dist/{chunk-KLMDWDT2.js → chunk-GB3YC4TI.js} +1 -1
- package/dist/{chunk-OCOY5MV2.js → chunk-GCN4O7HM.js} +1 -1
- package/dist/chunk-GDHD3TGC.js +6 -0
- package/dist/{chunk-JXW374CL.js → chunk-GJXINXSU.js} +11 -11
- package/dist/chunk-GWHV62YT.js +1 -0
- package/dist/chunk-HCTZN7L4.js +2 -0
- package/dist/{chunk-ZSBA6VIC.js → chunk-HDC5V7RY.js} +1 -1
- package/dist/{chunk-7NH7CHVI.js → chunk-HIQHYPLU.js} +1 -1
- package/dist/{chunk-XOTA6JTZ.js → chunk-HOSFU6UP.js} +3 -3
- package/dist/chunk-I22ZTRKK.js +3 -0
- package/dist/chunk-I4R7TML2.js +7 -0
- package/dist/{chunk-EENHXSWU.js → chunk-I5A6BPCP.js} +1 -1
- package/dist/chunk-IWOTLFOY.js +32 -0
- package/dist/{chunk-7UYZQN4V.js → chunk-J3H4LPN6.js} +3 -3
- package/dist/{chunk-XULPJ6UG.js → chunk-J3HX6ZGD.js} +1 -1
- package/dist/chunk-J3JPJCWP.js +1 -0
- package/dist/chunk-J5BRKYGE.js +294 -0
- package/dist/chunk-JAWKLBOB.js +3 -0
- package/dist/{chunk-MCVRONUY.js → chunk-JAWOP4HJ.js} +1 -1
- package/dist/{chunk-ZGK3LGCH.js → chunk-JCIN73BE.js} +1 -1
- package/dist/chunk-JEZ3PGVC.js +1 -0
- package/dist/{chunk-C7BTJ32Z.js → chunk-JJ6RM54S.js} +1 -1
- package/dist/chunk-JK3NIHTX.js +17 -0
- package/dist/chunk-JLE4NBMT.js +1 -0
- package/dist/chunk-JSOGPMWB.js +5 -0
- package/dist/chunk-JUYJZUYU.js +1 -0
- package/dist/chunk-KRQGLK2Q.js +3 -0
- package/dist/{chunk-3VZEETAV.js → chunk-KRZABRYT.js} +1 -1
- package/dist/{chunk-BS3BKORT.js → chunk-L2PC4MUV.js} +1 -1
- package/dist/chunk-LCZDC6EE.js +5 -0
- package/dist/chunk-LXVORHCQ.js +1 -0
- package/dist/chunk-M2YINBHF.js +32 -0
- package/dist/chunk-M7YFD4EV.js +10 -0
- package/dist/chunk-MEIEEENL.js +1 -0
- package/dist/chunk-MIDYZPO4.js +1 -0
- package/dist/chunk-MINZGZ4N.js +1 -0
- package/dist/chunk-MMIHHCMW.js +5 -0
- package/dist/{chunk-PRKBO42R.js → chunk-MPW2YJWU.js} +1 -1
- package/dist/chunk-MRS6LAY7.js +1 -0
- package/dist/chunk-N3CNWCC2.js +19 -0
- package/dist/{chunk-M2D7USAX.js → chunk-N3NE4MVN.js} +1 -1
- package/dist/chunk-N3YTDGFY.js +4 -0
- package/dist/{chunk-MHWV5RQV.js → chunk-N5LVGFDS.js} +2 -2
- package/dist/{chunk-QBSKKQBN.js → chunk-NILXAUUT.js} +1 -1
- package/dist/{chunk-5Y7GIF2W.js → chunk-NJOO5XJV.js} +1 -1
- package/dist/{chunk-ULQG3XQS.js → chunk-NNOSZ447.js} +1 -1
- package/dist/{chunk-6G6TMKXF.js → chunk-NTRAWIEJ.js} +21 -21
- package/dist/chunk-NWXDOCL5.js +1 -0
- package/dist/{chunk-2AJ5FI2K.js → chunk-OU3M32A2.js} +1 -1
- package/dist/chunk-OU4SKQTC.js +5 -0
- package/dist/chunk-OXJBYKMX.js +1 -0
- package/dist/chunk-OZBY45KT.js +1 -0
- package/dist/{chunk-75VPUOC5.js → chunk-P2OI2P2M.js} +1 -1
- package/dist/chunk-PCCK4YTE.js +1 -0
- package/dist/{chunk-6RE2SNCU.js → chunk-PFGYC53K.js} +1 -1
- package/dist/chunk-PMS4MNHB.js +6 -0
- package/dist/chunk-PNP5OKNZ.js +1 -0
- package/dist/{chunk-KN3WTTHZ.js → chunk-PXHY753L.js} +1 -1
- package/dist/chunk-Q73GEVSJ.js +11 -0
- package/dist/{chunk-5WVAHE5E.js → chunk-Q77MM2N2.js} +1 -1
- package/dist/chunk-Q7C44DX5.js +4 -0
- package/dist/chunk-QDVJJKLB.js +1 -0
- package/dist/{chunk-5CH3B62S.js → chunk-RJ5VF3QY.js} +1 -1
- package/dist/{chunk-E3EMHAJB.js → chunk-RKDZGK5K.js} +1 -1
- package/dist/{chunk-TYZXGSHO.js → chunk-RSRYC5ZF.js} +1 -1
- package/dist/chunk-S22NCNAJ.js +1 -0
- package/dist/chunk-S5IFJ737.js +3 -0
- package/dist/chunk-S6B2ADVR.js +8 -0
- package/dist/chunk-S7F5KFQP.js +1 -0
- package/dist/chunk-SSCYLDSX.js +3 -0
- package/dist/{chunk-QFWIDATO.js → chunk-STJ3LWFL.js} +1 -1
- package/dist/chunk-T3ERXB7F.js +8 -0
- package/dist/chunk-T4IV643Z.js +9 -0
- package/dist/chunk-T4NS63K4.js +16 -0
- package/dist/chunk-T6CC5WUU.js +159 -0
- package/dist/{chunk-3TNEIDOD.js → chunk-T7KHS6RF.js} +1 -1
- package/dist/{chunk-QYR5VPQA.js → chunk-TOLPNBZK.js} +1 -1
- package/dist/{chunk-DRFGABEB.js → chunk-TP7E54WN.js} +1 -1
- package/dist/chunk-TPCG6DCA.js +1 -0
- package/dist/{chunk-SXTMSGUE.js → chunk-TRYWVIVJ.js} +1 -1
- package/dist/chunk-TU47HMTL.js +1 -0
- package/dist/chunk-TUNUEOHO.js +3 -0
- package/dist/{chunk-MWY3A7O3.js → chunk-TY6BZTG3.js} +1 -1
- package/dist/chunk-TYMYIUIQ.js +1 -0
- package/dist/chunk-UB26DGTR.js +6 -0
- package/dist/chunk-UC7KMA6W.js +8 -0
- package/dist/chunk-UOHNRH6E.js +7 -0
- package/dist/{chunk-ZR76GGZ6.js → chunk-UQWFDL3F.js} +1 -1
- package/dist/chunk-USLYL5AC.js +1 -0
- package/dist/chunk-UTO4Z6P6.js +567 -0
- package/dist/{chunk-M2ZHFKPN.js → chunk-UU5P2IYU.js} +1 -1
- package/dist/chunk-UYSF234H.js +1 -0
- package/dist/chunk-VE35YELD.js +1 -0
- package/dist/{chunk-WSDN25F5.js → chunk-VI34CKV6.js} +1 -1
- package/dist/chunk-VJ6KDRZI.js +1 -0
- package/dist/{chunk-VBUZWRUL.js → chunk-VJEKDBGZ.js} +1 -1
- package/dist/chunk-VKWPEFWQ.js +1 -0
- package/dist/chunk-VPPWSKOY.js +1 -0
- package/dist/chunk-VRJTLVG3.js +1 -0
- package/dist/chunk-VUMUCNI7.js +1 -0
- package/dist/chunk-W7DDV2EY.js +1 -0
- package/dist/chunk-WA3YC5W4.js +15 -0
- package/dist/chunk-WHNWE7P2.js +1 -0
- package/dist/chunk-WVRGCNBZ.js +1 -0
- package/dist/{chunk-MOA33ZFO.js → chunk-WW7TENNA.js} +1 -1
- package/dist/{chunk-HZA6IAA4.js → chunk-XVUHUA36.js} +1 -1
- package/dist/{chunk-OLZHWPZP.js → chunk-XWPPBOGF.js} +1 -1
- package/dist/chunk-YIRFEW5M.js +1 -0
- package/dist/{chunk-KR6QDE7D.js → chunk-YL3TYQGT.js} +1 -1
- package/dist/{chunk-7MUKLZOL.js → chunk-YLQ3LNNY.js} +3 -3
- package/dist/chunk-YMAWEIUR.js +1 -0
- package/dist/chunk-YPBCSDFQ.js +1 -0
- package/dist/{chunk-KZOBF55B.js → chunk-YSIBRY6C.js} +1 -1
- package/dist/{chunk-KHTV6PBV.js → chunk-YVQXEPHY.js} +1 -1
- package/dist/{chunk-4LNCYIS3.js → chunk-ZDF5N422.js} +1 -1
- package/dist/{chunk-T4M5CWAO.js → chunk-ZG7BVVT2.js} +1 -1
- package/dist/chunk-ZGJ3DFTQ.js +9 -0
- package/dist/{chunk-NKQBEFPS.js → chunk-ZI7LK3LW.js} +1 -1
- package/dist/chunk-ZM75DSIW.js +1 -0
- package/dist/{chunk-URZPVSJZ.js → chunk-ZUKLGZOU.js} +66 -66
- package/dist/cli/commands/app/app-logs/sources.js +1 -2
- 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 -9
- package/dist/cli/commands/app/bulk/status.js +1 -5
- package/dist/cli/commands/app/config/link.js +1 -4
- 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 -3
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -22
- package/dist/cli/commands/app/dev/clean.js +1 -5
- package/dist/cli/commands/app/dev.js +1 -320
- package/dist/cli/commands/app/env/pull.js +1 -11
- 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 -16
- package/dist/cli/commands/app/function/replay.js +1 -5
- 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 -5
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -4
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -11
- package/dist/cli/commands/app/init.js +1 -10
- package/dist/cli/commands/app/logs.js +1 -2
- package/dist/cli/commands/app/release.js +1 -4
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -25
- 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/constants.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +12 -0
- package/dist/cli/commands/doc/fetch.js +1 -0
- package/dist/cli/commands/doc/search.d.ts +13 -0
- package/dist/cli/commands/doc/search.js +1 -0
- 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.d.ts +4 -0
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -15
- package/dist/cli/commands/theme/delete.js +1 -7
- package/dist/cli/commands/theme/dev.js +1 -26
- package/dist/cli/commands/theme/duplicate.js +1 -32
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -8
- 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 -3
- package/dist/cli/commands/theme/open.js +1 -8
- package/dist/cli/commands/theme/package.js +1 -7
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -3
- package/dist/cli/commands/theme/publish.js +1 -7
- package/dist/cli/commands/theme/pull.js +1 -3
- package/dist/cli/commands/theme/push.js +1 -28
- package/dist/cli/commands/theme/rename.js +1 -6
- package/dist/cli/commands/theme/share.js +1 -3
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
- package/dist/cli/services/commands/doc/fetch.js +45 -0
- package/dist/cli/services/commands/doc/search.d.ts +1 -0
- package/dist/cli/services/commands/doc/search.js +47 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-UY3MDGGA.js +1 -0
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/{custom-oclif-loader-DVFFWCBV.js → custom-oclif-loader-3AICQCNU.js} +1 -1
- package/dist/data/filters.json +60 -0
- package/dist/data/latest.json +1 -1
- package/dist/data/setting.json +29 -9
- package/dist/data/shopify_system_translations.json +71 -19
- package/dist/data/tags.json +3 -3
- package/dist/deprecations-KNUMDRIU.js +1 -0
- package/dist/{devtools-OLOT2NY4.js → devtools-37DE4MUR.js} +1 -1
- package/dist/{devtools-UFRKBFGI.js → devtools-WAWU5KQL.js} +1 -1
- package/dist/dist-C5IV2YDQ.js +1 -0
- package/dist/dist-VL4KZWV2.js +1 -0
- package/dist/environments-YPRVO2CF.js +1 -0
- package/dist/error-XRBQTNFM.js +1 -0
- package/dist/error-handler-NI7D6GSY.js +1 -0
- package/dist/{estree-KI7NUW53.js → estree-JV5M77BA.js} +2 -2
- package/dist/{flow-MLHT7MTJ.js → flow-N4JYPYMQ.js} +1 -1
- package/dist/fs-LJWVNO4H.js +1 -0
- package/dist/{glimmer-HAJ4HQCW.js → glimmer-JEV3BXHR.js} +1 -1
- package/dist/{graphql-F7IHGXDT.js → graphql-DTF6MHYF.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/html-LVOJ3RQS.js +25 -0
- package/dist/{http-proxy-node16-Q5DZMBHC.js → http-proxy-node16-X2WAMUT5.js} +1 -1
- package/dist/index.js +23 -1175
- package/dist/is-global-W6ALVC5L.js +1 -0
- package/dist/is-wsl-UEMXYJPN.js +1 -0
- package/dist/{latest-version-EFWBOTWM.js → latest-version-32HXMWJ7.js} +1 -1
- package/dist/lib-AIKYSHWL.js +1 -0
- package/dist/lib-O5EZ4NVT.js +1 -0
- package/dist/lib-Q4PWEMFD.js +1 -0
- package/dist/lib-QJDPPAWN.js +1 -0
- package/dist/{local-MTKXSZ3I.js → local-GKEWZAIV.js} +1 -1
- package/dist/local-storage-ZOZMA22B.js +1 -0
- package/dist/{markdown-PLKL4IZK.js → markdown-J6CE6POI.js} +2 -2
- package/dist/{meriyah-AYZQ3BGY.js → meriyah-PNQQZQYI.js} +1 -1
- package/dist/metadata-UEUN64TK.js +1 -0
- package/dist/{morph-EMYAITFM.js → morph-CGOZEPPZ.js} +4 -4
- package/dist/{multipart-parser-Q4QJZK3V.js → multipart-parser-5NSSTW27.js} +1 -1
- package/dist/node-package-manager-4ASQQIIF.js +1 -0
- package/dist/notifications-system-HLXJCAMG.js +1 -0
- package/dist/{npa-ICFSA3NL.js → npa-A4YSCQ5Q.js} +1 -1
- package/dist/{open-VA7TLUIL.js → open-KLSGXBIW.js} +1 -1
- package/dist/out-CDCY25QC.js +1 -0
- package/dist/output-S6E37GJQ.js +1 -0
- package/dist/{path-CWUNINMX.js → path-MBXP7ZIC.js} +1 -1
- package/dist/{postcss-3FJQPJI2.js → postcss-Q36SHOML.js} +2 -2
- package/dist/{prettier-NVRHEAFO.js → prettier-EGVCP5CY.js} +1 -1
- package/dist/{source-map-3K6Y2OMO.js → source-map-E7FCCJL7.js} +1 -1
- package/dist/system-YQZNGSWB.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-5R4Y7PXE.js +1 -0
- package/dist/{typescript-ODJ335NU.js → typescript-WYPDGPSV.js} +1 -1
- package/dist/ui-D2FFWRK7.js +1 -0
- package/dist/upgrade-TVTCFMXM.js +1 -0
- package/dist/version-J6MDN7BZ.js +1 -0
- package/dist/version-RIRW5EXQ.js +1 -0
- package/dist/workerd-QOTT6UCO.js +18 -0
- package/dist/{yaml-BIHS2GQW.js → yaml-6KWCJ64X.js} +1 -1
- package/oclif.manifest.json +442 -9
- package/package.json +18 -12
- package/dist/analytics-5TEIW43T.js +0 -1
- package/dist/analytics-GG7CYCGL.js +0 -1
- package/dist/angular-VRDO2DBE.js +0 -4
- package/dist/chunk-3D4JXJPS.js +0 -2
- package/dist/chunk-3NBK56IK.js +0 -1
- package/dist/chunk-4ZGSSQC6.js +0 -1
- package/dist/chunk-54CAKCYR.js +0 -144
- package/dist/chunk-5UHQVR2Z.js +0 -1
- package/dist/chunk-67MH4AXG.js +0 -1
- package/dist/chunk-6CYMJ76C.js +0 -9
- package/dist/chunk-6HBRBQAN.js +0 -6
- package/dist/chunk-6ITDI2SD.js +0 -1
- package/dist/chunk-6SF3ZETE.js +0 -1
- package/dist/chunk-6WL4GA2M.js +0 -15
- package/dist/chunk-7ESSIN27.js +0 -567
- package/dist/chunk-7QIOUDCX.js +0 -8
- package/dist/chunk-7ZT57XT7.js +0 -2
- package/dist/chunk-AKML26N3.js +0 -7
- package/dist/chunk-C2IK2HY3.js +0 -4
- package/dist/chunk-CBXSPL4W.js +0 -1
- package/dist/chunk-CEIQFLCN.js +0 -1
- package/dist/chunk-CERXUPGC.js +0 -14
- package/dist/chunk-DCPBRWVC.js +0 -1
- package/dist/chunk-DN2IE3VY.js +0 -1
- package/dist/chunk-EQU4MUQJ.js +0 -1
- package/dist/chunk-F2QU6WWX.js +0 -1
- package/dist/chunk-FFQ5EWII.js +0 -294
- package/dist/chunk-FKMC5OFF.js +0 -1
- package/dist/chunk-FUOIGXI4.js +0 -1
- package/dist/chunk-FYFNUDOC.js +0 -19
- package/dist/chunk-G4BPGWJC.js +0 -1
- package/dist/chunk-GVQIPEZT.js +0 -1
- package/dist/chunk-GZS44BUW.js +0 -102
- package/dist/chunk-HIBX234C.js +0 -6
- package/dist/chunk-HRUGYZZ4.js +0 -2
- package/dist/chunk-HUIJMGVJ.js +0 -586
- package/dist/chunk-IX5ICOBV.js +0 -7
- package/dist/chunk-IZ3C5J7G.js +0 -5
- package/dist/chunk-JAO53IH2.js +0 -1
- package/dist/chunk-JCL2RRU6.js +0 -1
- package/dist/chunk-JQJBBXMX.js +0 -17
- package/dist/chunk-K2WUCOQJ.js +0 -32
- package/dist/chunk-K6CTUBFC.js +0 -12
- package/dist/chunk-KKTW6ZCA.js +0 -5
- package/dist/chunk-LDGAHMS7.js +0 -159
- package/dist/chunk-M3RYUB22.js +0 -1
- package/dist/chunk-M56NDIMD.js +0 -1
- package/dist/chunk-MWGBTOO3.js +0 -1
- package/dist/chunk-N5PQPIBF.js +0 -374
- package/dist/chunk-NF2ABOOU.js +0 -1
- package/dist/chunk-NPEVESCV.js +0 -3
- package/dist/chunk-OTY24J2W.js +0 -1
- package/dist/chunk-OY3PNHPZ.js +0 -103
- package/dist/chunk-PAP22IQO.js +0 -264
- package/dist/chunk-PYVAWAUO.js +0 -5
- package/dist/chunk-QA23HIH4.js +0 -1
- package/dist/chunk-S6EJHWJL.js +0 -1
- package/dist/chunk-SIMFNECG.js +0 -1
- package/dist/chunk-T542UQBY.js +0 -1
- package/dist/chunk-TQ6HYDVC.js +0 -1
- package/dist/chunk-UHJYPEY2.js +0 -1
- package/dist/chunk-UJXUSRQK.js +0 -1
- package/dist/chunk-UWJ73J4B.js +0 -1
- package/dist/chunk-UXVZ2P63.js +0 -1411
- package/dist/chunk-VPRTJUIN.js +0 -1
- package/dist/chunk-WFXRSKRK.js +0 -1
- package/dist/chunk-XEFQQPL4.js +0 -1
- package/dist/chunk-XITQULK4.js +0 -3
- package/dist/chunk-XONFGLJQ.js +0 -847
- package/dist/chunk-XR6GMMEU.js +0 -1
- package/dist/chunk-XXVEHDVO.js +0 -1
- package/dist/chunk-Y7JGYGV7.js +0 -1
- package/dist/chunk-YOZNRLFC.js +0 -1
- package/dist/chunk-YTNDFQJT.js +0 -3
- package/dist/chunk-ZBRRJDGW.js +0 -1
- package/dist/chunk-ZTMSBSYD.js +0 -1
- package/dist/conf-store-BMZFATRQ.js +0 -1
- package/dist/deprecations-7LHRXPXU.js +0 -1
- package/dist/dist-LDXPBYSZ.js +0 -1
- package/dist/dist-V63ILV6L.js +0 -1
- package/dist/environments-5X7S2O5U.js +0 -1
- package/dist/error-ZRLNNGIQ.js +0 -1
- package/dist/error-handler-PRZFHPRG.js +0 -1
- package/dist/fs-H7V6IRSH.js +0 -1
- package/dist/html-VSSXOZOQ.js +0 -25
- package/dist/is-global-IOWPCT2U.js +0 -1
- package/dist/is-wsl-FVUIXDOK.js +0 -1
- package/dist/lib-5L7UKDEK.js +0 -1
- package/dist/lib-C3VO2BQW.js +0 -1
- package/dist/lib-QB6I6CTC.js +0 -1
- package/dist/lib-WU3FEA6I.js +0 -1
- package/dist/local-storage-CYEL4MXF.js +0 -1
- package/dist/metadata-NOVBMKLM.js +0 -1
- package/dist/node-package-manager-N5CVNHA3.js +0 -1
- package/dist/notifications-system-YX2GPLDW.js +0 -1
- package/dist/out-WLY6KV4B.js +0 -1
- package/dist/output-Q46DT46U.js +0 -1
- package/dist/system-E6Q3OBX3.js +0 -1
- package/dist/typescript-K5CWIA4V.js +0 -1
- package/dist/ui-WRS2IDPP.js +0 -1
- package/dist/upgrade-TKUN2M5P.js +0 -1
- package/dist/version-5W5RVAPA.js +0 -1
- package/dist/version-BQJ3FPXD.js +0 -1
- package/dist/workerd-GOK6GWEX.js +0 -18
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{l as O}from"./chunk-NTRAWIEJ.js";import{d as E}from"./chunk-TPCG6DCA.js";import{Pb as i,Qb as m,Z as b,da as N}from"./chunk-7FQFEB33.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();u();var l=class{constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:f,fuelConsumed:c,target:A,errorMessage:S,errorType:w,inputQueryVariablesMetafieldValue:g,inputQueryVariablesMetafieldNamespace:I,inputQueryVariablesMetafieldKey:C}){this.export=e,this.input=r,this.inputBytes=o,this.output=n,this.outputBytes=s,this.logs=a,this.functionId=f,this.fuelConsumed=c,this.target=A,this.errorMessage=S,this.errorType=w,this.inputQueryVariablesMetafieldValue=g,this.inputQueryVariablesMetafieldNamespace=I,this.inputQueryVariablesMetafieldKey=C}},h=class{constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:o,httpResponse:n}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=o,this.httpResponse=n}},_;(function(t){t[t.NoCachedResponse=0]="NoCachedResponse",t[t.CacheAboutToExpire=1]="CacheAboutToExpire",t[t.Unknown=2]="Unknown"})(_||(_={}));var d=class{constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:o,httpRequest:n,httpResponse:s,error:a}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=o,this.httpRequest=n,this.httpResponse=s,this.error=a}};u();function R(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function M(t,e){return e?.deep&&R(t)||e?.deep&&Array.isArray(t)?p(t,e):t}function p(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?p(r,e):r);if(R(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=M(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,U="function_run",z="function_network_access",V="function_network_access.response_from_cache",q="function_network_access.request_execution_in_background",J="function_network_access.request_execution",Z="no_cached_response",ee="cached_response_about_to_expire";function te(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&x(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function re(t){let e=JSON.parse(t);return new h({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var k={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:k[e.reason]??_.Unknown,httpRequest:e.http_request})}function oe(t){let e=JSON.parse(t);return new y({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ne=async t=>{let{errors:e}=t.response,r=L,o=null,n="not_attempted";if(e.length>0)if(i(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){i(`Failed to resubscribe to app logs: ${s}`),r=T,n="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=T,t.onThrottle(r)):(r=P,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:o,resubscribeResult:n}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var ie=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:o=!0})=>{let{cursor:n,...s}=t,a=p({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
|
|
2
|
+
`).filter(Boolean),a.payload.inputQueryVariablesMetafieldValue&&(a.payload.inputQueryVariablesMetafieldValue=x(a.payload.inputQueryVariablesMetafieldValue))),o?JSON.stringify(a,null,2):JSON.stringify(a)},pe=(t,e)=>{let r=p(JSON.parse(t));return e===U?new l(r):e===V?new h(r):e===q?new d(r):e===J?new y(r):r},ce=async(t,e,r,o)=>{let n=await t.subscribeToAppLogs(e,r);if(!n.appLogsSubscribe)throw new E("Failed to subscribe to app logs: No response received");let{jwtToken:s,success:a,errors:f}=n.appLogsSubscribe;if(i(`Token: ${s}
|
|
3
|
+
`),i(`API Key: ${e.apiKey}
|
|
4
|
+
`),f&&f.length>0){let c=f.join(", ");throw await O({stripAnsi:!1},()=>{m(`Errors subscribing to app logs: ${c}`,o),m("App log streaming is not available in this session.",o)}),new E(c)}else{if(!s)throw new E("Failed to subscribe to app logs: No response received");let c=Array.isArray(e.shopIds)?e.shopIds:[e.shopIds];i(`Subscribed to App Events for shop ID(s) ${c.join(", ")}`),a!==void 0&&i(`Success: ${a}
|
|
5
|
+
`)}return s};function ue(t){try{if(typeof t=="string"){let e=JSON.parse(t);return JSON.stringify(e,null,2)}else return typeof t=="object"&&t!==null?JSON.stringify(t,null,2):void 0}catch(e){throw new Error(`Error parsing JSON: ${e}`)}}var x=t=>{try{return JSON.parse(t)}catch{return t}};export{l as a,h as b,_ as c,d,y as e,p as f,L as g,P as h,H as i,W as j,U as k,z as l,V as m,q as n,J as o,Z as p,ee as q,te as r,re as s,se as t,oe as u,ne as v,ae as w,ie as x,pe as y,ce as z,ue as A};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{c as v}from"./chunk-DZQYG32N.js";import{a as y}from"./chunk-WHNWE7P2.js";import{a as c}from"./chunk-AVD3INWF.js";import{a as u}from"./chunk-MIDYZPO4.js";import{d as f}from"./chunk-VJ6KDRZI.js";import{k as p,q as m}from"./chunk-TUNUEOHO.js";import{xa as h}from"./chunk-G4OQABDT.js";import{b as l,d}from"./chunk-OXJBYKMX.js";import{r as O}from"./chunk-T6CC5WUU.js";import{e as F,g as a}from"./chunk-VKWPEFWQ.js";a();var t=F(O(),1);var w,o=class extends m{async command(r,n){let{ignore:g=[],only:_=[]}=r;h("theme-command:dev:single-env:authenticated");let i,e;if(r.theme){let s={filter:{theme:r.theme}};i=await u(n,s),e={...r,theme:i.id.toString(),store:n.storeFqdn}}else{i=await new c(n).findOrCreate();let s=r["theme-editor-sync"]&&i.createdAtRuntime;e={...r,theme:i.id.toString(),store:n.storeFqdn,"overwrite-json":s}}await f(i,"start development mode",r["allow-live"])&&(await v({adminSession:n,commandConfig:this.config,directory:e.path,store:e.store,password:e.password,storePassword:e["store-password"],theme:i,listing:e.listing,host:e.host,port:e.port,"live-reload":e["live-reload"],"error-overlay":e["error-overlay"],force:e.force,open:e.open,"theme-editor-sync":e["theme-editor-sync"],"standard-events-inspector":e["standard-events-inspector"],noDelete:e.nodelete,ignore:g,only:_,notify:e.notify}),await y({path:e.path,password:e.password,store:e.store,force:e.force,verbose:e.verbose,noColor:e["no-color"],silent:!0}))}};w=o;o.summary="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";o.descriptionWithMarkdown=`
|
|
2
|
+
Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.
|
|
3
|
+
|
|
4
|
+
This command returns the following information:
|
|
5
|
+
|
|
6
|
+
- A link to your development theme at http://127.0.0.1:9292. This URL can hot reload local changes to CSS and sections, or refresh the entire page when a file changes, enabling you to preview changes in real time using the store's data.
|
|
7
|
+
|
|
8
|
+
You can specify a different network interface and port using \`--host\` and \`--port\`.
|
|
9
|
+
|
|
10
|
+
- A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.
|
|
11
|
+
|
|
12
|
+
- A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with other developers.
|
|
13
|
+
|
|
14
|
+
If you already have a development theme for your current environment, then this command replaces the development theme with your local theme. You can override this using the \`--theme-editor-sync\` flag.
|
|
15
|
+
|
|
16
|
+
> Note: You can't preview checkout customizations using http://127.0.0.1:9292.
|
|
17
|
+
|
|
18
|
+
Development themes are deleted when you run \`shopify auth logout\`. If you need a preview link that can be used after you log out, then you should [share](https://shopify.dev/docs/api/shopify-cli/theme/theme-share) your theme or [push](https://shopify.dev/docs/api/shopify-cli/theme/theme-push) to an unpublished theme on your store.
|
|
19
|
+
|
|
20
|
+
You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).`;o.description=w.descriptionWithoutMarkdown();o.flags={...l,...p,host:t.Flags.string({description:"Set which network interface the web server listens on. The default value is 127.0.0.1.",env:"SHOPIFY_FLAG_HOST"}),"live-reload":t.Flags.string({description:`The live reload mode switches the server behavior when a file is modified:
|
|
21
|
+
- hot-reload Hot reloads local changes to CSS and sections (default)
|
|
22
|
+
- full-page Always refreshes the entire page
|
|
23
|
+
- off Deactivate live reload`,default:"hot-reload",options:["hot-reload","full-page","off"],env:"SHOPIFY_FLAG_LIVE_RELOAD"}),"error-overlay":t.Flags.string({description:`Controls the visibility of the error overlay when an theme asset upload fails:
|
|
24
|
+
- silent Prevents the error overlay from appearing.
|
|
25
|
+
- default Displays the error overlay.
|
|
26
|
+
`,options:["silent","default"],default:"default",env:"SHOPIFY_FLAG_ERROR_OVERLAY"}),poll:t.Flags.boolean({hidden:!0,description:"Force polling to detect file changes.",env:"SHOPIFY_FLAG_POLL"}),"theme-editor-sync":t.Flags.boolean({description:"Synchronize Theme Editor updates in the local theme files.",env:"SHOPIFY_FLAG_THEME_EDITOR_SYNC"}),"standard-events-inspector":t.Flags.boolean({description:"Inject the standard events inspector into storefront HTML.",env:"SHOPIFY_FLAG_STANDARD_EVENTS_INSPECTOR",default:!1}),port:d({description:"Local port to serve theme preview from.",env:"SHOPIFY_FLAG_PORT"}),theme:t.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),listing:t.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"}),nodelete:t.Flags.boolean({char:"n",description:"Prevents files from being deleted in the remote theme when a file has been deleted locally. This applies to files that are deleted while the command is running, and files that have been deleted locally before the command is run.",env:"SHOPIFY_FLAG_NODELETE"}),only:t.Flags.string({char:"o",multiple:!0,description:"Hot reload only files that match the specified pattern.",env:"SHOPIFY_FLAG_ONLY"}),ignore:t.Flags.string({char:"x",multiple:!0,description:"Skip hot reloading any files that match the specified pattern.",env:"SHOPIFY_FLAG_IGNORE"}),force:t.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),notify:t.Flags.string({description:"The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.",env:"SHOPIFY_FLAG_NOTIFY"}),open:t.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),"store-password":t.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),"allow-live":t.Flags.boolean({description:"Allow development on a live theme.",char:"a",env:"SHOPIFY_FLAG_ALLOW_LIVE",default:!1})};o.multiEnvironmentsFlags=null;var R=o;export{R as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as L}from"./chunk-OZBY45KT.js";import{a as M}from"./chunk-EKVTNWHM.js";import{a as C}from"./chunk-5BKCIDMS.js";import{F as j,Fa as E}from"./chunk-4QTEPWEJ.js";import{e as I}from"./chunk-CFOXXOO2.js";import{a as J}from"./chunk-A5HKAMAC.js";import{R as h,da as g,ga as A,z as y}from"./chunk-G4OQABDT.js";import{b as O}from"./chunk-OXJBYKMX.js";import{D,E as f,u as T}from"./chunk-NTRAWIEJ.js";import{g as R}from"./chunk-TPCG6DCA.js";import{r as z}from"./chunk-T6CC5WUU.js";import{Fb as k,Hb as m,Mb as v}from"./chunk-7FQFEB33.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();s();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"30"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetafieldForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetafieldForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetafieldDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}},{kind:"Field",name:{kind:"Name",value:"customerAccount"}}]}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adminFilterable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]};s();async function Q(e){let i="Admin",n=I(e.storeFqdn,"unstable");return{token:e.token,api:i,url:n}}async function w(e){return A({query:e.query,...await Q(e.session),variables:e.variables,autoRateLimitRestore:e.autoRateLimitRestore})}s();var V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metaobjectDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaobjectDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetaobjectForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetaobjectForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetaobjectDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}}]}},{kind:"Field",name:{kind:"Name",value:"displayNameKey"}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publishable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"translatable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"renderable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaTitleKey"}},{kind:"Field",name:{kind:"Name",value:"metaDescriptionKey"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"fieldDefinitions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"required"}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]}}]};var $=_(J(),1);var Z={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",customer:"CUSTOMER",delivery_customization:"DELIVERY_CUSTOMIZATION",delivery_method:"DELIVERY_METHOD",delivery_option_generator:"DELIVERY_OPTION_GENERATOR",discount:"DISCOUNT",draft_order:"DRAFTORDER",fulfillment_constraint_rule:"FULFILLMENT_CONSTRAINT_RULE",gift_card_transaction:"GIFT_CARD_TRANSACTION",order_routing_location_rule:"ORDER_ROUTING_LOCATION_RULE",payment_customization:"PAYMENT_CUSTOMIZATION",selling_plan:"SELLING_PLAN",shop:"SHOP",validation:"VALIDATION",variant:"PRODUCTVARIANT",cart_transform:"CARTTRANSFORM"};async function q({query:e,session:i,toNodes:n,toVariables:t,performQuery:d=a=>w({query:e,session:i,variables:a,autoRateLimitRestore:!0})}){let a;try{let o=n(await d(t(a))),l=[];for(l.push(...o.nodes);o.pageInfo.hasNextPage;)a=o.pageInfo.endCursor,o=n(await d(t(a))),l.push(...o.nodes);return{status:"ok",items:l}}catch(o){if(o instanceof Error&&o.message.includes("ACCESS_DENIED"))return{status:"scope_error"};throw o}}function x(e,i){let n="";for(let t of e)n=(0,$.updateTomlValues)(n,t);return`# ${i}
|
|
2
|
+
${n}`}function X(e,i){let n=i.map(le).map(a=>{switch(a.status){case"ok":{let{typeName:o,patches:l}=a;return x(l,`type: $app:${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null),t=e.flatMap(({items:a,ownerType:o,graphQLOwner:l})=>a.map(r=>({result:oe(r,o),graphQLOwner:l}))).map(({result:a,graphQLOwner:o})=>{switch(a.status){case"ok":{let{namespace:l,key:r,patches:b}=a;return x(b,`namespace: ${l==="app"?"$app":`$app:${l}`} key: ${r} owner_type: ${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null);return{tomlContent:[...n,...t].join(`
|
|
3
|
+
`),metafieldCount:t.length,metaobjectCount:n.length}}async function K(e){let i=await de(e),n=i.storeFqdn,t=await ne(i),d=await ie(i);e.includeExistingDeclaredDefinitions||(t=te(t,e.appConfiguration),d=ae(d,e.appConfiguration));let{tomlContent:a,metafieldCount:o,metaobjectCount:l}=X(t,d);ee(o,l,n,a)}function ee(e,i,n,t){T({headline:"Conversion to TOML complete.",body:["Converted",{warn:`${e} metafields`},"and",{warn:`${i} metaobjects`},"from",{warn:n},"into TOML, ready for you to copy."],orderedNextSteps:!0,nextSteps:["Review the suggested TOML carefully before applying.",["Missing sections? Make sure your app has the required access scopes to load metafields and metaobjects (e.g.",{command:"read_customers"},"to load customer metafields,",{command:"read_metaobject_definitions"},"to load metaobjects.)"],["Missing definitions? Only metafields and metaobjects that are app-reserved (using",{command:"$app"},") will be converted."],["When you're ready, add the generated TOML to your app's configuration file and test out changes with the",{command:"shopify app dev"},"command."]]}),ue(t)}async function ne(e){let i=[];return await D(Object.entries(Z).map(([n,t])=>({title:m`Loading ${k.green(n)} metafields`,task:async()=>{let d=await q({query:P,session:e,toNodes:a=>a.metafieldDefinitions,toVariables:a=>({ownerType:t,after:a})});i.push({metafields:d,ownerType:n,graphQLOwner:t})}}))),i.map(({metafields:n,ownerType:t,graphQLOwner:d})=>n.status==="ok"?{ownerType:t,items:n.items,graphQLOwner:d}:null).filter(n=>n!==null)}async function ie(e){let i=await f({title:m`Loading ${k.green("metaobjects")}`,task:async()=>q({query:V,session:e,toNodes:n=>n.metaobjectDefinitions,toVariables:n=>({after:n})})});return i.status==="ok"?i.items:[]}function te(e,i){return e.map(n=>{let t=n.items.filter(d=>!U(i,[n.ownerType,"metafields",p(d.namespace)??"",d.key]));return t.length>0?{...n,items:t}:null}).filter(n=>n!==null)}function ae(e,i){return e.filter(n=>!U(i,["metaobjects","app",p(n.type)??""]))}function U(e,i){let n=e;for(let t of i){if(!n[t])return!1;n=n[t]}return!0}async function de(e){let{remoteApp:i,store:n}=e,t=i.apiSecretKeys[0]?.secret;if(!t)throw new R("No API secret keys found for app");return await h(n.shopDomain,i.apiKey,t)}function p(e){if(!e.match(/^app--\d+/))return null;let i="app";return e.match(/^app--\d+--/)&&(i=e.replace(/^app--\d+--/,"")),i}function oe(e,i){let n=p(e.namespace);if(!n)return{status:"not_app_reserved"};let t=e.key,d=se(e),a=me(d,i,n,t);return{status:"ok",key:t,namespace:n,patches:a}}function le(e){let i=p(e.type);if(!i)return{status:"not_app_reserved"};let n=re(e,i),t=ce(n,i);return{status:"ok",typeName:i,patches:t}}function se(e){let i={name:e.name===e.key?void 0:e.name,type:e.type.name,description:e.description??void 0,capabilities:u({admin_filterable:e.capabilities.adminFilterable.enabled||void 0}),access:u({admin:Y(e.access.admin),storefront:H(e.access.storefront),customer_account:pe(e.access.customerAccount)}),validations:B(e.validations)},{type:n,validations:t}=G(i.type,i.validations);return i.type=n,i.validations=t,i}function re(e,i){return{name:e.name===i?void 0:e.name,description:e.description??void 0,display_name_field:e.displayNameKey??void 0,access:u({admin:Y(e.access.admin),storefront:H(e.access.storefront)}),capabilities:u({translatable:e.capabilities.translatable.enabled||void 0,publishable:e.capabilities.publishable.enabled||void 0,renderable:e.capabilities.renderable?.enabled||void 0,renderable_meta_title_field:e.capabilities.renderable?.data?.metaTitleKey??void 0,renderable_meta_description_field:e.capabilities.renderable?.data?.metaDescriptionKey??void 0}),fields:Object.fromEntries(e.fieldDefinitions.map(n=>{let t={type:n.type.name,description:n.description??void 0,name:n.name===n.key?void 0:n.name,required:n.required||void 0,validations:B(n.validations)},{type:d,validations:a}=G(t.type,t.validations);return t.type=d,t.validations=a,[n.key,t]}))}}function G(e,i){if(!i)return{type:e,validations:void 0};if(i.metaobject_definition_type&&typeof i.metaobject_definition_type=="string"){let n=p(i.metaobject_definition_type);return{type:`${e}<$app:${n}>`,validations:u({...i,metaobject_definition_type:void 0})}}if(i.metaobject_definition_types&&Array.isArray(i.metaobject_definition_types)&&i.metaobject_definition_types.every(n=>typeof n=="string")){let n=i.metaobject_definition_types.map(t=>p(t));return{type:`${e}<${n.map(t=>`$app:${t}`).join(",")}>`,validations:u({...i,metaobject_definition_types:void 0})}}return{type:e,validations:i}}function B(e){let i=n=>{try{return JSON.parse(n)}catch{return n}};return u(Object.fromEntries(e.filter(n=>n.value!==void 0&&n.name!=="metaobject_definition_id"&&n.name!=="metaobject_definition_ids").map(n=>[n.name,n.value?i(n.value):void 0])))}function me(e,i,n,t){let d=[[[i,"metafields",n,t,"name"],e.name],[[i,"metafields",n,t,"type"],e.type],[[i,"metafields",n,t,"description"],e.description]],a=[[[i,"metafields",n,t,"access","admin"],e.access?.admin],[[i,"metafields",n,t,"access","storefront"],e.access?.storefront],[[i,"metafields",n,t,"access","customer_account"],e.access?.customer_account],[[i,"metafields",n,t,"capabilities","admin_filterable"],e.capabilities?.admin_filterable||void 0]];return e.validations&&W(e.validations).forEach(({validationKey:l,actualValue:r})=>{d.push([[i,"metafields",n,t,"validations",l],r])}),[N(d),N(a)]}function ce(e,i){let n=[[["metaobjects","app",i,"name"],e.name===i?void 0:e.name],[["metaobjects","app",i,"description"],e.description],[["metaobjects","app",i,"display_name_field"],e.display_name_field]],t=[[["metaobjects","app",i,"access","admin"],e.access?.admin],[["metaobjects","app",i,"access","storefront"],e.access?.storefront]];return e.capabilities?.translatable&&t.push([["metaobjects","app",i,"capabilities","translatable"],!0]),e.capabilities?.publishable&&t.push([["metaobjects","app",i,"capabilities","publishable"],!0]),e.capabilities?.renderable&&(t.push([["metaobjects","app",i,"capabilities","renderable"],!0]),e.capabilities?.renderable_meta_title_field&&t.push([["metaobjects","app",i,"capabilities","renderable_meta_title_field"],e.capabilities.renderable_meta_title_field]),e.capabilities?.renderable_meta_description_field&&t.push([["metaobjects","app",i,"capabilities","renderable_meta_description_field"],e.capabilities.renderable_meta_description_field])),Object.entries(e.fields).forEach(([d,a])=>{if(typeof a=="string")n.push([["metaobjects","app",i,"fields",d],a]);else{let o=Object.fromEntries(Object.entries(a).filter(([l,r])=>r!==void 0));Object.keys(o).length===1?n.push([["metaobjects","app",i,"fields",d],a.type]):(n.push([["metaobjects","app",i,"fields",d,"type"],a.type]),n.push([["metaobjects","app",i,"fields",d,"description"],a.description]),n.push([["metaobjects","app",i,"fields",d,"name"],a.name]),n.push([["metaobjects","app",i,"fields",d,"required"],a.required||void 0]),a.validations&&W(a.validations).forEach(({validationKey:r,actualValue:b})=>{n.push([["metaobjects","app",i,"fields",d,"validations",r],b])}))}}),[N(n),N(t)]}function W(e){return Object.entries(e).map(([i,n])=>{let t;return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||Array.isArray(n)&&n.every(d=>typeof d=="string")?t=n:t=JSON.stringify(n),{validationKey:i,actualValue:t}})}function ue(e){let i=e.split(`
|
|
4
|
+
`);for(let n of i)n.match(/^\s*\[/)?v(m`${k.green(n)}`):n.match(/^\s*#/)?v(m`${k.gray(n)}`):v(m`${n}`)}function Y(e){switch(e){case"MERCHANT_READ_WRITE":return"merchant_read_write";case"MERCHANT_READ":case"PRIVATE":case"PUBLIC_READ":case"PUBLIC_READ_WRITE":case null:case void 0:return}}function H(e){switch(e){case"PUBLIC_READ":return"public_read";case"NONE":case null:case void 0:return}}function pe(e){switch(e){case"READ":return"read";case"READ_WRITE":return"read_write";case"NONE":case null:case void 0:return}}function u(e){if(e&&!g(e)&&!(typeof e=="object"&&Object.values(e).every(i=>i===void 0)))return e}function N(e){return e.filter(([i,n])=>n!==void 0)}var S=_(z(),1);var F,c=class extends M{async run(){let{appContextResult:i,...n}=await f({title:m`Loading application`,task:async()=>{let{flags:t}=await this.parse(F);await j(t.path);let d=await E({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),a=await L({appContextResult:d,storeFqdn:t.store,forceReselectStore:t.reset});return{appContextResult:d,appConfiguration:d.app.configuration,remoteApp:d.remoteApp,store:a,includeExistingDeclaredDefinitions:t["include-existing"]}}});return await K(n),{app:i.app}}};F=c;c.summary="Import metafield and metaobject definitions.";c.descriptionWithMarkdown="Import metafield and metaobject definitions from your development store. [Read more about declarative custom data definitions](https://shopify.dev/docs/apps/build/custom-data/declarative-custom-data-definitions).";c.description=F.descriptionWithoutMarkdown();c.flags={...O,...C,store:S.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",parse:async e=>y(e)}),"include-existing":S.Flags.boolean({description:"Include existing declared definitions in the output.",default:!1,env:"SHOPIFY_FLAG_INCLUDE_EXISTING"})};var Ke=c;export{Ke as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b}from"./chunk-EKVTNWHM.js";import{a as k}from"./chunk-5BKCIDMS.js";import{Fa as N,ga as x}from"./chunk-4QTEPWEJ.js";import{b as C,c as R}from"./chunk-OXJBYKMX.js";import{C as y}from"./chunk-NTRAWIEJ.js";import{d as v}from"./chunk-TPCG6DCA.js";import{Fb as w,Hb as E,Lb as L,Mb as m,Vb as T,ca as h}from"./chunk-7FQFEB33.js";import{u as A}from"./chunk-A4SBXDZB.js";import{j as u}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();l();var M=12;async function S(p,t,o){let n=await p.appVersions(t);if(!n.app)throw new v(`Invalid API Key: ${t.apiKey}`);let a=n.app.appVersions.nodes.map(e=>{let r=e.message??"";return{...e,status:e.status==="active"&&!o?A.green(`\u2605 ${e.status}`):e.status,createdBy:e.createdBy?.displayName??"",createdAt:h(new Date(e.createdAt)),message:r}});if(!o){let e=(process.stdout.columns??75)-M,r=e;a.forEach(s=>{let f=s.message.length+(s.versionTag?.length??0)+T(s.status).length+s.createdAt.length+s.createdBy.length;if(f>e){let I=f-s.message.length,g=Math.max(e-I,10);g<r&&(r=g)}}),a.forEach(s=>{s.message.length>r&&(s.message=`${s.message.slice(0,r-3)}...`)})}return{appVersions:a,totalResults:n.app.appVersions.pageInfo.totalResults,app:n.app}}async function c(p){let{remoteApp:t,developerPlatformClient:o,organization:n}=p,{appVersions:a,totalResults:e}=await S(o,t,p.json);if(p.json)return L(JSON.stringify(a,null,2));if(x({org:n.businessName,appName:t.title,configFile:u(p.app.configPath)}),a.length===0){m("No app versions found for this app");return}y({rows:a,columns:{versionTag:{header:"VERSION"},status:{header:"STATUS"},message:{header:"MESSAGE"},createdAt:{header:"DATE CREATED"},createdBy:{header:"CREATED BY"}}});let r=w.link(o.webUiName,[await o.appDeepLink(t),"versions"].join("/"));m(E`\nView all ${String(e)} app versions in the ${r}`)}var d,i=class extends b{async run(){let{flags:t}=await this.parse(d),{app:o,remoteApp:n,developerPlatformClient:a,organization:e}=await N({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});return await c({app:o,remoteApp:n,organization:e,developerPlatformClient:a,json:t.json}),{app:o}}};d=i;i.summary="List deployed versions of your app.";i.descriptionWithMarkdown="Lists the deployed app versions. An app version is a snapshot of your app extensions.";i.description=d.descriptionWithoutMarkdown();i.flags={...C,...k,...R};var J=i;export{J as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as l,C as f,D as m,E as d,J as p,y as u}from"./chunk-
|
|
1
|
+
import{B as l,C as f,D as m,E as d,J as p,y as u}from"./chunk-G4OQABDT.js";import{h as n}from"./chunk-HDC5V7RY.js";import{b as g}from"./chunk-HOSFU6UP.js";import{F as S,z as h}from"./chunk-NTRAWIEJ.js";import{r as C}from"./chunk-T6CC5WUU.js";import{Ob as w}from"./chunk-7FQFEB33.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();var r="NEW_LOGIN";function N(e,t){let s=[],o=e[t];if(o)for(let[c,I]of Object.entries(o))s.push({label:I.identity.alias??c,value:c});return s}async function b(){let e=await p({},{forceNewSession:!0}),t=await f(e.userId);if(!t){let s=await S({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await m(e.userId,s),s}return t}async function v(){let e=await l(),t=await u(),s=[];return e&&s.push(...N(e,t)),s.length>0&&s.push({label:"Log in with a different account",value:r}),s}async function y(e){if(e){let o=await d(e);if(o)return n(o),e}let t=await v(),s=r;return t.length>0&&(s=await h({message:"Which account would you like to use?",choices:t})),s===r?b():(n(s),t.find(o=>o.value===s)?.label??s)}var A=L(C(),1);var a=class e extends g{static{this.description="Logs you in to your Shopify account."}static{this.flags={alias:A.Flags.string({description:"Alias of the session you want to login to.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})}}async run(){let{flags:t}=await this.parse(e),s=await y(t.alias);w(`Current account: ${s}.`)}};export{a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as se,c as k,g as d}from"./chunk-VPRTJUIN.js";var De=k((yn,Ge)=>{d();Ge.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var qe=k((Sn,Ke)=>{d();var Wt=De(),Ue={"{":"}","(":")","[":"]"},Zt=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,s=-2,i=-2,u=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(u===-1||u>n||(u=e.indexOf("\\",t),u===-1||u>n)))||s!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(s=e.indexOf("}",t),s>t&&(u=e.indexOf("\\",t),u===-1||u>s))||i!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(i=e.indexOf(")",t),i>t&&(u=e.indexOf("\\",t),u===-1||u>i))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(i=e.indexOf(")",r),i>r&&(u=e.indexOf("\\",r),u===-1||u>i))))return!0;if(e[t]==="\\"){var l=e[t+1];t+=2;var A=Ue[l];if(A){var _=e.indexOf(A,t);_!==-1&&(t=_+1)}if(e[t]==="!")return!0}else t++}return!1},jt=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=Ue[r];if(n){var s=e.indexOf(n,t);s!==-1&&(t=s+1)}if(e[t]==="!")return!0}else t++}return!1};Ke.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(Wt(t))return!0;var n=Zt;return r&&r.strict===!1&&(n=jt),n(t)}});var nr=k((Hn,Fe)=>{"use strict";d();var zt=qe(),Yt=se("path").posix.dirname,Vt=se("os").platform()==="win32",Se="/",Jt=/\\/g,er=/[\{\[].*[\}\]]$/,tr=/(^|[^\\])([\{\[]|\([^\)]+$)/,rr=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Fe.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Vt&&t.indexOf(Se)<0&&(t=t.replace(Jt,Se)),er.test(t)&&(t+=Se),t+="a";do t=Yt(t);while(zt(t)||tr.test(t));return t.replace(rr,"$1")}});var Re=k(W=>{"use strict";d();W.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;W.find=(e,t)=>e.nodes.find(r=>r.type===t);W.exceedsLimit=(e,t,r=1,n)=>n===!1||!W.isInteger(e)||!W.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;W.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};W.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;W.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;W.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;W.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);W.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s<n.length;s++){let i=n[s];if(Array.isArray(i)){r(i);continue}i!==void 0&&t.push(i)}return t};return r(e),t}});var he=k((Ln,Xe)=>{"use strict";d();var Qe=Re();Xe.exports=(e,t={})=>{let r=(n,s={})=>{let i=t.escapeInvalid&&Qe.isInvalidBrace(s),u=n.invalid===!0&&t.escapeInvalid===!0,l="";if(n.value)return(i||u)&&Qe.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let A of n.nodes)l+=r(A);return l};return r(e)}});var Ze=k((mn,We)=>{"use strict";d();We.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var nt=k((wn,rt)=>{"use strict";d();var je=Ze(),re=(e,t,r)=>{if(je(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(je(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),i=String(n.shorthand),u=String(n.capture),l=String(n.wrap),A=e+":"+t+"="+s+i+u+l;if(re.cache.hasOwnProperty(A))return re.cache[A].result;let _=Math.min(e,t),h=Math.max(e,t);if(Math.abs(_-h)===1){let g=e+"|"+t;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let E=tt(e)||tt(t),f={min:e,max:t,a:_,b:h},H=[],C=[];if(E&&(f.isPadded=E,f.maxLen=String(f.max).length),_<0){let g=h<0?Math.abs(h):1;C=ze(g,Math.abs(_),f,n),_=f.a=0}return h>=0&&(H=ze(_,h,f,n)),f.negatives=C,f.positives=H,f.result=sr(C,H,n),n.capture===!0?f.result=`(${f.result})`:n.wrap!==!1&&H.length+C.length>1&&(f.result=`(?:${f.result})`),re.cache[A]=f,f.result};function sr(e,t,r){let n=be(e,t,"-",!1,r)||[],s=be(t,e,"",!1,r)||[],i=be(e,t,"-?",!0,r)||[];return n.concat(i).concat(s).join("|")}function ur(e,t){let r=1,n=1,s=Ve(e,r),i=new Set([t]);for(;e<=s&&s<=t;)i.add(s),r+=1,s=Ve(e,r);for(s=Je(t+1,n)-1;e<s&&s<=t;)i.add(s),n+=1,s=Je(t+1,n)-1;return i=[...i],i.sort(or),i}function ir(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=ar(e,t),s=n.length,i="",u=0;for(let l=0;l<s;l++){let[A,_]=n[l];A===_?i+=A:A!=="0"||_!=="9"?i+=cr(A,_,r):u++}return u&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[u],digits:s}}function ze(e,t,r,n){let s=ur(e,t),i=[],u=e,l;for(let A=0;A<s.length;A++){let _=s[A],h=ir(String(u),String(_),n),E="";if(!r.isPadded&&l&&l.pattern===h.pattern){l.count.length>1&&l.count.pop(),l.count.push(h.count[0]),l.string=l.pattern+et(l.count),u=_+1;continue}r.isPadded&&(E=lr(_,r,n)),h.string=E+h.pattern+et(h.count),i.push(h),u=_+1,l=h}return i}function be(e,t,r,n,s){let i=[];for(let u of e){let{string:l}=u;!n&&!Ye(t,"string",l)&&i.push(r+l),n&&Ye(t,"string",l)&&i.push(r+l)}return i}function ar(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function or(e,t){return e>t?1:t>e?-1:0}function Ye(e,t,r){return e.some(n=>n[t]===r)}function Ve(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Je(e,t){return e-e%Math.pow(10,t)}function et(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function cr(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function tt(e){return/^-?(0+)\d/.test(e)}function lr(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}re.cache={};re.clearCache=()=>re.cache={};rt.exports=re});var $e=k((Bn,lt)=>{"use strict";d();var fr=se("util"),ut=nt(),st=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),pr=e=>t=>e===!0?Number(t):String(t),He=e=>typeof e=="number"||typeof e=="string"&&e!=="",ae=e=>Number.isInteger(+e),ve=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Ar=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,Rr=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},_e=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},hr=(e,t,r)=>{e.negatives.sort((l,A)=>l<A?-1:l>A?1:0),e.positives.sort((l,A)=>l<A?-1:l>A?1:0);let n=t.capture?"":"?:",s="",i="",u;return e.positives.length&&(s=e.positives.map(l=>_e(String(l),r)).join("|")),e.negatives.length&&(i=`-(${n}${e.negatives.map(l=>_e(String(l),r)).join("|")})`),s&&i?u=`${s}|${i}`:u=s||i,t.wrap?`(${n}${u})`:u},it=(e,t,r,n)=>{if(r)return ut(e,t,{wrap:!1,...n});let s=String.fromCharCode(e);if(e===t)return s;let i=String.fromCharCode(t);return`[${s}-${i}]`},at=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,s=r.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return ut(e,t,r)},ot=(...e)=>new RangeError("Invalid range arguments: "+fr.inspect(...e)),ct=(e,t,r)=>{if(r.strictRanges===!0)throw ot([e,t]);return[]},gr=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},_r=(e,t,r=1,n={})=>{let s=Number(e),i=Number(t);if(!Number.isInteger(s)||!Number.isInteger(i)){if(n.strictRanges===!0)throw ot([e,t]);return[]}s===0&&(s=0),i===0&&(i=0);let u=s>i,l=String(e),A=String(t),_=String(r);r=Math.max(Math.abs(r),1);let h=ve(l)||ve(A)||ve(_),E=h?Math.max(l.length,A.length,_.length):0,f=h===!1&&Ar(e,t,n)===!1,H=n.transform||pr(f);if(n.toRegex&&r===1)return it(_e(e,E),_e(t,E),!0,n);let C={negatives:[],positives:[]},g=K=>C[K<0?"negatives":"positives"].push(Math.abs(K)),$=[],N=0;for(;u?s>=i:s<=i;)n.toRegex===!0&&r>1?g(s):$.push(Rr(H(s,N),E,f)),s=u?s-r:s+r,N++;return n.toRegex===!0?r>1?hr(C,n,E):at($,null,{wrap:!1,...n}):$},Er=(e,t,r=1,n={})=>{if(!ae(e)&&e.length>1||!ae(t)&&t.length>1)return ct(e,t,n);let s=n.transform||(f=>String.fromCharCode(f)),i=`${e}`.charCodeAt(0),u=`${t}`.charCodeAt(0),l=i>u,A=Math.min(i,u),_=Math.max(i,u);if(n.toRegex&&r===1)return it(A,_,!1,n);let h=[],E=0;for(;l?i>=u:i<=u;)h.push(s(i,E)),i=l?i-r:i+r,E++;return n.toRegex===!0?at(h,null,{wrap:!1,options:n}):h},ge=(e,t,r,n={})=>{if(t==null&&He(e))return[e];if(!He(e)||!He(t))return ct(e,t,n);if(typeof r=="function")return ge(e,t,1,{transform:r});if(st(r))return ge(e,t,0,r);let s={...n};return s.capture===!0&&(s.wrap=!0),r=r||s.step||1,ae(r)?ae(e)&&ae(t)?_r(e,t,r,s):Er(e,t,Math.max(Math.abs(r),1),s):r!=null&&!st(r)?gr(r,s):ge(e,t,1,r)};lt.exports=ge});var At=k((Mn,pt)=>{"use strict";d();var Cr=$e(),ft=Re(),xr=(e,t={})=>{let r=(n,s={})=>{let i=ft.isInvalidBrace(s),u=n.invalid===!0&&t.escapeInvalid===!0,l=i===!0||u===!0,A=t.escapeInvalid===!0?"\\":"",_="";if(n.isOpen===!0)return A+n.value;if(n.isClose===!0)return console.log("node.isClose",A,n.value),A+n.value;if(n.type==="open")return l?A+n.value:"(";if(n.type==="close")return l?A+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":l?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let h=ft.reduce(n.nodes),E=Cr(...h,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(E.length!==0)return h.length>1&&E.length>1?`(${E})`:E}if(n.nodes)for(let h of n.nodes)_+=r(h,n);return _};return r(e)};pt.exports=xr});var gt=k((Gn,ht)=>{"use strict";d();var yr=$e(),Rt=he(),ue=Re(),ne=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?ue.flatten(t).map(s=>`{${s}}`):t;for(let s of e)if(Array.isArray(s))for(let i of s)n.push(ne(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?ne(s,i,r):s+i);return ue.flatten(n)},dr=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(s,i={})=>{s.queue=[];let u=i,l=i.queue;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,l=u.queue;if(s.invalid||s.dollar){l.push(ne(l.pop(),Rt(s,t)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){l.push(ne(l.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let E=ue.reduce(s.nodes);if(ue.exceedsLimit(...E,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=yr(...E,t);f.length===0&&(f=Rt(s,t)),l.push(ne(l.pop(),f)),s.nodes=[];return}let A=ue.encloseBrace(s),_=s.queue,h=s;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,_=h.queue;for(let E=0;E<s.nodes.length;E++){let f=s.nodes[E];if(f.type==="comma"&&s.type==="brace"){E===1&&_.push(""),_.push("");continue}if(f.type==="close"){l.push(ne(l.pop(),_,A));continue}if(f.value&&f.type!=="open"){_.push(ne(_.pop(),f.value));continue}f.nodes&&n(f,s)}return _};return ue.flatten(n(e))};ht.exports=dr});var Et=k((Un,_t)=>{"use strict";d();_t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
1
|
+
import{a as se,c as k,g as d}from"./chunk-VKWPEFWQ.js";var De=k((yn,Ge)=>{d();Ge.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var qe=k((Sn,Ke)=>{d();var Wt=De(),Ue={"{":"}","(":")","[":"]"},Zt=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,s=-2,i=-2,u=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(u===-1||u>n||(u=e.indexOf("\\",t),u===-1||u>n)))||s!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(s=e.indexOf("}",t),s>t&&(u=e.indexOf("\\",t),u===-1||u>s))||i!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(i=e.indexOf(")",t),i>t&&(u=e.indexOf("\\",t),u===-1||u>i))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(i=e.indexOf(")",r),i>r&&(u=e.indexOf("\\",r),u===-1||u>i))))return!0;if(e[t]==="\\"){var l=e[t+1];t+=2;var A=Ue[l];if(A){var _=e.indexOf(A,t);_!==-1&&(t=_+1)}if(e[t]==="!")return!0}else t++}return!1},jt=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=Ue[r];if(n){var s=e.indexOf(n,t);s!==-1&&(t=s+1)}if(e[t]==="!")return!0}else t++}return!1};Ke.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(Wt(t))return!0;var n=Zt;return r&&r.strict===!1&&(n=jt),n(t)}});var nr=k((Hn,Fe)=>{"use strict";d();var zt=qe(),Yt=se("path").posix.dirname,Vt=se("os").platform()==="win32",Se="/",Jt=/\\/g,er=/[\{\[].*[\}\]]$/,tr=/(^|[^\\])([\{\[]|\([^\)]+$)/,rr=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Fe.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Vt&&t.indexOf(Se)<0&&(t=t.replace(Jt,Se)),er.test(t)&&(t+=Se),t+="a";do t=Yt(t);while(zt(t)||tr.test(t));return t.replace(rr,"$1")}});var Re=k(W=>{"use strict";d();W.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;W.find=(e,t)=>e.nodes.find(r=>r.type===t);W.exceedsLimit=(e,t,r=1,n)=>n===!1||!W.isInteger(e)||!W.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;W.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};W.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;W.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;W.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;W.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);W.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s<n.length;s++){let i=n[s];if(Array.isArray(i)){r(i);continue}i!==void 0&&t.push(i)}return t};return r(e),t}});var he=k((Ln,Xe)=>{"use strict";d();var Qe=Re();Xe.exports=(e,t={})=>{let r=(n,s={})=>{let i=t.escapeInvalid&&Qe.isInvalidBrace(s),u=n.invalid===!0&&t.escapeInvalid===!0,l="";if(n.value)return(i||u)&&Qe.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let A of n.nodes)l+=r(A);return l};return r(e)}});var Ze=k((mn,We)=>{"use strict";d();We.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var nt=k((wn,rt)=>{"use strict";d();var je=Ze(),re=(e,t,r)=>{if(je(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(je(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),i=String(n.shorthand),u=String(n.capture),l=String(n.wrap),A=e+":"+t+"="+s+i+u+l;if(re.cache.hasOwnProperty(A))return re.cache[A].result;let _=Math.min(e,t),h=Math.max(e,t);if(Math.abs(_-h)===1){let g=e+"|"+t;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let E=tt(e)||tt(t),f={min:e,max:t,a:_,b:h},H=[],C=[];if(E&&(f.isPadded=E,f.maxLen=String(f.max).length),_<0){let g=h<0?Math.abs(h):1;C=ze(g,Math.abs(_),f,n),_=f.a=0}return h>=0&&(H=ze(_,h,f,n)),f.negatives=C,f.positives=H,f.result=sr(C,H,n),n.capture===!0?f.result=`(${f.result})`:n.wrap!==!1&&H.length+C.length>1&&(f.result=`(?:${f.result})`),re.cache[A]=f,f.result};function sr(e,t,r){let n=be(e,t,"-",!1,r)||[],s=be(t,e,"",!1,r)||[],i=be(e,t,"-?",!0,r)||[];return n.concat(i).concat(s).join("|")}function ur(e,t){let r=1,n=1,s=Ve(e,r),i=new Set([t]);for(;e<=s&&s<=t;)i.add(s),r+=1,s=Ve(e,r);for(s=Je(t+1,n)-1;e<s&&s<=t;)i.add(s),n+=1,s=Je(t+1,n)-1;return i=[...i],i.sort(or),i}function ir(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=ar(e,t),s=n.length,i="",u=0;for(let l=0;l<s;l++){let[A,_]=n[l];A===_?i+=A:A!=="0"||_!=="9"?i+=cr(A,_,r):u++}return u&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[u],digits:s}}function ze(e,t,r,n){let s=ur(e,t),i=[],u=e,l;for(let A=0;A<s.length;A++){let _=s[A],h=ir(String(u),String(_),n),E="";if(!r.isPadded&&l&&l.pattern===h.pattern){l.count.length>1&&l.count.pop(),l.count.push(h.count[0]),l.string=l.pattern+et(l.count),u=_+1;continue}r.isPadded&&(E=lr(_,r,n)),h.string=E+h.pattern+et(h.count),i.push(h),u=_+1,l=h}return i}function be(e,t,r,n,s){let i=[];for(let u of e){let{string:l}=u;!n&&!Ye(t,"string",l)&&i.push(r+l),n&&Ye(t,"string",l)&&i.push(r+l)}return i}function ar(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function or(e,t){return e>t?1:t>e?-1:0}function Ye(e,t,r){return e.some(n=>n[t]===r)}function Ve(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Je(e,t){return e-e%Math.pow(10,t)}function et(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function cr(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function tt(e){return/^-?(0+)\d/.test(e)}function lr(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}re.cache={};re.clearCache=()=>re.cache={};rt.exports=re});var $e=k((Bn,lt)=>{"use strict";d();var fr=se("util"),ut=nt(),st=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),pr=e=>t=>e===!0?Number(t):String(t),He=e=>typeof e=="number"||typeof e=="string"&&e!=="",ae=e=>Number.isInteger(+e),ve=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Ar=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,Rr=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},_e=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},hr=(e,t,r)=>{e.negatives.sort((l,A)=>l<A?-1:l>A?1:0),e.positives.sort((l,A)=>l<A?-1:l>A?1:0);let n=t.capture?"":"?:",s="",i="",u;return e.positives.length&&(s=e.positives.map(l=>_e(String(l),r)).join("|")),e.negatives.length&&(i=`-(${n}${e.negatives.map(l=>_e(String(l),r)).join("|")})`),s&&i?u=`${s}|${i}`:u=s||i,t.wrap?`(${n}${u})`:u},it=(e,t,r,n)=>{if(r)return ut(e,t,{wrap:!1,...n});let s=String.fromCharCode(e);if(e===t)return s;let i=String.fromCharCode(t);return`[${s}-${i}]`},at=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,s=r.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return ut(e,t,r)},ot=(...e)=>new RangeError("Invalid range arguments: "+fr.inspect(...e)),ct=(e,t,r)=>{if(r.strictRanges===!0)throw ot([e,t]);return[]},gr=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},_r=(e,t,r=1,n={})=>{let s=Number(e),i=Number(t);if(!Number.isInteger(s)||!Number.isInteger(i)){if(n.strictRanges===!0)throw ot([e,t]);return[]}s===0&&(s=0),i===0&&(i=0);let u=s>i,l=String(e),A=String(t),_=String(r);r=Math.max(Math.abs(r),1);let h=ve(l)||ve(A)||ve(_),E=h?Math.max(l.length,A.length,_.length):0,f=h===!1&&Ar(e,t,n)===!1,H=n.transform||pr(f);if(n.toRegex&&r===1)return it(_e(e,E),_e(t,E),!0,n);let C={negatives:[],positives:[]},g=K=>C[K<0?"negatives":"positives"].push(Math.abs(K)),$=[],N=0;for(;u?s>=i:s<=i;)n.toRegex===!0&&r>1?g(s):$.push(Rr(H(s,N),E,f)),s=u?s-r:s+r,N++;return n.toRegex===!0?r>1?hr(C,n,E):at($,null,{wrap:!1,...n}):$},Er=(e,t,r=1,n={})=>{if(!ae(e)&&e.length>1||!ae(t)&&t.length>1)return ct(e,t,n);let s=n.transform||(f=>String.fromCharCode(f)),i=`${e}`.charCodeAt(0),u=`${t}`.charCodeAt(0),l=i>u,A=Math.min(i,u),_=Math.max(i,u);if(n.toRegex&&r===1)return it(A,_,!1,n);let h=[],E=0;for(;l?i>=u:i<=u;)h.push(s(i,E)),i=l?i-r:i+r,E++;return n.toRegex===!0?at(h,null,{wrap:!1,options:n}):h},ge=(e,t,r,n={})=>{if(t==null&&He(e))return[e];if(!He(e)||!He(t))return ct(e,t,n);if(typeof r=="function")return ge(e,t,1,{transform:r});if(st(r))return ge(e,t,0,r);let s={...n};return s.capture===!0&&(s.wrap=!0),r=r||s.step||1,ae(r)?ae(e)&&ae(t)?_r(e,t,r,s):Er(e,t,Math.max(Math.abs(r),1),s):r!=null&&!st(r)?gr(r,s):ge(e,t,1,r)};lt.exports=ge});var At=k((Mn,pt)=>{"use strict";d();var Cr=$e(),ft=Re(),xr=(e,t={})=>{let r=(n,s={})=>{let i=ft.isInvalidBrace(s),u=n.invalid===!0&&t.escapeInvalid===!0,l=i===!0||u===!0,A=t.escapeInvalid===!0?"\\":"",_="";if(n.isOpen===!0)return A+n.value;if(n.isClose===!0)return console.log("node.isClose",A,n.value),A+n.value;if(n.type==="open")return l?A+n.value:"(";if(n.type==="close")return l?A+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":l?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let h=ft.reduce(n.nodes),E=Cr(...h,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(E.length!==0)return h.length>1&&E.length>1?`(${E})`:E}if(n.nodes)for(let h of n.nodes)_+=r(h,n);return _};return r(e)};pt.exports=xr});var gt=k((Gn,ht)=>{"use strict";d();var yr=$e(),Rt=he(),ue=Re(),ne=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?ue.flatten(t).map(s=>`{${s}}`):t;for(let s of e)if(Array.isArray(s))for(let i of s)n.push(ne(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?ne(s,i,r):s+i);return ue.flatten(n)},dr=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(s,i={})=>{s.queue=[];let u=i,l=i.queue;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,l=u.queue;if(s.invalid||s.dollar){l.push(ne(l.pop(),Rt(s,t)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){l.push(ne(l.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let E=ue.reduce(s.nodes);if(ue.exceedsLimit(...E,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=yr(...E,t);f.length===0&&(f=Rt(s,t)),l.push(ne(l.pop(),f)),s.nodes=[];return}let A=ue.encloseBrace(s),_=s.queue,h=s;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,_=h.queue;for(let E=0;E<s.nodes.length;E++){let f=s.nodes[E];if(f.type==="comma"&&s.type==="brace"){E===1&&_.push(""),_.push("");continue}if(f.type==="close"){l.push(ne(l.pop(),_,A));continue}if(f.value&&f.type!=="open"){_.push(ne(_.pop(),f.value));continue}f.nodes&&n(f,s)}return _};return ue.flatten(n(e))};ht.exports=dr});var Et=k((Un,_t)=>{"use strict";d();_t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
2
2
|
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var St=k((qn,dt)=>{"use strict";d();var Sr=he(),{MAX_LENGTH:Ct,CHAR_BACKSLASH:Te,CHAR_BACKTICK:br,CHAR_COMMA:Hr,CHAR_DOT:vr,CHAR_LEFT_PARENTHESES:$r,CHAR_RIGHT_PARENTHESES:Tr,CHAR_LEFT_CURLY_BRACE:Lr,CHAR_RIGHT_CURLY_BRACE:Or,CHAR_LEFT_SQUARE_BRACKET:xt,CHAR_RIGHT_SQUARE_BRACKET:yt,CHAR_DOUBLE_QUOTE:mr,CHAR_SINGLE_QUOTE:Nr,CHAR_NO_BREAK_SPACE:wr,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Ir}=Et(),Br=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Ct,r.maxLength):Ct;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},i=[s],u=s,l=s,A=0,_=e.length,h=0,E=0,f,H=()=>e[h++],C=g=>{if(g.type==="text"&&l.type==="dot"&&(l.type="text"),l&&l.type==="text"&&g.type==="text"){l.value+=g.value;return}return u.nodes.push(g),g.parent=u,g.prev=l,l=g,g};for(C({type:"bos"});h<_;)if(u=i[i.length-1],f=H(),!(f===Ir||f===wr)){if(f===Te){C({type:"text",value:(t.keepEscaping?f:"")+H()});continue}if(f===yt){C({type:"text",value:"\\"+f});continue}if(f===xt){A++;let g;for(;h<_&&(g=H());){if(f+=g,g===xt){A++;continue}if(g===Te){f+=H();continue}if(g===yt&&(A--,A===0))break}C({type:"text",value:f});continue}if(f===$r){u=C({type:"paren",nodes:[]}),i.push(u),C({type:"text",value:f});continue}if(f===Tr){if(u.type!=="paren"){C({type:"text",value:f});continue}u=i.pop(),C({type:"text",value:f}),u=i[i.length-1];continue}if(f===mr||f===Nr||f===br){let g=f,$;for(t.keepQuotes!==!0&&(f="");h<_&&($=H());){if($===Te){f+=$+H();continue}if($===g){t.keepQuotes===!0&&(f+=$);break}f+=$}C({type:"text",value:f});continue}if(f===Lr){E++;let $={type:"brace",open:!0,close:!1,dollar:l.value&&l.value.slice(-1)==="$"||u.dollar===!0,depth:E,commas:0,ranges:0,nodes:[]};u=C($),i.push(u),C({type:"open",value:f});continue}if(f===Or){if(u.type!=="brace"){C({type:"text",value:f});continue}let g="close";u=i.pop(),u.close=!0,C({type:g,value:f}),E--,u=i[i.length-1];continue}if(f===Hr&&E>0){if(u.ranges>0){u.ranges=0;let g=u.nodes.shift();u.nodes=[g,{type:"text",value:Sr(u)}]}C({type:"comma",value:f}),u.commas++;continue}if(f===vr&&E>0&&u.commas===0){let g=u.nodes;if(E===0||g.length===0){C({type:"text",value:f});continue}if(l.type==="dot"){if(u.range=[],l.value+=f,l.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,l.type="text";continue}u.ranges++,u.args=[];continue}if(l.type==="range"){g.pop();let $=g[g.length-1];$.value+=l.value+f,l=$,u.ranges--;continue}C({type:"dot",value:f});continue}C({type:"text",value:f})}do if(u=i.pop(),u.type!=="root"){u.nodes.forEach(N=>{N.nodes||(N.type==="open"&&(N.isOpen=!0),N.type==="close"&&(N.isClose=!0),N.nodes||(N.type="text"),N.invalid=!0)});let g=i[i.length-1],$=g.nodes.indexOf(u);g.nodes.splice($,1,...u.nodes)}while(i.length>0);return C({type:"eos"}),s};dt.exports=Br});var Gr=k((Qn,Ht)=>{"use strict";d();var bt=he(),kr=At(),Mr=gt(),Pr=St(),Q=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let s=Q.create(n,t);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(Q.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Q.parse=(e,t={})=>Pr(e,t);Q.stringify=(e,t={})=>bt(typeof e=="string"?Q.parse(e,t):e,t);Q.compile=(e,t={})=>(typeof e=="string"&&(e=Q.parse(e,t)),kr(e,t));Q.expand=(e,t={})=>{typeof e=="string"&&(e=Q.parse(e,t));let r=Mr(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Q.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Q.compile(e,t):Q.expand(e,t);Ht.exports=Q});var oe=k((Wn,Ot)=>{"use strict";d();var Dr=se("path"),Y="\\\\/",vt=`[^${Y}]`,V="\\.",Ur="\\+",Kr="\\?",Ee="\\/",qr="(?=.)",$t="[^/]",Le=`(?:${Ee}|$)`,Tt=`(?:^|${Ee})`,Oe=`${V}{1,2}${Le}`,Fr=`(?!${V})`,Qr=`(?!${Tt}${Oe})`,Xr=`(?!${V}{0,1}${Le})`,Wr=`(?!${Oe})`,Zr=`[^.${Ee}]`,jr=`${$t}*?`,Lt={DOT_LITERAL:V,PLUS_LITERAL:Ur,QMARK_LITERAL:Kr,SLASH_LITERAL:Ee,ONE_CHAR:qr,QMARK:$t,END_ANCHOR:Le,DOTS_SLASH:Oe,NO_DOT:Fr,NO_DOTS:Qr,NO_DOT_SLASH:Xr,NO_DOTS_SLASH:Wr,QMARK_NO_DOT:Zr,STAR:jr,START_ANCHOR:Tt},zr={...Lt,SLASH_LITERAL:`[${Y}]`,QMARK:vt,STAR:`${vt}*?`,DOTS_SLASH:`${V}{1,2}(?:[${Y}]|$)`,NO_DOT:`(?!${V})`,NO_DOTS:`(?!(?:^|[${Y}])${V}{1,2}(?:[${Y}]|$))`,NO_DOT_SLASH:`(?!${V}{0,1}(?:[${Y}]|$))`,NO_DOTS_SLASH:`(?!${V}{1,2}(?:[${Y}]|$))`,QMARK_NO_DOT:`[^.${Y}]`,START_ANCHOR:`(?:^|[${Y}])`,END_ANCHOR:`(?:[${Y}]|$)`},Yr={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Ot.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Yr,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Dr.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?zr:Lt}}});var Ce=k(q=>{"use strict";d();var Vr=se("path"),Jr=process.platform==="win32",{REGEX_BACKSLASH:en,REGEX_REMOVE_BACKSLASH:tn,REGEX_SPECIAL_CHARS:rn,REGEX_SPECIAL_CHARS_GLOBAL:nn}=oe();q.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);q.hasRegexChars=e=>rn.test(e);q.isRegexChar=e=>e.length===1&&q.hasRegexChars(e);q.escapeRegex=e=>e.replace(nn,"\\$1");q.toPosixSlashes=e=>e.replace(en,"/");q.removeBackslashes=e=>e.replace(tn,t=>t==="\\"?"":t);q.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};q.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:Jr===!0||Vr.sep==="\\";q.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?q.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};q.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};q.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",i=`${n}(?:${e})${s}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Pt=k((Yn,Mt)=>{"use strict";d();var mt=Ce(),{CHAR_ASTERISK:me,CHAR_AT:sn,CHAR_BACKWARD_SLASH:ce,CHAR_COMMA:un,CHAR_DOT:Ne,CHAR_EXCLAMATION_MARK:we,CHAR_FORWARD_SLASH:kt,CHAR_LEFT_CURLY_BRACE:Ie,CHAR_LEFT_PARENTHESES:Be,CHAR_LEFT_SQUARE_BRACKET:an,CHAR_PLUS:on,CHAR_QUESTION_MARK:Nt,CHAR_RIGHT_CURLY_BRACE:cn,CHAR_RIGHT_PARENTHESES:wt,CHAR_RIGHT_SQUARE_BRACKET:ln}=oe(),It=e=>e===kt||e===ce,Bt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},fn=(e,t)=>{let r=t||{},n=e.length-1,s=r.parts===!0||r.scanToEnd===!0,i=[],u=[],l=[],A=e,_=-1,h=0,E=0,f=!1,H=!1,C=!1,g=!1,$=!1,N=!1,K=!1,w=!1,Z=!1,P=!1,J=0,G,x,v={value:"",depth:0,isGlob:!1},M=()=>_>=n,c=()=>A.charCodeAt(_+1),O=()=>(G=x,A.charCodeAt(++_));for(;_<n;){x=O();let D;if(x===ce){K=v.backslashes=!0,x=O(),x===Ie&&(N=!0);continue}if(N===!0||x===Ie){for(J++;M()!==!0&&(x=O());){if(x===ce){K=v.backslashes=!0,O();continue}if(x===Ie){J++;continue}if(N!==!0&&x===Ne&&(x=O())===Ne){if(f=v.isBrace=!0,C=v.isGlob=!0,P=!0,s===!0)continue;break}if(N!==!0&&x===un){if(f=v.isBrace=!0,C=v.isGlob=!0,P=!0,s===!0)continue;break}if(x===cn&&(J--,J===0)){N=!1,f=v.isBrace=!0,P=!0;break}}if(s===!0)continue;break}if(x===kt){if(i.push(_),u.push(v),v={value:"",depth:0,isGlob:!1},P===!0)continue;if(G===Ne&&_===h+1){h+=2;continue}E=_+1;continue}if(r.noext!==!0&&(x===on||x===sn||x===me||x===Nt||x===we)===!0&&c()===Be){if(C=v.isGlob=!0,g=v.isExtglob=!0,P=!0,x===we&&_===h&&(Z=!0),s===!0){for(;M()!==!0&&(x=O());){if(x===ce){K=v.backslashes=!0,x=O();continue}if(x===wt){C=v.isGlob=!0,P=!0;break}}continue}break}if(x===me){if(G===me&&($=v.isGlobstar=!0),C=v.isGlob=!0,P=!0,s===!0)continue;break}if(x===Nt){if(C=v.isGlob=!0,P=!0,s===!0)continue;break}if(x===an){for(;M()!==!0&&(D=O());){if(D===ce){K=v.backslashes=!0,O();continue}if(D===ln){H=v.isBracket=!0,C=v.isGlob=!0,P=!0;break}}if(s===!0)continue;break}if(r.nonegate!==!0&&x===we&&_===h){w=v.negated=!0,h++;continue}if(r.noparen!==!0&&x===Be){if(C=v.isGlob=!0,s===!0){for(;M()!==!0&&(x=O());){if(x===Be){K=v.backslashes=!0,x=O();continue}if(x===wt){P=!0;break}}continue}break}if(C===!0){if(P=!0,s===!0)continue;break}}r.noext===!0&&(g=!1,C=!1);let T=A,ee="",a="";h>0&&(ee=A.slice(0,h),A=A.slice(h),E-=h),T&&C===!0&&E>0?(T=A.slice(0,E),a=A.slice(E)):C===!0?(T="",a=A):T=A,T&&T!==""&&T!=="/"&&T!==A&&It(T.charCodeAt(T.length-1))&&(T=T.slice(0,-1)),r.unescape===!0&&(a&&(a=mt.removeBackslashes(a)),T&&K===!0&&(T=mt.removeBackslashes(T)));let o={prefix:ee,input:e,start:h,base:T,glob:a,isBrace:f,isBracket:H,isGlob:C,isExtglob:g,isGlobstar:$,negated:w,negatedExtglob:Z};if(r.tokens===!0&&(o.maxDepth=0,It(x)||u.push(v),o.tokens=u),r.parts===!0||r.tokens===!0){let D;for(let b=0;b<i.length;b++){let j=D?D+1:h,z=i[b],F=e.slice(j,z);r.tokens&&(b===0&&h!==0?(u[b].isPrefix=!0,u[b].value=ee):u[b].value=F,Bt(u[b]),o.maxDepth+=u[b].depth),(b!==0||F!=="")&&l.push(F),D=z}if(D&&D+1<e.length){let b=e.slice(D+1);l.push(b),r.tokens&&(u[u.length-1].value=b,Bt(u[u.length-1]),o.maxDepth+=u[u.length-1].depth)}o.slashes=i,o.parts=l}return o};Mt.exports=fn});var Ut=k((Jn,Dt)=>{"use strict";d();var xe=oe(),X=Ce(),{MAX_LENGTH:ye,POSIX_REGEX_SOURCE:pn,REGEX_NON_SPECIAL_CHARS:An,REGEX_SPECIAL_CHARS_BACKREF:Rn,REPLACEMENTS:Gt}=xe,hn=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(s=>X.escapeRegex(s)).join("..")}return r},ie=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,ke=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Gt[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(ye,r.maxLength):ye,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let i={type:"bos",value:"",output:r.prepend||""},u=[i],l=r.capture?"":"?:",A=X.isWindows(t),_=xe.globChars(A),h=xe.extglobChars(_),{DOT_LITERAL:E,PLUS_LITERAL:f,SLASH_LITERAL:H,ONE_CHAR:C,DOTS_SLASH:g,NO_DOT:$,NO_DOT_SLASH:N,NO_DOTS_SLASH:K,QMARK:w,QMARK_NO_DOT:Z,STAR:P,START_ANCHOR:J}=_,G=R=>`(${l}(?:(?!${J}${R.dot?g:E}).)*?)`,x=r.dot?"":$,v=r.dot?w:Z,M=r.bash===!0?G(r):P;r.capture&&(M=`(${M})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let c={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:u};e=X.removePrefix(e,c),s=e.length;let O=[],T=[],ee=[],a=i,o,D=()=>c.index===s-1,b=c.peek=(R=1)=>e[c.index+R],j=c.advance=()=>e[++c.index]||"",z=()=>e.slice(c.index+1),F=(R="",L=0)=>{c.consumed+=R,c.index+=L},le=R=>{c.output+=R.output!=null?R.output:R.value,F(R.value)},Qt=()=>{let R=1;for(;b()==="!"&&(b(2)!=="("||b(3)==="?");)j(),c.start++,R++;return R%2===0?!1:(c.negated=!0,c.start++,!0)},fe=R=>{c[R]++,ee.push(R)},te=R=>{c[R]--,ee.pop()},S=R=>{if(a.type==="globstar"){let L=c.braces>0&&(R.type==="comma"||R.type==="brace"),p=R.extglob===!0||O.length&&(R.type==="pipe"||R.type==="paren");R.type!=="slash"&&R.type!=="paren"&&!L&&!p&&(c.output=c.output.slice(0,-a.output.length),a.type="star",a.value="*",a.output=M,c.output+=a.output)}if(O.length&&R.type!=="paren"&&(O[O.length-1].inner+=R.value),(R.value||R.output)&&le(R),a&&a.type==="text"&&R.type==="text"){a.value+=R.value,a.output=(a.output||"")+R.value;return}R.prev=a,u.push(R),a=R},pe=(R,L)=>{let p={...h[L],conditions:1,inner:""};p.prev=a,p.parens=c.parens,p.output=c.output;let y=(r.capture?"(":"")+p.open;fe("parens"),S({type:R,value:L,output:c.output?"":C}),S({type:"paren",extglob:!0,value:j(),output:y}),O.push(p)},Xt=R=>{let L=R.close+(r.capture?")":""),p;if(R.type==="negate"){let y=M;if(R.inner&&R.inner.length>1&&R.inner.includes("/")&&(y=G(r)),(y!==M||D()||/^\)+$/.test(z()))&&(L=R.close=`)$))${y}`),R.inner.includes("*")&&(p=z())&&/^\.[^\\/.]+$/.test(p)){let m=ke(p,{...t,fastpaths:!1}).output;L=R.close=`)${m})${y})`}R.prev.type==="bos"&&(c.negatedExtglob=!0)}S({type:"paren",extglob:!0,value:o,output:L}),te("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let R=!1,L=e.replace(Rn,(p,y,m,U,B,de)=>U==="\\"?(R=!0,p):U==="?"?y?y+U+(B?w.repeat(B.length):""):de===0?v+(B?w.repeat(B.length):""):w.repeat(m.length):U==="."?E.repeat(m.length):U==="*"?y?y+U+(B?M:""):M:y?p:`\\${p}`);return R===!0&&(r.unescape===!0?L=L.replace(/\\/g,""):L=L.replace(/\\+/g,p=>p.length%2===0?"\\\\":p?"\\":"")),L===e&&r.contains===!0?(c.output=e,c):(c.output=X.wrapOutput(L,c,t),c)}for(;!D();){if(o=j(),o==="\0")continue;if(o==="\\"){let p=b();if(p==="/"&&r.bash!==!0||p==="."||p===";")continue;if(!p){o+="\\",S({type:"text",value:o});continue}let y=/^\\+/.exec(z()),m=0;if(y&&y[0].length>2&&(m=y[0].length,c.index+=m,m%2!==0&&(o+="\\")),r.unescape===!0?o=j():o+=j(),c.brackets===0){S({type:"text",value:o});continue}}if(c.brackets>0&&(o!=="]"||a.value==="["||a.value==="[^")){if(r.posix!==!1&&o===":"){let p=a.value.slice(1);if(p.includes("[")&&(a.posix=!0,p.includes(":"))){let y=a.value.lastIndexOf("["),m=a.value.slice(0,y),U=a.value.slice(y+2),B=pn[U];if(B){a.value=m+B,c.backtrack=!0,j(),!i.output&&u.indexOf(a)===1&&(i.output=C);continue}}}(o==="["&&b()!==":"||o==="-"&&b()==="]")&&(o=`\\${o}`),o==="]"&&(a.value==="["||a.value==="[^")&&(o=`\\${o}`),r.posix===!0&&o==="!"&&a.value==="["&&(o="^"),a.value+=o,le({value:o});continue}if(c.quotes===1&&o!=='"'){o=X.escapeRegex(o),a.value+=o,le({value:o});continue}if(o==='"'){c.quotes=c.quotes===1?0:1,r.keepQuotes===!0&&S({type:"text",value:o});continue}if(o==="("){fe("parens"),S({type:"paren",value:o});continue}if(o===")"){if(c.parens===0&&r.strictBrackets===!0)throw new SyntaxError(ie("opening","("));let p=O[O.length-1];if(p&&c.parens===p.parens+1){Xt(O.pop());continue}S({type:"paren",value:o,output:c.parens?")":"\\)"}),te("parens");continue}if(o==="["){if(r.nobracket===!0||!z().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(ie("closing","]"));o=`\\${o}`}else fe("brackets");S({type:"bracket",value:o});continue}if(o==="]"){if(r.nobracket===!0||a&&a.type==="bracket"&&a.value.length===1){S({type:"text",value:o,output:`\\${o}`});continue}if(c.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(ie("opening","["));S({type:"text",value:o,output:`\\${o}`});continue}te("brackets");let p=a.value.slice(1);if(a.posix!==!0&&p[0]==="^"&&!p.includes("/")&&(o=`/${o}`),a.value+=o,le({value:o}),r.literalBrackets===!1||X.hasRegexChars(p))continue;let y=X.escapeRegex(a.value);if(c.output=c.output.slice(0,-a.value.length),r.literalBrackets===!0){c.output+=y,a.value=y;continue}a.value=`(${l}${y}|${a.value})`,c.output+=a.value;continue}if(o==="{"&&r.nobrace!==!0){fe("braces");let p={type:"brace",value:o,output:"(",outputIndex:c.output.length,tokensIndex:c.tokens.length};T.push(p),S(p);continue}if(o==="}"){let p=T[T.length-1];if(r.nobrace===!0||!p){S({type:"text",value:o,output:o});continue}let y=")";if(p.dots===!0){let m=u.slice(),U=[];for(let B=m.length-1;B>=0&&(u.pop(),m[B].type!=="brace");B--)m[B].type!=="dots"&&U.unshift(m[B].value);y=hn(U,r),c.backtrack=!0}if(p.comma!==!0&&p.dots!==!0){let m=c.output.slice(0,p.outputIndex),U=c.tokens.slice(p.tokensIndex);p.value=p.output="\\{",o=y="\\}",c.output=m;for(let B of U)c.output+=B.output||B.value}S({type:"brace",value:o,output:y}),te("braces"),T.pop();continue}if(o==="|"){O.length>0&&O[O.length-1].conditions++,S({type:"text",value:o});continue}if(o===","){let p=o,y=T[T.length-1];y&&ee[ee.length-1]==="braces"&&(y.comma=!0,p="|"),S({type:"comma",value:o,output:p});continue}if(o==="/"){if(a.type==="dot"&&c.index===c.start+1){c.start=c.index+1,c.consumed="",c.output="",u.pop(),a=i;continue}S({type:"slash",value:o,output:H});continue}if(o==="."){if(c.braces>0&&a.type==="dot"){a.value==="."&&(a.output=E);let p=T[T.length-1];a.type="dots",a.output+=o,a.value+=o,p.dots=!0;continue}if(c.braces+c.parens===0&&a.type!=="bos"&&a.type!=="slash"){S({type:"text",value:o,output:E});continue}S({type:"dot",value:o,output:E});continue}if(o==="?"){if(!(a&&a.value==="(")&&r.noextglob!==!0&&b()==="("&&b(2)!=="?"){pe("qmark",o);continue}if(a&&a.type==="paren"){let y=b(),m=o;if(y==="<"&&!X.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(a.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(z()))&&(m=`\\${o}`),S({type:"text",value:o,output:m});continue}if(r.dot!==!0&&(a.type==="slash"||a.type==="bos")){S({type:"qmark",value:o,output:Z});continue}S({type:"qmark",value:o,output:w});continue}if(o==="!"){if(r.noextglob!==!0&&b()==="("&&(b(2)!=="?"||!/[!=<:]/.test(b(3)))){pe("negate",o);continue}if(r.nonegate!==!0&&c.index===0){Qt();continue}}if(o==="+"){if(r.noextglob!==!0&&b()==="("&&b(2)!=="?"){pe("plus",o);continue}if(a&&a.value==="("||r.regex===!1){S({type:"plus",value:o,output:f});continue}if(a&&(a.type==="bracket"||a.type==="paren"||a.type==="brace")||c.parens>0){S({type:"plus",value:o});continue}S({type:"plus",value:f});continue}if(o==="@"){if(r.noextglob!==!0&&b()==="("&&b(2)!=="?"){S({type:"at",extglob:!0,value:o,output:""});continue}S({type:"text",value:o});continue}if(o!=="*"){(o==="$"||o==="^")&&(o=`\\${o}`);let p=An.exec(z());p&&(o+=p[0],c.index+=p[0].length),S({type:"text",value:o});continue}if(a&&(a.type==="globstar"||a.star===!0)){a.type="star",a.star=!0,a.value+=o,a.output=M,c.backtrack=!0,c.globstar=!0,F(o);continue}let R=z();if(r.noextglob!==!0&&/^\([^?]/.test(R)){pe("star",o);continue}if(a.type==="star"){if(r.noglobstar===!0){F(o);continue}let p=a.prev,y=p.prev,m=p.type==="slash"||p.type==="bos",U=y&&(y.type==="star"||y.type==="globstar");if(r.bash===!0&&(!m||R[0]&&R[0]!=="/")){S({type:"star",value:o,output:""});continue}let B=c.braces>0&&(p.type==="comma"||p.type==="brace"),de=O.length&&(p.type==="pipe"||p.type==="paren");if(!m&&p.type!=="paren"&&!B&&!de){S({type:"star",value:o,output:""});continue}for(;R.slice(0,3)==="/**";){let Ae=e[c.index+4];if(Ae&&Ae!=="/")break;R=R.slice(3),F("/**",3)}if(p.type==="bos"&&D()){a.type="globstar",a.value+=o,a.output=G(r),c.output=a.output,c.globstar=!0,F(o);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&!U&&D()){c.output=c.output.slice(0,-(p.output+a.output).length),p.output=`(?:${p.output}`,a.type="globstar",a.output=G(r)+(r.strictSlashes?")":"|$)"),a.value+=o,c.globstar=!0,c.output+=p.output+a.output,F(o);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&R[0]==="/"){let Ae=R[1]!==void 0?"|$":"";c.output=c.output.slice(0,-(p.output+a.output).length),p.output=`(?:${p.output}`,a.type="globstar",a.output=`${G(r)}${H}|${H}${Ae})`,a.value+=o,c.output+=p.output+a.output,c.globstar=!0,F(o+j()),S({type:"slash",value:"/",output:""});continue}if(p.type==="bos"&&R[0]==="/"){a.type="globstar",a.value+=o,a.output=`(?:^|${H}|${G(r)}${H})`,c.output=a.output,c.globstar=!0,F(o+j()),S({type:"slash",value:"/",output:""});continue}c.output=c.output.slice(0,-a.output.length),a.type="globstar",a.output=G(r),a.value+=o,c.output+=a.output,c.globstar=!0,F(o);continue}let L={type:"star",value:o,output:M};if(r.bash===!0){L.output=".*?",(a.type==="bos"||a.type==="slash")&&(L.output=x+L.output),S(L);continue}if(a&&(a.type==="bracket"||a.type==="paren")&&r.regex===!0){L.output=o,S(L);continue}(c.index===c.start||a.type==="slash"||a.type==="dot")&&(a.type==="dot"?(c.output+=N,a.output+=N):r.dot===!0?(c.output+=K,a.output+=K):(c.output+=x,a.output+=x),b()!=="*"&&(c.output+=C,a.output+=C)),S(L)}for(;c.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(ie("closing","]"));c.output=X.escapeLast(c.output,"["),te("brackets")}for(;c.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(ie("closing",")"));c.output=X.escapeLast(c.output,"("),te("parens")}for(;c.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(ie("closing","}"));c.output=X.escapeLast(c.output,"{"),te("braces")}if(r.strictSlashes!==!0&&(a.type==="star"||a.type==="bracket")&&S({type:"maybe_slash",value:"",output:`${H}?`}),c.backtrack===!0){c.output="";for(let R of c.tokens)c.output+=R.output!=null?R.output:R.value,R.suffix&&(c.output+=R.suffix)}return c};ke.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(ye,r.maxLength):ye,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=Gt[e]||e;let i=X.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:l,ONE_CHAR:A,DOTS_SLASH:_,NO_DOT:h,NO_DOTS:E,NO_DOTS_SLASH:f,STAR:H,START_ANCHOR:C}=xe.globChars(i),g=r.dot?E:h,$=r.dot?f:h,N=r.capture?"":"?:",K={negated:!1,prefix:""},w=r.bash===!0?".*?":H;r.capture&&(w=`(${w})`);let Z=x=>x.noglobstar===!0?w:`(${N}(?:(?!${C}${x.dot?_:u}).)*?)`,P=x=>{switch(x){case"*":return`${g}${A}${w}`;case".*":return`${u}${A}${w}`;case"*.*":return`${g}${w}${u}${A}${w}`;case"*/*":return`${g}${w}${l}${A}${$}${w}`;case"**":return g+Z(r);case"**/*":return`(?:${g}${Z(r)}${l})?${$}${A}${w}`;case"**/*.*":return`(?:${g}${Z(r)}${l})?${$}${w}${u}${A}${w}`;case"**/.*":return`(?:${g}${Z(r)}${l})?${u}${A}${w}`;default:{let v=/^(.*?)\.(\w+)$/.exec(x);if(!v)return;let M=P(v[1]);return M?M+u+v[2]:void 0}}},J=X.removePrefix(e,K),G=P(J);return G&&r.strictSlashes!==!0&&(G+=`${l}?`),G};Dt.exports=ke});var qt=k((ts,Kt)=>{"use strict";d();var gn=se("path"),_n=Pt(),Me=Ut(),Pe=Ce(),En=oe(),Cn=e=>e&&typeof e=="object"&&!Array.isArray(e),I=(e,t,r=!1)=>{if(Array.isArray(e)){let h=e.map(f=>I(f,t,r));return f=>{for(let H of h){let C=H(f);if(C)return C}return!1}}let n=Cn(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},i=Pe.isWindows(t),u=n?I.compileRe(e,t):I.makeRe(e,t,!1,!0),l=u.state;delete u.state;let A=()=>!1;if(s.ignore){let h={...t,ignore:null,onMatch:null,onResult:null};A=I(s.ignore,h,r)}let _=(h,E=!1)=>{let{isMatch:f,match:H,output:C}=I.test(h,u,t,{glob:e,posix:i}),g={glob:e,state:l,regex:u,posix:i,input:h,output:C,match:H,isMatch:f};return typeof s.onResult=="function"&&s.onResult(g),f===!1?(g.isMatch=!1,E?g:!1):A(h)?(typeof s.onIgnore=="function"&&s.onIgnore(g),g.isMatch=!1,E?g:!1):(typeof s.onMatch=="function"&&s.onMatch(g),E?g:!0)};return r&&(_.state=l),_};I.test=(e,t,r,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=r||{},u=i.format||(s?Pe.toPosixSlashes:null),l=e===n,A=l&&u?u(e):e;return l===!1&&(A=u?u(e):e,l=A===n),(l===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?l=I.matchBase(e,t,r,s):l=t.exec(A)),{isMatch:!!l,match:l,output:A}};I.matchBase=(e,t,r,n=Pe.isWindows(r))=>(t instanceof RegExp?t:I.makeRe(t,r)).test(gn.basename(e));I.isMatch=(e,t,r)=>I(t,r)(e);I.parse=(e,t)=>Array.isArray(e)?e.map(r=>I.parse(r,t)):Me(e,{...t,fastpaths:!1});I.scan=(e,t)=>_n(e,t);I.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let s=t||{},i=s.contains?"":"^",u=s.contains?"":"$",l=`${i}(?:${e.output})${u}`;e&&e.negated===!0&&(l=`^(?!${l}).*$`);let A=I.toRegex(l,t);return n===!0&&(A.state=e),A};I.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Me.fastpaths(e,t)),s.output||(s=Me(e,t)),I.compileRe(s,t,r,n)};I.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};I.constants=En;Kt.exports=I});var xn=k((ns,Ft)=>{"use strict";d();Ft.exports=qt()});export{qe as a,nr as b,Gr as c,Ce as d,xn as e};
|
|
3
3
|
/*! Bundled license information:
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as x,c as D,f as M}from"./chunk-
|
|
1
|
+
import{b as x,c as D,f as M}from"./chunk-E7DHELFH.js";import{a as o}from"./chunk-VPPWSKOY.js";import{c as w}from"./chunk-5C7HDTHJ.js";import{C as h,F as e,v as y,z as s}from"./chunk-NTRAWIEJ.js";import{Mb as _,ua as u}from"./chunk-7FQFEB33.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
|
|
2
2
|
`)}export{$ as a,j as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as d,c as f}from"./chunk-7572RLUP.js";import{a as c}from"./chunk-S7F5KFQP.js";import{a as p}from"./chunk-5BKCIDMS.js";import{Ga as u,e as i}from"./chunk-4QTEPWEJ.js";import{b as n}from"./chunk-OXJBYKMX.js";import{v as e}from"./chunk-NTRAWIEJ.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a,t=class extends c{async run(){let{flags:o}=await this.parse(a),{app:r}=await u({directory:o.path,userProvidedConfigName:o.config}),m=await f(r,o.path);return await i(m,{stdout:process.stdout,stderr:process.stderr,app:r}),e({headline:"GraphQL types generated successfully."}),{app:r}}};a=t;t.summary="Generate GraphQL types for a function.";t.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.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...p,...d};var x=t;export{x as a};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as D}from"./chunk-AVD3INWF.js";import{a as _,c as b}from"./chunk-MIDYZPO4.js";import{a as c,b as F}from"./chunk-VJ6KDRZI.js";import{e as y,q as T}from"./chunk-5XDQ76DQ.js";import{d as v,k as g,q as w}from"./chunk-TUNUEOHO.js";import{b as u}from"./chunk-OXJBYKMX.js";import{A as p,v as d}from"./chunk-NTRAWIEJ.js";import{r as C}from"./chunk-T6CC5WUU.js";import{V as f}from"./chunk-7FQFEB33.js";import{e as Y,g as h}from"./chunk-VKWPEFWQ.js";h();h();async function I(t,e,i){let r=e.themes;e.development&&(r=[(await new D(t).find()).id.toString()]);let n=t.storeFqdn,s=await L(t,{...e,themes:r,development:!1});if(!e.force&&!i&&!await M(s,n))return;await Promise.all(s.map(o=>(y(o)&&v(),T(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
|
|
2
|
+
|
|
3
|
+
`}]:[];d({body:f(s,o=>[...l,`The following themes were deleted from ${n}:`,F(o)],o=>[...l,"The theme",...c(o),`was deleted from ${n}.`])})}async function L(t,e){if(e.selectTheme||e.themes.length>0)return b(t,e);let i=t.storeFqdn;return[await _(t,{header:`Select a theme to delete from ${i}`,filter:{development:e.development}})]}async function M(t,e){let r={message:f(t,n=>[`Delete the following themes from ${e}?`],n=>["Delete",...c(n),`from ${e}?`]),confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return t.length>1&&(r.infoTable={"":t.map(c)}),p(r)}var a=Y(C(),1);var O,m=class extends w{async command(e,i,r){let{environment:n,development:s,force:l,theme:o}=e,E=o??[];await I(i,{selectTheme:e["show-all"],environment:n,development:s,themes:E,force:l},r)}};O=m;m.summary="Delete remote themes from the connected store. This command can't be undone.";m.descriptionWithMarkdown=`Deletes a theme from your store.
|
|
4
|
+
|
|
5
|
+
You can specify multiple themes by ID. If no theme is specified, then you're prompted to select the theme that you want to delete from the list of themes in your store.
|
|
6
|
+
|
|
7
|
+
You're asked to confirm that you want to delete the specified themes before they are deleted. You can skip this confirmation using the \`--force\` flag.`;m.description=O.descriptionWithoutMarkdown();m.flags={...u,...g,development:a.Flags.boolean({char:"d",description:"Delete your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),"show-all":a.Flags.boolean({char:"a",description:"Include others development themes in theme list.",env:"SHOPIFY_FLAG_SHOW_ALL"}),force:a.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE"}),theme:a.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",multiple:!0})};m.multiEnvironmentsFlags=["store","password",["development","theme"]];var V=m;export{V as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
1
|
+
import{b as h}from"./chunk-HOSFU6UP.js";import{Ca as g,ua as u,wa as c}from"./chunk-7FQFEB33.js";import{d as f,q as p}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var d=f(p(),"/docs-shopify.dev/commands"),m=class extends h{static{this.description="Generate CLI commands documentation"}static{this.hidden=!0}async run(){let a=this.config.commands;await g(d),await c(d);let o=a.sort((e,i)=>e.id.length-i.id.length).filter(e=>!b(e)).map(e=>{let i=k(e);return N(e,i)});await Promise.all(o)}},C=["commands","help","plugins"];function b(t){return t.hidden?(C.push(t.id),!0):t.pluginType==="user"?!0:C.some(a=>t.id.startsWith(`${a}:`))}function k(t){let a=t.id.replace(/[:]/g," "),s=t.id.replace(/[:]/g,"-"),o=t.id.replace(/[:-]/g,"");return{commandName:a,fileName:s,interfaceName:o}}async function N(t,{commandName:a,fileName:s,interfaceName:o}){let e=Object.keys(t.flags).map(r=>{let n=t.flags[r];if(!n||n.hidden)return;let $=n.description??"",w=n.char?`-${n.char}, `:"",y=n.type==="option"?"string":"''",v=n.type==="option"?" <value>":"",x=n.required?"":"?",D=n.env!==void 0?` @environment ${n.env}`:"";return` /**
|
|
2
2
|
* ${$}
|
|
3
3
|
*${D}
|
|
4
4
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ga as r}from"./chunk-4QTEPWEJ.js";import{a}from"./chunk-QDVJJKLB.js";import{q as i}from"./chunk-773TIA5M.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var c=3e3;async function n(o){let t;try{if(a.getAllPublicMetadata().api_key!==void 0)return;await Promise.race([r({directory:o,skipPrompts:!0}),new Promise(l=>{t=setTimeout(l,c)})])}catch{}finally{t&&clearTimeout(t)}}var m=async()=>(await n(i()),a.getAllPublicMetadata()),f=m;export{f as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pb as m}from"./chunk-7FQFEB33.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();import{spawn as h}from"child_process";function g(e=process.pid,i="SIGTERM",r=!0,s){k(e,i,r,s??(n=>{n&&m(`Failed to kill process ${e}: ${n}`)}))}function k(e,i,r,s){let t=typeof e=="number"?e.toString():e;if(!/^\d+$/.test(t))if(s){s(new Error("pid must be a number"));return}else throw new Error("pid must be a number");let n={};n[t]=[];let o=new Set;switch(o.add(t),process.platform){case"win32":{h("taskkill",["/pid",t,"/T","/F"]).on("close",u=>{s&&(u===0?s():s(new Error(`taskkill exited with code ${u}`)))});break}case"darwin":l(t,n,o,function(f){return h("pgrep",["-lfP",f])},function(){w(n,i,t,r,s)});break;default:l(t,n,o,function(f){return h("ps",["-o","pid command","--no-headers","--ppid",f])},function(){w(n,i,t,r,s)});break}}function w(e,i,r,s,t){let n=new Set;try{Object.keys(e).forEach(function(o){e[o].forEach(function(f){n.has(f)||(E(f,i),n.add(f))}),o===r&&s&&!n.has(o)&&(E(o,i),n.add(o))})}catch(o){if(t){t(o);return}else throw o}t&&t()}function E(e,i){try{process.kill(parseInt(e,10),i)}catch(r){if(r.code!=="ESRCH")throw r}}function l(e,i,r,s,t){let n=s(e),o="";n.stdout?.on("data",function(u){let a=u.toString("ascii");o+=a});let f=u=>{if(r.delete(e),u!==0){if(r.size===0){t();return}return}o.trim().split(`
|
|
2
2
|
`).forEach(function(a){let d=a.match(/^(\d+)\s(.*)$/);if(d){let c=d[1],$=d[2];i[e].push(c),i[c]=[],m(`Killing process ${c}: ${$}`),r.add(c),l(c,i,r,s,t)}})};n.on("close",f)}export{g as a};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{A as gt,C as _e,D as ae,E as A,F as ce,H as yt,J as Et,a as nt,b as rt,e as W,f as M,i as at,k as ct,m as lt,n as dt,o as pt,r as ut,t as mt,u as ht,v as ie,w as $,y as ft}from"./chunk-DTIWUT2T.js";import{a as N,l as ot,m as it}from"./chunk-5XDQ76DQ.js";import{n as oe,o as O}from"./chunk-TUNUEOHO.js";import{aa as st}from"./chunk-4J32OHLY.js";import{va as L,xa as H}from"./chunk-G4OQABDT.js";import{b as Qe}from"./chunk-5C7HDTHJ.js";import{P as tt,u as Ke,w as _,x as te,y as et}from"./chunk-NTRAWIEJ.js";import{d as se}from"./chunk-TPCG6DCA.js";import{Fb as q,Hb as ne,Mb as re,O as Ve,Pb as F,Qb as D,Ta as v,Wa as C,_ as $e,bb as ke,ma as k,ua as be,wa as Xe,ya as Ze}from"./chunk-7FQFEB33.js";import{d as E,g as V,j as Ge,k as j}from"./chunk-773TIA5M.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var ns=".shopifyignore",Rt=/templates\/\*(\.(json|liquid))?$/,Tt=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=Ie(s),[a=[],u=[]]=Ie(n),[m=[],c=[]]=Ie(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(m,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Ve(l,f=>f.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>rs(n,i)||as(i)&&is(n,cs(i)));return(s?!r:r)?(F(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function wt(e){let t=E(e,ns);return await v(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function Ie(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function rs(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!Tt.has(t)&&(Tt.add(t),_({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),os(t)?ke(e,t.replace(Rt,"templates/**/*$1"),s):!1)}function os(e){return Rt.test(e)}function is(e,t){return t.test(e)}function as(e){return e.startsWith("/")&&e.endsWith("/")}function cs(e){return new RegExp(e.slice(1,-1))}h();import St from"fs/promises";var le=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&D("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{F(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),D(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await St.writeFile(this.notifyPath,t),await St.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ls from"node:events";var Ft=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ls,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await pe(e,c),p=de(c,l),f=typeof l=="string"?l:"",x=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,N({key:c,checksum:p,value:f,attachment:x})),l},i=C(Ft,{cwd:e,deep:3,ignore:O}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let p=V(e,l),f=o(p).then(()=>{let x=t.get(p);return s.add(x.key),x.value??x.attachment??""});tt(5).then(()=>{s.delete(p)}).catch(()=>{}),r(c,{fileKey:p,onContent:x=>{f.then(P=>{P&&x(P)}).catch(()=>{})},onSync:x=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:p=>p()})},m=new Set(Ft.map(c=>E(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-VDIVGBZH.js");c.watch([...m],{ignored:O,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var ds="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Pt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function $t(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>${e.title}</title>
|
|
5
|
+
<link rel="stylesheet" href="${ds}" />
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<div style="display: flex; justify-content: center; padding-top: 2rem;">
|
|
9
|
+
<div style="width: 80%;">
|
|
10
|
+
<div class="Polaris-Banner Polaris-Banner--withinPage" tabindex="0" role="alert" aria-live="polite">
|
|
11
|
+
<div class="Polaris-Box" style="--pc-box-width:100%">
|
|
12
|
+
<div
|
|
13
|
+
class="Polaris-BlockStack"
|
|
14
|
+
style="--pc-block-stack-align:space-between;--pc-block-stack-order:column"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
class="Polaris-Box"
|
|
18
|
+
style="--pc-box-color: var(--p-color-text-critical-on-bg-fill); --pc-box-background: var(--p-color-bg-fill-critical); --pc-box-padding-block-start-xs: var(--p-space-300); --pc-box-padding-block-end-xs: var(--p-space-300); --pc-box-padding-inline-start-xs: var(--p-space-300); --pc-box-padding-inline-end-xs: var(--p-space-300); --pc-box-border-start-start-radius: var(--p-border-radius-300); --pc-box-border-start-end-radius: var(--p-border-radius-300);"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="Polaris-InlineStack"
|
|
22
|
+
style="--pc-inline-stack-align:space-between;--pc-inline-stack-block-align:center;--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-200);--pc-inline-stack-flex-direction-xs:row"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="Polaris-InlineStack"
|
|
26
|
+
style="--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-100);--pc-inline-stack-flex-direction-xs:row"
|
|
27
|
+
>
|
|
28
|
+
<span class="Polaris-Banner--textCriticalOnBgFill">
|
|
29
|
+
<span class="Polaris-Icon">
|
|
30
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
|
31
|
+
<path d="M10 6a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5a.75.75 0 0 1 .75-.75Z" />
|
|
32
|
+
<path d="M11 13a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
|
|
33
|
+
<path
|
|
34
|
+
fill-rule="evenodd"
|
|
35
|
+
d="M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
|
|
36
|
+
/>
|
|
37
|
+
</svg>
|
|
38
|
+
</span>
|
|
39
|
+
</span>
|
|
40
|
+
<h2 class="Polaris-Text--root Polaris-Text--headingSm Polaris-Text--break">
|
|
41
|
+
${e.header}
|
|
42
|
+
</h2>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div
|
|
47
|
+
class="Polaris-Box"
|
|
48
|
+
style="--pc-box-padding-block-start-xs:var(--p-space-300);--pc-box-padding-block-end-xs:var(--p-space-300);--pc-box-padding-block-end-md:var(--p-space-400);--pc-box-padding-inline-start-xs:var(--p-space-300);--pc-box-padding-inline-start-md:var(--p-space-400);--pc-box-padding-inline-end-xs:var(--p-space-300);--pc-box-padding-inline-end-md:var(--p-space-400)"
|
|
49
|
+
>
|
|
50
|
+
<div
|
|
51
|
+
class="Polaris-BlockStack"
|
|
52
|
+
style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-300)"
|
|
53
|
+
>
|
|
54
|
+
${e.errors.map(s=>`
|
|
55
|
+
<div>
|
|
56
|
+
<span class="Polaris-Text--root Polaris-Text--headingSm">${Pt(s.message)}</span>
|
|
57
|
+
<ul class="Polaris-List">
|
|
58
|
+
<li class="Polaris-List__Item">${Pt(s.code)}</li>
|
|
59
|
+
</ul>
|
|
60
|
+
</div>`).join("")}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</body>
|
|
69
|
+
</html>`}h();h();var ps=/<head(\s[^>]*)?>/i,je="https://cdn.shopify.com/storefront",us=`${je}/standard-events.js`,ms=`${je}/standard-events.dev.js`,bt=`${je}/standard-events-inspector.js`,kt="shopify-cli-standard-events-inspector",hs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${qe(kt)}["']|\\bsrc=["']${qe(bt)}["'])[^>]*>`,"i"),fs=new RegExp(qe(us),"g");function ue(e){return hs.test(e)?e:e.replace(ps,t=>`${t}<script id="${kt}" src="${bt}" defer></script>`)}function _t(e){return e.replace(fs,ms)}function qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}h();var It=80;function X(e,t,s){if(!gs(e)||s.type==="theme-extension")return;let n=e.path.length>It?`${e.path.substring(0,It)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=ys(t.status),u=e.method.padStart(6);re(ne`• ${oe.format(new Date)} Request ${q.raw("\xBB")} ${u} ${a(String(t.status))} ${n} ${q.gray(i)}`)}function gs(e){let t=[z,J,"/checkouts","/payments"],s=[".js",".css",".json",".map"];if(t.some(o=>e.path.startsWith(o)))return!1;let[n]=e.path.split("?"),r=j(n);return!s.includes(r)}function ys(e){return e<300?q.green:e<400?q.yellow:q.errorText}var J="/cdn/",z="/ext/cdn/",Ce="/api/collect",Es=/^\/cart\//,Lt=/^\/checkouts\/(?!internal\/)/,xs=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,Ts=new RegExp(`^${J}`),Rs=new RegExp(`^${z}`),ws=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,Ss=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",Ce,"/cdn-cgi/challenge-platform"],qt="_shopify_essential",Fs=new RegExp(`${qt}=([^;]*)(;|$)`);function jt(e,t){return $(async s=>{if(Ss.some(n=>s.path.startsWith(n)))return null;if(vs(s)){let n=s.path.split("?")[0]??"";return He(s,t).then(async r=>{if(X(s,r,t),r.ok){let o=n.split("/").at(-1)??"";if(t.localThemeFileSystem.files.has(`assets/${o}.liquid`)){let i=Z(await r.text(),t);return new Response(i,r)}}return r}).catch(async r=>{let{status:o,statusText:i,...a}=A(r,`Failed to proxy request to ${n}`);return o>=500&&!n.endsWith(".js.map")&&_(a),new Response(r.message,{status:o,statusText:i})})}})}function vs(e){if(e.method!=="GET"||e.path.match(Es)||e.path.match(Lt)||e.path.match(xs)||e.path.match(Ts)||e.path.match(Rs))return!0;let[t]=e.path.split("?"),s=j(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function me(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function Ps(e){return ws.test(e.path)}function Z(e,t){let s=e,n=`(data-shs-beacon-endpoint=["'])https://${me(t)}${Ce}`,r=new RegExp(n,"g");s=s.replace(r,`$1${Ce}`);let o=new RegExp(`(https?:)?//${me(t)}${J}`,"g");s=s.replace(o,J);let i=/(?:https?:)?\/\/cdn\.shopify\.com\/(.*?\/(assets\/[^?#"'`>\s]+))/g,a=c=>c.startsWith("assets/"),u=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),m=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,p)=>{let f=p&&u.has(p),x=p&&m.has(p)&&l.startsWith("extensions/");return U(p).startsWith("image/")?c:x?`${z}${l}`:f?`${J}${l}`:c}),t.options.standardEventsDevBundle&&(s=_t(s)),s}function $s(e,t){let s=`http://${t.options.host}:${t.options.port}`,n=new RegExp(`data-base-url=["']((?:https?:)?//${me(t)})[^"']*?["']`,"g");return e.replace(n,(r,o)=>r.replace(o,s))}function bs(e,t){let s=new RegExp(`Domain=${me(t)};\\s*`,"gi");return e.map(n=>n.replace(s,""))}async function Q(e,t,s){let n=At(e,t);if(n.status>=300&&n.status<400)return n;t.headers.get("content-type")?.includes("application/json")||n.headers.set("content-type","text/html; charset=utf-8");let i=await n.text();return i=Z(i,e),i=$s(i,e),e.options.standardEventsInspector&&(i=ue(i)),s&&(i=s(i)??i),new Response(i,n)}var Ct=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function At(e,t){let s=new Response(t.body,t);s.headers.delete("content-length"),s.headers.delete("content-encoding");for(let i of Ct)s.headers.delete(i);s.headers.delete("access-control-allow-origin"),s.headers.delete("access-control-allow-credentials"),s.headers.delete("access-control-allow-methods"),s.headers.delete("access-control-allow-headers"),s.headers.delete("access-control-expose-headers"),s.headers.delete("access-control-max-age");let n=s.headers.get("Link");n&&s.headers.set("Link",Z(n,e));let r=s.headers.get("Location");if(r){let i=new URL(r,"https://shopify.dev");Lt.test(i.pathname)||(i.searchParams.delete("_fd"),i.searchParams.delete("pb"),s.headers.set("Location",i.href.replace(i.origin,"")))}let o=s.headers.getSetCookie();if(o?.length){s.headers.set("Set-Cookie",bs(o,e).join(","));let i=o.join(",").match(Fs)?.[1];i&&(e.session.sessionCookies[qt]=i)}return s}function Ae(e){let t=at(e);for(let n of Ct)delete t[n];delete t["upgrade-insecure-requests"];let s=ct(e);return s&&(t["X-Forwarded-For"]=s),t}function He(e,t){let s=e.path.replace(new RegExp(z,"g"),"/"),n=e.path.startsWith(z)?"cdn.shopify.com":t.session.storeFqdn,r=new URL(s,`https://${n}`);if(r.hostname!==n)return Promise.reject(new Error(`Request failed: Hostname mismatch. Expected host: ${n}. Resulting URL hostname: ${r.hostname}`));let o=lt(e),i=Ae(e);return Ps(e)||(/\/assets\/[^/]+\.(css|js)$/.test(r.pathname)&&/\?\d+$/.test(r.search)&&(r.search=`?v=${Date.now()}`),r.searchParams.set("_fd","0"),r.searchParams.set("pb","0"),i=rt({...i,...nt(),referer:r.origin,Cookie:yt(t.session,{headers:i}),...t.type==="theme"?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>At(t,a)).catch(a=>{throw ae(L(a),r)})}var De=0,ks=5;function Dt(e,t){return $(s=>{let[n="/",r=""]=s.path.split("?");return Is(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Ht(t,{status:500,statusText:"Internal Server Error"},{title:"Failed to Upload Theme Files",header:"Upload Errors",errors:Array.from(t.localThemeFileSystem.uploadErrors.entries()).map(([i,a])=>({message:i,code:a.join(`
|
|
70
|
+
`)}))}):ce(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:Ae(s),replaceExtensionTemplates:fe(t),replaceTemplates:Oe(t,n,dt(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!_s(s)){let a=await Ls(s,t,i);if(a)return X(s,a,t),a}return X(s,i,t),Q(t,i,a=>(qs(i,a,String(e.id)),De=0,Ne(a,t)))}).catch(async i=>{if(i instanceof he&&(F(`Theme ID mismatch: expected ${i.getExpectedThemeId()} but got ${i.getActualThemeId()}; refreshing session...`),H("theme-service:error-page:theme-id-mismatch"),t.session.refresh)){De++,De>ks&&(et(new se(i.getMessage())),process.exit(1)),await t.session.refresh();let f=new URLSearchParams(r),x=new URLSearchParams([...f].filter(([ve])=>!ve.startsWith("__sfr"))),P=n+(x.toString()?`?${x}`:"");return new Response(null,{status:302,headers:{Location:P}})}let{status:a,statusText:u,cause:m,...c}=A(i,"Failed to render storefront"),[l,...p]=c.headline.split(`
|
|
71
|
+
`);return te(c),Ht(t,{status:a,statusText:u},{title:l,header:l,errors:[{message:[...p,m.message].join("<br>"),code:m.stack?.replace(`${m.message}
|
|
72
|
+
`,"")??""}]})})})}function Ht(e,t,s){let n=Ne($t(s),e);return e.options.standardEventsInspector&&(n=ue(n)),H("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function _s(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function Is(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function Ls(e,t,s){F(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await He(e,t).catch(r=>new Response(null,A(r)));if(n.status<400)return F(`Proxy status: ${n.status}. Returning proxy response.`),t.options.standardEventsInspector&&(n.headers.get("content-type")??"").includes("text/html")?Q(t,n):n;F(`Proxy status: ${n.status}. Returning render error.`)}function qs(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new he(s,n,e)}var he=class extends Error{constructor(t,s,n){super([`Theme ID mismatch: expected ${t} but got ${s}.`,`Request ID: ${n.headers.get("x-request-id")}`,`URL: ${n.url}`,"This is likely related to an issue in upstream Shopify APIs.","Please try again in a few minutes and report this issue:","https://community.shopify.dev/c/shopify-cli-libraries/14"].join(`
|
|
73
|
+
`)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};h();h();function ge(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}h();function ye(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var js={stylesheet:new Map,javascript:new Map};function Ot(e,t){return $(async s=>{if(s.method!=="GET")return;if(Ds(s,t))return Os(s,t);let{file:n,fileKey:r,isUnsynced:o}=Hs(s,t);if(!r)return;let i=U(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(ut(s,"X-Local-Asset","true"),!n){o&&M(s,W({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(Z(n.value,t)):Buffer.from(n.attachment??"","base64");return ie(s,{getContents:()=>a,getMeta:()=>({type:i,size:a.length,mtime:n.stats?.mtime})})})}var Cs=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,As=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Hs(e,t){let s=(n,r)=>{let o=e.path.match(n)?.[1];if(o){let i=E("assets",o),a=r.files.get(i),u=r.unsyncedFileKeys.has(i);if(a||u)return{file:a,isUnsynced:u,fileKey:i}}};return s(Cs,t.localThemeFileSystem)??s(As,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Ds(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Os(e,t){switch(ye(e).pathname.split("/").at(-1)){case"styles.css":return Ns(t,e);case"block-scripts.js":return We(t,e,"block");case"snippet-scripts.js":return We(t,e,"snippet");case"scripts.js":return We(t,e,"section");case void 0:break;default:break}}function Ns(e,t){let s=Ee(e,"section"),n=Ee(e,"block"),r=Ee(e,"snippet"),o=[`/*** GENERATED LOCALLY ***/
|
|
74
|
+
`];for(let[,a]of[...s,...n,...r]){let u=Nt(a,"stylesheet");u&&o.push(u)}let i=o.join(`
|
|
75
|
+
`);return ie(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function We(e,t,s){let n=Ee(e,s),r=`${s}s`,o=[`
|
|
76
|
+
/*** GENERATED LOCALLY ***/
|
|
77
|
+
|
|
78
|
+
(function () {
|
|
79
|
+
var __${r}__ = {};
|
|
80
|
+
|
|
81
|
+
(function () {
|
|
82
|
+
var element = document.getElementById("${r}-script");
|
|
83
|
+
var attribute = element ? element.getAttribute("data-${r}") : "";
|
|
84
|
+
var ${r} = attribute.split(",").filter(Boolean);
|
|
85
|
+
|
|
86
|
+
for (var i = 0; i < ${r}.length; i++) {
|
|
87
|
+
__${r}__[${r}[i]] = true;
|
|
88
|
+
}
|
|
89
|
+
})();`];for(let[a,u]of n){let m=a.split("/").pop()?.replace(".liquid",""),c=Nt(u,"javascript")??"";m&&c&&o.push(`
|
|
90
|
+
(function () {
|
|
91
|
+
if (!__${r}__["${m}"] && !Shopify.designMode) return;
|
|
92
|
+
try {
|
|
93
|
+
${c}
|
|
94
|
+
} catch (e) {
|
|
95
|
+
console.error(e);
|
|
96
|
+
}
|
|
97
|
+
})();`)}o.push("})();");let i=o.join(`
|
|
98
|
+
`);return ie(t,{getContents:()=>i,getMeta:()=>({type:"text/javascript",size:Buffer.byteLength(i),mtime:new Date})})}function Ee(e,t){return[...e.localThemeFileSystem.files.entries()].filter(([s])=>s.endsWith(".liquid")&&s.startsWith(`${t}s/`)).sort(([s],[n])=>s.localeCompare(n))}function Nt(e,t){let s=js[t],n=s.get(e.key);if(n?.checksum===e.checksum)return n.content;if(s.delete(e.key),!e.value)return;let r=[`/* ${e.key} */`],o=ge(e.value??"",t)?.trimEnd();if(o&&r.push(o),r.length>1){let i=r.join(`
|
|
99
|
+
`);return s.set(e.key,{checksum:e.checksum,content:i}),i}}h();import*as Wt from"node:os";function Ws(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Wt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function Ms(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Mt(e,t){let s=Ws(e,t);return $(n=>{let r=n.node.req.headers.host,o=Ms(r);if(!o||!s.has(o))return M(n,W({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Ut(){return Bt()}function qr(){return Bt()}function Bt(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as Us}from"node:http";async function zr(e,t){let s=await Js(e,t);return await zs(e,s),Bs(e,s)}function Bs(e,t){let s=ft();s.use(Mt(t.options.host,t.options.port)),s.use(Jt(e,t)),s.use(Ot(e,t)),s.use(jt(e,t)),s.use(Dt(e,t));let n=Us(gt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function Js(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o}=t,i="127.0.0.1",a=r??9293,u=Ut(),m=vt(o);return await m.ready(),{session:await Et(e.id.toString(),s,void 0,n),localThemeFileSystem:u,localThemeExtensionFileSystem:m,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:i,port:a,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function zs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{xe(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function fe(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var we=Ye(st(),1);import Ys from"node:events";var Me=new Map,K=new Map;function zt(e,t){let s=(0,we.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?K.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):K.delete(e)}function Ue(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(j(e))}function Oe(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${E("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Ue(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(u){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function co(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=j(r);o(u=>{!Qs(r)&&Ue(r)&&a===".json"&&zt(r,u),xe(e,t,i,{type:"update",key:r,payload:Xs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),xe(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&zt(o,a)}else o.endsWith(".liquid")&&Xt(i)}))})}var Gs="1",Gt=new Ys;function Re(e){Gt.emit("hot-reload",{...e,version:Gs})}function Jt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=ht(s);return Gt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{_({headline:"Failed to send HotReload event.",body:a.stack})})}),Re({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,we.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?te(o):o.type==="warn"?_(o):o.type==="info"?Ke(o):_({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Vt)return k(Se()).then(o=>pt(s,o,"application/javascript")).catch(o=>M(s,W({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",u=s.path.split("?")[0]??"",m=new URLSearchParams(r);if(m.delete("section_key"),m.delete("section_id"),m.delete("app_block_id"),m.delete("_fd"),m.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let p=t.localThemeFileSystem.files.get(o)?.value;if(!p)return"";c[o]=p}for(let p of l)if(p.endsWith(".json")){for(let[f,x]of K.get(p)??[])if(i.endsWith(`__${x}`)){let P=t.localThemeFileSystem.files.get(p)?.value;P&&(c[p]=P);continue}}}return ce(t.session,{method:s.method,path:u??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:mt(s),replaceExtensionTemplates:fe(t)}).then(async l=>{if(!l.ok)throw H("theme-service:hot-reload:section:render-failed"),ae(l);return Q(t,l)}).catch(async l=>{let{status:p,statusText:f,...x}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||_(x),new Response(null,{status:p,statusText:f})})}})}var ee=(e,t)=>Re({themeId:String(e),type:"full",key:t});function xe(e,t,s,n){let r=()=>ee(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);Re({sync:"local",themeId:o,...n}),s(()=>Re({sync:"remote",themeId:o,...n}),r)}function Vs(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,we.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of K)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function Xs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Vs(e,t):[],replaceTemplates:Ue(e)?Oe(t):{},updatedFileParts:n&&Xt(n)}}var Te="hot-reload-client",Zs="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Yt=new RegExp(`<script id="${Te}"[^>]*>[^<]*</script>`),Vt="/@shopify/theme-hot-reload";function Ne(e,t){return t.options.liveReload==="off"?e.replace(Yt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Yt,"").replace(/<\/head>/,`<script id="${Te}" src="${Vt}" defer></script></head>`):e.includes(`<script id="${Te}"`)?e:e.replace(/<\/head>/,`<script id="${Te}" src="${Zs}" defer></script></head>`)}function Qs(e){return e.startsWith("assets/")}function Xt(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Me.get(e.key);if(o?.checksum===e.checksum||(Me.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,m=(c,l)=>{u=u.replace(l,"");let p=a(l),f=`${c}Tag`;n[f]=!o||p!==o[f],r[f]=p};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return u=a(u.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=u,n.liquid=!o||u!==o.liquid,Me.set(e.key,r),n}h();var Zt=Ye(st(),1);function Ks(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Qt(e,t,s){if(Ks(s)){let n=E(e,"listings",t,s);if(await v(n))return n}}async function Kt(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Zt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function go(e,t){let s=E(e,"listings"),n=E(s,t);if(await v(n))return;let o=[];await v(s)&&(o=await C("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${$e(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new se(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import en from"node:events";import{fileURLToPath as tn}from"node:url";var sn=250,es=["assets/**/*.*","config/**/*.json","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],b={layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function Co(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new en,a=(d,g)=>{i.emit(d,g)},u=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await rn(e,d,t.listing):await pe(e,d),y=de(d,g);return s.set(d,N({key:d,checksum:y,value:typeof g=="string"?g:"",attachment:Buffer.isBuffer(g)?g.toString("base64"):""})),g},c=C(es,{cwd:e,deep:3,ignore:O}).then(d=>Promise.all([wt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),p=d=>Le([{key:d}],o).length===0;function f(d,g,y,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===Se()){ee(g,T);return}let w=l(T);if(t?.listing&&w.startsWith(`listings/${t.listing}/`)){let R=w.replace(`listings/${t.listing}/`,"");if(R.startsWith("templates/")||R.startsWith("sections/"))w=R;else return}x(w).then(()=>{switch(d){case"add":case"change":return P(d,g,y,w);case"unlink":return ve(g,y,w,n)}}).catch(R=>{D(`Error handling file event for ${w}: ${R}`)})}function x(d){return u?.notify(d)??Promise.resolve()}let P=(d,g,y,T)=>{if(p(T))return;let w=s.get(T)?.checksum,R=m(T).then(async()=>{let S=s.get(T);if(S)return S.checksum!==w&&r.add(T),{value:S.value||void 0,attachment:S.attachment}}),I=R.then(S=>{if(S)return nn(r,n,T,g,y)(S)}).catch(_e(T,"upload"));a(d,{fileKey:T,onContent:S=>{R.then(Y=>{r.has(T)&&S(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(S,Y)=>{I.then(G=>{G?S():Y?.()}).catch(()=>{})}})},ve=(d,g,y,T)=>{if(p(y))return;T.delete(y),s.delete(y),r.add(y);let w=t?.noDelete?Promise.resolve():ot(Number(d),[y],g).then(async R=>{if(!R[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ts("delete",y),!0}).catch(R=>(_e(y,"delete")(R),!1));a("unlink",{fileKey:y,onSync:R=>{w.then(I=>{I&&R()}).catch(()=>{})}})},Pe=new Set(es.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&Pe.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&Pe.add(Se()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await on(e,d)},write:async d=>{let g=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&g){let y=E("listings",t.listing,d.key),T=E(e,y),w=await v(T);s.set(d.key,N({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),w?await Be(e,{...d,key:y}):await Be(e,d);return}s.set(d.key,N({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Be(e,d)},read:m,applyIgnoreFilters:d=>Le(d,o),addEventListener:(d,g)=>{i.on(d,g)},startWatcher:async(d,g)=>{let{default:y}=await import("./chokidar-VDIVGBZH.js"),T=y.watch([...Pe],{ignored:O,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),w=new Map,R=(I,S)=>{let G=`${l(S)}:${I}`,ze=w.get(G);ze&&clearTimeout(ze);let ss=setTimeout(()=>{w.delete(G),f(I,d,g,S)},sn);w.set(G,ss)};T.on("add",R.bind(null,"add")).on("change",R.bind(null,"change")).on("unlink",R.bind(null,"unlink")).on("error",I=>{D(`File watcher error: ${I}`),L("theme-service:file-watcher:error")})}}}function nn(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await it(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ee(n,s),new Error(a.join(`
|
|
100
|
+
`))}return t.delete(s)&&ee(n,s),e.delete(s),ts("update",s),!0}}async function Be(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await an(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function pe(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await v(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function rn(e,t,s){if(t==="config/settings_data.json")return Kt(e,s);let n=await Qt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return pe(e,t)}async function on(e,t){let s=E(e,t);if(!await v(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Ze(s)}function Ao(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],m=[],c=[],l=[];return e.forEach(p=>{let f=p.key;f.endsWith(".liquid")?b.sectionLiquidRegex.test(f)?t.push(p):b.blockLiquidRegex.test(f)?c.push(p):b.layoutLiquidRegex.test(f)?l.push(p):s.push(p):b.configSchemaRegex.test(f)?a.push(p):b.configDataRegex.test(f)?u.push(p):b.jsonRegex.test(f)?b.contextualizedJsonRegex.test(f)?i.push(p):b.sectionJsonRegex.test(f)?n.push(p):b.templateJsonRegex.test(f)?r.push(p):o.push(p):b.staticAssetRegex.test(f)&&m.push(p)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,staticAssetFiles:m,blockLiquidFiles:c,layoutFiles:l}}function Fe(e){return xt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml"].includes(U(e))}async function Ho(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","sections","templates"].every(n=>t.has(n))}async function an(e){let t=cn(e);await v(t)||await Xe(t)}function cn(e){let t=Ge(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ts(e,t){re(ne`• ${oe.format(new Date)} Synced ${q.raw("\xBB")} ${e} ${t}`)}function Se(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?E(tn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function de(e,t){return t?Buffer.isBuffer(t)?Je(t):un(e)?ln(t):dn(e,t):""}function ln(e){let t=e;return t=t.replace(/\r\n/g,`
|
|
101
|
+
`),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=pn(t),Je(t)}function dn(e,t){let s=t;return Fe(e)&&(s=s.replace(/\r\n/g,`
|
|
102
|
+
`)),Je(s)}function pn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
|
|
103
|
+
`))&&(n+=r,s=r==="\\"&&!s);return n}function Je(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Qe(t)}function Mo(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function un(e){return e.endsWith("/settings_data.json")}export{Mo as a,jt as b,Dt as c,Ot as d,Mt as e,qr as f,zr as g,co as h,Jt as i,ee as j,go as k,Co as l,Ao as m,Ho as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f}from"./chunk-S7F5KFQP.js";import{a as n}from"./chunk-5BKCIDMS.js";import{C as p,F as s,Ga as c}from"./chunk-4QTEPWEJ.js";import{b as e}from"./chunk-OXJBYKMX.js";import{r as d}from"./chunk-T6CC5WUU.js";import{e as l,g as r}from"./chunk-VKWPEFWQ.js";r();var m=l(d(),1);var t,{config:b,...u}=n,o=class extends f{async run(){let{flags:a,args:i}=await this.parse(t),{app:g}=await c({directory:a.path,userProvidedConfigName:i.config});return await s(a.path),await p({directory:a.path,configName:i.config,reset:a.reset}),{app:g}}};t=o;o.summary="Activate an app configuration.";o.descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";o.description=t.descriptionWithoutMarkdown();o.usage="app config use [config] [flags]";o.flags={...e,...u};o.args={config:m.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};var v=o;export{v as a};
|