shopify 4.9.5 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-RSUIYNLC.js +1 -0
- package/dist/analytics-V2SDYXQJ.js +1 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +7 -0
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/assets/hydrogen/vite/package.json +3 -4
- package/dist/assets/hydrogen/vite/vite.config.js +3 -3
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-2AW3KBTP.js +1 -0
- package/dist/{chunk-S6A7TMR4.js → chunk-2CJQQQW4.js} +1 -1
- package/dist/{chunk-7LB6DPB6.js → chunk-2M4BKFYF.js} +1 -1
- package/dist/chunk-2M535QQJ.js +6 -0
- package/dist/chunk-2NZ7GDDR.js +2 -0
- package/dist/{chunk-QUO4RD3W.js → chunk-2QQ7EBJD.js} +1 -1
- package/dist/chunk-2RFCYZMG.js +47 -0
- package/dist/chunk-2S5NPJEJ.js +5 -0
- package/dist/chunk-2TPLPZA2.js +3 -0
- package/dist/{chunk-ANG44FIF.js → chunk-2YGPWG3I.js} +1 -1
- package/dist/chunk-32O27NE3.js +1 -0
- package/dist/chunk-335BUVBP.js +1 -0
- package/dist/{chunk-MZL6VM3W.js → chunk-364BVGRY.js} +1 -1
- package/dist/{chunk-4VS7YD53.js → chunk-36TZ447N.js} +1 -1
- package/dist/chunk-37P5YOP2.js +7 -0
- package/dist/chunk-3G2PEYPI.js +2 -0
- package/dist/{chunk-2II4W4ZF.js → chunk-3JACWBUC.js} +1 -1
- package/dist/chunk-43HKFLOU.js +3 -0
- package/dist/chunk-46JYM3GH.js +1 -0
- package/dist/chunk-4EDE3UH7.js +18 -0
- package/dist/{chunk-ND6O6KT6.js → chunk-4GQEXVDT.js} +1 -1
- package/dist/{chunk-5XTJ4OL4.js → chunk-4IUXLUFD.js} +1 -1
- package/dist/chunk-4QZ6OBXL.js +4 -0
- package/dist/{chunk-XVFQ6CNO.js → chunk-4SDCXKYR.js} +9 -6
- package/dist/chunk-56GKTWFF.js +5 -0
- package/dist/chunk-5AQ5JT2V.js +7 -0
- package/dist/{chunk-SUTVPAJF.js → chunk-5AWELO3D.js} +1 -1
- package/dist/{chunk-LD6ZCTZ3.js → chunk-5B76DT7X.js} +1 -1
- package/dist/chunk-5D4FNAAD.js +3 -0
- package/dist/chunk-5TWYJQQO.js +1 -0
- package/dist/{chunk-3XAD2E55.js → chunk-5XOEMYEQ.js} +1 -1
- package/dist/chunk-5YUDEPEY.js +1 -0
- package/dist/chunk-5YXYYQBX.js +1 -0
- package/dist/chunk-63UKZLPC.js +1 -0
- package/dist/chunk-6JZC6UKY.js +20 -0
- package/dist/chunk-6PUU6ZNQ.js +1 -0
- package/dist/chunk-6Y6A2QGK.js +3 -0
- package/dist/chunk-75LAVRRL.js +274 -0
- package/dist/chunk-7AWAOPLA.js +1 -0
- package/dist/chunk-7GHSE7SG.js +1 -0
- package/dist/{chunk-CEQ5S3HH.js → chunk-7NYCJG2U.js} +1 -1
- package/dist/chunk-7U2MTK6I.js +1 -0
- package/dist/{chunk-NHE46R6C.js → chunk-7XAEI4XT.js} +1 -1
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/chunk-A7LBGXWG.js +1 -0
- package/dist/{chunk-SEXH4EP5.js → chunk-ACA2BGAD.js} +1 -1
- package/dist/chunk-ADVLRSSO.js +1 -0
- package/dist/chunk-AIEVQSI3.js +1 -0
- package/dist/chunk-AOBE6HN6.js +31 -0
- package/dist/chunk-AQ34X5B3.js +2 -0
- package/dist/chunk-B2VE7WOX.js +1 -0
- package/dist/chunk-B4ISKIXN.js +5 -0
- package/dist/chunk-BAHIL37I.js +1 -0
- package/dist/chunk-BB7GAZP6.js +1 -0
- package/dist/{chunk-AJMJQA4J.js → chunk-BN7ZXAZJ.js} +1 -1
- package/dist/chunk-BNTOGZLY.js +1 -0
- package/dist/chunk-BU3JQM3W.js +1 -0
- package/dist/chunk-C3LL5CZA.js +1 -0
- package/dist/{chunk-PIGERIRY.js → chunk-C4EKNOLY.js} +1 -1
- package/dist/{chunk-YN4FSUFF.js → chunk-CFUZ6574.js} +1 -1
- package/dist/{chunk-7DSH4CRU.js → chunk-CKVVJ4XO.js} +1 -1
- package/dist/chunk-CNPBDSDL.js +1 -0
- package/dist/{chunk-BAHM64B4.js → chunk-CWR3IFXD.js} +1 -1
- package/dist/{chunk-T3UCIWRH.js → chunk-CX3ANDPI.js} +1 -1
- package/dist/chunk-CXPYOLGM.js +4 -0
- package/dist/{chunk-MTBABHUB.js → chunk-D4LFWIFE.js} +1 -1
- package/dist/chunk-DM7BTMFP.js +2 -0
- package/dist/{chunk-WGO2GC6I.js → chunk-DSKAIC7O.js} +1 -1
- package/dist/{chunk-WKVFVT3H.js → chunk-DTRENW4Q.js} +1 -1
- package/dist/{chunk-G362JEAV.js → chunk-DVW7NDVD.js} +1 -1
- package/dist/chunk-E3CTHNQS.js +1 -0
- package/dist/chunk-EA5XVQJT.js +1 -0
- package/dist/{chunk-K6FH5JSY.js → chunk-EH22T4FI.js} +2 -2
- package/dist/{chunk-5NCWBBRW.js → chunk-ETXBF6Q7.js} +1 -1
- package/dist/{chunk-5GFVMGAZ.js → chunk-EXTVC33U.js} +1 -1
- package/dist/chunk-F3OM2YO6.js +1 -0
- package/dist/{chunk-MWWULCLD.js → chunk-FHNJLON5.js} +1 -1
- package/dist/chunk-FK5OFLSJ.js +1 -0
- package/dist/chunk-FNWXMCSD.js +97 -0
- package/dist/chunk-FPOZMNT2.js +2 -0
- package/dist/chunk-FS5PZCZ3.js +1 -0
- package/dist/chunk-FTHVOIK7.js +4 -0
- package/dist/chunk-FVRI7ZKE.js +103 -0
- package/dist/chunk-FZCGRIOM.js +1 -0
- package/dist/chunk-GCKGQFV7.js +1 -0
- package/dist/chunk-GGJUPL4W.js +6 -0
- package/dist/{chunk-RW3P3UMU.js → chunk-GHU6YEXH.js} +2 -2
- package/dist/chunk-GNPIKPHB.js +1 -0
- package/dist/{chunk-PT3OZEBI.js → chunk-GSGCSBRN.js} +1 -1
- package/dist/chunk-H57KYDEI.js +16 -0
- package/dist/chunk-HF4NDEX3.js +1 -0
- package/dist/chunk-HNU6R7RT.js +7 -0
- package/dist/{chunk-65GNYRYR.js → chunk-HP2ZAAY7.js} +2 -2
- package/dist/chunk-HPT3UXZ5.js +4 -0
- package/dist/chunk-HT66BOEC.js +8 -0
- package/dist/chunk-HXNGLDMU.js +1 -0
- package/dist/chunk-IAL6IQYW.js +16 -0
- package/dist/{chunk-PIZDYS7T.js → chunk-IILLQOUC.js} +60 -60
- package/dist/chunk-IULZYDCI.js +9 -0
- package/dist/chunk-IWTNUJGY.js +2 -0
- package/dist/chunk-IWTOC6DG.js +1 -0
- package/dist/chunk-IY5EI5V2.js +1 -0
- package/dist/{chunk-AODTY2BL.js → chunk-J3UXIC23.js} +4 -4
- package/dist/{chunk-EZG5EB7D.js → chunk-J5DUFSR4.js} +1 -1
- package/dist/chunk-J7BTC45S.js +1 -0
- package/dist/chunk-JMVK2BIB.js +3 -0
- package/dist/chunk-JUTULEWW.js +5 -0
- package/dist/{chunk-DO5YFMTJ.js → chunk-K3YALQBQ.js} +1 -1
- package/dist/{chunk-XPDHT3Z4.js → chunk-KGASGUDQ.js} +1 -1
- package/dist/{chunk-JPFHPVIO.js → chunk-KLYGMYXV.js} +1 -1
- package/dist/chunk-KNQXCU3Y.js +6 -0
- package/dist/{chunk-4BXQTW5G.js → chunk-KOTZSPZA.js} +1 -1
- package/dist/chunk-KT5QQOES.js +3 -0
- package/dist/chunk-KVF55INC.js +5 -0
- package/dist/chunk-L6VONMA2.js +5 -0
- package/dist/chunk-LENSEW2F.js +2 -0
- package/dist/{chunk-35NTERVR.js → chunk-LGXNXAQA.js} +2 -2
- package/dist/{chunk-TQ7URMGS.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-LR4J4KYJ.js +5 -0
- package/dist/chunk-LWMKZJ4M.js +1 -0
- package/dist/chunk-M2KX3PXA.js +1 -0
- package/dist/{chunk-VSFZEGIK.js → chunk-M73IECPW.js} +1 -1
- package/dist/{chunk-Z4DESIR5.js → chunk-M7NLCGCP.js} +1 -1
- package/dist/chunk-MHWETFNT.js +1 -0
- package/dist/chunk-MMUGP3WP.js +7 -0
- package/dist/{chunk-VG5ZDVDQ.js → chunk-MNWT2SQO.js} +86 -200
- package/dist/chunk-MS7DTL4U.js +213 -0
- package/dist/chunk-MU2X7NGF.js +11 -0
- package/dist/chunk-MXXMIPUN.js +8 -0
- package/dist/{chunk-XTOOTN4P.js → chunk-MZCIRMZJ.js} +1 -1
- package/dist/{chunk-LLNUIGHP.js → chunk-MZWPIFAM.js} +4 -4
- package/dist/{chunk-HB4YI2PF.js → chunk-NCPZVARH.js} +118 -118
- package/dist/{chunk-LCMDVUVO.js → chunk-NJVNGEOU.js} +30 -30
- package/dist/chunk-NMECLRGK.js +11 -0
- package/dist/{chunk-VNG2I7NM.js → chunk-NMLLRFZF.js} +1 -1
- package/dist/chunk-NPB753M3.js +1 -0
- package/dist/chunk-NUCDRKDW.js +5 -0
- package/dist/chunk-OH7BQZQ7.js +2 -0
- package/dist/chunk-OLKLHVHA.js +22 -0
- package/dist/chunk-OPVXPDOQ.js +1 -0
- package/dist/chunk-OQUXGAF2.js +1 -0
- package/dist/chunk-OUMERKRE.js +10 -0
- package/dist/{chunk-PFXDXD5O.js → chunk-OYGIQDME.js} +1 -1
- package/dist/{chunk-4IAGBAQD.js → chunk-P5W5RVE6.js} +1 -1
- package/dist/chunk-PNZURX3S.js +1 -0
- package/dist/chunk-PRKJVU4Y.js +1 -0
- package/dist/{chunk-2VGPNRHH.js → chunk-PVASYKSJ.js} +2 -2
- package/dist/chunk-PXFPVGWV.js +1 -0
- package/dist/chunk-Q2ORJEB2.js +25 -0
- package/dist/chunk-QBE6XVU3.js +1 -0
- package/dist/chunk-QFWWCZOI.js +1 -0
- package/dist/{chunk-TR4OWSEX.js → chunk-QFYLJVJW.js} +1 -1
- package/dist/{chunk-Y5VFOLNQ.js → chunk-QGWC23HQ.js} +1 -1
- package/dist/chunk-QVVQUJQL.js +2 -0
- package/dist/{chunk-762IKULK.js → chunk-QX3T6G5X.js} +1 -1
- package/dist/chunk-QYFU363G.js +17 -0
- package/dist/chunk-RDXLDCMI.js +3 -0
- package/dist/chunk-REDUS6EW.js +1 -0
- package/dist/{chunk-KOS53Z7E.js → chunk-RFZNFTVM.js} +1 -1
- package/dist/chunk-RIG66DIQ.js +18 -0
- package/dist/chunk-RNUEPPVN.js +1 -0
- package/dist/chunk-RWTAPWLJ.js +3 -0
- package/dist/chunk-T5YVYVSW.js +1 -0
- package/dist/{chunk-VTOPYXHO.js → chunk-TTBNFGCW.js} +2 -2
- package/dist/chunk-UDPYSL3M.js +4 -0
- package/dist/{chunk-EAVD3OH2.js → chunk-ULMNNGGX.js} +1 -1
- package/dist/chunk-URCH4ITT.js +1 -0
- package/dist/chunk-UU2R56LN.js +12 -0
- package/dist/{chunk-YIZAQABE.js → chunk-V2FCZC7U.js} +1 -1
- package/dist/chunk-V654BMS7.js +376 -0
- package/dist/{chunk-5BGUKF7L.js → chunk-V75WUEFU.js} +1 -1
- package/dist/{chunk-5O7JTVO2.js → chunk-V7H7ITCF.js} +1 -1
- package/dist/{chunk-EO422KZZ.js → chunk-VG2AESTZ.js} +1 -1
- package/dist/chunk-VXD26GIG.js +1 -0
- package/dist/chunk-VXL5FBE7.js +3 -0
- package/dist/{chunk-RUDHGUIM.js → chunk-W7S6SYBM.js} +1 -1
- package/dist/chunk-WAY723TL.js +16 -0
- package/dist/{chunk-4TF7ER72.js → chunk-WBJ6ZHYH.js} +1 -1
- package/dist/chunk-WFOU5M4H.js +16 -0
- package/dist/chunk-WGOSE3RL.js +4 -0
- package/dist/chunk-WQ6W725N.js +1 -0
- package/dist/{chunk-7BWSN3SG.js → chunk-WQOPLNDH.js} +1 -1
- package/dist/chunk-X4A5D3PZ.js +8 -0
- package/dist/chunk-X7DCL5LT.js +1 -0
- package/dist/{chunk-HY6EXJBZ.js → chunk-XDXHSGDL.js} +1 -1
- package/dist/chunk-XKKKMV46.js +6 -0
- package/dist/chunk-XRVJJG6W.js +26 -0
- package/dist/chunk-XV6XCOTG.js +319 -0
- package/dist/chunk-XYFYQWKW.js +1 -0
- package/dist/{chunk-BD2L6YE5.js → chunk-XZLM4HLO.js} +1 -1
- package/dist/{chunk-YLCYRG2T.js → chunk-YCUEDZDA.js} +1 -1
- package/dist/{chunk-MF7IHOM5.js → chunk-YFRI75U4.js} +1 -1
- package/dist/chunk-YQ63ZFYT.js +1 -0
- package/dist/{chunk-I3J63RFV.js → chunk-YTUUU33R.js} +1 -1
- package/dist/chunk-YXIFSIRX.js +1 -0
- package/dist/{chunk-QBIYAMSH.js → chunk-ZBVHPC6W.js} +1 -1
- package/dist/chunk-ZDQO6CNY.js +1 -0
- package/dist/{chunk-LG6DGIFX.js → chunk-ZHHTQRWU.js} +1 -1
- package/dist/chunk-ZTZGDZCE.js +7 -0
- package/dist/{chunk-MQ4WV4B6.js → chunk-ZVEBXHEY.js} +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +34 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +53 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.d.ts +6 -6
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.d.ts +64 -0
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/services/commands/doc/fetch-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/fetch-result.js +22 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +2 -1
- package/dist/cli/services/commands/doc/fetch.js +2 -15
- package/dist/cli/services/commands/doc/search-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/search-result.js +14 -0
- package/dist/cli/services/commands/doc/search.d.ts +9 -1
- package/dist/cli/services/commands/doc/search.js +27 -2
- package/dist/cli/services/commands/doc/types.d.ts +107 -0
- package/dist/cli/services/commands/doc/types.js +47 -0
- package/dist/cli/services/commands/help/types.d.ts +6 -6
- package/dist/command-event-context-LFUZ7UCA.js +1 -0
- package/dist/command-json-schema-6EGXCM4B.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-E7ELDWBA.js +1 -0
- package/dist/custom-oclif-loader-FKFZJPHF.js +1 -0
- package/dist/deprecations-RNGBHZYB.js +1 -0
- package/dist/dist-VHIZZDYK.js +1 -0
- package/dist/dist-WXI5YQYP.js +1 -0
- package/dist/{environment-RSUK27TA.js → environment-O7ECODHU.js} +1 -1
- package/dist/environments-WZJ6MRTH.js +1 -0
- package/dist/error-IFB626JA.js +1 -0
- package/dist/error-handler-OVJYVIOZ.js +1 -0
- package/dist/fs-7UOUHJDO.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +13 -13
- package/dist/is-global-XW3CVHLK.js +1 -0
- package/dist/json-error-C2U7ZLCG.js +1 -0
- package/dist/{lib-TYM5B75S.js → lib-PJHT4MKY.js} +1 -1
- package/dist/{lib-55QUD4AJ.js → lib-VKSQ65BQ.js} +1 -1
- package/dist/{lib-PH52G55H.js → lib-YEZOHXF3.js} +1 -1
- package/dist/{local-ZZGRGYUP.js → local-KA3IWOZ6.js} +1 -1
- package/dist/{metadata-YQNVKC2R.js → metadata-6JI7HF5B.js} +1 -1
- package/dist/{morph-BABFBRSW.js → morph-CRY35DIK.js} +1 -1
- package/dist/node-package-manager-X3QIEMMX.js +1 -0
- package/dist/notifications-system-OXGLT2R4.js +1 -0
- package/dist/os-NORIEVMI.js +1 -0
- package/dist/out-B2GISN65.js +1 -0
- package/dist/output-K3JTLRJD.js +1 -0
- package/dist/{path-CPAYTWQW.js → path-3L2QRACZ.js} +1 -1
- package/dist/system-LTHR2T7L.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-MYUBVKCK.js +1 -0
- package/dist/upgrade-MFTWBXL3.js +1 -0
- package/dist/version-BNGPPAUU.js +1 -0
- package/dist/version-RCGFWSB4.js +1 -0
- package/dist/workerd-ISSXMKIH.js +18 -0
- package/oclif.manifest.json +1669 -429
- package/package.json +8 -8
- package/dist/analytics-PBZEKUGU.js +0 -1
- package/dist/analytics-WVGBNFGK.js +0 -1
- package/dist/chunk-2EC5SUGK.js +0 -19
- package/dist/chunk-2QENUJVG.js +0 -1
- package/dist/chunk-2RONPKOD.js +0 -1
- package/dist/chunk-2WDJXERZ.js +0 -25
- package/dist/chunk-32NWVYUC.js +0 -1
- package/dist/chunk-32RRWGNS.js +0 -1
- package/dist/chunk-32VQQ6EU.js +0 -1
- package/dist/chunk-34RFTE5T.js +0 -4
- package/dist/chunk-35VQQKVX.js +0 -1
- package/dist/chunk-3N6NKC2U.js +0 -1
- package/dist/chunk-3Q5BAPQK.js +0 -7
- package/dist/chunk-42DMJGOW.js +0 -2
- package/dist/chunk-4CTTWXUX.js +0 -32
- package/dist/chunk-4HBKQUKY.js +0 -1
- package/dist/chunk-4MQXMIWQ.js +0 -7
- package/dist/chunk-5APLAJCB.js +0 -3
- package/dist/chunk-5AQNISGC.js +0 -1
- package/dist/chunk-5OM72O4N.js +0 -1
- package/dist/chunk-5SLKHURV.js +0 -1
- package/dist/chunk-5VRB3FBD.js +0 -6
- package/dist/chunk-62GA7XR3.js +0 -18
- package/dist/chunk-62LMVFR7.js +0 -1
- package/dist/chunk-6IDEDOXW.js +0 -2
- package/dist/chunk-72CBJYAG.js +0 -16
- package/dist/chunk-7E4MJCVE.js +0 -10
- package/dist/chunk-7HZU7CYS.js +0 -1
- package/dist/chunk-7Q4EKY3E.js +0 -3
- package/dist/chunk-7YXHILW4.js +0 -383
- package/dist/chunk-7Z6IX7MU.js +0 -1
- package/dist/chunk-A4XREDFZ.js +0 -1
- package/dist/chunk-AHNLGCHF.js +0 -5
- package/dist/chunk-ARRRFY6S.js +0 -4
- package/dist/chunk-BAP2CHI2.js +0 -1
- package/dist/chunk-BQWK222Q.js +0 -1
- package/dist/chunk-C3PXIZY3.js +0 -8
- package/dist/chunk-C6HGU77I.js +0 -1
- package/dist/chunk-CBFAU5AF.js +0 -5
- package/dist/chunk-COP2Q2YT.js +0 -1
- package/dist/chunk-CSWDRG3E.js +0 -1
- package/dist/chunk-CVBWEUWX.js +0 -1
- package/dist/chunk-D3NVUE65.js +0 -1
- package/dist/chunk-DCKRQZLE.js +0 -20
- package/dist/chunk-DYH3ZXJS.js +0 -15
- package/dist/chunk-EBX6DYDX.js +0 -2
- package/dist/chunk-EDRCFY3K.js +0 -16
- package/dist/chunk-EEAY7HFW.js +0 -317
- package/dist/chunk-EJMLNBZA.js +0 -275
- package/dist/chunk-EO3S2TFI.js +0 -2
- package/dist/chunk-EOIGDOUD.js +0 -7
- package/dist/chunk-EYKXHMEJ.js +0 -6
- package/dist/chunk-FHV2H3Z2.js +0 -12
- package/dist/chunk-FOAV642V.js +0 -1
- package/dist/chunk-FVTP7EO4.js +0 -46
- package/dist/chunk-FYIC4JHB.js +0 -26
- package/dist/chunk-GF36WNMH.js +0 -5
- package/dist/chunk-GJ3QUZO6.js +0 -1
- package/dist/chunk-GJZVUEMP.js +0 -11
- package/dist/chunk-GP6O7YRO.js +0 -20
- package/dist/chunk-GW424AJO.js +0 -7
- package/dist/chunk-GXSF6NCR.js +0 -1
- package/dist/chunk-GYVQIRBD.js +0 -1
- package/dist/chunk-H3ZPYOQV.js +0 -1
- package/dist/chunk-H7YSZKZ2.js +0 -1
- package/dist/chunk-HILYTMVA.js +0 -1
- package/dist/chunk-HMWQOQAQ.js +0 -2
- package/dist/chunk-HNSRF4SQ.js +0 -1
- package/dist/chunk-HTODXNY6.js +0 -3
- package/dist/chunk-IUYVJJKE.js +0 -9
- package/dist/chunk-JM2CQP64.js +0 -97
- package/dist/chunk-K4AF7A25.js +0 -1
- package/dist/chunk-KDV4WR5A.js +0 -4
- package/dist/chunk-KF7NL5YM.js +0 -8
- package/dist/chunk-KMJTO7CU.js +0 -103
- package/dist/chunk-KN3MUEWA.js +0 -4
- package/dist/chunk-KYB4JX76.js +0 -5
- package/dist/chunk-LJAU6YHF.js +0 -10
- package/dist/chunk-LMQOFVRC.js +0 -17
- package/dist/chunk-LQSD25YS.js +0 -3
- package/dist/chunk-M2HQFHNO.js +0 -1
- package/dist/chunk-M5WBYWSQ.js +0 -7
- package/dist/chunk-N47RQHEI.js +0 -2
- package/dist/chunk-NRG2WPSM.js +0 -1
- package/dist/chunk-O2CP7DQE.js +0 -1
- package/dist/chunk-O6FXUKI2.js +0 -2
- package/dist/chunk-OHJUEUSA.js +0 -1
- package/dist/chunk-OOKTWSGP.js +0 -4
- package/dist/chunk-OONMCK7X.js +0 -1
- package/dist/chunk-OWK2RI4O.js +0 -6
- package/dist/chunk-P2UEQJJ4.js +0 -5
- package/dist/chunk-QBJ74XPX.js +0 -18
- package/dist/chunk-QGFJOTOH.js +0 -4
- package/dist/chunk-QLHPTMIH.js +0 -1
- package/dist/chunk-RIO5HKD5.js +0 -1
- package/dist/chunk-S7EKUSO6.js +0 -3
- package/dist/chunk-SJ2ROSXG.js +0 -1
- package/dist/chunk-SNTRSP5K.js +0 -359
- package/dist/chunk-SYCN2GT2.js +0 -3
- package/dist/chunk-TBNEN73P.js +0 -1
- package/dist/chunk-TVI7TQ4C.js +0 -16
- package/dist/chunk-TYMYIUIQ.js +0 -1
- package/dist/chunk-UEQT7TA4.js +0 -1
- package/dist/chunk-UUM367NR.js +0 -5
- package/dist/chunk-V5FZRNXI.js +0 -1
- package/dist/chunk-VE35YELD.js +0 -1
- package/dist/chunk-WEICJ4GW.js +0 -1
- package/dist/chunk-WJJXJNNP.js +0 -3
- package/dist/chunk-XAQUXFN5.js +0 -1
- package/dist/chunk-XE6EUHSS.js +0 -2
- package/dist/chunk-XFEJS652.js +0 -16
- package/dist/chunk-XI4QEULN.js +0 -1
- package/dist/chunk-XP63T4KZ.js +0 -5
- package/dist/chunk-XRCAUZAZ.js +0 -8
- package/dist/chunk-XSRZWJIJ.js +0 -1
- package/dist/chunk-YFJELEVH.js +0 -1
- package/dist/chunk-YNJIDLI3.js +0 -7
- package/dist/chunk-YRX4E67D.js +0 -6
- package/dist/chunk-Z2NL6XQK.js +0 -6
- package/dist/chunk-Z6Z5DPKS.js +0 -1
- package/dist/chunk-ZOE6WXW6.js +0 -1
- package/dist/cli/commands/app/app-logs/sources.js +0 -1
- package/dist/command-json-schema-3RP5P43D.js +0 -1
- package/dist/conf-store-XORTWCKZ.js +0 -1
- package/dist/custom-oclif-loader-ZRYPPYIP.js +0 -1
- package/dist/deprecations-AZDMCRNN.js +0 -1
- package/dist/dist-DTBXLVHF.js +0 -1
- package/dist/dist-SOYIDACZ.js +0 -1
- package/dist/environments-L42SEHB4.js +0 -1
- package/dist/error-H6B5BHYC.js +0 -1
- package/dist/error-handler-JB752NKM.js +0 -1
- package/dist/fs-XHZY6MNM.js +0 -1
- package/dist/is-global-2NBDZWLC.js +0 -1
- package/dist/json-error-OHV2KQFY.js +0 -1
- package/dist/node-package-manager-LN2Y7FQ2.js +0 -1
- package/dist/notifications-system-HWJ3F44U.js +0 -1
- package/dist/os-MHOCCDIB.js +0 -1
- package/dist/out-53ABAVL7.js +0 -1
- package/dist/output-GILH4S6M.js +0 -1
- package/dist/system-6WYK24ET.js +0 -1
- package/dist/ui-RP6SVJUK.js +0 -1
- package/dist/upgrade-5G7FBJJV.js +0 -1
- package/dist/version-TOBC7X2C.js +0 -1
- package/dist/version-UIRCT6RC.js +0 -1
- package/dist/workerd-ARH2OCYL.js +0 -18
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{b as oe}from"./chunk-AIEVQSI3.js";import{a as ie,b as ne,q as re}from"./chunk-FNWXMCSD.js";import{$ as te,F as ee}from"./chunk-V654BMS7.js";import{a as q,d as X}from"./chunk-335BUVBP.js";import{h as A}from"./chunk-J7BTC45S.js";import{Sa as Z,la as Y}from"./chunk-RIG66DIQ.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();var Ce=/^gid:\/\/shopify\/Shop\/(\d+)$/,ve=/^\d+$/,se=250,De=new Set(ie),Re=new Set(ne);function le(i,e){let o=[],t=[],n=new Map;for(let s of e){let f=Be(s.shopId),l=!0;if(f){let L=n.get(f);L===void 0?n.set(f,s.sourceRow):(o.push({row:s.sourceRow,field:"shop_id",message:`Duplicate shop ID; first seen on row ${L}`}),l=!1)}else o.push({row:s.sourceRow,field:"shop_id",message:"Shop ID must be a positive numeric ID or gid://shopify/Shop/<id>"}),l=!1;if(i==="unschedule"){l&&f&&t.push({action:i,shopId:f});continue}let h=s.targetPlanHandle?.trim(),w=s.priceBehavior?.trim(),S=s.notification?.trim(),O=S?.length?S:"WHEN_REQUIRED";h||(o.push({row:s.sourceRow,field:"target_plan_handle",message:"Target plan handle is required"}),l=!1),ae(w)||(o.push({row:s.sourceRow,field:"price_behavior",message:"Price behavior must be HONOR_BILLING_PRICE or PLAN_PRICE"}),l=!1),fe(O)||(o.push({row:s.sourceRow,field:"notification",message:"Notification must be OPT_OUT or WHEN_REQUIRED"}),l=!1),l&&f&&h&&ae(w)&&fe(O)&&t.push({action:i,shopId:f,targetPlanHandle:h,priceBehavior:w,notification:O})}if(o.length>0)return{ok:!1,errors:o};let r=[...t].sort((s,f)=>s.shopId<f.shopId?-1:s.shopId>f.shopId?1:0),a=ue(i,r);return{ok:!0,plan:{action:i,rows:r,batches:Ae(i,r),canonicalInput:a,inputDigest:ce(a)}}}function Be(i){let e=i?.trim();if(!e)return;let o=ve.test(e)?e:Ce.exec(e)?.[1];if(o===void 0)return;let t=BigInt(o);return t>0?`gid://shopify/Shop/${t}`:void 0}function ae(i){return i!==void 0&&De.has(i)}function fe(i){return Re.has(i)}function ue(i,e){return JSON.stringify({version:1,action:i,rows:e})}function Ae(i,e){let o=[];for(let t=0;t<e.length;t+=se){let n=e.slice(t,t+se),r=ue(i,n);o.push({index:o.length,rows:n,canonicalPayload:r,payloadDigest:ce(r)})}return o}function ce(i){return q(i).toString("hex")}d();d();d();d();d();var c=class i extends Error{constructor(e,o,t,...n){Array.isArray(o)&&(o=o.join(" ").trim()),super(o),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let r of n)for(let a in r){let s=r[a];this[a]=Buffer.isBuffer(s)?s.toString(t.encoding):s==null?s:JSON.parse(JSON.stringify(s))}}};d();var M=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var z=function(i){let e=[];for(let o=0,t=i.length;o<t;o++){let n=i[o];if(n==null||n===!1)e[o]={disabled:!0};else if(typeof n=="string"||typeof n=="number")e[o]={name:`${n}`};else if(M(n)){if(typeof n.name!="string")throw new c("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${o}`,"when column is an object literal"]);e[o]=n}else throw new c("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(n)} at position ${o}`])}return e};d();d();var Q=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let o=this.length+e.length;if(o>=this.size&&(this.resize(),o>=this.size))throw Error("INVALID_BUFFER_STATE");let t=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{let o=this.length++;o===this.size&&this.resize();let t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,o)}}append(e){let o=this.length++;o===this.size&&this.resize(),this.buf[o]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let o=Buffer.allocUnsafe(this.size);this.buf.copy(o,0,0,e),this.buf=o}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},H=Q;var de=function(i){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((t,n)=>{let r=Buffer.from(String.fromCharCode(n),i.encoding);return n!==63&&r.length===1&&r[0]===63||t.push(r),t},[]),o=new Uint8Array(256);for(let t of e)o[t[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new H(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter?i.delimiter.map(t=>t.length):[],i.delimiter_auto?1:0,i.quote!==null?i.quote.length:0,...e.map(t=>t.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new H(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(t=>t.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:o}};d();d();var me=function(i){return i.replace(/([A-Z])/g,function(e,o){return"_"+o.toLowerCase()})};var T=function(i){let e={};for(let t in i)e[me(t)]=i[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new c("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new c("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new c("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){let n=Date.parse(t);return isNaN(n)?t:new Date(n)};else if(typeof e.cast_date!="function")throw new c("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=z(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new c("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!M(e.delimiter_auto))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!M(e.delimiter_auto.preferred))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(t,n)=>(t.total-t.std)*(n.preferred[t.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let o=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(t){if(typeof t=="string"&&(t=Buffer.from(t,e.encoding)),!Buffer.isBuffer(t)||t.length===0)throw new c("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${o}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new c("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new c("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new c("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,n){if(typeof t!="string"&&!Buffer.isBuffer(t))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=Buffer.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};d();var _e=function(i,e){e||({delimiter_auto:e}=T({delimiter_auto:!0})),typeof i=="string"&&(i=Buffer.from(i)),Buffer.isBuffer(i)&&(i=(n=>{let r=[],a=j({delimiter:[]}),s=h=>r.push(h),f=()=>{},l=a.parse(n,!0,s,f);if(l!==void 0)throw l;return r})(i));let o=Array(127).fill().map(()=>({lines:[]}));i.map(([n],r)=>{for(let a=0,s=n.length;a<s;a++){let f=n.charCodeAt(a);o[f].lines[r]===void 0&&(o[f].lines[r]=0),o[f].lines[r]++}}),o.map((n,r)=>{n.char_code=r,n.std=Le(n.lines),n.total=n.lines.reduce((a,s)=>a+s,0),n.preferred=!!e.preferred[r],n.score=e.score(n,e)});let t=o.reduce((n,r)=>n.score>r.score?n:r,{});return String.fromCharCode(t.char_code)},Le=function(i){let e=i.length;if(e===0)return 0;let o=i.reduce((t,n)=>t+n)/e;return Math.sqrt(i.map(t=>Math.pow(t-o,2)).reduce((t,n)=>t+n)/e)};var he=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},Te=13,$e=10,$={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},j=function(i={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},o=T(i);return{info:e,original_options:i,options:o,state:de(o),__needMoreData:function(t,n,r){if(r)return!1;let{encoding:a,escape:s,quote:f}=this.options,{quoting:l,needMoreDataSize:h,recordDelimiterMaxLength:w}=this.state,S=n-t-1,O=Math.max(h,w===0?Buffer.from(`\r
|
|
2
|
+
`,a).length:w,l?(s===null?0:s.length)+f.length:0,l?f.length+w:0);return S<O},parse:function(t,n,r,a){let{bom:s,comment_no_infix:f,delimiter_auto:l,encoding:h,from_line:w,ltrim:S,max_record_size:O,raw:L,relax_quotes:I,rtrim:E,skip_empty_lines:y,to:g,to_line:p}=this.options,{comment:x,escape:C,quote:N,record_delimiter:F}=this.options,{bomSkipped:Se,delimiterDiscovered:Ne,delimiterBufPrevious:V,rawBuffer:Ee,escapeIsQuote:xe}=this.state;if(!Ne&&l){let _;if(V===void 0?_=t:V!==void 0&&t===void 0?_=V:_=Buffer.concat([V,t]),t=void 0,n||_.length>l.size)this.options.delimiter=[Buffer.from(_e(_,this.options.delimiter_auto))],this.state.previousBuf=_,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=_;return}}let{previousBuf:P}=this.state,m;if(P===void 0)if(t===void 0){a();return}else m=t;else P!==void 0&&t===void 0?m=P:m=Buffer.concat([P,t]);if(Se===!1)if(s===!1)this.state.bomSkipped=!0;else if(m.length<3){if(n===!1){this.state.previousBuf=m;return}}else{for(let _ in $)if($[_].compare(m,0,$[_].length)===0){let D=$[_].length;this.state.bufBytesStart+=D,m=m.slice(D);let k=T({...this.original_options,encoding:_});for(let b in k)this.options[b]=k[b];({comment:x,escape:C,quote:N}=this.options);break}this.state.bomSkipped=!0}let U=m.length,u;for(u=0;u<U&&!this.__needMoreData(u,U,n);u++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),p!==-1&&this.info.lines>p){this.state.stop=!0,a();return}this.state.quoting===!1&&F.length===0&&this.__autoDiscoverRecordDelimiter(m,u)&&(F=this.options.record_delimiter);let _=m[u];if(L===!0&&Ee.append(_),(_===Te||_===$e)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(C!==null&&this.state.quoting===!0&&this.__isEscape(m,u,_)&&u+C.length<U)if(xe){if(this.__isQuote(m,u+C.length)){this.state.escaping=!0,u+=C.length-1;continue}}else{this.state.escaping=!0,u+=C.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(m,u))if(this.state.quoting===!0){let b=m[u+N.length],R=E&&this.__isCharTrimable(m,u+N.length),v=x!==null&&this.__compareBytes(x,m,u+N.length,b),B=this.__isDelimiter(m,u+N.length,b),J=F.length===0?this.__autoDiscoverRecordDelimiter(m,u+N.length):this.__isRecordDelimiter(b,m,u+N.length);if(C!==null&&this.__isEscape(m,u,_)&&this.__isQuote(m,u+C.length))u+=C.length-1;else if(!b||B||J||v||R){this.state.quoting=!1,this.state.wasQuoting=!0,u+=N.length-1;continue}else if(I===!1){let W=this.__error(new c("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(b)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(W!==void 0)return W}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),u+=N.length-1}else if(this.state.field.length!==0){if(I===!1){let b=this.__infoField(),R=Object.keys($).map(B=>$[B].equals(this.state.field.toString())?B:!1).filter(Boolean)[0],v=this.__error(new c("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(b.column)} at line ${b.lines}, value is ${JSON.stringify(this.state.field.toString(h))}`,R?`(${R} bom)`:void 0],this.options,b,{field:this.state.field}));if(v!==void 0)return v}}else{this.state.quoting=!0,u+=N.length-1;continue}if(this.state.quoting===!1){let b=this.__isRecordDelimiter(_,m,u);if(b!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=w){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),u+=b-1;continue}if(y===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,u+=b-1;continue}this.info.bytes=this.state.bufBytesStart+u;let B=this.__onField();if(B!==void 0)return B;this.info.bytes=this.state.bufBytesStart+u+b;let J=this.__onRecord(r);if(J!==void 0)return J;if(g!==-1&&this.info.records>=g){this.state.stop=!0,a();return}}this.state.commenting=!1,u+=b-1;continue}if(this.state.commenting)continue;if(x!==null&&(f===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(x,m,u,_)!==0){this.state.commenting=!0;continue}let R=this.__isDelimiter(m,u,_);if(R!==0){this.info.bytes=this.state.bufBytesStart+u;let v=this.__onField();if(v!==void 0)return v;u+=R-1;continue}}}if(this.state.commenting===!1&&O!==0&&this.state.record_length+this.state.field.length>O)return this.__error(new c("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${O}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let D=S===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(m,u),k=E===!1||this.state.wasQuoting===!1;if(D===!0&&k===!0)this.state.field.append(_);else{if(E===!0&&!this.__isCharTrimable(m,u))return this.__error(new c("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));D===!1&&(u+=this.__isCharTrimable(m,u)-1);continue}}if(n===!0)if(this.state.quoting===!0){let _=this.__error(new c("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(_!==void 0)return _}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+u;let _=this.__onField();if(_!==void 0)return _;let D=this.__onRecord(r);if(D!==void 0)return D}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=u,this.state.previousBuf=m.slice(u);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(t){let{columns:n,group_columns_by_name:r,encoding:a,info:s,from:f,relax_column_count:l,relax_column_count_less:h,relax_column_count_more:w,raw:S,skip_records_with_empty_values:O}=this.options,{enabled:L,record:I}=this.state;if(L===!1)return this.__resetRecord();let E=I.length;if(n===!0){if(O===!0&&he(I)){this.__resetRecord();return}return this.__firstLineToColumns(I)}if(n===!1&&this.info.records===0&&(this.state.expectedRecordLength=E),E!==this.state.expectedRecordLength){let y=n===!1?new c("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:I}):new c("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${n.length},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:I});if(l===!0||h===!0&&E<this.state.expectedRecordLength||w===!0&&E>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=y;else{let g=this.__error(y);if(g)return g}}if(O===!0&&he(I)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,f===1||this.info.records>=f){let{objname:y}=this.options;if(n!==!1){let g={};for(let p=0,x=I.length;p<x;p++)n[p]===void 0||n[p].disabled||(r===!0&&Object.hasOwn(g,n[p].name)?Array.isArray(g[n[p].name])?g[n[p].name]=g[n[p].name].concat(I[p]):g[n[p].name]=[g[n[p].name],I[p]]:Object.defineProperty(g,n[p].name,{value:I[p],enumerable:!0,writable:!0,configurable:!0}));if(S===!0||s===!0){let p=Object.assign({record:g},S===!0?{raw:this.state.rawBuffer.toString(a)}:{},s===!0?{info:this.__infoRecord()}:{}),x=this.__push(y===void 0?p:[g[y],p],t);if(x)return x}else{let p=this.__push(y===void 0?g:[g[y],g],t);if(p)return p}}else if(S===!0||s===!0){let g=Object.assign({record:I},S===!0?{raw:this.state.rawBuffer.toString(a)}:{},s===!0?{info:this.__infoRecord()}:{}),p=this.__push(y===void 0?g:[I[y],g],t);if(p)return p}else{let g=this.__push(y===void 0?I:[I[y],I],t);if(g)return g}}this.__resetRecord()},__firstLineToColumns:function(t){let{firstLineToHeaders:n}=this.state;try{let r=n===void 0?t:n.call(null,t);if(!Array.isArray(r))return this.__error(new c("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(r)}`],this.options,this.__infoField(),{headers:r}));let a=z(r);this.state.expectedRecordLength=a.length,this.options.columns=a,this.__resetRecord();return}catch(r){return r}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:t,encoding:n,rtrim:r,max_record_size:a}=this.options,{enabled:s,wasQuoting:f}=this.state;if(s===!1)return this.__resetField();let l=this.state.field.toString(n);if(r===!0&&f===!1&&(l=l.trimRight()),t===!0){let[h,w]=this.__cast(l);if(h!==void 0)return h;l=w}this.state.record.push(l),a!==0&&typeof l=="string"&&(this.state.record_length+=l.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(t,n){let{on_record:r}=this.options;if(r!==void 0){let a=this.__infoRecord();try{t=r.call(null,t,a)}catch(s){return s}if(t==null)return}this.info.bytes_records+=this.info.bytes,n(t)},__cast:function(t){let{columns:n,relax_column_count:r}=this.options;if(Array.isArray(n)===!0&&r&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let s=this.__infoField();return[void 0,this.state.castField.call(null,t,s)]}catch(s){return[s]}if(this.__isFloat(t))return[void 0,parseFloat(t)];if(this.options.cast_date!==!1){let s=this.__infoField();return[void 0,this.options.cast_date.call(null,t,s)]}return[void 0,t]},__compareBytes:function(t,n,r,a){if(t[0]!==a)return 0;let s=t.length;for(let f=1;f<s;f++)if(t[f]!==n[r+f])return 0;return s},__isCharTrimable:function(t,n){let{timchars:r,timcharFirstBytes:a}=this.state,s=t[n];if(s===void 0||a[s]===0)return 0;e:for(let f=0;f<r.length;f++){let l=r[f];for(let h=0;h<l.length;h++)if(l[h]!==t[n+h])continue e;return l.length}return 0},__isDelimiter:function(t,n,r){let{delimiter:a,ignore_last_delimiters:s}=this.options;if(s===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(s!==!1&&typeof s=="number"&&this.state.record.length===s-1)return 0;e:for(let f=0;f<a.length;f++){let l=a[f];if(l[0]===r){for(let h=1;h<l.length;h++)if(l[h]!==t[n+h])continue e;return l.length}}return 0},__isEscape:function(t,n,r){let{escape:a}=this.options;if(a===null)return!1;let s=a.length;if(a[0]===r){for(let f=0;f<s;f++)if(a[f]!==t[n+f])return!1;return!0}return!1},__isFloat:function(t){return t-parseFloat(t)+1>=0},__isQuote:function(t,n){let{quote:r}=this.options;if(r===null)return!1;let a=r.length;for(let s=0;s<a;s++)if(r[s]!==t[n+s])return!1;return!0},__isRecordDelimiter:function(t,n,r){let{record_delimiter:a}=this.options,s=a.length;e:for(let f=0;f<s;f++){let l=a[f],h=l.length;if(l[0]===t){for(let w=1;w<h;w++)if(l[w]!==n[r+w])continue e;return l.length}}return 0},__autoDiscoverRecordDelimiter:function(t,n){let{encoding:r}=this.options,a=[Buffer.from(`\r
|
|
3
|
+
`,r),Buffer.from(`
|
|
4
|
+
`,r),Buffer.from("\r",r)];e:for(let s=0;s<a.length;s++){let f=a[s].length;for(let l=0;l<f;l++)if(a[s][l]!==t[n+l])continue e;return this.options.record_delimiter.push(a[s]),this.state.recordDelimiterMaxLength=a[s].length,a[s].length}return 0},__error:function(t){let{encoding:n,raw:r,skip_records_with_error:a}=this.options,s=typeof t=="string"?new Error(t):t;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(s,r?this.state.rawBuffer.toString(n):void 0)}catch(f){return f}return}else return s},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:t,raw:n,encoding:r}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:t===!0,index:this.state.record.length,raw:n?this.state.rawBuffer.toString(r):void 0}},__infoField:function(){let{columns:t}=this.options,n=Array.isArray(t),r=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:r,column:n===!0?t.length>this.state.record.length?t[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var pe=function(i,e={}){typeof i=="string"&&(i=Buffer.from(i));let o=e&&e.objname?Object.create(null):[],t=j(e),n=s=>{t.options.objname===void 0?o.push(s):o[s[0]]=s[1]},r=()=>{},a=t.parse(i,!0,n,r);if(a!==void 0)throw a;return o};var Me=["shop_id","target_plan_handle","price_behavior","notification"],Ve={schedule:["shop_id","target_plan_handle","price_behavior"],unschedule:["shop_id"]};function ge(i,e){if(i.trim()==="")return{ok:!1,errors:[{message:"The CSV is empty"}]};let o=[],t;try{t=pe(i,{bom:!0,columns:r=>(o=r,r),info:!0,skip_empty_lines:!0,trim:!0})}catch(r){if(!(r instanceof c))throw r;return{ok:!1,errors:[{message:`Invalid CSV: ${r.message}`}]}}let n=Pe(o,e);return n.length>0?{ok:!1,errors:n}:t.length===0?{ok:!1,errors:[{message:"The CSV must contain at least one data row"}]}:{ok:!0,rows:t.map(({record:r,info:a})=>ke(r,a.lines,e))}}function Pe(i,e){let o=[],t=new Set(Me),n=new Set;for(let r of i)n.has(r)?o.push({field:r,message:`Duplicate CSV header: ${r}`}):n.add(r),t.has(r)||o.push({field:r,message:`Unknown CSV header: ${r}`});for(let r of Ve[e])i.includes(r)||o.push({field:r,message:`Missing required CSV header: ${r}`});return o}function ke(i,e,o){return o==="unschedule"?{sourceRow:e,shopId:i.shop_id}:{sourceRow:e,shopId:i.shop_id,...i.target_plan_handle===void 0?{}:{targetPlanHandle:i.target_plan_handle},...i.price_behavior===void 0?{}:{priceBehavior:i.price_behavior},...i.notification===void 0?{}:{notification:i.notification}}}d();var be={fileExists:Z,readFile:Y,readStdin:te};async function G(i,e=be){let o={...be,...e};if(i!=="-"){if(!await o.fileExists(i))throw new A(`CSV file not found: ${i}`);try{return await o.readFile(i)}catch(n){if(n instanceof A)throw n;let r=n instanceof Error?n.message:String(n);throw new A(`Couldn't read CSV file ${i}: ${r}`)}}let t=await o.readStdin();if(t===void 0||t==="")throw new A("Provide --input <path> or pipe CSV data to stdin.");return t}async function we(i,e,o){let t=o?await G(e,o):await G(e),n=ge(t,i);return n.ok?le(i,n.rows):n}d();d();var Je="shopify-subscription-migration:v1";function Ie(){return X()}function ye({appIdentifier:i,action:e,invocationId:o,canonicalBatchPayload:t}){let n=JSON.stringify({namespace:Je,appIdentifier:i,action:e,invocationId:o,canonicalBatchPayload:t});return q(n).toString("hex")}var K=class extends Error{batchIndex;constructor(e){super(`Migration submission batch ${e} returned neither an operation nor user errors`),this.name="MigrationSubmissionProtocolError",this.batchIndex=e}};async function Oe({clientId:i,plan:e,invocationId:o=Ie(),createOperation:t=re}){let n={clientId:i,action:e.action,inputDigest:e.inputDigest,total:e.rows.length,operations:[]};for(let r of e.batches){let a=ye({appIdentifier:i,action:e.action,invocationId:o,canonicalBatchPayload:r.canonicalPayload}),s;try{s=await t({clientId:i,idempotencyKey:a,migrations:r.rows.map(qe)})}catch(f){if(n.operations.length===0)throw f;return{status:"failed",submission:n,failure:{type:"submission",batchIndex:r.index,userErrors:[{message:f instanceof Error?f.message:"Migration request failed.",field:null}]}}}if(s.operation&&n.operations.push({batchIndex:r.index,batchPayloadDigest:r.payloadDigest,operation:s.operation}),s.userErrors.length>0)return{status:"failed",submission:n,failure:{type:"submission",batchIndex:r.index,userErrors:s.userErrors}};if(!s.operation)throw new K(r.index)}return{status:"success",submission:n}}function qe(i){return i.action==="unschedule"?{shopId:i.shopId,action:{cancelMigration:!0}}:{shopId:i.shopId,action:{scheduleMigration:ze(i)}}}function ze({targetPlanHandle:i,priceBehavior:e,notification:o}){return{targetPlanHandle:i,priceBehavior:e,notification:o}}async function ii(i){let e=await we(i.action,i.input);if(!e.ok)throw new A(Fe(e.errors));if(!i.skipConfirmation&&!await ee({message:`${i.action==="schedule"?"Schedule":"Unschedule"} ${e.plan.rows.length} subscriptions?`}))return{status:"cancelled",changed:!1,action:i.action,reason:"Confirmation declined."};let o=await Oe({clientId:i.clientId,plan:e.plan});if(o.status==="failed"||!i.watch)return o;i.onSubmissionAccepted?.(o.submission);let t=await oe({clientId:i.clientId,operationIds:o.submission.operations.map(({operation:a})=>a.id)}),n=je(o.submission,t),r=n.operations.filter(({operation:a})=>a.status==="FAILED").map(({operation:a})=>a.id);return r.length===0?{status:"success",submission:n}:{status:"failed",submission:n,failure:{type:"operations",operationIds:r}}}function je(i,e){let o=new Map(e.map(t=>[t.id,t]));return{...i,operations:i.operations.map(t=>({...t,operation:o.get(t.operation.id)??t.operation}))}}function Fe(i){return i.map(e=>{let o=[e.row===void 0?void 0:`row ${e.row}`,e.field].filter(t=>t!==void 0).join(", ");return o?`${o}: ${e.message}`:e.message}).join(`
|
|
5
|
+
`)}export{ii as a};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{A as o,B as n,C as i,D as t,H as s,z as e}from"./chunk-V654BMS7.js";import{h as d,k as l}from"./chunk-J7BTC45S.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
|
|
2
|
+
Error: Unexpected error
|
|
3
|
+
at Module._compile (internal/modules/cjs/loader.js:1137:30)
|
|
4
|
+
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
|
|
5
|
+
at Module.load (internal/modules/cjs/loader.js:985:32)
|
|
6
|
+
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
|
|
7
|
+
`,t(a);let c=[["Have you",{link:{label:"created a Shopify Partners organization",url:"https://partners.shopify.com/signup"}},{char:"?"}],"Have you confirmed your accounts from the emails you received?",["Need to connect to a different App or organization? Run the command again with",{command:"--reset"}]];t(new d("No Organization found",void 0,c)),i({headline:"Version couldn't be released.",body:"This version needs to be submitted for review and approved by Shopify before it can be released."}),s({rows:[{id:"1",name:"John Doe",email:"jon@doe.com"},{id:"2",name:"Jane Doe",email:"jane@doe.com"},{id:"3",name:"John Smith",email:"jon@smith.com"}],columns:{id:{header:"ID",color:"red"},name:{header:"Name",color:"dim"},email:{}}})}export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-46JYM3GH.js";import{b as p}from"./chunk-ZDQO6CNY.js";import{b as C}from"./chunk-YTUUU33R.js";import{a as c}from"./chunk-JD5P5RAJ.js";import{e as L,g as u}from"./chunk-VKWPEFWQ.js";u();u();import{fileURLToPath as y}from"node:url";async function g(e){let{isDevelopment:o}=await import("./local-KA3IWOZ6.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-FKFZJPHF.js"),r=await import("./lib-VKSQ65BQ.js"),{run:s,flush:m,Errors:l,settings:f}=r.default??r;o()&&(f.debug=!0);try{let t=new n({root:y(e.moduleURL)});await t.load(),e.lazyCommandLoader&&t.setLazyCommandLoader(e.lazyCommandLoader);let a=e.argv??process.argv.slice(2),i=a.indexOf("--");if((i===-1?a:a.slice(0,i)).includes("--json-schema")||c(process.env.SHOPIFY_FLAG_JSON_SCHEMA)){let{printCommandJsonSchema:I}=await import("./command-json-schema-6EGXCM4B.js");await I(t,a,e.lazyCommandLoader);return}await s(a,t),await m()}catch(t){let{errorHandler:a}=await import("./error-handler-OVJYVIOZ.js");await a(t);let i=t;return l.handle({...i,name:i?.name??"Error",message:i?.message??String(t),stack:i?.stack,skipOclifErrorHandling:!0})}}var d=L(C());async function O(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<22){let{renderError:s}=await import("./ui-MYUBVKCK.js");s({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function v(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[p.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function H(e,o=g,n=process.argv,r=process.env,s=process.versions){return v(e,n,r),e.runInCreateMode&&await w(e,n),b(n,r),await O(s),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function w(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-X3QIEMMX.js"),{moduleDirectory:r}=await import("./path-3L2QRACZ.js"),l=(await n(r(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(t=>t.includes("init"))===-1){let t=o.findIndex(a=>a.match(new RegExp(`bin(\\/|\\\\)+(create-${l}|dev|run)`)))+1;o.splice(t,0,"init")}}var k={...h,"no-color":d.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:d.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output. May include sensitive data.",env:"SHOPIFY_FLAG_VERBOSE"})},U={json:d.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:p.json})},V={"auth-alias":d.Flags.string({description:"Alias of the Shopify account to use for authentication.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})},P=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return d.Flags.integer({min:1,max:65535,...e,description:o})};function D(e){let o=e.description?.trimEnd(),r=[o&&!o.endsWith(".")?`${o}.`:o,"Required if non interactive."].filter(Boolean).join(" ");return{...e,description:r,requiredIfNonInteractive:!0}}async function M(){let{cacheClear:e}=await import("./conf-store-E7ELDWBA.js");e()}export{H as a,k as b,U as c,V as d,P as e,D as f,M as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Dn,c as Mn,d as qn,e as An}from"./chunk-JJZNUFPD.js";import{a as E,c,g as o}from"./chunk-VKWPEFWQ.js";var Vt=c(H=>{"use strict";o();Object.defineProperty(H,"__esModule",{value:!0});H.splitWhen=H.flatten=void 0;function Fn(t){return t.reduce((e,r)=>[].concat(e,r),[])}H.flatten=Fn;function Rn(t,e){let r=[[]],n=0;for(let s of t)e(s)?(n++,r[n]=[]):r[n].push(s);return r}H.splitWhen=Rn});var Ct=c(K=>{"use strict";o();Object.defineProperty(K,"__esModule",{value:!0});K.isEnoentCodeError=void 0;function Ln(t){return t.code==="ENOENT"}K.isEnoentCodeError=Ln});var Yt=c(z=>{"use strict";o();Object.defineProperty(z,"__esModule",{value:!0});z.createDirentFromStats=void 0;var Se=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function xn(t,e){return new Se(t,e)}z.createDirentFromStats=xn});var Qt=c(P=>{"use strict";o();Object.defineProperty(P,"__esModule",{value:!0});P.convertPosixPathToPattern=P.convertWindowsPathToPattern=P.convertPathToPattern=P.escapePosixPath=P.escapeWindowsPath=P.escape=P.removeLeadingDotSegment=P.makeAbsolute=P.unixify=void 0;var jn=E("os"),In=E("path"),Ht=jn.platform()==="win32",Bn=2,Nn=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Wn=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Vn=/^\\\\([.?])/,Cn=/\\(?![!()+@[\]{}])/g;function Yn(t){return t.replace(/\\/g,"/")}P.unixify=Yn;function Hn(t,e){return In.resolve(t,e)}P.makeAbsolute=Hn;function Un(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(Bn)}return t}P.removeLeadingDotSegment=Un;P.escape=Ht?Pe:ve;function Pe(t){return t.replace(Wn,"\\$2")}P.escapeWindowsPath=Pe;function ve(t){return t.replace(Nn,"\\$2")}P.escapePosixPath=ve;P.convertPathToPattern=Ht?Ut:Gt;function Ut(t){return Pe(t).replace(Vn,"//$1").replace(Cn,"/")}P.convertWindowsPathToPattern=Ut;function Gt(t){return ve(t)}P.convertPosixPathToPattern=Gt});var Zt=c((bo,zt)=>{"use strict";o();var Xt=E("util"),Jt=Mn(),q=An(),Ee=qn(),$t=t=>t===""||t==="./",Kt=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},S=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,s=new Set,i=new Set,a=0,d=u=>{i.add(u.output),r&&r.onResult&&r.onResult(u)};for(let u=0;u<e.length;u++){let _=q(String(e[u]),{...r,onResult:d},!0),p=_.state.negated||_.state.negatedExtglob;p&&a++;for(let R of t){let m=_(R,!0);(p?!m.isMatch:m.isMatch)&&(p?n.add(m.output):(n.delete(m.output),s.add(m.output)))}}let h=(a===e.length?[...i]:[...s]).filter(u=>!n.has(u));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(u=>u.replace(/\\/g,"")):e}return h};S.match=S;S.matcher=(t,e)=>q(t,e);S.isMatch=(t,e,r)=>q(e,r)(t);S.any=S.isMatch;S.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,s=[],i=d=>{r.onResult&&r.onResult(d),s.push(d.output)},a=new Set(S(t,e,{...r,onResult:i}));for(let d of s)a.has(d)||n.add(d);return[...n]};S.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Xt.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>S.contains(t,n,r));if(typeof e=="string"){if($t(t)||$t(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return S.isMatch(t,e,{...r,contains:!0})};S.matchKeys=(t,e,r)=>{if(!Ee.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=S(Object.keys(t),e,r),s={};for(let i of n)s[i]=t[i];return s};S.some=(t,e,r)=>{let n=[].concat(t);for(let s of[].concat(e)){let i=q(String(s),r);if(n.some(a=>i(a)))return!0}return!1};S.every=(t,e,r)=>{let n=[].concat(t);for(let s of[].concat(e)){let i=q(String(s),r);if(!n.every(a=>i(a)))return!1}return!0};S.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Xt.inspect(t)}"`);return[].concat(e).every(n=>q(n,r)(t))};S.capture=(t,e,r)=>{let n=Ee.isWindows(r),i=q.makeRe(String(t),{...r,capture:!0}).exec(n?Ee.toPosixSlashes(e):e);if(i)return i.slice(1).map(a=>a===void 0?"":a)};S.makeRe=(...t)=>q.makeRe(...t);S.scan=(...t)=>q.scan(...t);S.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let s of Jt(String(n),e))r.push(q.parse(s,e));return r};S.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!Kt(t)?[t]:Jt(t,e)};S.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return S.braces(t,{...e,expand:!0})};S.hasBraces=Kt;zt.exports=S});var cr=c(l=>{"use strict";o();Object.defineProperty(l,"__esModule",{value:!0});l.isAbsolute=l.partitionAbsoluteAndRelative=l.removeDuplicateSlashes=l.matchAny=l.convertPatternsToRe=l.makeRe=l.getPatternParts=l.expandBraceExpansion=l.expandPatternsWithBraceExpansion=l.isAffectDepthOfReadingPattern=l.endsWithSlashGlobStar=l.hasGlobStar=l.getBaseDirectory=l.isPatternRelatedToParentDirectory=l.getPatternsOutsideCurrentDirectory=l.getPatternsInsideCurrentDirectory=l.getPositivePatterns=l.getNegativePatterns=l.isPositivePattern=l.isNegativePattern=l.convertToNegativePattern=l.convertToPositivePattern=l.isDynamicPattern=l.isStaticPattern=void 0;var er=E("path"),Gn=Dn(),be=Zt(),tr="**",Qn="\\",$n=/[*?]|^!/,Xn=/\[[^[]*]/,Jn=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Kn=/[!*+?@]\([^(]*\)/,zn=/,|\.\./,Zn=/(?!^)\/{2,}/g;function rr(t,e={}){return!nr(t,e)}l.isStaticPattern=rr;function nr(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(Qn)||$n.test(t)||Xn.test(t)||Jn.test(t)||e.extglob!==!1&&Kn.test(t)||e.braceExpansion!==!1&&es(t))}l.isDynamicPattern=nr;function es(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let n=t.slice(e,r);return zn.test(n)}function ts(t){return Z(t)?t.slice(1):t}l.convertToPositivePattern=ts;function rs(t){return"!"+t}l.convertToNegativePattern=rs;function Z(t){return t.startsWith("!")&&t[1]!=="("}l.isNegativePattern=Z;function sr(t){return!Z(t)}l.isPositivePattern=sr;function ns(t){return t.filter(Z)}l.getNegativePatterns=ns;function ss(t){return t.filter(sr)}l.getPositivePatterns=ss;function is(t){return t.filter(e=>!we(e))}l.getPatternsInsideCurrentDirectory=is;function os(t){return t.filter(we)}l.getPatternsOutsideCurrentDirectory=os;function we(t){return t.startsWith("..")||t.startsWith("./..")}l.isPatternRelatedToParentDirectory=we;function as(t){return Gn(t,{flipBackslashes:!1})}l.getBaseDirectory=as;function us(t){return t.includes(tr)}l.hasGlobStar=us;function ir(t){return t.endsWith("/"+tr)}l.endsWithSlashGlobStar=ir;function cs(t){let e=er.basename(t);return ir(t)||rr(e)}l.isAffectDepthOfReadingPattern=cs;function ls(t){return t.reduce((e,r)=>e.concat(or(r)),[])}l.expandPatternsWithBraceExpansion=ls;function or(t){let e=be.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,n)=>r.length-n.length),e.filter(r=>r!=="")}l.expandBraceExpansion=or;function hs(t,e){let{parts:r}=be.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}l.getPatternParts=hs;function ar(t,e){return be.makeRe(t,e)}l.makeRe=ar;function fs(t,e){return t.map(r=>ar(r,e))}l.convertPatternsToRe=fs;function ds(t,e){return e.some(r=>r.test(t))}l.matchAny=ds;function _s(t){return t.replace(Zn,"/")}l.removeDuplicateSlashes=_s;function ps(t){let e=[],r=[];for(let n of t)ur(n)?e.push(n):r.push(n);return[e,r]}l.partitionAbsoluteAndRelative=ps;function ur(t){return er.isAbsolute(t)}l.isAbsolute=ur});var dr=c((Oo,fr)=>{"use strict";o();var gs=E("stream"),lr=gs.PassThrough,ms=Array.prototype.slice;fr.exports=ys;function ys(){let t=[],e=ms.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let s=n.end!==!1,i=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let a=lr(n);function d(){for(let u=0,_=arguments.length;u<_;u++)t.push(hr(arguments[u],n));return f(),this}function f(){if(r)return;r=!0;let u=t.shift();if(!u){process.nextTick(h);return}Array.isArray(u)||(u=[u]);let _=u.length+1;function p(){--_>0||(r=!1,f())}function R(m){function O(){m.removeListener("merge2UnpipeEnd",O),m.removeListener("end",O),i&&m.removeListener("error",J),p()}function J(C){a.emit("error",C)}if(m._readableState.endEmitted)return p();m.on("merge2UnpipeEnd",O),m.on("end",O),i&&m.on("error",J),m.pipe(a,{end:!1}),m.resume()}for(let m=0;m<u.length;m++)R(u[m]);p()}function h(){r=!1,a.emit("queueDrain"),s&&a.end()}return a.setMaxListeners(0),a.add=d,a.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),e.length&&d.apply(null,e),a}function hr(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=hr(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(lr(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var pr=c(ee=>{"use strict";o();Object.defineProperty(ee,"__esModule",{value:!0});ee.merge=void 0;var Ss=dr();function Ps(t){let e=Ss(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>_r(t)),e.once("end",()=>_r(t)),e}ee.merge=Ps;function _r(t){t.forEach(e=>e.emit("close"))}});var gr=c(U=>{"use strict";o();Object.defineProperty(U,"__esModule",{value:!0});U.isEmpty=U.isString=void 0;function vs(t){return typeof t=="string"}U.isString=vs;function Es(t){return t===""}U.isEmpty=Es});var L=c(b=>{"use strict";o();Object.defineProperty(b,"__esModule",{value:!0});b.string=b.stream=b.pattern=b.path=b.fs=b.errno=b.array=void 0;var bs=Vt();b.array=bs;var ws=Ct();b.errno=ws;var Ts=Yt();b.fs=Ts;var ks=Qt();b.path=ks;var Os=cr();b.pattern=Os;var Ds=pr();b.stream=Ds;var Ms=gr();b.string=Ms});var Pr=c(w=>{"use strict";o();Object.defineProperty(w,"__esModule",{value:!0});w.convertPatternGroupToTask=w.convertPatternGroupsToTasks=w.groupPatternsByBaseDirectory=w.getNegativePatternsAsPositive=w.getPositivePatterns=w.convertPatternsToTasks=w.generate=void 0;var D=L();function qs(t,e){let r=mr(t,e),n=mr(e.ignore,e),s=yr(r),i=Sr(r,n),a=s.filter(u=>D.pattern.isStaticPattern(u,e)),d=s.filter(u=>D.pattern.isDynamicPattern(u,e)),f=Te(a,i,!1),h=Te(d,i,!0);return f.concat(h)}w.generate=qs;function mr(t,e){let r=t;return e.braceExpansion&&(r=D.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>D.pattern.removeDuplicateSlashes(n))}function Te(t,e,r){let n=[],s=D.pattern.getPatternsOutsideCurrentDirectory(t),i=D.pattern.getPatternsInsideCurrentDirectory(t),a=ke(s),d=ke(i);return n.push(...Oe(a,e,r)),"."in d?n.push(De(".",i,e,r)):n.push(...Oe(d,e,r)),n}w.convertPatternsToTasks=Te;function yr(t){return D.pattern.getPositivePatterns(t)}w.getPositivePatterns=yr;function Sr(t,e){return D.pattern.getNegativePatterns(t).concat(e).map(D.pattern.convertToPositivePattern)}w.getNegativePatternsAsPositive=Sr;function ke(t){let e={};return t.reduce((r,n)=>{let s=D.pattern.getBaseDirectory(n);return s in r?r[s].push(n):r[s]=[n],r},e)}w.groupPatternsByBaseDirectory=ke;function Oe(t,e,r){return Object.keys(t).map(n=>De(n,t[n],e,r))}w.convertPatternGroupsToTasks=Oe;function De(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(D.pattern.convertToNegativePattern))}}w.convertPatternGroupToTask=De});var Er=c(te=>{"use strict";o();Object.defineProperty(te,"__esModule",{value:!0});te.read=void 0;function As(t,e,r){e.fs.lstat(t,(n,s)=>{if(n!==null){vr(r,n);return}if(!s.isSymbolicLink()||!e.followSymbolicLink){Me(r,s);return}e.fs.stat(t,(i,a)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){vr(r,i);return}Me(r,s);return}e.markSymbolicLink&&(a.isSymbolicLink=()=>!0),Me(r,a)})})}te.read=As;function vr(t,e){t(e)}function Me(t,e){t(null,e)}});var br=c(re=>{"use strict";o();Object.defineProperty(re,"__esModule",{value:!0});re.read=void 0;function Fs(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}re.read=Fs});var wr=c(x=>{"use strict";o();Object.defineProperty(x,"__esModule",{value:!0});x.createFileSystemAdapter=x.FILE_SYSTEM_ADAPTER=void 0;var ne=E("fs");x.FILE_SYSTEM_ADAPTER={lstat:ne.lstat,stat:ne.stat,lstatSync:ne.lstatSync,statSync:ne.statSync};function Rs(t){return t===void 0?x.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},x.FILE_SYSTEM_ADAPTER),t)}x.createFileSystemAdapter=Rs});var Tr=c(Ae=>{"use strict";o();Object.defineProperty(Ae,"__esModule",{value:!0});var Ls=wr(),qe=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Ls.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};Ae.default=qe});var Y=c(j=>{"use strict";o();Object.defineProperty(j,"__esModule",{value:!0});j.statSync=j.stat=j.Settings=void 0;var kr=Er(),xs=br(),Fe=Tr();j.Settings=Fe.default;function js(t,e,r){if(typeof e=="function"){kr.read(t,Re(),e);return}kr.read(t,Re(e),r)}j.stat=js;function Is(t,e){let r=Re(e);return xs.read(t,r)}j.statSync=Is;function Re(t={}){return t instanceof Fe.default?t:new Fe.default(t)}});var Mr=c((Qo,Dr)=>{o();var Or;Dr.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(Or||(Or=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var Ar=c((Xo,qr)=>{o();qr.exports=Ns;var Bs=Mr();function Ns(t,e){let r,n,s,i=!0;Array.isArray(t)?(r=[],n=t.length):(s=Object.keys(t),r={},n=s.length);function a(f){function h(){e&&e(f,r),e=null}i?Bs(h):h()}function d(f,h,u){r[f]=u,(--n===0||h)&&a(h)}n?s?s.forEach(function(f){t[f](function(h,u){d(f,h,u)})}):t.forEach(function(f,h){f(function(u,_){d(h,u,_)})}):a(null),i=!1}});var Le=c(ie=>{"use strict";o();Object.defineProperty(ie,"__esModule",{value:!0});ie.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var se=process.versions.node.split(".");if(se[0]===void 0||se[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var Fr=Number.parseInt(se[0],10),Ws=Number.parseInt(se[1],10),Rr=10,Vs=10,Cs=Fr>Rr,Ys=Fr===Rr&&Ws>=Vs;ie.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Cs||Ys});var Lr=c(oe=>{"use strict";o();Object.defineProperty(oe,"__esModule",{value:!0});oe.createDirentFromStats=void 0;var xe=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Hs(t,e){return new xe(t,e)}oe.createDirentFromStats=Hs});var je=c(ae=>{"use strict";o();Object.defineProperty(ae,"__esModule",{value:!0});ae.fs=void 0;var Us=Lr();ae.fs=Us});var Ie=c(ue=>{"use strict";o();Object.defineProperty(ue,"__esModule",{value:!0});ue.joinPathSegments=void 0;function Gs(t,e,r){return t.endsWith(r)?t+e:t+r+e}ue.joinPathSegments=Gs});var Wr=c(I=>{"use strict";o();Object.defineProperty(I,"__esModule",{value:!0});I.readdir=I.readdirWithFileTypes=I.read=void 0;var Qs=Y(),xr=Ar(),$s=Le(),jr=je(),Ir=Ie();function Xs(t,e,r){if(!e.stats&&$s.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Br(t,e,r);return}Nr(t,e,r)}I.read=Xs;function Br(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,s)=>{if(n!==null){ce(r,n);return}let i=s.map(d=>({dirent:d,name:d.name,path:Ir.joinPathSegments(t,d.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Be(r,i);return}let a=i.map(d=>Js(d,e));xr(a,(d,f)=>{if(d!==null){ce(r,d);return}Be(r,f)})})}I.readdirWithFileTypes=Br;function Js(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,s)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=jr.fs.createDirentFromStats(t.name,s),r(null,t)})}}function Nr(t,e,r){e.fs.readdir(t,(n,s)=>{if(n!==null){ce(r,n);return}let i=s.map(a=>{let d=Ir.joinPathSegments(t,a,e.pathSegmentSeparator);return f=>{Qs.stat(d,e.fsStatSettings,(h,u)=>{if(h!==null){f(h);return}let _={name:a,path:d,dirent:jr.fs.createDirentFromStats(a,u)};e.stats&&(_.stats=u),f(null,_)})}});xr(i,(a,d)=>{if(a!==null){ce(r,a);return}Be(r,d)})})}I.readdir=Nr;function ce(t,e){t(e)}function Be(t,e){t(null,e)}});var Ur=c(B=>{"use strict";o();Object.defineProperty(B,"__esModule",{value:!0});B.readdir=B.readdirWithFileTypes=B.read=void 0;var Ks=Y(),zs=Le(),Vr=je(),Cr=Ie();function Zs(t,e){return!e.stats&&zs.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Yr(t,e):Hr(t,e)}B.read=Zs;function Yr(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let s={dirent:n,name:n.name,path:Cr.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let i=e.fs.statSync(s.path);s.dirent=Vr.fs.createDirentFromStats(s.name,i)}catch(i){if(e.throwErrorOnBrokenSymbolicLink)throw i}return s})}B.readdirWithFileTypes=Yr;function Hr(t,e){return e.fs.readdirSync(t).map(n=>{let s=Cr.joinPathSegments(t,n,e.pathSegmentSeparator),i=Ks.statSync(s,e.fsStatSettings),a={name:n,path:s,dirent:Vr.fs.createDirentFromStats(n,i)};return e.stats&&(a.stats=i),a})}B.readdir=Hr});var Gr=c(N=>{"use strict";o();Object.defineProperty(N,"__esModule",{value:!0});N.createFileSystemAdapter=N.FILE_SYSTEM_ADAPTER=void 0;var G=E("fs");N.FILE_SYSTEM_ADAPTER={lstat:G.lstat,stat:G.stat,lstatSync:G.lstatSync,statSync:G.statSync,readdir:G.readdir,readdirSync:G.readdirSync};function ei(t){return t===void 0?N.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},N.FILE_SYSTEM_ADAPTER),t)}N.createFileSystemAdapter=ei});var Qr=c(We=>{"use strict";o();Object.defineProperty(We,"__esModule",{value:!0});var ti=E("path"),ri=Y(),ni=Gr(),Ne=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=ni.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,ti.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new ri.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};We.default=Ne});var le=c(W=>{"use strict";o();Object.defineProperty(W,"__esModule",{value:!0});W.Settings=W.scandirSync=W.scandir=void 0;var $r=Wr(),si=Ur(),Ve=Qr();W.Settings=Ve.default;function ii(t,e,r){if(typeof e=="function"){$r.read(t,Ce(),e);return}$r.read(t,Ce(e),r)}W.scandir=ii;function oi(t,e){let r=Ce(e);return si.read(t,r)}W.scandirSync=oi;function Ce(t={}){return t instanceof Ve.default?t:new Ve.default(t)}});var Jr=c((pa,Xr)=>{"use strict";o();function ai(t){var e=new t,r=e;function n(){var i=e;return i.next?e=i.next:(e=new t,r=e),i.next=null,i}function s(i){r.next=i,r=i}return{get:n,release:s}}Xr.exports=ai});var zr=c((ma,Ye)=>{"use strict";o();var ui=Jr();function Kr(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=ui(ci),s=null,i=null,a=0,d=null,f={push:O,drain:T,saturated:T,pause:u,paused:!1,get concurrency(){return r},set concurrency(g){if(!(g>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=g,!f.paused)for(;s&&a<r;)a++,C()},running:h,resume:R,idle:m,length:_,getQueue:p,unshift:J,empty:T,kill:En,killAndDrain:bn,error:Tn,abort:wn};return f;function h(){return a}function u(){f.paused=!0}function _(){for(var g=s,v=0;g;)g=g.next,v++;return v}function p(){for(var g=s,v=[];g;)v.push(g.value),g=g.next;return v}function R(){if(f.paused){if(f.paused=!1,s===null){a++,C();return}for(;s&&a<r;)a++,C()}}function m(){return a===0&&f.length()===0}function O(g,v){var y=n.get();y.context=t,y.release=C,y.value=g,y.callback=v||T,y.errorHandler=d,a>=r||f.paused?i?(i.next=y,i=y):(s=y,i=y,f.saturated()):(a++,e.call(t,y.value,y.worked))}function J(g,v){var y=n.get();y.context=t,y.release=C,y.value=g,y.callback=v||T,y.errorHandler=d,a>=r||f.paused?s?(y.next=s,s=y):(s=y,i=y,f.saturated()):(a++,e.call(t,y.value,y.worked))}function C(g){g&&n.release(g);var v=s;v&&a<=r?f.paused?a--:(i===s&&(i=null),s=v.next,v.next=null,e.call(t,v.value,v.worked),i===null&&f.empty()):--a===0&&f.drain()}function En(){s=null,i=null,f.drain=T}function bn(){s=null,i=null,f.drain(),f.drain=T}function wn(){var g=s;for(s=null,i=null;g;){var v=g.next,y=g.callback,Wt=g.errorHandler,kn=g.value,On=g.context;g.value=null,g.callback=T,g.errorHandler=null,Wt&&Wt(new Error("abort"),kn),y.call(On,new Error("abort")),g.release(g),g=v}f.drain=T}function Tn(g){d=g}}function T(){}function ci(){this.value=null,this.callback=T,this.next=null,this.release=T,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var s=t.callback,i=t.errorHandler,a=t.value;t.value=null,t.callback=T,t.errorHandler&&i(r,a),s.call(t.context,r,n),t.release(t)}}function li(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(u,_){e.call(this,u).then(function(p){_(null,p)},_)}var s=Kr(t,n,r),i=s.push,a=s.unshift;return s.push=d,s.unshift=f,s.drained=h,s;function d(u){var _=new Promise(function(p,R){i(u,function(m,O){if(m){R(m);return}p(O)})});return _.catch(T),_}function f(u){var _=new Promise(function(p,R){a(u,function(m,O){if(m){R(m);return}p(O)})});return _.catch(T),_}function h(){var u=new Promise(function(_){process.nextTick(function(){if(s.idle())_();else{var p=s.drain;s.drain=function(){typeof p=="function"&&p(),_(),s.drain=p}}})});return u}}Ye.exports=Kr;Ye.exports.promise=li});var he=c(A=>{"use strict";o();Object.defineProperty(A,"__esModule",{value:!0});A.joinPathSegments=A.replacePathSegmentSeparator=A.isAppliedFilter=A.isFatalError=void 0;function hi(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}A.isFatalError=hi;function fi(t,e){return t===null||t(e)}A.isAppliedFilter=fi;function di(t,e){return t.split(/[/\\]/).join(e)}A.replacePathSegmentSeparator=di;function _i(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}A.joinPathSegments=_i});var Ge=c(Ue=>{"use strict";o();Object.defineProperty(Ue,"__esModule",{value:!0});var pi=he(),He=class{constructor(e,r){this._root=e,this._settings=r,this._root=pi.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};Ue.default=He});var Xe=c($e=>{"use strict";o();Object.defineProperty($e,"__esModule",{value:!0});var gi=E("events"),mi=le(),yi=zr(),fe=he(),Si=Ge(),Qe=class extends Si.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=mi.scandir,this._emitter=new gi.EventEmitter,this._queue=yi(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,s=>{s!==null&&this._handleError(s)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,s)=>{if(n!==null){r(n,void 0);return}for(let i of s)this._handleEntry(i,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!fe.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=fe.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),fe.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&fe.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};$e.default=Qe});var Zr=c(Ke=>{"use strict";o();Object.defineProperty(Ke,"__esModule",{value:!0});var Pi=Xe(),Je=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Pi.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{vi(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Ei(e,this._storage)}),this._reader.read()}};Ke.default=Je;function vi(t,e){t(e)}function Ei(t,e){t(null,e)}});var en=c(Ze=>{"use strict";o();Object.defineProperty(Ze,"__esModule",{value:!0});var bi=E("stream"),wi=Xe(),ze=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new wi.default(this._root,this._settings),this._stream=new bi.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Ze.default=ze});var tn=c(tt=>{"use strict";o();Object.defineProperty(tt,"__esModule",{value:!0});var Ti=le(),de=he(),ki=Ge(),et=class extends ki.default{constructor(){super(...arguments),this._scandir=Ti.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let s of n)this._handleEntry(s,r)}catch(n){this._handleError(n)}}_handleError(e){if(de.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=de.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),de.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&de.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};tt.default=et});var rn=c(nt=>{"use strict";o();Object.defineProperty(nt,"__esModule",{value:!0});var Oi=tn(),rt=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Oi.default(this._root,this._settings)}read(){return this._reader.read()}};nt.default=rt});var nn=c(it=>{"use strict";o();Object.defineProperty(it,"__esModule",{value:!0});var Di=E("path"),Mi=le(),st=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Di.sep),this.fsScandirSettings=new Mi.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};it.default=st});var pe=c(F=>{"use strict";o();Object.defineProperty(F,"__esModule",{value:!0});F.Settings=F.walkStream=F.walkSync=F.walk=void 0;var sn=Zr(),qi=en(),Ai=rn(),ot=nn();F.Settings=ot.default;function Fi(t,e,r){if(typeof e=="function"){new sn.default(t,_e()).read(e);return}new sn.default(t,_e(e)).read(r)}F.walk=Fi;function Ri(t,e){let r=_e(e);return new Ai.default(t,r).read()}F.walkSync=Ri;function Li(t,e){let r=_e(e);return new qi.default(t,r).read()}F.walkStream=Li;function _e(t={}){return t instanceof ot.default?t:new ot.default(t)}});var ge=c(ut=>{"use strict";o();Object.defineProperty(ut,"__esModule",{value:!0});var xi=E("path"),ji=Y(),on=L(),at=class{constructor(e){this._settings=e,this._fsStatSettings=new ji.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return xi.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:on.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!on.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};ut.default=at});var ht=c(lt=>{"use strict";o();Object.defineProperty(lt,"__esModule",{value:!0});var Ii=E("stream"),Bi=Y(),Ni=pe(),Wi=ge(),ct=class extends Wi.default{constructor(){super(...arguments),this._walkStream=Ni.walkStream,this._stat=Bi.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),s=new Ii.PassThrough({objectMode:!0});s._write=(i,a,d)=>this._getEntry(n[i],e[i],r).then(f=>{f!==null&&r.entryFilter(f)&&s.push(f),i===n.length-1&&s.end(),d()}).catch(d);for(let i=0;i<n.length;i++)s.write(i);return s}_getEntry(e,r,n){return this._getStat(e).then(s=>this._makeEntry(s,r)).catch(s=>{if(n.errorFilter(s))return null;throw s})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(s,i)=>s===null?r(i):n(s))})}};lt.default=ct});var an=c(dt=>{"use strict";o();Object.defineProperty(dt,"__esModule",{value:!0});var Vi=pe(),Ci=ge(),Yi=ht(),ft=class extends Ci.default{constructor(){super(...arguments),this._walkAsync=Vi.walk,this._readerStream=new Yi.default(this._settings)}dynamic(e,r){return new Promise((n,s)=>{this._walkAsync(e,r,(i,a)=>{i===null?n(a):s(i)})})}async static(e,r){let n=[],s=this._readerStream.static(e,r);return new Promise((i,a)=>{s.once("error",a),s.on("data",d=>n.push(d)),s.once("end",()=>i(n))})}};dt.default=ft});var un=c(pt=>{"use strict";o();Object.defineProperty(pt,"__esModule",{value:!0});var X=L(),_t=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:e,segments:r,sections:n})}}_getPatternSegments(e){return X.pattern.getPatternParts(e,this._micromatchOptions).map(n=>X.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:X.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return X.array.splitWhen(e,r=>r.dynamic&&X.pattern.hasGlobStar(r.pattern))}};pt.default=_t});var cn=c(mt=>{"use strict";o();Object.defineProperty(mt,"__esModule",{value:!0});var Hi=un(),gt=class extends Hi.default{match(e){let r=e.split("/"),n=r.length,s=this._storage.filter(i=>!i.complete||i.segments.length>n);for(let i of s){let a=i.sections[0];if(!i.complete&&n>a.length||r.every((f,h)=>{let u=i.segments[h];return!!(u.dynamic&&u.patternRe.test(f)||!u.dynamic&&u.pattern===f)}))return!0}return!1}};mt.default=gt});var ln=c(St=>{"use strict";o();Object.defineProperty(St,"__esModule",{value:!0});var me=L(),Ui=cn(),yt=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let s=this._getMatcher(r),i=this._getNegativePatternsRe(n);return a=>this._filter(e,a,s,i)}_getMatcher(e){return new Ui.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(me.pattern.isAffectDepthOfReadingPattern);return me.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,s){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let i=me.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(i,n)?!1:this._isSkippedByNegativePatterns(i,s)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let s=e.split("/").length;return n-s}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!me.pattern.matchAny(e,r)}};St.default=yt});var hn=c(vt=>{"use strict";o();Object.defineProperty(vt,"__esModule",{value:!0});var V=L(),Pt=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let[n,s]=V.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:V.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:V.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:V.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return a=>this._filter(a,i)}_filter(e,r){let n=V.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let s=this._isMatchToPatternsSet(n,r,e.dirent.isDirectory());return this._settings.unique&&s&&this._createIndexRecord(n),s}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,r,n){return!(!this._isMatchToPatterns(e,r.positive.all,n)||this._isMatchToPatterns(e,r.negative.relative,n)||this._isMatchToAbsoluteNegative(e,r.negative.absolute,n))}_isMatchToAbsoluteNegative(e,r,n){if(r.length===0)return!1;let s=V.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(s,r,n)}_isMatchToPatterns(e,r,n){if(r.length===0)return!1;let s=V.pattern.matchAny(e,r);return!s&&n?V.pattern.matchAny(e+"/",r):s}};vt.default=Pt});var fn=c(bt=>{"use strict";o();Object.defineProperty(bt,"__esModule",{value:!0});var Gi=L(),Et=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return Gi.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};bt.default=Et});var _n=c(Tt=>{"use strict";o();Object.defineProperty(Tt,"__esModule",{value:!0});var dn=L(),wt=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=dn.path.makeAbsolute(this._settings.cwd,r),r=dn.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};Tt.default=wt});var ye=c(Ot=>{"use strict";o();Object.defineProperty(Ot,"__esModule",{value:!0});var Qi=E("path"),$i=ln(),Xi=hn(),Ji=fn(),Ki=_n(),kt=class{constructor(e){this._settings=e,this.errorFilter=new Ji.default(this._settings),this.entryFilter=new Xi.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new $i.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Ki.default(this._settings)}_getRootDirectory(e){return Qi.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};Ot.default=kt});var pn=c(Mt=>{"use strict";o();Object.defineProperty(Mt,"__esModule",{value:!0});var zi=an(),Zi=ye(),Dt=class extends Zi.default{constructor(){super(...arguments),this._reader=new zi.default(this._settings)}async read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(r,e,n)).map(i=>n.transform(i))}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};Mt.default=Dt});var gn=c(At=>{"use strict";o();Object.defineProperty(At,"__esModule",{value:!0});var eo=E("stream"),to=ht(),ro=ye(),qt=class extends ro.default{constructor(){super(...arguments),this._reader=new to.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),s=this.api(r,e,n),i=new eo.Readable({objectMode:!0,read:()=>{}});return s.once("error",a=>i.emit("error",a)).on("data",a=>i.emit("data",n.transform(a))).once("end",()=>i.emit("end")),i.once("close",()=>s.destroy()),i}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};At.default=qt});var mn=c(Rt=>{"use strict";o();Object.defineProperty(Rt,"__esModule",{value:!0});var no=Y(),so=pe(),io=ge(),Ft=class extends io.default{constructor(){super(...arguments),this._walkSync=so.walkSync,this._statSync=no.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let s of e){let i=this._getFullEntryPath(s),a=this._getEntry(i,s,r);a===null||!r.entryFilter(a)||n.push(a)}return n}_getEntry(e,r,n){try{let s=this._getStat(e);return this._makeEntry(s,r)}catch(s){if(n.errorFilter(s))return null;throw s}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};Rt.default=Ft});var yn=c(xt=>{"use strict";o();Object.defineProperty(xt,"__esModule",{value:!0});var oo=mn(),ao=ye(),Lt=class extends ao.default{constructor(){super(...arguments),this._reader=new oo.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};xt.default=Lt});var Sn=c($=>{"use strict";o();Object.defineProperty($,"__esModule",{value:!0});$.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var Q=E("fs"),uo=E("os"),co=Math.max(uo.cpus().length,1);$.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:Q.lstat,lstatSync:Q.lstatSync,stat:Q.stat,statSync:Q.statSync,readdir:Q.readdir,readdirSync:Q.readdirSync};var jt=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,co),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},$.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};$.default=jt});var _o=c((du,vn)=>{o();var Pn=Pr(),lo=pn(),ho=gn(),fo=yn(),It=Sn(),k=L();async function Bt(t,e){M(t);let r=Nt(t,lo.default,e),n=await Promise.all(r);return k.array.flatten(n)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(h,u){M(h);let _=Nt(h,fo.default,u);return k.array.flatten(_)}t.sync=e;function r(h,u){M(h);let _=Nt(h,ho.default,u);return k.stream.merge(_)}t.stream=r;function n(h,u){M(h);let _=[].concat(h),p=new It.default(u);return Pn.generate(_,p)}t.generateTasks=n;function s(h,u){M(h);let _=new It.default(u);return k.pattern.isDynamicPattern(h,_)}t.isDynamicPattern=s;function i(h){return M(h),k.path.escape(h)}t.escapePath=i;function a(h){return M(h),k.path.convertPathToPattern(h)}t.convertPathToPattern=a;let d;(function(h){function u(p){return M(p),k.path.escapePosixPath(p)}h.escapePath=u;function _(p){return M(p),k.path.convertPosixPathToPattern(p)}h.convertPathToPattern=_})(d=t.posix||(t.posix={}));let f;(function(h){function u(p){return M(p),k.path.escapeWindowsPath(p)}h.escapePath=u;function _(p){return M(p),k.path.convertWindowsPathToPattern(p)}h.convertPathToPattern=_})(f=t.win32||(t.win32={}))})(Bt||(Bt={}));function Nt(t,e,r){let n=[].concat(t),s=new It.default(r),i=Pn.generate(n,s),a=new e(s);return i.map(a.read,a)}function M(t){if(![].concat(t).every(n=>k.string.isString(n)&&!k.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}vn.exports=Bt});export{dr as a,_o as b};
|
|
1
|
+
import{b as Dn,c as Mn,d as qn,e as An}from"./chunk-JJZNUFPD.js";import{a as E,c,g as o}from"./chunk-VKWPEFWQ.js";var Vt=c(H=>{"use strict";o();Object.defineProperty(H,"__esModule",{value:!0});H.splitWhen=H.flatten=void 0;function Fn(t){return t.reduce((e,r)=>[].concat(e,r),[])}H.flatten=Fn;function Rn(t,e){let r=[[]],n=0;for(let s of t)e(s)?(n++,r[n]=[]):r[n].push(s);return r}H.splitWhen=Rn});var Ct=c(K=>{"use strict";o();Object.defineProperty(K,"__esModule",{value:!0});K.isEnoentCodeError=void 0;function Ln(t){return t.code==="ENOENT"}K.isEnoentCodeError=Ln});var Yt=c(z=>{"use strict";o();Object.defineProperty(z,"__esModule",{value:!0});z.createDirentFromStats=void 0;var Se=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function xn(t,e){return new Se(t,e)}z.createDirentFromStats=xn});var Qt=c(P=>{"use strict";o();Object.defineProperty(P,"__esModule",{value:!0});P.convertPosixPathToPattern=P.convertWindowsPathToPattern=P.convertPathToPattern=P.escapePosixPath=P.escapeWindowsPath=P.escape=P.removeLeadingDotSegment=P.makeAbsolute=P.unixify=void 0;var jn=E("os"),In=E("path"),Ht=jn.platform()==="win32",Bn=2,Nn=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Wn=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Vn=/^\\\\([.?])/,Cn=/\\(?![!()+@[\]{}])/g;function Yn(t){return t.replace(/\\/g,"/")}P.unixify=Yn;function Hn(t,e){return In.resolve(t,e)}P.makeAbsolute=Hn;function Un(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(Bn)}return t}P.removeLeadingDotSegment=Un;P.escape=Ht?Pe:ve;function Pe(t){return t.replace(Wn,"\\$2")}P.escapeWindowsPath=Pe;function ve(t){return t.replace(Nn,"\\$2")}P.escapePosixPath=ve;P.convertPathToPattern=Ht?Ut:Gt;function Ut(t){return Pe(t).replace(Vn,"//$1").replace(Cn,"/")}P.convertWindowsPathToPattern=Ut;function Gt(t){return ve(t)}P.convertPosixPathToPattern=Gt});var Zt=c((bo,zt)=>{"use strict";o();var Xt=E("util"),Jt=Mn(),q=An(),Ee=qn(),$t=t=>t===""||t==="./",Kt=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},S=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,s=new Set,i=new Set,a=0,d=u=>{i.add(u.output),r&&r.onResult&&r.onResult(u)};for(let u=0;u<e.length;u++){let _=q(String(e[u]),{...r,onResult:d},!0),p=_.state.negated||_.state.negatedExtglob;p&&a++;for(let R of t){let m=_(R,!0);(p?!m.isMatch:m.isMatch)&&(p?n.add(m.output):(n.delete(m.output),s.add(m.output)))}}let h=(a===e.length?[...i]:[...s]).filter(u=>!n.has(u));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(u=>u.replace(/\\/g,"")):e}return h};S.match=S;S.matcher=(t,e)=>q(t,e);S.isMatch=(t,e,r)=>q(e,r)(t);S.any=S.isMatch;S.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,s=[],i=d=>{r.onResult&&r.onResult(d),s.push(d.output)},a=new Set(S(t,e,{...r,onResult:i}));for(let d of s)a.has(d)||n.add(d);return[...n]};S.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Xt.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>S.contains(t,n,r));if(typeof e=="string"){if($t(t)||$t(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return S.isMatch(t,e,{...r,contains:!0})};S.matchKeys=(t,e,r)=>{if(!Ee.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=S(Object.keys(t),e,r),s={};for(let i of n)s[i]=t[i];return s};S.some=(t,e,r)=>{let n=[].concat(t);for(let s of[].concat(e)){let i=q(String(s),r);if(n.some(a=>i(a)))return!0}return!1};S.every=(t,e,r)=>{let n=[].concat(t);for(let s of[].concat(e)){let i=q(String(s),r);if(!n.every(a=>i(a)))return!1}return!0};S.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Xt.inspect(t)}"`);return[].concat(e).every(n=>q(n,r)(t))};S.capture=(t,e,r)=>{let n=Ee.isWindows(r),i=q.makeRe(String(t),{...r,capture:!0}).exec(n?Ee.toPosixSlashes(e):e);if(i)return i.slice(1).map(a=>a===void 0?"":a)};S.makeRe=(...t)=>q.makeRe(...t);S.scan=(...t)=>q.scan(...t);S.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let s of Jt(String(n),e))r.push(q.parse(s,e));return r};S.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!Kt(t)?[t]:Jt(t,e)};S.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return S.braces(t,{...e,expand:!0})};S.hasBraces=Kt;zt.exports=S});var cr=c(l=>{"use strict";o();Object.defineProperty(l,"__esModule",{value:!0});l.isAbsolute=l.partitionAbsoluteAndRelative=l.removeDuplicateSlashes=l.matchAny=l.convertPatternsToRe=l.makeRe=l.getPatternParts=l.expandBraceExpansion=l.expandPatternsWithBraceExpansion=l.isAffectDepthOfReadingPattern=l.endsWithSlashGlobStar=l.hasGlobStar=l.getBaseDirectory=l.isPatternRelatedToParentDirectory=l.getPatternsOutsideCurrentDirectory=l.getPatternsInsideCurrentDirectory=l.getPositivePatterns=l.getNegativePatterns=l.isPositivePattern=l.isNegativePattern=l.convertToNegativePattern=l.convertToPositivePattern=l.isDynamicPattern=l.isStaticPattern=void 0;var er=E("path"),Gn=Dn(),be=Zt(),tr="**",Qn="\\",$n=/[*?]|^!/,Xn=/\[[^[]*]/,Jn=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Kn=/[!*+?@]\([^(]*\)/,zn=/,|\.\./,Zn=/(?!^)\/{2,}/g;function rr(t,e={}){return!nr(t,e)}l.isStaticPattern=rr;function nr(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(Qn)||$n.test(t)||Xn.test(t)||Jn.test(t)||e.extglob!==!1&&Kn.test(t)||e.braceExpansion!==!1&&es(t))}l.isDynamicPattern=nr;function es(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let n=t.slice(e,r);return zn.test(n)}function ts(t){return Z(t)?t.slice(1):t}l.convertToPositivePattern=ts;function rs(t){return"!"+t}l.convertToNegativePattern=rs;function Z(t){return t.startsWith("!")&&t[1]!=="("}l.isNegativePattern=Z;function sr(t){return!Z(t)}l.isPositivePattern=sr;function ns(t){return t.filter(Z)}l.getNegativePatterns=ns;function ss(t){return t.filter(sr)}l.getPositivePatterns=ss;function is(t){return t.filter(e=>!we(e))}l.getPatternsInsideCurrentDirectory=is;function os(t){return t.filter(we)}l.getPatternsOutsideCurrentDirectory=os;function we(t){return t.startsWith("..")||t.startsWith("./..")}l.isPatternRelatedToParentDirectory=we;function as(t){return Gn(t,{flipBackslashes:!1})}l.getBaseDirectory=as;function us(t){return t.includes(tr)}l.hasGlobStar=us;function ir(t){return t.endsWith("/"+tr)}l.endsWithSlashGlobStar=ir;function cs(t){let e=er.basename(t);return ir(t)||rr(e)}l.isAffectDepthOfReadingPattern=cs;function ls(t){return t.reduce((e,r)=>e.concat(or(r)),[])}l.expandPatternsWithBraceExpansion=ls;function or(t){let e=be.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,n)=>r.length-n.length),e.filter(r=>r!=="")}l.expandBraceExpansion=or;function hs(t,e){let{parts:r}=be.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}l.getPatternParts=hs;function ar(t,e){return be.makeRe(t,e)}l.makeRe=ar;function fs(t,e){return t.map(r=>ar(r,e))}l.convertPatternsToRe=fs;function ds(t,e){return e.some(r=>r.test(t))}l.matchAny=ds;function _s(t){return t.replace(Zn,"/")}l.removeDuplicateSlashes=_s;function ps(t){let e=[],r=[];for(let n of t)ur(n)?e.push(n):r.push(n);return[e,r]}l.partitionAbsoluteAndRelative=ps;function ur(t){return er.isAbsolute(t)}l.isAbsolute=ur});var dr=c((Oo,fr)=>{"use strict";o();var gs=E("stream"),lr=gs.PassThrough,ms=Array.prototype.slice;fr.exports=ys;function ys(){let t=[],e=ms.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let s=n.end!==!1,i=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let a=lr(n);function d(){for(let u=0,_=arguments.length;u<_;u++)t.push(hr(arguments[u],n));return f(),this}function f(){if(r)return;r=!0;let u=t.shift();if(!u){process.nextTick(h);return}Array.isArray(u)||(u=[u]);let _=u.length+1;function p(){--_>0||(r=!1,f())}function R(m){function O(){m.removeListener("merge2UnpipeEnd",O),m.removeListener("end",O),i&&m.removeListener("error",J),p()}function J(C){a.emit("error",C)}if(m._readableState.endEmitted)return p();m.on("merge2UnpipeEnd",O),m.on("end",O),i&&m.on("error",J),m.pipe(a,{end:!1}),m.resume()}for(let m=0;m<u.length;m++)R(u[m]);p()}function h(){r=!1,a.emit("queueDrain"),s&&a.end()}return a.setMaxListeners(0),a.add=d,a.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),e.length&&d.apply(null,e),a}function hr(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=hr(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(lr(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var pr=c(ee=>{"use strict";o();Object.defineProperty(ee,"__esModule",{value:!0});ee.merge=void 0;var Ss=dr();function Ps(t){let e=Ss(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>_r(t)),e.once("end",()=>_r(t)),e}ee.merge=Ps;function _r(t){t.forEach(e=>e.emit("close"))}});var gr=c(U=>{"use strict";o();Object.defineProperty(U,"__esModule",{value:!0});U.isEmpty=U.isString=void 0;function vs(t){return typeof t=="string"}U.isString=vs;function Es(t){return t===""}U.isEmpty=Es});var L=c(b=>{"use strict";o();Object.defineProperty(b,"__esModule",{value:!0});b.string=b.stream=b.pattern=b.path=b.fs=b.errno=b.array=void 0;var bs=Vt();b.array=bs;var ws=Ct();b.errno=ws;var Ts=Yt();b.fs=Ts;var ks=Qt();b.path=ks;var Os=cr();b.pattern=Os;var Ds=pr();b.stream=Ds;var Ms=gr();b.string=Ms});var Pr=c(w=>{"use strict";o();Object.defineProperty(w,"__esModule",{value:!0});w.convertPatternGroupToTask=w.convertPatternGroupsToTasks=w.groupPatternsByBaseDirectory=w.getNegativePatternsAsPositive=w.getPositivePatterns=w.convertPatternsToTasks=w.generate=void 0;var D=L();function qs(t,e){let r=mr(t,e),n=mr(e.ignore,e),s=yr(r),i=Sr(r,n),a=s.filter(u=>D.pattern.isStaticPattern(u,e)),d=s.filter(u=>D.pattern.isDynamicPattern(u,e)),f=Te(a,i,!1),h=Te(d,i,!0);return f.concat(h)}w.generate=qs;function mr(t,e){let r=t;return e.braceExpansion&&(r=D.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>D.pattern.removeDuplicateSlashes(n))}function Te(t,e,r){let n=[],s=D.pattern.getPatternsOutsideCurrentDirectory(t),i=D.pattern.getPatternsInsideCurrentDirectory(t),a=ke(s),d=ke(i);return n.push(...Oe(a,e,r)),"."in d?n.push(De(".",i,e,r)):n.push(...Oe(d,e,r)),n}w.convertPatternsToTasks=Te;function yr(t){return D.pattern.getPositivePatterns(t)}w.getPositivePatterns=yr;function Sr(t,e){return D.pattern.getNegativePatterns(t).concat(e).map(D.pattern.convertToPositivePattern)}w.getNegativePatternsAsPositive=Sr;function ke(t){let e={};return t.reduce((r,n)=>{let s=D.pattern.getBaseDirectory(n);return s in r?r[s].push(n):r[s]=[n],r},e)}w.groupPatternsByBaseDirectory=ke;function Oe(t,e,r){return Object.keys(t).map(n=>De(n,t[n],e,r))}w.convertPatternGroupsToTasks=Oe;function De(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(D.pattern.convertToNegativePattern))}}w.convertPatternGroupToTask=De});var Er=c(te=>{"use strict";o();Object.defineProperty(te,"__esModule",{value:!0});te.read=void 0;function As(t,e,r){e.fs.lstat(t,(n,s)=>{if(n!==null){vr(r,n);return}if(!s.isSymbolicLink()||!e.followSymbolicLink){Me(r,s);return}e.fs.stat(t,(i,a)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){vr(r,i);return}Me(r,s);return}e.markSymbolicLink&&(a.isSymbolicLink=()=>!0),Me(r,a)})})}te.read=As;function vr(t,e){t(e)}function Me(t,e){t(null,e)}});var br=c(re=>{"use strict";o();Object.defineProperty(re,"__esModule",{value:!0});re.read=void 0;function Fs(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}re.read=Fs});var wr=c(x=>{"use strict";o();Object.defineProperty(x,"__esModule",{value:!0});x.createFileSystemAdapter=x.FILE_SYSTEM_ADAPTER=void 0;var ne=E("fs");x.FILE_SYSTEM_ADAPTER={lstat:ne.lstat,stat:ne.stat,lstatSync:ne.lstatSync,statSync:ne.statSync};function Rs(t){return t===void 0?x.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},x.FILE_SYSTEM_ADAPTER),t)}x.createFileSystemAdapter=Rs});var Tr=c(Ae=>{"use strict";o();Object.defineProperty(Ae,"__esModule",{value:!0});var Ls=wr(),qe=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Ls.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};Ae.default=qe});var Y=c(j=>{"use strict";o();Object.defineProperty(j,"__esModule",{value:!0});j.statSync=j.stat=j.Settings=void 0;var kr=Er(),xs=br(),Fe=Tr();j.Settings=Fe.default;function js(t,e,r){if(typeof e=="function"){kr.read(t,Re(),e);return}kr.read(t,Re(e),r)}j.stat=js;function Is(t,e){let r=Re(e);return xs.read(t,r)}j.statSync=Is;function Re(t={}){return t instanceof Fe.default?t:new Fe.default(t)}});var Mr=c((Qo,Dr)=>{o();var Or;Dr.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(Or||(Or=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var Ar=c((Xo,qr)=>{o();qr.exports=Ns;var Bs=Mr();function Ns(t,e){let r,n,s,i=!0;Array.isArray(t)?(r=[],n=t.length):(s=Object.keys(t),r={},n=s.length);function a(f){function h(){e&&e(f,r),e=null}i?Bs(h):h()}function d(f,h,u){r[f]=u,(--n===0||h)&&a(h)}n?s?s.forEach(function(f){t[f](function(h,u){d(f,h,u)})}):t.forEach(function(f,h){f(function(u,_){d(h,u,_)})}):a(null),i=!1}});var Le=c(ie=>{"use strict";o();Object.defineProperty(ie,"__esModule",{value:!0});ie.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var se=process.versions.node.split(".");if(se[0]===void 0||se[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var Fr=Number.parseInt(se[0],10),Ws=Number.parseInt(se[1],10),Rr=10,Vs=10,Cs=Fr>Rr,Ys=Fr===Rr&&Ws>=Vs;ie.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Cs||Ys});var Lr=c(oe=>{"use strict";o();Object.defineProperty(oe,"__esModule",{value:!0});oe.createDirentFromStats=void 0;var xe=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Hs(t,e){return new xe(t,e)}oe.createDirentFromStats=Hs});var je=c(ae=>{"use strict";o();Object.defineProperty(ae,"__esModule",{value:!0});ae.fs=void 0;var Us=Lr();ae.fs=Us});var Ie=c(ue=>{"use strict";o();Object.defineProperty(ue,"__esModule",{value:!0});ue.joinPathSegments=void 0;function Gs(t,e,r){return t.endsWith(r)?t+e:t+r+e}ue.joinPathSegments=Gs});var Wr=c(I=>{"use strict";o();Object.defineProperty(I,"__esModule",{value:!0});I.readdir=I.readdirWithFileTypes=I.read=void 0;var Qs=Y(),xr=Ar(),$s=Le(),jr=je(),Ir=Ie();function Xs(t,e,r){if(!e.stats&&$s.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Br(t,e,r);return}Nr(t,e,r)}I.read=Xs;function Br(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,s)=>{if(n!==null){ce(r,n);return}let i=s.map(d=>({dirent:d,name:d.name,path:Ir.joinPathSegments(t,d.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Be(r,i);return}let a=i.map(d=>Js(d,e));xr(a,(d,f)=>{if(d!==null){ce(r,d);return}Be(r,f)})})}I.readdirWithFileTypes=Br;function Js(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,s)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=jr.fs.createDirentFromStats(t.name,s),r(null,t)})}}function Nr(t,e,r){e.fs.readdir(t,(n,s)=>{if(n!==null){ce(r,n);return}let i=s.map(a=>{let d=Ir.joinPathSegments(t,a,e.pathSegmentSeparator);return f=>{Qs.stat(d,e.fsStatSettings,(h,u)=>{if(h!==null){f(h);return}let _={name:a,path:d,dirent:jr.fs.createDirentFromStats(a,u)};e.stats&&(_.stats=u),f(null,_)})}});xr(i,(a,d)=>{if(a!==null){ce(r,a);return}Be(r,d)})})}I.readdir=Nr;function ce(t,e){t(e)}function Be(t,e){t(null,e)}});var Ur=c(B=>{"use strict";o();Object.defineProperty(B,"__esModule",{value:!0});B.readdir=B.readdirWithFileTypes=B.read=void 0;var Ks=Y(),zs=Le(),Vr=je(),Cr=Ie();function Zs(t,e){return!e.stats&&zs.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Yr(t,e):Hr(t,e)}B.read=Zs;function Yr(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let s={dirent:n,name:n.name,path:Cr.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let i=e.fs.statSync(s.path);s.dirent=Vr.fs.createDirentFromStats(s.name,i)}catch(i){if(e.throwErrorOnBrokenSymbolicLink)throw i}return s})}B.readdirWithFileTypes=Yr;function Hr(t,e){return e.fs.readdirSync(t).map(n=>{let s=Cr.joinPathSegments(t,n,e.pathSegmentSeparator),i=Ks.statSync(s,e.fsStatSettings),a={name:n,path:s,dirent:Vr.fs.createDirentFromStats(n,i)};return e.stats&&(a.stats=i),a})}B.readdir=Hr});var Gr=c(N=>{"use strict";o();Object.defineProperty(N,"__esModule",{value:!0});N.createFileSystemAdapter=N.FILE_SYSTEM_ADAPTER=void 0;var G=E("fs");N.FILE_SYSTEM_ADAPTER={lstat:G.lstat,stat:G.stat,lstatSync:G.lstatSync,statSync:G.statSync,readdir:G.readdir,readdirSync:G.readdirSync};function ei(t){return t===void 0?N.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},N.FILE_SYSTEM_ADAPTER),t)}N.createFileSystemAdapter=ei});var Qr=c(We=>{"use strict";o();Object.defineProperty(We,"__esModule",{value:!0});var ti=E("path"),ri=Y(),ni=Gr(),Ne=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=ni.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,ti.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new ri.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};We.default=Ne});var le=c(W=>{"use strict";o();Object.defineProperty(W,"__esModule",{value:!0});W.Settings=W.scandirSync=W.scandir=void 0;var $r=Wr(),si=Ur(),Ve=Qr();W.Settings=Ve.default;function ii(t,e,r){if(typeof e=="function"){$r.read(t,Ce(),e);return}$r.read(t,Ce(e),r)}W.scandir=ii;function oi(t,e){let r=Ce(e);return si.read(t,r)}W.scandirSync=oi;function Ce(t={}){return t instanceof Ve.default?t:new Ve.default(t)}});var Jr=c((pa,Xr)=>{"use strict";o();function ai(t){var e=new t,r=e;function n(){var i=e;return i.next?e=i.next:(e=new t,r=e),i.next=null,i}function s(i){r.next=i,r=i}return{get:n,release:s}}Xr.exports=ai});var zr=c((ma,Ye)=>{"use strict";o();var ui=Jr();function Kr(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=ui(ci),s=null,i=null,a=0,d=null,f={push:O,drain:T,saturated:T,pause:u,paused:!1,get concurrency(){return r},set concurrency(g){if(!(g>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=g,!f.paused)for(;s&&a<r;)a++,C()},running:h,resume:R,idle:m,length:_,getQueue:p,unshift:J,empty:T,kill:En,killAndDrain:bn,error:Tn,abort:wn};return f;function h(){return a}function u(){f.paused=!0}function _(){for(var g=s,v=0;g;)g=g.next,v++;return v}function p(){for(var g=s,v=[];g;)v.push(g.value),g=g.next;return v}function R(){if(f.paused){if(f.paused=!1,s===null){a++,C();return}for(;s&&a<r;)a++,C()}}function m(){return a===0&&f.length()===0}function O(g,v){var y=n.get();y.context=t,y.release=C,y.value=g,y.callback=v||T,y.errorHandler=d,a>=r||f.paused?i?(i.next=y,i=y):(s=y,i=y,f.saturated()):(a++,e.call(t,y.value,y.worked))}function J(g,v){var y=n.get();y.context=t,y.release=C,y.value=g,y.callback=v||T,y.errorHandler=d,a>=r||f.paused?s?(y.next=s,s=y):(s=y,i=y,f.saturated()):(a++,e.call(t,y.value,y.worked))}function C(g){g&&n.release(g);var v=s;v&&a<=r?f.paused?a--:(i===s&&(i=null),s=v.next,v.next=null,e.call(t,v.value,v.worked),i===null&&f.empty()):--a===0&&f.drain()}function En(){s=null,i=null,f.drain=T}function bn(){s=null,i=null,f.drain(),f.drain=T}function wn(){var g=s;for(s=null,i=null;g;){var v=g.next,y=g.callback,Wt=g.errorHandler,kn=g.value,On=g.context;g.value=null,g.callback=T,g.errorHandler=null,Wt&&Wt(new Error("abort"),kn),y.call(On,new Error("abort")),g.release(g),g=v}f.drain=T}function Tn(g){d=g}}function T(){}function ci(){this.value=null,this.callback=T,this.next=null,this.release=T,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var s=t.callback,i=t.errorHandler,a=t.value;t.value=null,t.callback=T,t.errorHandler&&i(r,a),s.call(t.context,r,n),t.release(t)}}function li(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(u,_){e.call(this,u).then(function(p){_(null,p)},_)}var s=Kr(t,n,r),i=s.push,a=s.unshift;return s.push=d,s.unshift=f,s.drained=h,s;function d(u){var _=new Promise(function(p,R){i(u,function(m,O){if(m){R(m);return}p(O)})});return _.catch(T),_}function f(u){var _=new Promise(function(p,R){a(u,function(m,O){if(m){R(m);return}p(O)})});return _.catch(T),_}function h(){var u=new Promise(function(_){process.nextTick(function(){if(s.idle())_();else{var p=s.drain;s.drain=function(){typeof p=="function"&&p(),_(),s.drain=p}}})});return u}}Ye.exports=Kr;Ye.exports.promise=li});var he=c(A=>{"use strict";o();Object.defineProperty(A,"__esModule",{value:!0});A.joinPathSegments=A.replacePathSegmentSeparator=A.isAppliedFilter=A.isFatalError=void 0;function hi(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}A.isFatalError=hi;function fi(t,e){return t===null||t(e)}A.isAppliedFilter=fi;function di(t,e){return t.split(/[/\\]/).join(e)}A.replacePathSegmentSeparator=di;function _i(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}A.joinPathSegments=_i});var Ge=c(Ue=>{"use strict";o();Object.defineProperty(Ue,"__esModule",{value:!0});var pi=he(),He=class{constructor(e,r){this._root=e,this._settings=r,this._root=pi.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};Ue.default=He});var Xe=c($e=>{"use strict";o();Object.defineProperty($e,"__esModule",{value:!0});var gi=E("events"),mi=le(),yi=zr(),fe=he(),Si=Ge(),Qe=class extends Si.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=mi.scandir,this._emitter=new gi.EventEmitter,this._queue=yi(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,s=>{s!==null&&this._handleError(s)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,s)=>{if(n!==null){r(n,void 0);return}for(let i of s)this._handleEntry(i,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!fe.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=fe.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),fe.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&fe.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};$e.default=Qe});var Zr=c(Ke=>{"use strict";o();Object.defineProperty(Ke,"__esModule",{value:!0});var Pi=Xe(),Je=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Pi.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{vi(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Ei(e,this._storage)}),this._reader.read()}};Ke.default=Je;function vi(t,e){t(e)}function Ei(t,e){t(null,e)}});var en=c(Ze=>{"use strict";o();Object.defineProperty(Ze,"__esModule",{value:!0});var bi=E("stream"),wi=Xe(),ze=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new wi.default(this._root,this._settings),this._stream=new bi.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Ze.default=ze});var tn=c(tt=>{"use strict";o();Object.defineProperty(tt,"__esModule",{value:!0});var Ti=le(),de=he(),ki=Ge(),et=class extends ki.default{constructor(){super(...arguments),this._scandir=Ti.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let s of n)this._handleEntry(s,r)}catch(n){this._handleError(n)}}_handleError(e){if(de.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=de.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),de.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&de.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};tt.default=et});var rn=c(nt=>{"use strict";o();Object.defineProperty(nt,"__esModule",{value:!0});var Oi=tn(),rt=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Oi.default(this._root,this._settings)}read(){return this._reader.read()}};nt.default=rt});var nn=c(it=>{"use strict";o();Object.defineProperty(it,"__esModule",{value:!0});var Di=E("path"),Mi=le(),st=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Di.sep),this.fsScandirSettings=new Mi.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};it.default=st});var pe=c(F=>{"use strict";o();Object.defineProperty(F,"__esModule",{value:!0});F.Settings=F.walkStream=F.walkSync=F.walk=void 0;var sn=Zr(),qi=en(),Ai=rn(),ot=nn();F.Settings=ot.default;function Fi(t,e,r){if(typeof e=="function"){new sn.default(t,_e()).read(e);return}new sn.default(t,_e(e)).read(r)}F.walk=Fi;function Ri(t,e){let r=_e(e);return new Ai.default(t,r).read()}F.walkSync=Ri;function Li(t,e){let r=_e(e);return new qi.default(t,r).read()}F.walkStream=Li;function _e(t={}){return t instanceof ot.default?t:new ot.default(t)}});var ge=c(ut=>{"use strict";o();Object.defineProperty(ut,"__esModule",{value:!0});var xi=E("path"),ji=Y(),on=L(),at=class{constructor(e){this._settings=e,this._fsStatSettings=new ji.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return xi.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:on.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!on.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};ut.default=at});var ht=c(lt=>{"use strict";o();Object.defineProperty(lt,"__esModule",{value:!0});var Ii=E("stream"),Bi=Y(),Ni=pe(),Wi=ge(),ct=class extends Wi.default{constructor(){super(...arguments),this._walkStream=Ni.walkStream,this._stat=Bi.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),s=new Ii.PassThrough({objectMode:!0});s._write=(i,a,d)=>this._getEntry(n[i],e[i],r).then(f=>{f!==null&&r.entryFilter(f)&&s.push(f),i===n.length-1&&s.end(),d()}).catch(d);for(let i=0;i<n.length;i++)s.write(i);return s}_getEntry(e,r,n){return this._getStat(e).then(s=>this._makeEntry(s,r)).catch(s=>{if(n.errorFilter(s))return null;throw s})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(s,i)=>s===null?r(i):n(s))})}};lt.default=ct});var an=c(dt=>{"use strict";o();Object.defineProperty(dt,"__esModule",{value:!0});var Vi=pe(),Ci=ge(),Yi=ht(),ft=class extends Ci.default{constructor(){super(...arguments),this._walkAsync=Vi.walk,this._readerStream=new Yi.default(this._settings)}dynamic(e,r){return new Promise((n,s)=>{this._walkAsync(e,r,(i,a)=>{i===null?n(a):s(i)})})}async static(e,r){let n=[],s=this._readerStream.static(e,r);return new Promise((i,a)=>{s.once("error",a),s.on("data",d=>n.push(d)),s.once("end",()=>i(n))})}};dt.default=ft});var un=c(pt=>{"use strict";o();Object.defineProperty(pt,"__esModule",{value:!0});var X=L(),_t=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:e,segments:r,sections:n})}}_getPatternSegments(e){return X.pattern.getPatternParts(e,this._micromatchOptions).map(n=>X.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:X.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return X.array.splitWhen(e,r=>r.dynamic&&X.pattern.hasGlobStar(r.pattern))}};pt.default=_t});var cn=c(mt=>{"use strict";o();Object.defineProperty(mt,"__esModule",{value:!0});var Hi=un(),gt=class extends Hi.default{match(e){let r=e.split("/"),n=r.length,s=this._storage.filter(i=>!i.complete||i.segments.length>n);for(let i of s){let a=i.sections[0];if(!i.complete&&n>a.length||r.every((f,h)=>{let u=i.segments[h];return!!(u.dynamic&&u.patternRe.test(f)||!u.dynamic&&u.pattern===f)}))return!0}return!1}};mt.default=gt});var ln=c(St=>{"use strict";o();Object.defineProperty(St,"__esModule",{value:!0});var me=L(),Ui=cn(),yt=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let s=this._getMatcher(r),i=this._getNegativePatternsRe(n);return a=>this._filter(e,a,s,i)}_getMatcher(e){return new Ui.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(me.pattern.isAffectDepthOfReadingPattern);return me.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,s){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let i=me.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(i,n)?!1:this._isSkippedByNegativePatterns(i,s)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let s=e.split("/").length;return n-s}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!me.pattern.matchAny(e,r)}};St.default=yt});var hn=c(vt=>{"use strict";o();Object.defineProperty(vt,"__esModule",{value:!0});var V=L(),Pt=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let[n,s]=V.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:V.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:V.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:V.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return a=>this._filter(a,i)}_filter(e,r){let n=V.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let s=this._isMatchToPatternsSet(n,r,e.dirent.isDirectory());return this._settings.unique&&s&&this._createIndexRecord(n),s}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,r,n){return!(!this._isMatchToPatterns(e,r.positive.all,n)||this._isMatchToPatterns(e,r.negative.relative,n)||this._isMatchToAbsoluteNegative(e,r.negative.absolute,n))}_isMatchToAbsoluteNegative(e,r,n){if(r.length===0)return!1;let s=V.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(s,r,n)}_isMatchToPatterns(e,r,n){if(r.length===0)return!1;let s=V.pattern.matchAny(e,r);return!s&&n?V.pattern.matchAny(e+"/",r):s}};vt.default=Pt});var fn=c(bt=>{"use strict";o();Object.defineProperty(bt,"__esModule",{value:!0});var Gi=L(),Et=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return Gi.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};bt.default=Et});var _n=c(Tt=>{"use strict";o();Object.defineProperty(Tt,"__esModule",{value:!0});var dn=L(),wt=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=dn.path.makeAbsolute(this._settings.cwd,r),r=dn.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};Tt.default=wt});var ye=c(Ot=>{"use strict";o();Object.defineProperty(Ot,"__esModule",{value:!0});var Qi=E("path"),$i=ln(),Xi=hn(),Ji=fn(),Ki=_n(),kt=class{constructor(e){this._settings=e,this.errorFilter=new Ji.default(this._settings),this.entryFilter=new Xi.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new $i.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Ki.default(this._settings)}_getRootDirectory(e){return Qi.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};Ot.default=kt});var pn=c(Mt=>{"use strict";o();Object.defineProperty(Mt,"__esModule",{value:!0});var zi=an(),Zi=ye(),Dt=class extends Zi.default{constructor(){super(...arguments),this._reader=new zi.default(this._settings)}async read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(r,e,n)).map(i=>n.transform(i))}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};Mt.default=Dt});var gn=c(At=>{"use strict";o();Object.defineProperty(At,"__esModule",{value:!0});var eo=E("stream"),to=ht(),ro=ye(),qt=class extends ro.default{constructor(){super(...arguments),this._reader=new to.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),s=this.api(r,e,n),i=new eo.Readable({objectMode:!0,read:()=>{}});return s.once("error",a=>i.emit("error",a)).on("data",a=>i.emit("data",n.transform(a))).once("end",()=>i.emit("end")),i.once("close",()=>s.destroy()),i}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};At.default=qt});var mn=c(Rt=>{"use strict";o();Object.defineProperty(Rt,"__esModule",{value:!0});var no=Y(),so=pe(),io=ge(),Ft=class extends io.default{constructor(){super(...arguments),this._walkSync=so.walkSync,this._statSync=no.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let s of e){let i=this._getFullEntryPath(s),a=this._getEntry(i,s,r);a===null||!r.entryFilter(a)||n.push(a)}return n}_getEntry(e,r,n){try{let s=this._getStat(e);return this._makeEntry(s,r)}catch(s){if(n.errorFilter(s))return null;throw s}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};Rt.default=Ft});var yn=c(xt=>{"use strict";o();Object.defineProperty(xt,"__esModule",{value:!0});var oo=mn(),ao=ye(),Lt=class extends ao.default{constructor(){super(...arguments),this._reader=new oo.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};xt.default=Lt});var Sn=c($=>{"use strict";o();Object.defineProperty($,"__esModule",{value:!0});$.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var Q=E("fs"),uo=E("os"),co=Math.max(uo.cpus().length,1);$.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:Q.lstat,lstatSync:Q.lstatSync,stat:Q.stat,statSync:Q.statSync,readdir:Q.readdir,readdirSync:Q.readdirSync};var jt=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,co),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},$.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};$.default=jt});var _o=c((du,vn)=>{o();var Pn=Pr(),lo=pn(),ho=gn(),fo=yn(),It=Sn(),k=L();async function Bt(t,e){M(t);let r=Nt(t,lo.default,e),n=await Promise.all(r);return k.array.flatten(n)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(h,u){M(h);let _=Nt(h,fo.default,u);return k.array.flatten(_)}t.sync=e;function r(h,u){M(h);let _=Nt(h,ho.default,u);return k.stream.merge(_)}t.stream=r;function n(h,u){M(h);let _=[].concat(h),p=new It.default(u);return Pn.generate(_,p)}t.generateTasks=n;function s(h,u){M(h);let _=new It.default(u);return k.pattern.isDynamicPattern(h,_)}t.isDynamicPattern=s;function i(h){return M(h),k.path.escape(h)}t.escapePath=i;function a(h){return M(h),k.path.convertPathToPattern(h)}t.convertPathToPattern=a;let d;(function(h){function u(p){return M(p),k.path.escapePosixPath(p)}h.escapePath=u;function _(p){return M(p),k.path.convertPosixPathToPattern(p)}h.convertPathToPattern=_})(d=t.posix||(t.posix={}));let f;(function(h){function u(p){return M(p),k.path.escapeWindowsPath(p)}h.escapePath=u;function _(p){return M(p),k.path.convertWindowsPathToPattern(p)}h.convertPathToPattern=_})(f=t.win32||(t.win32={}))})(Bt||(Bt={}));function Nt(t,e,r){let n=[].concat(t),s=new It.default(r),i=Pn.generate(n,s),a=new e(s);return i.map(a.read,a)}function M(t){if(![].concat(t).every(n=>k.string.isString(n)&&!k.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}vn.exports=Bt});export{_o as a};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
queue-microtask/index.js:
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c as b,i as u,n as w,p as _}from"./chunk-FNWXMCSD.js";import{a as h}from"./chunk-NPB753M3.js";import{Ma as g}from"./chunk-XV6XCOTG.js";import{c as d}from"./chunk-5AWELO3D.js";import{h as m}from"./chunk-J7BTC45S.js";import{wb as s}from"./chunk-RIG66DIQ.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var j=250,c=class extends Error{constructor(){super("Migratable subscriptions were not found"),this.name="MigratableSubscriptionsNotFoundError"}},l=class extends Error{constructor(t){super(t),this.name="MigrationListProtocolError"}};async function*S({clientId:i,status:t,getPage:o=_}){let e=new Set,a;for(;;){let p=await o({clientId:i,first:j,after:a,status:t});if(p===null)throw new c;if(yield p.subscriptions,!p.pageInfo.hasNextPage)return;let{endCursor:n}=p.pageInfo;if(n===null||n.trim()==="")throw new l("Migratable subscription page has no cursor for its next page");if(e.has(n))throw new l(`Migratable subscription pagination repeated cursor: ${n}`);e.add(n),a=n}}r();var v="shop_id,status,manual_subscription_name,manual_subscription_price_amount,manual_subscription_price_currency_code,manual_subscription_interval,target_plan_handle,notification_kind,notification_opt_out_deadline,notification_sent_at,price_behavior,effective_date,last_failure_reason";function C(i){return u.encode({subscriptions:i.map(w)})}async function y({pages:i,json:t}){t?s(C(await x(i))):await E(i)}async function x(i){let t=[];for await(let o of i)t.push(...o);return t}async function E(i){let t=!1;for await(let o of i){let e=M(o);t?e.length>0&&s(e.join(`
|
|
2
|
+
`)):(s([v,...e].join(`
|
|
3
|
+
`)),t=!0)}t||s(v)}function M(i){return i.map(t=>[t.shopId,t.status,t.manualSubscriptionName,t.manualSubscriptionPrice?.amount,t.manualSubscriptionPrice?.currencyCode,t.manualSubscriptionInterval,t.targetPlanHandle,t.notification?.kind,t.notification?.optOutDeadline,t.notification?.sentAt,t.priceBehavior,t.effectiveDate,t.lastFailureReason].map(L).join(","))}function L(i){let t=i??"";return/[",\r\n]/.test(t)?`"${t.replaceAll('"','""')}"`:t}var f=class i extends h{static summary="Lists app subscriptions eligible for migration.";static descriptionWithMarkdown="Lists every app subscription eligible for migration.\n\nBy default, the command writes CSV to stdout, streaming each page of results as it arrives. If a later page fails, the rows already written remain valid CSV. Use `--json` to fetch all pages first and then write a single JSON envelope to stdout. Use shell redirection to save either format, for example `shopify app subscription-migrations list > subscriptions.csv` or `shopify app subscription-migrations list --json > subscriptions.json`.\n\nUse `--status` to filter subscriptions by migration status. Supported values are `UNSCHEDULED`, `SCHEDULED`, and `MIGRATED`.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --status SCHEDULED > scheduled-subscriptions.csv","<%= config.bin %> <%= command.id %> --json","<%= config.bin %> <%= command.id %> --json > subscriptions.json","<%= config.bin %> <%= command.id %> --client-id <client-id> > subscriptions.csv"];static flags={...b,...d};static get jsonOutputSchema(){return u}async run(){let{flags:t}=await this.parse(i),{app:o,remoteApp:e}=await g({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});try{let a=S({clientId:e.apiKey,status:t.status});await y({pages:a,json:t.json})}catch(a){throw a instanceof c?new m("App not found"):a}return{app:o}}};export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,b as e,e as p}from"./chunk-WGOSE3RL.js";import{b as a}from"./chunk-OLKLHVHA.js";import{b as o,c as r}from"./chunk-5AWELO3D.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class n extends a{static summary="Upgrades Shopify CLI.";static descriptionWithMarkdown="Upgrades Shopify CLI using your package manager.";static get jsonOutputSchema(){return i}static description=this.descriptionForHelp();static flags={...o,...r};async run(){let{flags:m}=await this.parse(n),c=await p();e(c,m.json?"json":"text")}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-NMLLRFZF.js";import{Ma as D}from"./chunk-XV6XCOTG.js";import{b as u,d as B}from"./chunk-7AWAOPLA.js";import{b as W,j as y}from"./chunk-NCPZVARH.js";import{C as _,J as N,U as F}from"./chunk-V654BMS7.js";import{h as s,k as C}from"./chunk-J7BTC45S.js";import{Sa as A,la as T,qb as m,sb as o}from"./chunk-RIG66DIQ.js";import{e as z,g as t}from"./chunk-VKWPEFWQ.js";t();var b=z(W(),1);function H(e){return e.startsWith("gid://")?e:/^\d+$/.test(e)?`gid://shopify/BulkOperation/${e}`:e}function J(e){return e.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1]??e}function g(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}if(n.definitions.filter(i=>i.kind==="OperationDefinition").length!==1)throw new s("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}function X(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}return n.definitions.find(i=>i.kind==="OperationDefinition")?.operation==="mutation"}async function Y(e){let{adminSession:n,userSpecifiedVersion:a,minimumDefaultVersion:i}=e;if(a==="unstable")return a;let r=await B(n);if(!a){let c=r.filter(v=>v.supported).map(v=>v.handle);i&&c.push(i);let f=c.sort().reverse()[0];if(!f)throw new s("No supported API versions available for this store.");return f}let l=r.map(c=>c.handle);if(l.includes(a))return a;let d=o`Invalid API version: ${a}`.value,k=o`Allowed versions: ${l.join(", ")}`.value;throw new s(d,k)}t();t();var p="2026-01";t();async function E(e){let n;if(e.query!==void 0){if(!e.query.trim())throw new s("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");n=e.query}else if(e.queryFile){if(!await A(e.queryFile))throw new s(o`Query file not found at ${m.path(e.queryFile)}. Please check the path and try again.`);let a=await T(e.queryFile,{encoding:"utf8"});if(!a.trim())throw new s(o`Query file at ${m.path(e.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);n=a}else throw new C("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");return g(n),n}t();t();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunQuery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function Z(e){let{adminSession:n,query:a,version:i}=e;return(await u({query:R,session:n,variables:{query:a},...i&&{version:i}})).bulkOperationRunQuery}t();t();t();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StagedUploadsCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StagedUploadInput"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedUploadsCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedTargets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"resourceUrl"}},{kind:"Field",name:{kind:"Name",value:"parameters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function h(e){let{adminSession:n,variablesJsonl:a}=e,i=Buffer.from(a??"","utf-8"),r="bulk-variables.jsonl",l=i.length,d=await ee(n,r,l),k=ne(d);return await ie(i,k.url,k.parameters,r),k.stagedUploadKey}async function ee(e,n,a){return u({query:L,session:e,variables:{input:[{filename:n,fileSize:a.toString(),httpMethod:"POST",mimeType:"text/jsonl",resource:"BULK_MUTATION_VARIABLES"}]}})}function ne(e){if(!e.stagedUploadsCreate)throw new s("No response received from stagedUploadsCreate mutation");if(e.stagedUploadsCreate.userErrors.length>0){let i=e.stagedUploadsCreate.userErrors.map(r=>r.message).join(", ");throw new s(`Failed to create staged upload: ${i}`)}let n=e.stagedUploadsCreate.stagedTargets?.[0];if(!n)throw new s("No staged upload target returned from Shopify");if(!n.url||!n.resourceUrl)throw new s("Invalid staged upload target: missing required URLs");let a=n.parameters.find(i=>i.name==="key")?.value;if(!a)throw new s("No key parameter found in staged upload target");return{url:n.url,resourceUrl:n.resourceUrl,parameters:n.parameters,stagedUploadKey:a}}async function ie(e,n,a,i){let r=new FormData;for(let d of a)r.append(d.name,d.value);r.append("file",new Blob([new Uint8Array(e)],{type:"text/jsonl"}),i);let l=await N({title:o`Uploading bulk operation variables`,task:async()=>y(n,{method:"POST",body:r},"slow-request"),renderOptions:{stdout:process.stderr}});if(!l.ok){let d=await l.text();throw new s(`Failed to upload file to staged URL: ${l.statusText}
|
|
2
2
|
${d}`)}}t();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"mutation"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunMutation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"mutation"},value:{kind:"Variable",name:{kind:"Name",value:"mutation"}}},{kind:"Argument",name:{kind:"Name",value:"stagedUploadPath"},value:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}}},{kind:"Argument",name:{kind:"Name",value:"clientIdentifier"},value:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function ae(e){let{adminSession:n,query:a,variablesJsonl:i,version:r}=e,l=await h({adminSession:n,variablesJsonl:i});return(await u({query:U,session:n,variables:{mutation:a,stagedUploadPath:l},...r&&{version:r}})).bulkOperationRunMutation}t();t();var S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetBulkOperationById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};t();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListBulkOperations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkOperationsSortKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"sortKey"},value:{kind:"Variable",name:{kind:"Name",value:"sortKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function te(e){let{adminSession:n,operationId:a,version:i}=e;return(await u({query:S,session:n,variables:{id:a},version:i??p})).bulkOperation}async function re(e){let{adminSession:n,version:a,sinceDays:i=7,first:r=100}=e,l=new Date(Date.now()-i*24*60*60*1e3).toISOString().split("T")[0];return(await u({query:q,session:n,variables:{query:`created_at:>=${l}`,first:r,sortKey:"CREATED_AT"},version:a??p})).bulkOperations.nodes}t();t();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationCancel"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationCancel"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"fileSize"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"query"}},{kind:"Field",name:{kind:"Name",value:"rootObjectCount"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function oe(e){let{adminSession:n,operationId:a,version:i}=e;return(await u({query:P,session:n,variables:{id:a},version:i??p})).bulkOperationCancel}t();t();function O(e){switch(e.status){case"RUNNING":return o`Bulk operation in progress${e.objectCount>0?m.gray(` (${String(e.objectCount)} objects ${e.type==="MUTATION"?"written":"read"})`):""}`;case"CREATED":return o`Starting`;case"COMPLETED":return o`Bulk operation succeeded: ${m.gray(`${String(e.objectCount)} objects`)}`;case"FAILED":return o`Bulk operation failed. ${m.errorText(`Error: ${e.errorCode??"unknown"}`)}`;case"CANCELING":return o`Bulk operation canceling...`;case"CANCELED":return o`Bulk operation canceled.`;case"EXPIRED":return o`Bulk operation expired.`;default:return o`Bulk operation status: ${e.status}`}}function le(e,n){let a=e.map(i=>o`${i.field?.join(".")??"unknown"}: ${i.message}`.value).join(`
|
|
3
3
|
`);_({headline:n,body:a})}function de(e){let n=O(e).value;switch(e.status){case"CANCELING":return{headline:"Bulk operation is being cancelled.",renderType:"success"};case"CANCELED":case"COMPLETED":case"FAILED":{let a=[o`ID: ${m.cyan(e.id)}`.value,o`Status: ${m.yellow(e.status)}`.value,o`Created at: ${m.gray(String(e.createdAt))}`.value,...e.completedAt?[o`Completed at: ${m.gray(String(e.completedAt))}`.value]:[]];return{headline:o`Bulk operation is already ${e.status.toLowerCase()}.`.value,body:o`This operation has already finished and can't be canceled.`.value,customSections:[{body:[{list:{items:a}}]}],renderType:"warning"}}case"CREATED":case"EXPIRED":case"RUNNING":return{headline:n,renderType:"info"}}}var se=["COMPLETED","FAILED","CANCELED","EXPIRED"],V=1,ue=5,M=10,$=3e3,Q=300;async function me(e,n){return N({title:o`Starting bulk operation`,task:async()=>{let a=Date.now(),i=j({adminSession:e,operationId:n,pollIntervalSeconds:Q/1e3,useAdaptivePolling:!1}),r;do{let{value:l,done:d}=await i.next();if(r=l,d)return r}while(Date.now()-a<$);return r},renderOptions:{stdout:process.stderr}})}async function ke(e,n,a,i){return N({title:o`Polling bulk operation`,task:async r=>{let l=j({adminSession:e,operationId:n,pollIntervalSeconds:ue,initialPollIntervalSeconds:V,initialPollCount:M,useAdaptivePolling:!0,abortSignal:a});for(;;){let{value:d,done:k}=await l.next();if(k)return d;r(O(d))}},onAbort:i,renderOptions:{stdout:process.stderr}})}async function*j({adminSession:e,operationId:n,pollIntervalSeconds:a,useAdaptivePolling:i=!1,initialPollIntervalSeconds:r=V,initialPollCount:l=M,abortSignal:d}){let k=0;for(;;){let c=await pe(e,n);if(!c.bulkOperation)throw new Error("bulk operation not found");let f=c.bulkOperation;if(se.includes(f.status)||d?.aborted)return f;yield f,k++;let v=a;if(i&&k<=l&&(v=r),d){let w,K=new Promise(G=>{let I=()=>G();d.addEventListener("abort",I,{once:!0}),w=()=>d.removeEventListener("abort",I)});await Promise.race([F(v),K]),w?.()}else await F(v)}}async function pe(e,n){return u({query:S,session:e,variables:{id:n},version:p})}t();async function ce(e){let n=await y(e);if(!n.ok)throw new s(`Failed to download bulk operation results: ${n.statusText}`);return n.text()}function ve(e){return e.trim().split(`
|
|
4
4
|
`).filter(a=>a.trim().length>0).some(a=>{let i;try{i=JSON.parse(a)}catch(l){if(l instanceof SyntaxError)return!1;throw l}if(Array.isArray(i.errors)&&i.errors.length>0)return!0;if(!i.data)return!1;let r=Object.values(i.data)[0];return r?.userErrors!==void 0&&r.userErrors.length>0})}t();async function fe(e){let n=await D({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),a=await x({appContextResult:n,storeFqdn:e.store,forceReselectStore:e.reset,storeTypes:["APP_DEVELOPMENT","DEVELOPMENT","DEVELOPMENT_SUPERSET","PRODUCTION"]});return{appContextResult:n,store:a}}async function Jn(e){let n=await E({query:e.query,queryFile:e["query-file"]}),{appContextResult:a,store:i}=await fe(e);return{query:n,appContextResult:a,store:i}}export{p as a,H as b,J as c,g as d,X as e,Y as f,E as g,Z as h,ae as i,te as j,re as k,oe as l,O as m,le as n,de as o,me as p,ke as q,ce as r,ve as s,fe as t,Jn as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as i,h as r,o as s}from"./chunk-IWTNUJGY.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();import{existsSync as l,readFileSync as u}from"fs";import{fileURLToPath as g,pathToFileURL as p}from"url";var a;function h(){if(!a){let n=i(s(import.meta.url),"..","oclif.manifest.json");a=JSON.parse(u(n,"utf8")).commands}return a}var m=new Map;function y(n){let t=m.get(n);if(!t){for(t=r(g(import.meta.resolve(n)));t!==r(t);){try{if(JSON.parse(u(i(t,"package.json"),"utf8")).name===n)break}catch(o){if(o instanceof SyntaxError){t=r(t);continue}if(o.code==="ENOENT"){t=r(t);continue}throw o}t=r(t)}m.set(n,t)}return t}var P={"demo:watcher":"dist/cli/commands/app/demo/watcher.js","kitchen-sink":"dist/cli/commands/kitchen-sink/index.js","doctor-release":"dist/cli/commands/doctor-release/doctor-release.js","doctor-release:theme":"dist/cli/commands/doctor-release/theme/index.js"};function f(n){return P[n]??`dist/cli/commands/${n.replace(/:/g,"/")}.js`}var C=new Set(["@shopify/cli","@shopify/app","@shopify/theme"]);async function D(n){let o=h()[n];if(!o)return;let e=o.customPluginName??o.pluginName;if(e)return C.has(e)?j(n,e):k(n,e)}var d=i(s(import.meta.url),"..");function w(n,t){let o=f(n),e=i(d,o);return l(e)?d:y(t)}async function j(n,t){let o=f(n),e=w(n,t);return(await import(p(i(e,o)).href)).default}async function k(n,t){if(t==="@shopify/cli-hydrogen"){let{COMMANDS:o}=await import("./dist-WXI5YQYP.js");return o?.[n]}if(t==="@oclif/plugin-commands"){let{commands:o}=await import("./lib-YEZOHXF3.js");return o[n]}if(t==="@oclif/plugin-plugins"){let{commands:o}=await import("./lib-PJHT4MKY.js");return o[n]}if(t==="@shopify/plugin-did-you-mean"){let{DidYouMeanCommands:o}=await import("./dist-VHIZZDYK.js");return o[n]}}export{D as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as y}from"./chunk-HB3MJYBK.js";import{a as B}from"./chunk-CKVVJ4XO.js";import{a as P}from"./chunk-LWMKZJ4M.js";import{A as O,D as p,F as N,J as u,M as m,O as h,P as l,U as g,W as J,a as D,e as F,f as x,r as I,t as E,v as M}from"./chunk-MNWT2SQO.js";import{b as C}from"./chunk-OLKLHVHA.js";import{b as j,c as _}from"./chunk-5AWELO3D.js";import{$ as v,A as k}from"./chunk-V654BMS7.js";import{a as R}from"./chunk-BN7ZXAZJ.js";import{h as d}from"./chunk-J7BTC45S.js";import{wb as T}from"./chunk-RIG66DIQ.js";import{b as c}from"./chunk-FZCGRIOM.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();var X=5e6,Y={readStdin:v,engineVersion:x,writeAgentFindings:M,recordMetadata:B};function z(t){return m(t.record)}function a(t,e){let i=new d("The findings document was rejected. Nothing was recorded.",null,[["Fix every error, then run",{command:z(e)},"again."]],[{title:"Errors",body:{list:{items:t}}}]);throw i.code="findings-document-rejected",i.details={errors:t},i}async function q(t,e){try{return await e.readStdin()}catch(i){throw i instanceof d&&a([i.message],t),i}}async function G(t,e){let i=await q(t,e);if(i===void 0){let n=new d("No findings document was piped on stdin.",null,[["Pipe the findings document on stdin:",{command:z(t)}]]);throw n.code="findings-document-missing",n}let r=Buffer.byteLength(i,"utf8");r>X&&a([`The findings document is ${r} bytes; the limit is 5 MB.`],t);try{return JSON.parse(i)}catch(n){let o=n instanceof Error?n.message:String(n);a([`The findings document is not valid JSON: ${o}`],t)}}async function S(t,e=Y){let{selection:i}=t,r=u(i,t.path),n=await G(r,e),o=F(n,{engineVersion:e.engineVersion()});o.ok||a(o.errors,r);let b=O(o.document);b>I&&a([`The recorded findings would be stored as ${b} bytes; the limit is 5 MB. Shorten or remove findings.`],r);let V=await e.writeAgentFindings(i.appDirectory,p(i),o.document),A=o.document.checks.reduce((L,K)=>L+K.findings.length,0);return await e.recordMetadata({num_security_findings:A}),{path:V,checks:o.document.checks.length,findings:A}}s();s();var f=R({name:"AppSecurityRecordResult",schema:c.object({status:c.literal("success"),app:l,resultsDirectory:h().describe("The absolute path of the results directory."),path:h().describe("The absolute path of the agent-findings.json file that was written."),checkCount:c.number().int().nonnegative().describe("The number of checks recorded."),findingCount:c.number().int().nonnegative().describe("The number of findings recorded, across every check.")}).strict(),definitions:{AppSecurityApp:l}});function $(t,e,i){if(i==="json"){T(f.encode(H(t,e)));return}let r=u(e.selection,e.path);k({headline:"Agent findings recorded.",body:[`Recorded ${y(t.checks,"check")} and ${y(t.findings,"finding")} in`,{filePath:t.path}],nextSteps:[["Run",{command:m(r.review)},"to see the results."]]})}function H(t,{selection:e}){let{resultsDirectory:i}=E(e.appDirectory,p(e));return{status:"success",app:J(e),resultsDirectory:g(i),path:g(t.path),checkCount:t.checks,findingCount:t.findings}}var w=class t extends C{static summary="Record agent findings from an app security check.";static descriptionWithMarkdown="Reads a coding agent's complete findings document from stdin, validates it, and replaces `agent-findings.json` in the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. `--client-id` is checked against your Shopify account before anything is read, so it needs you to be logged in.\n\nThe document must include a `scope` with the `include_dirs`, `excludes` and `no_git_ignore` values of the `check` run it describes, exactly as typed. It's recorded as reported and never compared with the scan's files.\n\nThe document is recorded all or nothing: if anything is invalid, the command fails with every error, writes nothing, and exits with a non-zero code. It needs the results directory that `shopify app security check` creates.\n\nReports the number of findings to Shopify as usage telemetry, but not finding details. See [usage reporting](https://shopify.dev/docs/api/shopify-cli#usage-reporting) for details.";static get jsonOutputSchema(){return f}static description=this.descriptionForHelp();static flags={...j,...D,..._};async run(){let{flags:e}=await this.parse(t),i=await N({path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"],allowPrompts:!1,validateClientIdFlag:!0});await P(i,e.path);let r={selection:i,path:e.path},n=await S(r);$(n,r,e.json?"json":"text")}};export{w as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m,d as f,e as u}from"./chunk-C3LL5CZA.js";import{d as c,f as w,j as T}from"./chunk-2NZ7GDDR.js";import{g as d}from"./chunk-KT5QQOES.js";import{G as s}from"./chunk-V654BMS7.js";import{h as l}from"./chunk-J7BTC45S.js";import{T as i}from"./chunk-RIG66DIQ.js";import{g as h}from"./chunk-VKWPEFWQ.js";h();async function q(e,r){let n=await m(e),t=new u(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",p=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&p.unshift(g(e)),(await s({message:y,choices:p}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new u(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return{...t,createdAtRuntime:!0}},label:"[Create a new theme]",group:i(c)}}export{q as a,B as b,C as c};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{e as ce}from"./chunk-QFWWCZOI.js";import{p as P,v as ie}from"./chunk-KT5QQOES.js";import{ca as xe,da as se}from"./chunk-DTRENW4Q.js";import{r as Z}from"./chunk-2M535QQJ.js";import{b as re,c as L}from"./chunk-5AWELO3D.js";import{A as ee,z as T}from"./chunk-V654BMS7.js";import{c as X}from"./chunk-F3OM2YO6.js";import{h as E}from"./chunk-J7BTC45S.js";import{Bb as oe,Da as D,N as A,Sa as N,_a as V,na as q,ta as j,wb as g,yb as te,zb as ne}from"./chunk-RIG66DIQ.js";import{b as m,h as z,i as K,j as Q}from"./chunk-FZCGRIOM.js";import{b as Te}from"./chunk-YTUUU33R.js";import{c as O,e as I,g as B,o as M}from"./chunk-IWTNUJGY.js";import{e as b,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();import{AsyncLocalStorage as Se}from"node:async_hooks";import{format as Fe}from"node:util";var ae=new Se,x=0,$;async function ue(t){if(Q()!=="json")return t();x===0&&($=console.error,console.error=(...e)=>{ae.getStore()?K({type:"diagnostic",level:"warning",message:Fe(...e)}):$(...e)}),x++;try{return await ae.run(!0,t)}finally{_e()}}function _e(){x--,x===0&&(console.error=$)}var i=b(se(),1),k=b(xe(),1);function Re(t,e){return t instanceof Error&&"code"in t&&t.code==="ENOENT"&&"path"in t&&typeof t.path=="string"&&I(t.path)===I(e)}async function Ie(t){if(!(t===void 0||i.ModernIdentifiers.some(e=>e===t))&&await N(t)&&await D(await q(t)))throw new E(`Theme Check config must be a file, but ${t} is a directory.`,"Pass the path to a .theme-check.yml file to --config, or omit --config to use the .theme-check.yml in your theme root. To choose the theme directory, use --path.")}async function G(t,e){await Ie(t);try{return await e()}catch(r){throw t!==void 0&&Re(r,t)?new E(`Theme Check config file not found: ${t}`):r}}function Ae(t){switch(t){case"error":return i.Severity.ERROR;case"suggestion":case"warning":return i.Severity.WARNING;case"style":case"info":return i.Severity.INFO;case"crash":return}}function me(t){switch(t){case i.Severity.ERROR:return"error";case i.Severity.WARNING:return"warning";case i.Severity.INFO:return"info"}}function je(t){return new Map(t.map(e=>[e.uri,e.source]))}function Ne(t,e,r){let o=t.split(`
|
|
2
|
+
`).slice(e,r+1),s=o.length===1;return o.map((c,a)=>{let u=e+a+1,h=s?c.trim():c;return`${u} ${h}`}).join(`
|
|
3
|
+
`)}function Ee(t){switch(t){case i.Severity.ERROR:return{error:`
|
|
4
|
+
[error]:`};case i.Severity.WARNING:return{warn:`
|
|
5
|
+
[warning]:`};case i.Severity.INFO:return{info:`
|
|
6
|
+
[info]:`}}}function Le(t,e){return t.map((n,o)=>{let{message:s,uri:c,start:a,end:u,check:h,severity:y}=n,f=e.get(c),p=f===void 0?[]:[`
|
|
7
|
+
|
|
8
|
+
${Ne(f,a.line,u.line)}`],v=o===t.length-1?"":`
|
|
9
|
+
|
|
10
|
+
`;return[Ee(y),{bold:h},{subdued:`
|
|
11
|
+
${s}`},...p,v]}).flat()}var Pe=(t,e)=>t.severity-e.severity;function H(t){let e=t.reduce((r,n)=>{let{uri:o}=n,s=i.path.fsPath(o);return r[s]??=[],r[s].push(n),r},{});return Object.keys(e).reduce((r,n)=>(r[n]=e[n].sort(Pe),r),{})}function he(t){return t.reduce((e,r)=>(e[r.severity]=(e[r.severity]??0)+1,e),{})}function fe(t,e,r){let n=[`${r.length} files inspected`];if(t.length===0)n.push("with no offenses found.");else{n.push(`with ${t.length} total offenses found across ${Object.keys(e).length} files.`);let o=he(t);o[i.Severity.ERROR]&&n.push(`
|
|
12
|
+
${o[i.Severity.ERROR]} errors.`),o[i.Severity.WARNING]&&n.push(`
|
|
13
|
+
${o[i.Severity.WARNING]} warnings.`),o[i.Severity.INFO]&&n.push(`
|
|
14
|
+
${o[i.Severity.INFO]} info issues.`)}return n}function le(t,e,r,n){let o=je(r);Object.keys(t).sort().forEach(c=>{let a=c.replace(e,"").slice(1);T({headline:n?`[${n}] ${a}`:a,body:Le(t[c],o)})})}function $e(t,e){return Object.entries(t).map(([r,n])=>{let o=n.map(c=>({check:c.check,severity:me(c.severity),start_row:c.start.line,start_column:c.start.character,end_row:c.end.line,end_column:c.end.character,message:c.message})),s=he(n);return{environment:e,path:r,offenses:o,errorCount:s[i.Severity.ERROR]??0,warningCount:s[i.Severity.WARNING]??0,infoCount:s[i.Severity.INFO]??0}})}function de(t,e){process.exit(W(t,e)?1:0)}function W(t,e){let r=e?Ae(e):void 0;return r!==void 0&&t.some(n=>n.severity<=r)}function Ge(t){return t.split(`
|
|
15
|
+
`).map(e=>`# ${e}`).join(`
|
|
16
|
+
`)}async function pe(t){let e=".theme-check.yml",r=O(t,e);if(await N(r)){te(`${e} already exists at ${t}`);return}let{settings:n}=await(0,i.loadConfig)(void 0,t),o=Ge(k.default.stringify(n)),s=k.default.stringify({extends:"theme-check:recommended",ignore:["node_modules/**"]});await j(r,`${s}${o}`),ne(`Created ${e} at ${t}`)}var He=async(t,e)=>{let r=(0,i.applyFixToString)(t.source,e),n=i.path.fsPath(t.uri);await j(n,r)};async function ge(t,e){await(0,i.autofix)(t,e,He)}async function ye(t,e,r){let{ignore:n,settings:o,rootUri:s}=await G(e,()=>(0,i.loadConfig)(e,t)),c={extends:[],ignore:A(n??[]),rootUri:s,...o},a=r?{[r]:c}:c;g(k.default.stringify(a))}async function ve(t,e,r){let{settings:n,ignore:o,checks:s}=await G(e,()=>(0,i.loadConfig)(e,t)),c=A(o??[]),u=Object.keys(n).reduce((y,f)=>{let{severity:p,enabled:v,...C}=n[f];if(!v)return y;let we=me(p??i.Severity.INFO),w=s.find(Oe=>Oe.meta.code===f),be=w&&w.meta?{description:w.meta.docs.description,doc:w.meta.docs.url}:{};return y[f]={severity:we,...be,ignored_patterns:`[${c.join(", ")}]`,...C},y},{}),h=r?{[r]:u}:u;g(k.default.stringify(h))}function ke(t){return"_handle"in t&&typeof t._handle=="object"&&t._handle!==null&&typeof t._handle.setBlocking=="function"}async function Y(t,e,r){let{offenses:n,theme:o}=await G(e,()=>ue(()=>(0,i.themeCheckRun)(t,e,c=>{process.env.SHOPIFY_TMP_FLAG_DEBUG&&oe(c)})));return{result:$e(H(n),r),offenses:n,theme:o}}l();l();import{resolve as We}from"node:path";var Ce=m.object({filePath:m.string().refine(B).describe("The absolute native path of the file."),check:m.string(),severity:m.enum(["error","warning","info"]),startRow:m.number().int().positive().describe("The one-based starting line."),startColumn:m.number().int().positive().describe("The one-based starting column."),endRow:m.number().int().positive().describe("The one-based ending line."),endColumn:m.number().int().positive().describe("The one-based ending column."),message:m.string()}).strict(),Ye=m.object({valid:m.boolean().describe("Whether the validation passes the selected blocking policy."),issues:m.array(Ce),errorCount:m.number().int().nonnegative(),warningCount:m.number().int().nonnegative(),infoCount:m.number().int().nonnegative()}).strict();function S(t){return Math.max(t+1,1)}var F=ce({name:"ThemeCheckResult",schema:Ye,definitions:{ThemeCheckIssue:Ce},project:t=>{let{files:e,valid:r}=Array.isArray(t)?{files:t,valid:void 0}:t;return{valid:r??e.every(n=>n.errorCount===0),issues:e.flatMap(n=>n.offenses.map(o=>({filePath:We(n.path),check:o.check,severity:o.severity,startRow:S(o.start_row),startColumn:S(o.start_column),endRow:S(o.end_row),endColumn:S(o.end_column),message:o.message}))),errorCount:e.reduce((n,o)=>n+o.errorCount,0),warningCount:e.reduce((n,o)=>n+o.warningCount,0),infoCount:e.reduce((n,o)=>n+o.infoCount,0)}}});function J(t){return JSON.stringify(JSON.parse(F.encode(t)))}function _({result:t,offenses:e,theme:r,valid:n},o,s,c){let a=H(e);if(o==="text"&&(le(a,s,r,c),(e.length?T:ee)({headline:c?`[${c}] Theme Check Summary.`:"Theme Check Summary.",body:fe(e,a,r)})),o==="json"){let u=process.stdout;ke(u)&&u._handle.setBlocking(!0),g(J(n===void 0?t:{files:t,valid:n}))}}var d=b(Te(),1);var U=b(se(),1);var R=class extends ie{static get jsonOutputSchema(){return F}static summary="Validate the theme.";static descriptionWithMarkdown="Calls and runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) to analyze your theme code for errors and to ensure that it follows theme and Liquid best practices. [Learn more about the checks that Theme Check runs.](https://shopify.dev/docs/themes/tools/theme-check/checks)";static description=this.descriptionForHelp();static flags={...re,...L,json:d.Flags.boolean({...L.json,env:"SHOPIFY_FLAG_JSON",exclusive:["init","version","print","list"]}),path:P.path,"auto-correct":d.Flags.boolean({char:"a",required:!1,description:"Automatically fix offenses",env:"SHOPIFY_FLAG_AUTO_CORRECT"}),config:d.Flags.string({char:"C",required:!1,description:`Path to a config file to use, overriding .theme-check.yml if present
|
|
17
|
+
Use --path to set the theme directory
|
|
18
|
+
Supports all theme-check: config values, e.g., theme-check:theme-app-extension,
|
|
19
|
+
theme-check:recommended, theme-check:all
|
|
20
|
+
For backwards compatibility, :theme_app_extension is also supported `,env:"SHOPIFY_FLAG_CONFIG"}),"fail-level":d.Flags.string({required:!1,description:"Minimum severity for exit with error code",env:"SHOPIFY_FLAG_FAIL_LEVEL",options:["crash","error","suggestion","style","warning","info"],default:"error"}),init:d.Flags.boolean({required:!1,description:"Generate a .theme-check.yml file",env:"SHOPIFY_FLAG_INIT"}),list:d.Flags.boolean({required:!1,description:"List enabled checks",env:"SHOPIFY_FLAG_LIST"}),output:d.Flags.string({char:"o",required:!1,description:"The output format to use",env:"SHOPIFY_FLAG_OUTPUT",options:["text","json"],default:"text"}),print:d.Flags.boolean({required:!1,description:"Output active config to STDOUT",env:"SHOPIFY_FLAG_PRINT"}),version:d.Flags.boolean({char:"v",required:!1,description:"Print Theme Check version",env:"SHOPIFY_FLAG_VERSION"}),environment:P.environment};static multiEnvironmentsFlags=["path"];async command(e,r,n){let o=e.path,s=e.environment?.[0],a=e.config?.startsWith(":")&&U.LegacyIdentifiers.has(e.config.slice(1))?U.LegacyIdentifiers.get(e.config.slice(1)):e.config;if(e.init){await pe(o);return}if(e.version){let v=await V(O("node_modules","@shopify","theme-check-node","package.json"),{type:"file",cwd:M(import.meta.url)}),C="unknown";v&&(C=await Z(v)??"unknown"),g(C);return}if(e.print){await ye(o,a,s);return}if(e.list){await ve(o,a,s);return}let u=await Y(o,a,s),{offenses:h,theme:y}=u,f=e.json||e.output==="json",p=!W(h,e["fail-level"]);if(f||_({...u,valid:p},e.output,o,s),e["auto-correct"]&&await ge(y,h),f&&!n&&_({...u,valid:p},"json",o,s),f)return p||(process.exitCode=1),{files:u.result,valid:p};if(!n)return de(h,e["fail-level"])}async _run(){let e=this.argv.indexOf("--"),r=e<0?this.argv:this.argv.slice(0,e),n=Je(r)==="json";return n&&!r.includes("--json")&&(this.argv=[...r,"--json",...e<0?[]:this.argv.slice(e)]),n?z({outputMode:"json",sink:X},()=>super._run()):super._run()}collectsEnvironmentResults(e){return!!e.json||e.output==="json"}validateCommandFlags(e){if(!this.collectsEnvironmentResults(e))return;let r=["init","version","print","list"].find(n=>e[n]);r&&this.error(`JSON output can't be used with --${r}.`,{exit:2})}renderEnvironmentResults(e){g(J({environments:e}))}};function Je(t){let e=process.env.SHOPIFY_FLAG_OUTPUT,r=Object.entries(R.flags);for(let n=0;n<t.length;n++){let o=t[n];if(o.startsWith("--")){let[s,...c]=o.slice(2).split("=");if(r.find(([h])=>h===s)?.[1]?.type!=="option")continue;let u=c.length?c.join("="):t[++n];s==="output"&&(e=u)}else if(o.startsWith("-"))for(let s=1;s<o.length;s++){let c=r.find(([,u])=>u.char===o[s]);if(!c)break;if(c[1].type!=="option")continue;let a=o.slice(s+1).replace(/^=/,"")||t[++n];c[0]==="output"&&(e=a);break}}return e}async function St(t,e,r,n){let o=await Y(t,r,n);return _(o,e,t,n),{offenses:o.offenses,theme:o.theme}}export{R as a,St as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as t}from"./chunk-FZCGRIOM.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var c=t.object({status:t.literal("success")});export{c as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{b as f}from"./chunk-XDXHSGDL.js";import{D as c}from"./chunk-NCPZVARH.js";import{z as m}from"./chunk-V654BMS7.js";import{a}from"./chunk-BN7ZXAZJ.js";import{k as d}from"./chunk-J7BTC45S.js";import{yb as h}from"./chunk-RIG66DIQ.js";import{b as t,c as l,d as s}from"./chunk-FZCGRIOM.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();o();var u=t.string().regex(/^gid:\/\/shopify\/BulkOperation\/[^/]+$/).describe("The Shopify global ID of a bulk operation."),n=t.object({gid:u,type:t.string(),status:t.string(),errorCode:t.string().nullable(),createdAt:l,completedAt:l.nullable(),objectCount:t.string().regex(/^\d+$/).describe("A nonnegative decimal count, without loss of integer precision."),url:t.string().url().nullable(),partialDataUrl:t.string().url().nullable()}).strict(),i=t.object({storeDomain:t.string().regex(/^[^.]+\.myshopify\.com$/).nullable(),apiVersion:t.string().nullable().describe("The API version selected for the request.")}).strict();var B=n.omit({type:!0}),O=i.extend({operationGid:u,operation:n.nullable()}),b=i.extend({operations:t.array(B),pageInfo:t.object({hasNextPage:t.boolean().nullable().describe("Unknown when the API result reaches the fetch limit.")}).strict()}),D=a({name:"BulkOperationStatusResult",schema:t.union([O,b]),definitions:{GetBulkOperationStatusResult:O,ListBulkOperationsResult:b,BulkOperation:n,ListedBulkOperation:B}}),J=a({name:"CancelBulkOperationResult",schema:i.extend({status:t.literal("success"),operation:n}),definitions:{BulkOperation:n}}),k=i.extend({status:t.enum(["success","partial","cancelled"]),reason:t.literal("watch-aborted").optional(),operation:n,resultsJsonl:t.string().optional().describe("Downloaded results in their native JSONL format.")}),g=t.object({path:t.string().describe("The absolute path of the downloaded results file."),format:t.literal("jsonl")}).strict(),R=a({name:"ExecuteBulkOperationResult",schema:t.union([k,g]),definitions:{BulkOperation:n,ExecuteBulkOperationResult:k,BulkOperationFile:g}});o();function U(e,r,S){let p=[...r.operationId?[`ID: ${r.operationId}`]:[],...f(r)];if(S==="json"){h(`${e}
|
|
2
|
+
${p.join(`
|
|
3
|
+
`)}`);return}m({headline:e,body:[{list:{items:p}}]})}o();function F(e){let r=c(e.store);return{storeDomain:r?`${r}.myshopify.com`:null,apiVersion:e.apiVersion??null}}function q(e){if(typeof e.objectCount=="number"&&!Number.isSafeInteger(e.objectCount))throw new d("Shopify returned a bulk operation count that can't be represented exactly.");return{gid:e.id,..."type"in e?{type:e.type}:{},status:e.status,errorCode:e.errorCode??null,createdAt:s(new Date(String(e.createdAt))),completedAt:e.completedAt?s(new Date(String(e.completedAt))):null,objectCount:String(e.objectCount),url:e.url??null,partialDataUrl:e.partialDataUrl??null}}export{D as a,J as b,R as c,F as d,q as e,U as f};
|