@aussieljk/forkbook 0.0.0-stage → 0.0.1-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +77 -2
- package/assets/addon-vitest/templates/vitest.config.4.template.ts +36 -0
- package/assets/browser/favicon-wrapper.svg +46 -0
- package/assets/browser/favicon.svg +1 -0
- package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-bold.woff2 +0 -0
- package/assets/browser/nunito-sans-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-regular.woff2 +0 -0
- package/assets/builder-vite/iframe.html +99 -0
- package/assets/create/rendererAssets/.eslintrc.json +16 -0
- package/assets/create/rendererAssets/common/Configure.mdx +388 -0
- package/assets/create/rendererAssets/common/assets/accessibility.png +0 -0
- package/assets/create/rendererAssets/common/assets/accessibility.svg +1 -0
- package/assets/create/rendererAssets/common/assets/addon-library.png +0 -0
- package/assets/create/rendererAssets/common/assets/assets.png +0 -0
- package/assets/create/rendererAssets/common/assets/avif-test-image.avif +0 -0
- package/assets/create/rendererAssets/common/assets/context.png +0 -0
- package/assets/create/rendererAssets/common/assets/discord.svg +1 -0
- package/assets/create/rendererAssets/common/assets/docs.png +0 -0
- package/assets/create/rendererAssets/common/assets/figma-plugin.png +0 -0
- package/assets/create/rendererAssets/common/assets/github.svg +1 -0
- package/assets/create/rendererAssets/common/assets/share.png +0 -0
- package/assets/create/rendererAssets/common/assets/styling.png +0 -0
- package/assets/create/rendererAssets/common/assets/testing.png +0 -0
- package/assets/create/rendererAssets/common/assets/theming.png +0 -0
- package/assets/create/rendererAssets/common/assets/tutorials.svg +1 -0
- package/assets/create/rendererAssets/common/assets/youtube.svg +1 -0
- package/assets/create/rendererAssets/common/button.css +30 -0
- package/assets/create/rendererAssets/common/header.css +32 -0
- package/assets/create/rendererAssets/common/page.css +68 -0
- package/assets/create/templates/react-native/index.expo.js +20 -0
- package/assets/create/templates/react-native/index.js +25 -0
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/message-reference.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/react-native/metro-env.d.ts +69 -0
- package/assets/server/addon.tsconfig.json +6 -0
- package/assets/server/base-preview-body.html +116 -0
- package/assets/server/base-preview-head.html +494 -0
- package/assets/server/openBrowser.applescript +94 -0
- package/assets/server/template.ejs +87 -0
- package/dist/.build-stamp +0 -0
- package/dist/_browser-chunks/Color-PCLE2J36.js +1025 -0
- package/dist/_browser-chunks/DocsRenderer-JXND3PVQ.js +10 -0
- package/dist/_browser-chunks/WithTooltip-XSQFTBMB.js +1619 -0
- package/dist/_browser-chunks/chunk-2JDQ35OA.js +247 -0
- package/dist/_browser-chunks/chunk-2JT76G3E.js +104 -0
- package/dist/_browser-chunks/chunk-2MEPHP35.js +17 -0
- package/dist/_browser-chunks/chunk-2SCZVUKW.js +24 -0
- package/dist/_browser-chunks/chunk-46Z7NGAS.js +41 -0
- package/dist/_browser-chunks/chunk-4ATQOMJB.js +30 -0
- package/dist/_browser-chunks/chunk-52CW7FF7.js +49 -0
- package/dist/_browser-chunks/chunk-5I7E4GMO.js +62 -0
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +20 -0
- package/dist/_browser-chunks/chunk-5WMXI5GW.js +816 -0
- package/dist/_browser-chunks/chunk-66OCZ54D.js +2604 -0
- package/dist/_browser-chunks/chunk-6SXYJQST.js +253 -0
- package/dist/_browser-chunks/chunk-AYRF6EJB.js +36 -0
- package/dist/_browser-chunks/chunk-B4AUNNU4.js +156 -0
- package/dist/_browser-chunks/chunk-BCP2FFXF.js +369 -0
- package/dist/_browser-chunks/chunk-C3D4HEFY.js +3396 -0
- package/dist/_browser-chunks/chunk-CFAOWGL7.js +43 -0
- package/dist/_browser-chunks/chunk-CFWWCCZV.js +223 -0
- package/dist/_browser-chunks/chunk-CNED6RYH.js +18 -0
- package/dist/_browser-chunks/chunk-DRQKCCAG.js +136 -0
- package/dist/_browser-chunks/chunk-ECQ75MKQ.js +0 -0
- package/dist/_browser-chunks/chunk-EIYAKDGP.js +302 -0
- package/dist/_browser-chunks/chunk-ENKK74N4.js +12 -0
- package/dist/_browser-chunks/chunk-FENFYI4X.js +698 -0
- package/dist/_browser-chunks/chunk-FJGWSWL5.js +155 -0
- package/dist/_browser-chunks/chunk-FVSEPWWX.js +2810 -0
- package/dist/_browser-chunks/chunk-GNZY6LOW.js +10116 -0
- package/dist/_browser-chunks/chunk-IE4ULIOQ.js +14 -0
- package/dist/_browser-chunks/chunk-IMSF75WX.js +42 -0
- package/dist/_browser-chunks/chunk-IWQGIXJS.js +14 -0
- package/dist/_browser-chunks/chunk-JMC7AIKT.js +108 -0
- package/dist/_browser-chunks/chunk-JPUOQJUI.js +8 -0
- package/dist/_browser-chunks/chunk-JSBKXXXF.js +218 -0
- package/dist/_browser-chunks/chunk-JWSKPMPC.js +73 -0
- package/dist/_browser-chunks/chunk-JYVGARBG.js +2943 -0
- package/dist/_browser-chunks/chunk-KBK7GKBN.js +35 -0
- package/dist/_browser-chunks/chunk-KQ7CRO2B.js +108 -0
- package/dist/_browser-chunks/chunk-LAWXTSXK.js +18 -0
- package/dist/_browser-chunks/chunk-LE2LTDW3.js +14 -0
- package/dist/_browser-chunks/chunk-LEVSOOLQ.js +48 -0
- package/dist/_browser-chunks/chunk-LV5PIKV4.js +93 -0
- package/dist/_browser-chunks/chunk-MDOL7KML.js +56 -0
- package/dist/_browser-chunks/chunk-MFMDGWP6.js +34 -0
- package/dist/_browser-chunks/chunk-MLBOOZL4.js +67 -0
- package/dist/_browser-chunks/chunk-NQUD4B7H.js +91 -0
- package/dist/_browser-chunks/chunk-NULBREPZ.js +43 -0
- package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
- package/dist/_browser-chunks/chunk-OD6IBQCC.js +117 -0
- package/dist/_browser-chunks/chunk-ODVJ3XZJ.js +157 -0
- package/dist/_browser-chunks/chunk-OQWFVDIN.js +386 -0
- package/dist/_browser-chunks/chunk-OVH3USFB.js +20 -0
- package/dist/_browser-chunks/chunk-OZZPSYQR.js +14 -0
- package/dist/_browser-chunks/chunk-P6PK47TQ.js +1970 -0
- package/dist/_browser-chunks/chunk-PFRNG3UC.js +22 -0
- package/dist/_browser-chunks/chunk-PJSMZ27A.js +13 -0
- package/dist/_browser-chunks/chunk-QC4HFS6K.js +41 -0
- package/dist/_browser-chunks/chunk-QDXFODK4.js +274 -0
- package/dist/_browser-chunks/chunk-RBCHTR7C.js +28 -0
- package/dist/_browser-chunks/chunk-RMYQ3QN3.js +294 -0
- package/dist/_browser-chunks/chunk-RNTIV5CE.js +411 -0
- package/dist/_browser-chunks/chunk-RSPAQWVJ.js +80 -0
- package/dist/_browser-chunks/chunk-S6TK43XQ.js +836 -0
- package/dist/_browser-chunks/chunk-SC67XZST.js +18 -0
- package/dist/_browser-chunks/chunk-SFVA4SBT.js +683 -0
- package/dist/_browser-chunks/chunk-SZYFOQMT.js +25 -0
- package/dist/_browser-chunks/chunk-TBJCJXK4.js +18 -0
- package/dist/_browser-chunks/chunk-UMDO3KB7.js +205 -0
- package/dist/_browser-chunks/chunk-V2G23FV7.js +11 -0
- package/dist/_browser-chunks/chunk-V5M7Q4HT.js +88 -0
- package/dist/_browser-chunks/chunk-W5M6NPS3.js +198 -0
- package/dist/_browser-chunks/chunk-W7NE2JXW.js +84 -0
- package/dist/_browser-chunks/chunk-WGVAAM43.js +1110 -0
- package/dist/_browser-chunks/chunk-WHQRNHXD.js +8 -0
- package/dist/_browser-chunks/chunk-WOSOWBCA.js +12 -0
- package/dist/_browser-chunks/chunk-WZ7KR7SH.js +85 -0
- package/dist/_browser-chunks/chunk-YEKO6BHJ.js +20 -0
- package/dist/_browser-chunks/chunk-YI2IBIQS.js +7 -0
- package/dist/_browser-chunks/chunk-YTIT5NA5.js +1966 -0
- package/dist/_browser-chunks/chunk-ZEHRUHTA.js +6 -0
- package/dist/_browser-chunks/chunk-ZTQ5MEJ5.js +203 -0
- package/dist/_browser-chunks/matchers-YLBYSYAF.js +1263 -0
- package/dist/_browser-chunks/react-dom-client-4OHE3QDV.js +9 -0
- package/dist/_node-chunks/attached-runtime-I2G4WLJI.js +282 -0
- package/dist/_node-chunks/builder-manager-VVHYQXCH.js +1661 -0
- package/dist/_node-chunks/chunk-2BUPBPFB.js +82 -0
- package/dist/_node-chunks/chunk-2DSIDINN.js +884 -0
- package/dist/_node-chunks/chunk-2RU7BKEW.js +23 -0
- package/dist/_node-chunks/chunk-34EO2PUT.js +26 -0
- package/dist/_node-chunks/chunk-3BKIBF5S.js +3008 -0
- package/dist/_node-chunks/chunk-3SDUYDXH.js +98 -0
- package/dist/_node-chunks/chunk-3T4ZSNPH.js +662 -0
- package/dist/_node-chunks/chunk-3W7F2B7P.js +79 -0
- package/dist/_node-chunks/chunk-3Y6AAY5H.js +80 -0
- package/dist/_node-chunks/chunk-42UWAGPW.js +1193 -0
- package/dist/_node-chunks/chunk-4FEANXWU.js +1986 -0
- package/dist/_node-chunks/chunk-5DQFEZEA.js +40 -0
- package/dist/_node-chunks/chunk-6KEHV53S.js +1218 -0
- package/dist/_node-chunks/chunk-6LMWA44H.js +3837 -0
- package/dist/_node-chunks/chunk-6YKBRP72.js +20 -0
- package/dist/_node-chunks/chunk-7GUDZVRQ.js +110 -0
- package/dist/_node-chunks/chunk-B5J7Q7J4.js +21 -0
- package/dist/_node-chunks/chunk-BS2WMZMR.js +90 -0
- package/dist/_node-chunks/chunk-BSKFCWQD.js +47 -0
- package/dist/_node-chunks/chunk-BXVYT7SB.js +36 -0
- package/dist/_node-chunks/chunk-CCOTJ4FC.js +688 -0
- package/dist/_node-chunks/chunk-CQKMLL5J.js +33 -0
- package/dist/_node-chunks/chunk-CXRU72ET.js +63 -0
- package/dist/_node-chunks/chunk-DC7DKR5K.js +20 -0
- package/dist/_node-chunks/chunk-DHJFTB4K.js +25 -0
- package/dist/_node-chunks/chunk-DUR55DJJ.js +1094 -0
- package/dist/_node-chunks/chunk-E6YESGLX.js +7032 -0
- package/dist/_node-chunks/chunk-EHUNOMDD.js +52345 -0
- package/dist/_node-chunks/chunk-ET7PWEO7.js +298 -0
- package/dist/_node-chunks/chunk-EWOX7HPJ.js +20 -0
- package/dist/_node-chunks/chunk-F3ZFKBHY.js +844 -0
- package/dist/_node-chunks/chunk-FK7KGTV7.js +26 -0
- package/dist/_node-chunks/chunk-FPZB5OI7.js +35 -0
- package/dist/_node-chunks/chunk-FW2HQUBQ.js +25 -0
- package/dist/_node-chunks/chunk-FY6UXW6G.js +11 -0
- package/dist/_node-chunks/chunk-GEFQN7K3.js +499 -0
- package/dist/_node-chunks/chunk-GRBLDJCR.js +989 -0
- package/dist/_node-chunks/chunk-H32DYT6P.js +87 -0
- package/dist/_node-chunks/chunk-H4PPVMP5.js +23 -0
- package/dist/_node-chunks/chunk-HMP2G23X.js +25 -0
- package/dist/_node-chunks/chunk-ICPBH3E7.js +59 -0
- package/dist/_node-chunks/chunk-IDEL2J23.js +23 -0
- package/dist/_node-chunks/chunk-IK4FGZLR.js +223 -0
- package/dist/_node-chunks/chunk-JDXXX6LB.js +68 -0
- package/dist/_node-chunks/chunk-JGGFYIG5.js +5468 -0
- package/dist/_node-chunks/chunk-JPAZLYJ3.js +29 -0
- package/dist/_node-chunks/chunk-JZOO7GGC.js +48 -0
- package/dist/_node-chunks/chunk-KISMCCP5.js +4744 -0
- package/dist/_node-chunks/chunk-LCK4ZQKG.js +115 -0
- package/dist/_node-chunks/chunk-LO56I6E2.js +132 -0
- package/dist/_node-chunks/chunk-LXBD4UL4.js +104 -0
- package/dist/_node-chunks/chunk-MA24JW6C.js +7162 -0
- package/dist/_node-chunks/chunk-MK2KYAI6.js +5414 -0
- package/dist/_node-chunks/chunk-NDWKJ4CL.js +2102 -0
- package/dist/_node-chunks/chunk-NIBT7XDZ.js +168 -0
- package/dist/_node-chunks/chunk-NPO45IMH.js +33 -0
- package/dist/_node-chunks/chunk-OISX4AGQ.js +414 -0
- package/dist/_node-chunks/chunk-OUW6R7C3.js +26 -0
- package/dist/_node-chunks/chunk-OWNFOGTA.js +194 -0
- package/dist/_node-chunks/chunk-Q7QNUM5H.js +49 -0
- package/dist/_node-chunks/chunk-QEQLR22M.js +1877 -0
- package/dist/_node-chunks/chunk-RRN2V55B.js +45 -0
- package/dist/_node-chunks/chunk-RWFIFGO5.js +144 -0
- package/dist/_node-chunks/chunk-RXNJDRGO.js +209 -0
- package/dist/_node-chunks/chunk-RZMQ7S3L.js +92 -0
- package/dist/_node-chunks/chunk-SIEXZVCR.js +51 -0
- package/dist/_node-chunks/chunk-SLWQNBGO.js +2034 -0
- package/dist/_node-chunks/chunk-SVTBJ7Q3.js +35 -0
- package/dist/_node-chunks/chunk-SWO5CDYU.js +32 -0
- package/dist/_node-chunks/chunk-TD5PLLQG.js +121 -0
- package/dist/_node-chunks/chunk-TEQGGSP7.js +33 -0
- package/dist/_node-chunks/chunk-TFCEV2XX.js +155 -0
- package/dist/_node-chunks/chunk-TFEWM4E3.js +1073 -0
- package/dist/_node-chunks/chunk-TINO74G5.js +21 -0
- package/dist/_node-chunks/chunk-TNJIXE37.js +40 -0
- package/dist/_node-chunks/chunk-TWI4GVH7.js +19 -0
- package/dist/_node-chunks/chunk-U5W53R2J.js +1011 -0
- package/dist/_node-chunks/chunk-UBOGWBEA.js +148 -0
- package/dist/_node-chunks/chunk-UMUBKI6E.js +3787 -0
- package/dist/_node-chunks/chunk-UVINFLGY.js +56 -0
- package/dist/_node-chunks/chunk-V2DY426G.js +1133 -0
- package/dist/_node-chunks/chunk-VLOXOXXE.js +45 -0
- package/dist/_node-chunks/chunk-W4OMYLSP.js +1297 -0
- package/dist/_node-chunks/chunk-WAXVSN3O.js +18 -0
- package/dist/_node-chunks/chunk-WCULS5TP.js +3767 -0
- package/dist/_node-chunks/chunk-WNZ2UMFM.js +153 -0
- package/dist/_node-chunks/chunk-WZJF2OUH.js +74 -0
- package/dist/_node-chunks/chunk-XGIUVY52.js +611 -0
- package/dist/_node-chunks/chunk-XHL2LVBM.js +415 -0
- package/dist/_node-chunks/chunk-XI6B6P47.js +59 -0
- package/dist/_node-chunks/chunk-XLP2ZKXV.js +60 -0
- package/dist/_node-chunks/chunk-YCMRA6RX.js +95 -0
- package/dist/_node-chunks/chunk-YZFWBA5L.js +2700 -0
- package/dist/_node-chunks/chunk-ZMAMXQKP.js +4731 -0
- package/dist/_node-chunks/chunk-ZWBCQ4MJ.js +110 -0
- package/dist/_node-chunks/dist-VTSTZKUB.js +16 -0
- package/dist/_node-chunks/globby-OEMHPBFY.js +2884 -0
- package/dist/_node-chunks/jiti-NFX6UU74.js +3848 -0
- package/dist/_node-chunks/lib-MDVARD7W.js +366 -0
- package/dist/_node-chunks/local-runtime-NTKIN2QT.js +78 -0
- package/dist/_node-chunks/mdx-plugin-MWISDWDQ.js +5680 -0
- package/dist/_node-chunks/monorepo-LIRFMQXE.js +121 -0
- package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js +121 -0
- package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +22 -0
- package/dist/_node-chunks/pattern-copy-play-EKHIUAU2.js +807 -0
- package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +20 -0
- package/dist/_node-chunks/rehype-external-links-BUN3HUCO.js +121 -0
- package/dist/_node-chunks/rehype-slug-PLADX223.js +52 -0
- package/dist/_node-chunks/relaxed-limits-GBHW6KIQ.js +117 -0
- package/dist/_node-chunks/run-KDTIZNSY.js +103 -0
- package/dist/_node-chunks/run-NL66VTNR.js +4532 -0
- package/dist/_node-chunks/session-id-KIIVOQLR.js +23 -0
- package/dist/_node-chunks/setup-MGC7BQO6.js +278 -0
- package/dist/_node-chunks/vitest.config.4.template-JH2THZFG.js +54 -0
- package/dist/actions/decorator.d.ts +7 -0
- package/dist/actions/decorator.js +43 -0
- package/dist/actions/index.d.ts +67 -0
- package/dist/actions/index.js +28 -0
- package/dist/addon-a11y/index.d.ts +52 -0
- package/dist/addon-a11y/index.js +16 -0
- package/dist/addon-a11y/manager.js +1429 -0
- package/dist/addon-a11y/preset.js +18 -0
- package/dist/addon-a11y/preview.d.ts +17 -0
- package/dist/addon-a11y/preview.js +15 -0
- package/dist/addon-docs/blocks.d.ts +1061 -0
- package/dist/addon-docs/blocks.js +2461 -0
- package/dist/addon-docs/index.d.ts +236 -0
- package/dist/addon-docs/index.js +16 -0
- package/dist/addon-docs/manager.js +90 -0
- package/dist/addon-docs/mdx-react-shim.d.ts +1 -0
- package/dist/addon-docs/mdx-react-shim.js +2 -0
- package/dist/addon-docs/preset.js +378 -0
- package/dist/addon-docs/preview.d.ts +4 -0
- package/dist/addon-docs/preview.js +7 -0
- package/dist/addon-links/index.d.ts +22 -0
- package/dist/addon-links/index.js +20 -0
- package/dist/addon-links/manager.js +14 -0
- package/dist/addon-links/preview.d.ts +6 -0
- package/dist/addon-links/preview.js +9 -0
- package/dist/addon-links/react/index.d.ts +25 -0
- package/dist/addon-links/react/index.js +52 -0
- package/dist/addon-mcp/preset.js +1345 -0
- package/dist/addon-mcp/preview.js +29 -0
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +1153 -0
- package/dist/addon-ondevice-actions/index.d.ts +4 -0
- package/dist/addon-ondevice-actions/index.js +7 -0
- package/dist/addon-ondevice-actions/register.js +7 -0
- package/dist/addon-ondevice-controls/index.d.ts +6 -0
- package/dist/addon-ondevice-controls/index.js +14 -0
- package/dist/addon-ondevice-controls/register.js +10 -0
- package/dist/addon-pseudo-states/index.d.ts +35 -0
- package/dist/addon-pseudo-states/index.js +15 -0
- package/dist/addon-pseudo-states/manager.js +53 -0
- package/dist/addon-pseudo-states/preview.d.ts +9 -0
- package/dist/addon-pseudo-states/preview.js +10 -0
- package/dist/addon-themes/index.d.ts +80 -0
- package/dist/addon-themes/index.js +104 -0
- package/dist/addon-themes/manager.js +97 -0
- package/dist/addon-themes/postinstall.js +33 -0
- package/dist/addon-themes/preview.d.ts +6 -0
- package/dist/addon-themes/preview.js +8 -0
- package/dist/addon-vitest/constants.d.ts +132 -0
- package/dist/addon-vitest/constants.js +66 -0
- package/dist/addon-vitest/index.d.ts +4 -0
- package/dist/addon-vitest/index.js +8 -0
- package/dist/addon-vitest/manager.js +665 -0
- package/dist/addon-vitest/node/coverage-reporter.js +1284 -0
- package/dist/addon-vitest/node/vitest.js +674 -0
- package/dist/addon-vitest/postinstall.js +24 -0
- package/dist/addon-vitest/preset.js +943 -0
- package/dist/addon-vitest/vitest-plugin/global-setup.js +162 -0
- package/dist/addon-vitest/vitest-plugin/index.d.ts +56 -0
- package/dist/addon-vitest/vitest-plugin/index.js +463 -0
- package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +9 -0
- package/dist/addon-vitest/vitest-plugin/setup-file.browser.4.js +20 -0
- package/dist/addon-vitest/vitest-plugin/setup-file.js +50 -0
- package/dist/addon-vitest/vitest-plugin/test-utils.js +128 -0
- package/dist/babel/index.d.ts +2301 -0
- package/dist/babel/index.js +61 -0
- package/dist/backgrounds/index.d.ts +6 -0
- package/dist/backgrounds/index.js +15 -0
- package/dist/bin/core.js +1705 -0
- package/dist/bin/dispatcher.js +43 -0
- package/dist/bin/loader.js +115 -0
- package/dist/builder-vite/index.d.ts +50 -0
- package/dist/builder-vite/index.js +245 -0
- package/dist/builder-vite/preset.js +27 -0
- package/dist/channels/index.d.ts +2 -0
- package/dist/channels/index.js +352 -0
- package/dist/chunk-B2t1tGRh.d.ts +284 -0
- package/dist/chunk-BCoJQE-f.d.ts +602 -0
- package/dist/chunk-BGkgZp-H.d.ts +214 -0
- package/dist/chunk-BTVrWliM.d.ts +115 -0
- package/dist/chunk-BXLImeLy.d.ts +197 -0
- package/dist/chunk-BfBzpgct.d.ts +916 -0
- package/dist/chunk-Bpi2tz-6.d.ts +511 -0
- package/dist/chunk-BxWufQms.d.ts +142 -0
- package/dist/chunk-C-bavsOH.d.ts +34 -0
- package/dist/chunk-C2p5r3Vt.d.ts +13001 -0
- package/dist/chunk-C6PAgHLT.d.ts +12 -0
- package/dist/chunk-CMeX4WRe.d.ts +179 -0
- package/dist/chunk-Ct9xd6IM.d.ts +65 -0
- package/dist/chunk-CwQKNaYL.d.ts +15 -0
- package/dist/chunk-D7DwV41f.d.ts +3622 -0
- package/dist/chunk-DEVFdzxR.d.ts +253 -0
- package/dist/chunk-DaVb55-_.d.ts +124 -0
- package/dist/chunk-DgRNfmj_.d.ts +40 -0
- package/dist/chunk-DoIGKY33.d.ts +666 -0
- package/dist/chunk-Dr3R0DXk.d.ts +40 -0
- package/dist/chunk-DtHByo32.d.ts +55 -0
- package/dist/chunk-Dw1z1Pki.d.ts +933 -0
- package/dist/chunk-DzuY9DXg.d.ts +79 -0
- package/dist/chunk-FjDVzZTj.d.ts +62 -0
- package/dist/chunk-Kt1tW-D1.d.ts +59 -0
- package/dist/chunk-XP8oHzpE.d.ts +6 -0
- package/dist/chunk-gCX81nOr.d.ts +61 -0
- package/dist/chunk-pcFXCimE.d.ts +741 -0
- package/dist/cli/index.d.ts +1174 -0
- package/dist/cli/index.js +5613 -0
- package/dist/cli/skills/content/index.d.ts +72 -0
- package/dist/cli/skills/content/index.js +335 -0
- package/dist/cli/tools/sdk/child-host.d.ts +61 -0
- package/dist/cli/tools/sdk/child-host.js +131 -0
- package/dist/cli/tools/sdk/index.d.ts +137 -0
- package/dist/cli/tools/sdk/index.js +44 -0
- package/dist/cli-commands/bin/index.js +25 -0
- package/dist/client-logger/index.d.ts +31 -0
- package/dist/client-logger/index.js +63 -0
- package/dist/common/index.d.ts +1103 -0
- package/dist/common/index.js +364 -0
- package/dist/components/index.d.ts +1924 -0
- package/dist/components/index.js +13759 -0
- package/dist/core-events/index.d.ts +155 -0
- package/dist/core-events/index.js +136 -0
- package/dist/core-server/index.d.ts +2200 -0
- package/dist/core-server/index.js +4165 -0
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +4168 -0
- package/dist/core-server/presets/common-override-preset.js +81 -0
- package/dist/core-server/presets/common-preset.js +2187 -0
- package/dist/create/bin/index.js +23 -0
- package/dist/create/index.js +25 -0
- package/dist/csf/csf-utils.d.ts +2 -0
- package/dist/csf/csf-utils.js +19 -0
- package/dist/csf/index.d.ts +7 -0
- package/dist/csf/index.js +2142 -0
- package/dist/csf-tools/index.d.ts +1157 -0
- package/dist/csf-tools/index.js +736 -0
- package/dist/docs-tools/index.d.ts +197 -0
- package/dist/docs-tools/index.js +61 -0
- package/dist/highlight/index.d.ts +10 -0
- package/dist/highlight/index.js +15 -0
- package/dist/instrumenter/index.d.ts +113 -0
- package/dist/instrumenter/index.js +2595 -0
- package/dist/manager/_manager-chunks/globals-runtime-8HkdnU2F.js +6144 -0
- package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +3389 -0
- package/dist/manager/_manager-chunks/globals-runtime-BdGkqNEt.js +45 -0
- package/dist/manager/_manager-chunks/globals-runtime-BmphMP6z.js +1190 -0
- package/dist/manager/_manager-chunks/globals-runtime-BvM-NY2g.js +13307 -0
- package/dist/manager/_manager-chunks/globals-runtime-C02fvgcd.js +9243 -0
- package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +9766 -0
- package/dist/manager/_manager-chunks/globals-runtime-DpNYC-qi.js +5564 -0
- package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +5357 -0
- package/dist/manager/_manager-chunks/globals-runtime-DwFqpqya.js +722 -0
- package/dist/manager/_manager-chunks/globals-runtime-FC201B7s.js +6837 -0
- package/dist/manager/_manager-chunks/globals-runtime-Rp_zjGnh.js +121 -0
- package/dist/manager/_manager-chunks/globals-runtime-ZHrQFa3-.js +10463 -0
- package/dist/manager/_manager-chunks/globals-runtime-eLPTIfX-.js +7759 -0
- package/dist/manager/_manager-chunks/globals-runtime-qKvCZHFY.js +4468 -0
- package/dist/manager/_manager-chunks/globals-runtime-sGpNlIJ1.js +5102 -0
- package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +452 -0
- package/dist/manager/_manager-chunks/runtime-BK0zF7FN.js +22 -0
- package/dist/manager/_manager-chunks/runtime-BhkT2CXl.js +1408 -0
- package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +998 -0
- package/dist/manager/_manager-chunks/runtime-D0UOWx0U.js +979 -0
- package/dist/manager/_manager-chunks/runtime-D94Vq3oR.js +4014 -0
- package/dist/manager/_manager-chunks/runtime-DMig8mT7.js +77 -0
- package/dist/manager/_manager-chunks/runtime-EITvVbkG.js +46 -0
- package/dist/manager/_manager-chunks/runtime-cp5pazY2.js +8936 -0
- package/dist/manager/_manager-chunks/runtime-eDVAYF7N.js +6860 -0
- package/dist/manager/_manager-chunks/runtime-i-PDAHLR.js +2493 -0
- package/dist/manager/globals-runtime.js +2 -0
- package/dist/manager/globals.d.ts +23 -0
- package/dist/manager/globals.js +26 -0
- package/dist/manager/manager-stores.d.ts +2 -0
- package/dist/manager/manager-stores.js +19 -0
- package/dist/manager/runtime.js +2 -0
- package/dist/manager-api/index.d.ts +2 -0
- package/dist/manager-api/index.js +3257 -0
- package/dist/manager-errors.d.ts +89 -0
- package/dist/manager-errors.js +20 -0
- package/dist/mcp/index.d.ts +270 -0
- package/dist/mcp/index.js +305 -0
- package/dist/mocking-utils/index.d.ts +689 -0
- package/dist/mocking-utils/index.js +521 -0
- package/dist/mocking-utils/mocker-runtime.js +1254 -0
- package/dist/nextjs-vite/config/preview.js +3 -0
- package/dist/nextjs-vite/export-mocks/cache/index.d.ts +25 -0
- package/dist/nextjs-vite/export-mocks/cache/index.js +29 -0
- package/dist/nextjs-vite/export-mocks/headers/index.d.ts +37 -0
- package/dist/nextjs-vite/export-mocks/headers/index.js +54 -0
- package/dist/nextjs-vite/export-mocks/link/index.d.ts +9 -0
- package/dist/nextjs-vite/export-mocks/link/index.js +59 -0
- package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +28 -0
- package/dist/nextjs-vite/export-mocks/navigation/index.js +58 -0
- package/dist/nextjs-vite/export-mocks/router/index.d.ts +34 -0
- package/dist/nextjs-vite/export-mocks/router/index.js +63 -0
- package/dist/nextjs-vite/index.d.ts +92 -0
- package/dist/nextjs-vite/index.js +58 -0
- package/dist/nextjs-vite/node/index.d.ts +6 -0
- package/dist/nextjs-vite/node/index.js +20 -0
- package/dist/nextjs-vite/preset.js +648 -0
- package/dist/nextjs-vite/preview.d.ts +20 -0
- package/dist/nextjs-vite/preview.js +11 -0
- package/dist/nextjs-vite/vite-plugin/index.d.ts +6 -0
- package/dist/nextjs-vite/vite-plugin/index.js +19 -0
- package/dist/nextjs-vite-plugin/index.d.ts +28 -0
- package/dist/nextjs-vite-plugin/index.js +923 -0
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +29 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-context.js +8 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-default-loader.js +23 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +28 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +17 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/cache/index.js +29 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/dynamic/index.js +40 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/headers/index.js +55 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/link/index.js +63 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/navigation/index.js +71 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +74 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/rsc/server-only.js +7 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/safe-stable-stringify/index.js +13 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/compatibility/draft-mode.compat.js +7 -0
- package/dist/node-logger/index.d.ts +495 -0
- package/dist/node-logger/index.js +42 -0
- package/dist/oxc-parser/index.d.ts +99 -0
- package/dist/oxc-parser/index.js +275 -0
- package/dist/oxc-parser/worker.js +37 -0
- package/dist/preview/_chunks/runtime-BIzIdDbb.js +10263 -0
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +1102 -0
- package/dist/preview/_chunks/runtime-BZSnICCg.js +8484 -0
- package/dist/preview/_chunks/runtime-BdGkqNEt.js +45 -0
- package/dist/preview/_chunks/runtime-BwSxqk3t.js +63 -0
- package/dist/preview/_chunks/runtime-CqHxptiK.js +6143 -0
- package/dist/preview/_chunks/runtime-CsV4HZPV.js +5064 -0
- package/dist/preview/_chunks/runtime-CxZK_Ln3.js +284 -0
- package/dist/preview/_chunks/runtime-DZToXfvO.js +9767 -0
- package/dist/preview/_chunks/runtime-DrTjJkPY.js +3872 -0
- package/dist/preview/_chunks/runtime-DuHdxMFA.js +387 -0
- package/dist/preview/_chunks/runtime-iXdo8CR8.js +3635 -0
- package/dist/preview/_chunks/runtime-q3wt0e_N.js +6838 -0
- package/dist/preview/globals.d.ts +16 -0
- package/dist/preview/globals.js +20 -0
- package/dist/preview/runtime.js +6 -0
- package/dist/preview-api/index.d.ts +4 -0
- package/dist/preview-api/index.js +147 -0
- package/dist/preview-errors.d.ts +186 -0
- package/dist/preview-errors.js +56 -0
- package/dist/react/docgen/docgen-worker.js +38 -0
- package/dist/react/entry-preview-argtypes.js +9 -0
- package/dist/react/entry-preview-docs.js +12 -0
- package/dist/react/entry-preview-rsc.js +11 -0
- package/dist/react/entry-preview.js +21 -0
- package/dist/react/index.d.ts +119 -0
- package/dist/react/index.js +26 -0
- package/dist/react/preset.js +301 -0
- package/dist/react/preview.d.ts +2 -0
- package/dist/react/preview.js +11 -0
- package/dist/react-native/bin/get-stories.js +34 -0
- package/dist/react-native/index.d.ts +160 -0
- package/dist/react-native/index.js +1547 -0
- package/dist/react-native/metro/node.d.ts +83 -0
- package/dist/react-native/metro/node.js +21 -0
- package/dist/react-native/metro/withStorybook.d.ts +2269 -0
- package/dist/react-native/metro/withStorybook.js +138 -0
- package/dist/react-native/preview.d.ts +6 -0
- package/dist/react-native/preview.js +20 -0
- package/dist/react-native/scripts/generate.d.ts +22 -0
- package/dist/react-native/scripts/generate.js +18 -0
- package/dist/react-native/stub.js +20 -0
- package/dist/react-native-theming/index.d.ts +175 -0
- package/dist/react-native-theming/index.js +2591 -0
- package/dist/react-native-ui/index.d.ts +130 -0
- package/dist/react-native-ui/index.js +1448 -0
- package/dist/react-native-ui-common/index.d.ts +230 -0
- package/dist/react-native-ui-common/index.js +514 -0
- package/dist/react-vite/index.d.ts +4 -0
- package/dist/react-vite/index.js +8 -0
- package/dist/react-vite/node/index.d.ts +6 -0
- package/dist/react-vite/node/index.js +20 -0
- package/dist/react-vite/preset.d.ts +6 -0
- package/dist/react-vite/preset.js +21 -0
- package/dist/router/index.d.ts +141 -0
- package/dist/router/index.js +1217 -0
- package/dist/server-errors.d.ts +2 -0
- package/dist/server-errors.js +149 -0
- package/dist/shared/open-service/index.d.ts +3 -0
- package/dist/shared/open-service/index.js +115 -0
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +75 -0
- package/dist/shared/open-service/toolsets/docs/public.d.ts +1296 -0
- package/dist/shared/open-service/toolsets/docs/public.js +991 -0
- package/dist/telemetry/index.d.ts +314 -0
- package/dist/telemetry/index.js +103 -0
- package/dist/test/index.d.ts +158 -0
- package/dist/test/index.js +19421 -0
- package/dist/theming/create.d.ts +15 -0
- package/dist/theming/create.js +11 -0
- package/dist/theming/index.d.ts +54 -0
- package/dist/theming/index.js +511 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +48 -0
- package/dist/viewport/index.d.ts +275 -0
- package/dist/viewport/index.js +21 -0
- package/package.json +1054 -4
- package/template/nextjs-vite/cli/.eslintrc.json +6 -0
- package/template/nextjs-vite/cli/js/Button.jsx +42 -0
- package/template/nextjs-vite/cli/js/Button.stories.js +49 -0
- package/template/nextjs-vite/cli/js/Configure.mdx +470 -0
- package/template/nextjs-vite/cli/js/Header.jsx +58 -0
- package/template/nextjs-vite/cli/js/Header.stories.js +30 -0
- package/template/nextjs-vite/cli/js/Page.jsx +68 -0
- package/template/nextjs-vite/cli/js/Page.stories.js +28 -0
- package/template/nextjs-vite/cli/ts/Button.stories.ts +54 -0
- package/template/nextjs-vite/cli/ts/Button.tsx +39 -0
- package/template/nextjs-vite/cli/ts/Configure.mdx +446 -0
- package/template/nextjs-vite/cli/ts/Header.stories.ts +34 -0
- package/template/nextjs-vite/cli/ts/Header.tsx +54 -0
- package/template/nextjs-vite/cli/ts/Page.stories.ts +33 -0
- package/template/nextjs-vite/cli/ts/Page.tsx +73 -0
- package/template/react/cli/.eslintrc.json +5 -0
- package/template/react/cli/js/Button.jsx +39 -0
- package/template/react/cli/js/Button.stories.js +49 -0
- package/template/react/cli/js/Header.jsx +56 -0
- package/template/react/cli/js/Header.stories.js +29 -0
- package/template/react/cli/js/Page.jsx +69 -0
- package/template/react/cli/js/Page.stories.js +28 -0
- package/template/react/cli/ts/Button.stories.ts +54 -0
- package/template/react/cli/ts/Button.tsx +37 -0
- package/template/react/cli/ts/Header.stories.ts +34 -0
- package/template/react/cli/ts/Header.tsx +56 -0
- package/template/react/cli/ts/Page.stories.ts +33 -0
- package/template/react/cli/ts/Page.tsx +73 -0
- package/template/react-vite/cli/.eslintrc.json +5 -0
- package/template/react-vite/cli/js/Button.jsx +39 -0
- package/template/react-vite/cli/js/Button.stories.js +49 -0
- package/template/react-vite/cli/js/Header.jsx +56 -0
- package/template/react-vite/cli/js/Header.stories.js +29 -0
- package/template/react-vite/cli/js/Page.jsx +69 -0
- package/template/react-vite/cli/js/Page.stories.js +28 -0
- package/template/react-vite/cli/ts/Button.stories.ts +54 -0
- package/template/react-vite/cli/ts/Button.tsx +37 -0
- package/template/react-vite/cli/ts/Header.stories.ts +34 -0
- package/template/react-vite/cli/ts/Header.tsx +56 -0
- package/template/react-vite/cli/ts/Page.stories.ts +33 -0
- package/template/react-vite/cli/ts/Page.tsx +73 -0
|
@@ -0,0 +1,2884 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ro17f80mg6k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ro17f80mg6k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ro17f80mg6k from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ro17f80mg6k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ro17f80mg6k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ro17f80mg6k.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
require_micromatch
|
|
14
|
+
} from "./chunk-QEQLR22M.js";
|
|
15
|
+
import {
|
|
16
|
+
toPath
|
|
17
|
+
} from "./chunk-BXVYT7SB.js";
|
|
18
|
+
import {
|
|
19
|
+
slash
|
|
20
|
+
} from "./chunk-DC7DKR5K.js";
|
|
21
|
+
import {
|
|
22
|
+
__commonJS,
|
|
23
|
+
__require,
|
|
24
|
+
__toESM
|
|
25
|
+
} from "./chunk-CXRU72ET.js";
|
|
26
|
+
|
|
27
|
+
// ../../node_modules/fast-glob/out/utils/array.js
|
|
28
|
+
var require_array = __commonJS({
|
|
29
|
+
"../../node_modules/fast-glob/out/utils/array.js"(exports) {
|
|
30
|
+
"use strict";
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
32
|
+
exports.splitWhen = exports.flatten = void 0;
|
|
33
|
+
function flatten(items) {
|
|
34
|
+
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
35
|
+
}
|
|
36
|
+
exports.flatten = flatten;
|
|
37
|
+
function splitWhen(items, predicate) {
|
|
38
|
+
let result = [[]], groupIndex = 0;
|
|
39
|
+
for (let item of items)
|
|
40
|
+
predicate(item) ? (groupIndex++, result[groupIndex] = []) : result[groupIndex].push(item);
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
exports.splitWhen = splitWhen;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// ../../node_modules/fast-glob/out/utils/errno.js
|
|
48
|
+
var require_errno = __commonJS({
|
|
49
|
+
"../../node_modules/fast-glob/out/utils/errno.js"(exports) {
|
|
50
|
+
"use strict";
|
|
51
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
52
|
+
exports.isEnoentCodeError = void 0;
|
|
53
|
+
function isEnoentCodeError(error) {
|
|
54
|
+
return error.code === "ENOENT";
|
|
55
|
+
}
|
|
56
|
+
exports.isEnoentCodeError = isEnoentCodeError;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// ../../node_modules/fast-glob/out/utils/fs.js
|
|
61
|
+
var require_fs = __commonJS({
|
|
62
|
+
"../../node_modules/fast-glob/out/utils/fs.js"(exports) {
|
|
63
|
+
"use strict";
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
65
|
+
exports.createDirentFromStats = void 0;
|
|
66
|
+
var DirentFromStats = class {
|
|
67
|
+
constructor(name, stats) {
|
|
68
|
+
this.name = name, this.isBlockDevice = stats.isBlockDevice.bind(stats), this.isCharacterDevice = stats.isCharacterDevice.bind(stats), this.isDirectory = stats.isDirectory.bind(stats), this.isFIFO = stats.isFIFO.bind(stats), this.isFile = stats.isFile.bind(stats), this.isSocket = stats.isSocket.bind(stats), this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
function createDirentFromStats(name, stats) {
|
|
72
|
+
return new DirentFromStats(name, stats);
|
|
73
|
+
}
|
|
74
|
+
exports.createDirentFromStats = createDirentFromStats;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// ../../node_modules/fast-glob/out/utils/path.js
|
|
79
|
+
var require_path = __commonJS({
|
|
80
|
+
"../../node_modules/fast-glob/out/utils/path.js"(exports) {
|
|
81
|
+
"use strict";
|
|
82
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
83
|
+
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
84
|
+
var os = __require("os"), path2 = __require("path"), IS_WINDOWS_PLATFORM = os.platform() === "win32", LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2, POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, DOS_DEVICE_PATH_RE = /^\\\\([.?])/, WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g;
|
|
85
|
+
function unixify(filepath) {
|
|
86
|
+
return filepath.replace(/\\/g, "/");
|
|
87
|
+
}
|
|
88
|
+
exports.unixify = unixify;
|
|
89
|
+
function makeAbsolute(cwd, filepath) {
|
|
90
|
+
return path2.resolve(cwd, filepath);
|
|
91
|
+
}
|
|
92
|
+
exports.makeAbsolute = makeAbsolute;
|
|
93
|
+
function removeLeadingDotSegment(entry) {
|
|
94
|
+
if (entry.charAt(0) === ".") {
|
|
95
|
+
let secondCharactery = entry.charAt(1);
|
|
96
|
+
if (secondCharactery === "/" || secondCharactery === "\\")
|
|
97
|
+
return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
|
|
98
|
+
}
|
|
99
|
+
return entry;
|
|
100
|
+
}
|
|
101
|
+
exports.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
102
|
+
exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
103
|
+
function escapeWindowsPath(pattern) {
|
|
104
|
+
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
105
|
+
}
|
|
106
|
+
exports.escapeWindowsPath = escapeWindowsPath;
|
|
107
|
+
function escapePosixPath(pattern) {
|
|
108
|
+
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
109
|
+
}
|
|
110
|
+
exports.escapePosixPath = escapePosixPath;
|
|
111
|
+
exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
112
|
+
function convertWindowsPathToPattern(filepath) {
|
|
113
|
+
return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
|
|
114
|
+
}
|
|
115
|
+
exports.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
116
|
+
function convertPosixPathToPattern(filepath) {
|
|
117
|
+
return escapePosixPath(filepath);
|
|
118
|
+
}
|
|
119
|
+
exports.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// ../../node_modules/is-extglob/index.js
|
|
124
|
+
var require_is_extglob = __commonJS({
|
|
125
|
+
"../../node_modules/is-extglob/index.js"(exports, module) {
|
|
126
|
+
module.exports = function(str) {
|
|
127
|
+
if (typeof str != "string" || str === "")
|
|
128
|
+
return !1;
|
|
129
|
+
for (var match; match = /(\\).|([@?!+*]\(.*\))/g.exec(str); ) {
|
|
130
|
+
if (match[2]) return !0;
|
|
131
|
+
str = str.slice(match.index + match[0].length);
|
|
132
|
+
}
|
|
133
|
+
return !1;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// ../../node_modules/is-glob/index.js
|
|
139
|
+
var require_is_glob = __commonJS({
|
|
140
|
+
"../../node_modules/is-glob/index.js"(exports, module) {
|
|
141
|
+
var isExtglob = require_is_extglob(), chars = { "{": "}", "(": ")", "[": "]" }, strictCheck = function(str) {
|
|
142
|
+
if (str[0] === "!")
|
|
143
|
+
return !0;
|
|
144
|
+
for (var index = 0, pipeIndex = -2, closeSquareIndex = -2, closeCurlyIndex = -2, closeParenIndex = -2, backSlashIndex = -2; index < str.length; ) {
|
|
145
|
+
if (str[index] === "*" || str[index + 1] === "?" && /[\].+)]/.test(str[index]) || closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]" && (closeSquareIndex < index && (closeSquareIndex = str.indexOf("]", index)), closeSquareIndex > index && (backSlashIndex === -1 || backSlashIndex > closeSquareIndex || (backSlashIndex = str.indexOf("\\", index), backSlashIndex === -1 || backSlashIndex > closeSquareIndex))) || closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}" && (closeCurlyIndex = str.indexOf("}", index), closeCurlyIndex > index && (backSlashIndex = str.indexOf("\\", index), backSlashIndex === -1 || backSlashIndex > closeCurlyIndex)) || closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")" && (closeParenIndex = str.indexOf(")", index), closeParenIndex > index && (backSlashIndex = str.indexOf("\\", index), backSlashIndex === -1 || backSlashIndex > closeParenIndex)) || pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|" && (pipeIndex < index && (pipeIndex = str.indexOf("|", index)), pipeIndex !== -1 && str[pipeIndex + 1] !== ")" && (closeParenIndex = str.indexOf(")", pipeIndex), closeParenIndex > pipeIndex && (backSlashIndex = str.indexOf("\\", pipeIndex), backSlashIndex === -1 || backSlashIndex > closeParenIndex))))
|
|
146
|
+
return !0;
|
|
147
|
+
if (str[index] === "\\") {
|
|
148
|
+
var open = str[index + 1];
|
|
149
|
+
index += 2;
|
|
150
|
+
var close = chars[open];
|
|
151
|
+
if (close) {
|
|
152
|
+
var n = str.indexOf(close, index);
|
|
153
|
+
n !== -1 && (index = n + 1);
|
|
154
|
+
}
|
|
155
|
+
if (str[index] === "!")
|
|
156
|
+
return !0;
|
|
157
|
+
} else
|
|
158
|
+
index++;
|
|
159
|
+
}
|
|
160
|
+
return !1;
|
|
161
|
+
}, relaxedCheck = function(str) {
|
|
162
|
+
if (str[0] === "!")
|
|
163
|
+
return !0;
|
|
164
|
+
for (var index = 0; index < str.length; ) {
|
|
165
|
+
if (/[*?{}()[\]]/.test(str[index]))
|
|
166
|
+
return !0;
|
|
167
|
+
if (str[index] === "\\") {
|
|
168
|
+
var open = str[index + 1];
|
|
169
|
+
index += 2;
|
|
170
|
+
var close = chars[open];
|
|
171
|
+
if (close) {
|
|
172
|
+
var n = str.indexOf(close, index);
|
|
173
|
+
n !== -1 && (index = n + 1);
|
|
174
|
+
}
|
|
175
|
+
if (str[index] === "!")
|
|
176
|
+
return !0;
|
|
177
|
+
} else
|
|
178
|
+
index++;
|
|
179
|
+
}
|
|
180
|
+
return !1;
|
|
181
|
+
};
|
|
182
|
+
module.exports = function(str, options) {
|
|
183
|
+
if (typeof str != "string" || str === "")
|
|
184
|
+
return !1;
|
|
185
|
+
if (isExtglob(str))
|
|
186
|
+
return !0;
|
|
187
|
+
var check = strictCheck;
|
|
188
|
+
return options && options.strict === !1 && (check = relaxedCheck), check(str);
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// ../../node_modules/glob-parent/index.js
|
|
194
|
+
var require_glob_parent = __commonJS({
|
|
195
|
+
"../../node_modules/glob-parent/index.js"(exports, module) {
|
|
196
|
+
"use strict";
|
|
197
|
+
var isGlob = require_is_glob(), pathPosixDirname = __require("path").posix.dirname, isWin32 = __require("os").platform() === "win32", slash2 = "/", backslash = /\\/g, enclosure = /[\{\[].*[\}\]]$/, globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/, escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
|
198
|
+
module.exports = function(str, opts) {
|
|
199
|
+
var options = Object.assign({ flipBackslashes: !0 }, opts);
|
|
200
|
+
options.flipBackslashes && isWin32 && str.indexOf(slash2) < 0 && (str = str.replace(backslash, slash2)), enclosure.test(str) && (str += slash2), str += "a";
|
|
201
|
+
do
|
|
202
|
+
str = pathPosixDirname(str);
|
|
203
|
+
while (isGlob(str) || globby2.test(str));
|
|
204
|
+
return str.replace(escaped, "$1");
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// ../../node_modules/fast-glob/out/utils/pattern.js
|
|
210
|
+
var require_pattern = __commonJS({
|
|
211
|
+
"../../node_modules/fast-glob/out/utils/pattern.js"(exports) {
|
|
212
|
+
"use strict";
|
|
213
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
214
|
+
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
215
|
+
var path2 = __require("path"), globParent = require_glob_parent(), micromatch = require_micromatch(), GLOBSTAR = "**", ESCAPE_SYMBOL = "\\", COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/, REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/, REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/, GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/, BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./, DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
216
|
+
function isStaticPattern(pattern, options = {}) {
|
|
217
|
+
return !isDynamicPattern2(pattern, options);
|
|
218
|
+
}
|
|
219
|
+
exports.isStaticPattern = isStaticPattern;
|
|
220
|
+
function isDynamicPattern2(pattern, options = {}) {
|
|
221
|
+
return pattern === "" ? !1 : !!(options.caseSensitiveMatch === !1 || pattern.includes(ESCAPE_SYMBOL) || COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern) || options.extglob !== !1 && GLOB_EXTENSION_SYMBOLS_RE.test(pattern) || options.braceExpansion !== !1 && hasBraceExpansion(pattern));
|
|
222
|
+
}
|
|
223
|
+
exports.isDynamicPattern = isDynamicPattern2;
|
|
224
|
+
function hasBraceExpansion(pattern) {
|
|
225
|
+
let openingBraceIndex = pattern.indexOf("{");
|
|
226
|
+
if (openingBraceIndex === -1)
|
|
227
|
+
return !1;
|
|
228
|
+
let closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1);
|
|
229
|
+
if (closingBraceIndex === -1)
|
|
230
|
+
return !1;
|
|
231
|
+
let braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
|
|
232
|
+
return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
|
|
233
|
+
}
|
|
234
|
+
function convertToPositivePattern(pattern) {
|
|
235
|
+
return isNegativePattern2(pattern) ? pattern.slice(1) : pattern;
|
|
236
|
+
}
|
|
237
|
+
exports.convertToPositivePattern = convertToPositivePattern;
|
|
238
|
+
function convertToNegativePattern(pattern) {
|
|
239
|
+
return "!" + pattern;
|
|
240
|
+
}
|
|
241
|
+
exports.convertToNegativePattern = convertToNegativePattern;
|
|
242
|
+
function isNegativePattern2(pattern) {
|
|
243
|
+
return pattern.startsWith("!") && pattern[1] !== "(";
|
|
244
|
+
}
|
|
245
|
+
exports.isNegativePattern = isNegativePattern2;
|
|
246
|
+
function isPositivePattern(pattern) {
|
|
247
|
+
return !isNegativePattern2(pattern);
|
|
248
|
+
}
|
|
249
|
+
exports.isPositivePattern = isPositivePattern;
|
|
250
|
+
function getNegativePatterns(patterns) {
|
|
251
|
+
return patterns.filter(isNegativePattern2);
|
|
252
|
+
}
|
|
253
|
+
exports.getNegativePatterns = getNegativePatterns;
|
|
254
|
+
function getPositivePatterns(patterns) {
|
|
255
|
+
return patterns.filter(isPositivePattern);
|
|
256
|
+
}
|
|
257
|
+
exports.getPositivePatterns = getPositivePatterns;
|
|
258
|
+
function getPatternsInsideCurrentDirectory(patterns) {
|
|
259
|
+
return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
|
|
260
|
+
}
|
|
261
|
+
exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
|
|
262
|
+
function getPatternsOutsideCurrentDirectory(patterns) {
|
|
263
|
+
return patterns.filter(isPatternRelatedToParentDirectory);
|
|
264
|
+
}
|
|
265
|
+
exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
|
|
266
|
+
function isPatternRelatedToParentDirectory(pattern) {
|
|
267
|
+
return pattern.startsWith("..") || pattern.startsWith("./..");
|
|
268
|
+
}
|
|
269
|
+
exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
|
|
270
|
+
function getBaseDirectory(pattern) {
|
|
271
|
+
return globParent(pattern, { flipBackslashes: !1 });
|
|
272
|
+
}
|
|
273
|
+
exports.getBaseDirectory = getBaseDirectory;
|
|
274
|
+
function hasGlobStar(pattern) {
|
|
275
|
+
return pattern.includes(GLOBSTAR);
|
|
276
|
+
}
|
|
277
|
+
exports.hasGlobStar = hasGlobStar;
|
|
278
|
+
function endsWithSlashGlobStar(pattern) {
|
|
279
|
+
return pattern.endsWith("/" + GLOBSTAR);
|
|
280
|
+
}
|
|
281
|
+
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
282
|
+
function isAffectDepthOfReadingPattern(pattern) {
|
|
283
|
+
let basename = path2.basename(pattern);
|
|
284
|
+
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
285
|
+
}
|
|
286
|
+
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
287
|
+
function expandPatternsWithBraceExpansion(patterns) {
|
|
288
|
+
return patterns.reduce((collection, pattern) => collection.concat(expandBraceExpansion(pattern)), []);
|
|
289
|
+
}
|
|
290
|
+
exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
291
|
+
function expandBraceExpansion(pattern) {
|
|
292
|
+
let patterns = micromatch.braces(pattern, { expand: !0, nodupes: !0, keepEscaping: !0 });
|
|
293
|
+
return patterns.sort((a, b) => a.length - b.length), patterns.filter((pattern2) => pattern2 !== "");
|
|
294
|
+
}
|
|
295
|
+
exports.expandBraceExpansion = expandBraceExpansion;
|
|
296
|
+
function getPatternParts(pattern, options) {
|
|
297
|
+
let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: !0 }));
|
|
298
|
+
return parts.length === 0 && (parts = [pattern]), parts[0].startsWith("/") && (parts[0] = parts[0].slice(1), parts.unshift("")), parts;
|
|
299
|
+
}
|
|
300
|
+
exports.getPatternParts = getPatternParts;
|
|
301
|
+
function makeRe(pattern, options) {
|
|
302
|
+
return micromatch.makeRe(pattern, options);
|
|
303
|
+
}
|
|
304
|
+
exports.makeRe = makeRe;
|
|
305
|
+
function convertPatternsToRe(patterns, options) {
|
|
306
|
+
return patterns.map((pattern) => makeRe(pattern, options));
|
|
307
|
+
}
|
|
308
|
+
exports.convertPatternsToRe = convertPatternsToRe;
|
|
309
|
+
function matchAny(entry, patternsRe) {
|
|
310
|
+
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
311
|
+
}
|
|
312
|
+
exports.matchAny = matchAny;
|
|
313
|
+
function removeDuplicateSlashes(pattern) {
|
|
314
|
+
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
315
|
+
}
|
|
316
|
+
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
317
|
+
function partitionAbsoluteAndRelative(patterns) {
|
|
318
|
+
let absolute = [], relative = [];
|
|
319
|
+
for (let pattern of patterns)
|
|
320
|
+
isAbsolute(pattern) ? absolute.push(pattern) : relative.push(pattern);
|
|
321
|
+
return [absolute, relative];
|
|
322
|
+
}
|
|
323
|
+
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
324
|
+
function isAbsolute(pattern) {
|
|
325
|
+
return path2.isAbsolute(pattern);
|
|
326
|
+
}
|
|
327
|
+
exports.isAbsolute = isAbsolute;
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
// ../../node_modules/merge2/index.js
|
|
332
|
+
var require_merge2 = __commonJS({
|
|
333
|
+
"../../node_modules/merge2/index.js"(exports, module) {
|
|
334
|
+
"use strict";
|
|
335
|
+
var Stream = __require("stream"), PassThrough = Stream.PassThrough, slice = Array.prototype.slice;
|
|
336
|
+
module.exports = merge2;
|
|
337
|
+
function merge2() {
|
|
338
|
+
let streamsQueue = [], args = slice.call(arguments), merging = !1, options = args[args.length - 1];
|
|
339
|
+
options && !Array.isArray(options) && options.pipe == null ? args.pop() : options = {};
|
|
340
|
+
let doEnd = options.end !== !1, doPipeError = options.pipeError === !0;
|
|
341
|
+
options.objectMode == null && (options.objectMode = !0), options.highWaterMark == null && (options.highWaterMark = 64 * 1024);
|
|
342
|
+
let mergedStream = PassThrough(options);
|
|
343
|
+
function addStream() {
|
|
344
|
+
for (let i = 0, len = arguments.length; i < len; i++)
|
|
345
|
+
streamsQueue.push(pauseStreams(arguments[i], options));
|
|
346
|
+
return mergeStream(), this;
|
|
347
|
+
}
|
|
348
|
+
function mergeStream() {
|
|
349
|
+
if (merging)
|
|
350
|
+
return;
|
|
351
|
+
merging = !0;
|
|
352
|
+
let streams = streamsQueue.shift();
|
|
353
|
+
if (!streams) {
|
|
354
|
+
process.nextTick(endStream2);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
Array.isArray(streams) || (streams = [streams]);
|
|
358
|
+
let pipesCount = streams.length + 1;
|
|
359
|
+
function next() {
|
|
360
|
+
--pipesCount > 0 || (merging = !1, mergeStream());
|
|
361
|
+
}
|
|
362
|
+
function pipe(stream) {
|
|
363
|
+
function onend() {
|
|
364
|
+
stream.removeListener("merge2UnpipeEnd", onend), stream.removeListener("end", onend), doPipeError && stream.removeListener("error", onerror), next();
|
|
365
|
+
}
|
|
366
|
+
function onerror(err) {
|
|
367
|
+
mergedStream.emit("error", err);
|
|
368
|
+
}
|
|
369
|
+
if (stream._readableState.endEmitted)
|
|
370
|
+
return next();
|
|
371
|
+
stream.on("merge2UnpipeEnd", onend), stream.on("end", onend), doPipeError && stream.on("error", onerror), stream.pipe(mergedStream, { end: !1 }), stream.resume();
|
|
372
|
+
}
|
|
373
|
+
for (let i = 0; i < streams.length; i++)
|
|
374
|
+
pipe(streams[i]);
|
|
375
|
+
next();
|
|
376
|
+
}
|
|
377
|
+
function endStream2() {
|
|
378
|
+
merging = !1, mergedStream.emit("queueDrain"), doEnd && mergedStream.end();
|
|
379
|
+
}
|
|
380
|
+
return mergedStream.setMaxListeners(0), mergedStream.add = addStream, mergedStream.on("unpipe", function(stream) {
|
|
381
|
+
stream.emit("merge2UnpipeEnd");
|
|
382
|
+
}), args.length && addStream.apply(null, args), mergedStream;
|
|
383
|
+
}
|
|
384
|
+
function pauseStreams(streams, options) {
|
|
385
|
+
if (Array.isArray(streams))
|
|
386
|
+
for (let i = 0, len = streams.length; i < len; i++)
|
|
387
|
+
streams[i] = pauseStreams(streams[i], options);
|
|
388
|
+
else {
|
|
389
|
+
if (!streams._readableState && streams.pipe && (streams = streams.pipe(PassThrough(options))), !streams._readableState || !streams.pause || !streams.pipe)
|
|
390
|
+
throw new Error("Only readable stream can be merged.");
|
|
391
|
+
streams.pause();
|
|
392
|
+
}
|
|
393
|
+
return streams;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
// ../../node_modules/fast-glob/out/utils/stream.js
|
|
399
|
+
var require_stream = __commonJS({
|
|
400
|
+
"../../node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
401
|
+
"use strict";
|
|
402
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
403
|
+
exports.merge = void 0;
|
|
404
|
+
var merge2 = require_merge2();
|
|
405
|
+
function merge(streams) {
|
|
406
|
+
let mergedStream = merge2(streams);
|
|
407
|
+
return streams.forEach((stream) => {
|
|
408
|
+
stream.once("error", (error) => mergedStream.emit("error", error));
|
|
409
|
+
}), mergedStream.once("close", () => propagateCloseEventToSources(streams)), mergedStream.once("end", () => propagateCloseEventToSources(streams)), mergedStream;
|
|
410
|
+
}
|
|
411
|
+
exports.merge = merge;
|
|
412
|
+
function propagateCloseEventToSources(streams) {
|
|
413
|
+
streams.forEach((stream) => stream.emit("close"));
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
// ../../node_modules/fast-glob/out/utils/string.js
|
|
419
|
+
var require_string = __commonJS({
|
|
420
|
+
"../../node_modules/fast-glob/out/utils/string.js"(exports) {
|
|
421
|
+
"use strict";
|
|
422
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
423
|
+
exports.isEmpty = exports.isString = void 0;
|
|
424
|
+
function isString(input) {
|
|
425
|
+
return typeof input == "string";
|
|
426
|
+
}
|
|
427
|
+
exports.isString = isString;
|
|
428
|
+
function isEmpty(input) {
|
|
429
|
+
return input === "";
|
|
430
|
+
}
|
|
431
|
+
exports.isEmpty = isEmpty;
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
// ../../node_modules/fast-glob/out/utils/index.js
|
|
436
|
+
var require_utils = __commonJS({
|
|
437
|
+
"../../node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
438
|
+
"use strict";
|
|
439
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
440
|
+
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
|
|
441
|
+
var array = require_array();
|
|
442
|
+
exports.array = array;
|
|
443
|
+
var errno = require_errno();
|
|
444
|
+
exports.errno = errno;
|
|
445
|
+
var fs4 = require_fs();
|
|
446
|
+
exports.fs = fs4;
|
|
447
|
+
var path2 = require_path();
|
|
448
|
+
exports.path = path2;
|
|
449
|
+
var pattern = require_pattern();
|
|
450
|
+
exports.pattern = pattern;
|
|
451
|
+
var stream = require_stream();
|
|
452
|
+
exports.stream = stream;
|
|
453
|
+
var string = require_string();
|
|
454
|
+
exports.string = string;
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
// ../../node_modules/fast-glob/out/managers/tasks.js
|
|
459
|
+
var require_tasks = __commonJS({
|
|
460
|
+
"../../node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
461
|
+
"use strict";
|
|
462
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
463
|
+
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
|
464
|
+
var utils = require_utils();
|
|
465
|
+
function generate(input, settings) {
|
|
466
|
+
let patterns = processPatterns(input, settings), ignore = processPatterns(settings.ignore, settings), positivePatterns = getPositivePatterns(patterns), negativePatterns = getNegativePatternsAsPositive(patterns, ignore), staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)), dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)), staticTasks = convertPatternsToTasks(
|
|
467
|
+
staticPatterns,
|
|
468
|
+
negativePatterns,
|
|
469
|
+
/* dynamic */
|
|
470
|
+
!1
|
|
471
|
+
), dynamicTasks = convertPatternsToTasks(
|
|
472
|
+
dynamicPatterns,
|
|
473
|
+
negativePatterns,
|
|
474
|
+
/* dynamic */
|
|
475
|
+
!0
|
|
476
|
+
);
|
|
477
|
+
return staticTasks.concat(dynamicTasks);
|
|
478
|
+
}
|
|
479
|
+
exports.generate = generate;
|
|
480
|
+
function processPatterns(input, settings) {
|
|
481
|
+
let patterns = input;
|
|
482
|
+
return settings.braceExpansion && (patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns)), settings.baseNameMatch && (patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`)), patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
|
|
483
|
+
}
|
|
484
|
+
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
485
|
+
let tasks = [], patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive), patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive), outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory), insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
|
|
486
|
+
return tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)), "." in insideCurrentDirectoryGroup ? tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)) : tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)), tasks;
|
|
487
|
+
}
|
|
488
|
+
exports.convertPatternsToTasks = convertPatternsToTasks;
|
|
489
|
+
function getPositivePatterns(patterns) {
|
|
490
|
+
return utils.pattern.getPositivePatterns(patterns);
|
|
491
|
+
}
|
|
492
|
+
exports.getPositivePatterns = getPositivePatterns;
|
|
493
|
+
function getNegativePatternsAsPositive(patterns, ignore) {
|
|
494
|
+
return utils.pattern.getNegativePatterns(patterns).concat(ignore).map(utils.pattern.convertToPositivePattern);
|
|
495
|
+
}
|
|
496
|
+
exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
|
|
497
|
+
function groupPatternsByBaseDirectory(patterns) {
|
|
498
|
+
let group = {};
|
|
499
|
+
return patterns.reduce((collection, pattern) => {
|
|
500
|
+
let base = utils.pattern.getBaseDirectory(pattern);
|
|
501
|
+
return base in collection ? collection[base].push(pattern) : collection[base] = [pattern], collection;
|
|
502
|
+
}, group);
|
|
503
|
+
}
|
|
504
|
+
exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
|
|
505
|
+
function convertPatternGroupsToTasks(positive, negative, dynamic) {
|
|
506
|
+
return Object.keys(positive).map((base) => convertPatternGroupToTask(base, positive[base], negative, dynamic));
|
|
507
|
+
}
|
|
508
|
+
exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
|
|
509
|
+
function convertPatternGroupToTask(base, positive, negative, dynamic) {
|
|
510
|
+
return {
|
|
511
|
+
dynamic,
|
|
512
|
+
positive,
|
|
513
|
+
negative,
|
|
514
|
+
base,
|
|
515
|
+
patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
exports.convertPatternGroupToTask = convertPatternGroupToTask;
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
// ../../node_modules/@nodelib/fs.stat/out/providers/async.js
|
|
523
|
+
var require_async = __commonJS({
|
|
524
|
+
"../../node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) {
|
|
525
|
+
"use strict";
|
|
526
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
527
|
+
exports.read = void 0;
|
|
528
|
+
function read(path2, settings, callback) {
|
|
529
|
+
settings.fs.lstat(path2, (lstatError, lstat) => {
|
|
530
|
+
if (lstatError !== null) {
|
|
531
|
+
callFailureCallback(callback, lstatError);
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
535
|
+
callSuccessCallback(callback, lstat);
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
settings.fs.stat(path2, (statError, stat) => {
|
|
539
|
+
if (statError !== null) {
|
|
540
|
+
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
541
|
+
callFailureCallback(callback, statError);
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
callSuccessCallback(callback, lstat);
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
settings.markSymbolicLink && (stat.isSymbolicLink = () => !0), callSuccessCallback(callback, stat);
|
|
548
|
+
});
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
exports.read = read;
|
|
552
|
+
function callFailureCallback(callback, error) {
|
|
553
|
+
callback(error);
|
|
554
|
+
}
|
|
555
|
+
function callSuccessCallback(callback, result) {
|
|
556
|
+
callback(null, result);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
// ../../node_modules/@nodelib/fs.stat/out/providers/sync.js
|
|
562
|
+
var require_sync = __commonJS({
|
|
563
|
+
"../../node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports) {
|
|
564
|
+
"use strict";
|
|
565
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
566
|
+
exports.read = void 0;
|
|
567
|
+
function read(path2, settings) {
|
|
568
|
+
let lstat = settings.fs.lstatSync(path2);
|
|
569
|
+
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink)
|
|
570
|
+
return lstat;
|
|
571
|
+
try {
|
|
572
|
+
let stat = settings.fs.statSync(path2);
|
|
573
|
+
return settings.markSymbolicLink && (stat.isSymbolicLink = () => !0), stat;
|
|
574
|
+
} catch (error) {
|
|
575
|
+
if (!settings.throwErrorOnBrokenSymbolicLink)
|
|
576
|
+
return lstat;
|
|
577
|
+
throw error;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
exports.read = read;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
// ../../node_modules/@nodelib/fs.stat/out/adapters/fs.js
|
|
585
|
+
var require_fs2 = __commonJS({
|
|
586
|
+
"../../node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports) {
|
|
587
|
+
"use strict";
|
|
588
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
589
|
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
590
|
+
var fs4 = __require("fs");
|
|
591
|
+
exports.FILE_SYSTEM_ADAPTER = {
|
|
592
|
+
lstat: fs4.lstat,
|
|
593
|
+
stat: fs4.stat,
|
|
594
|
+
lstatSync: fs4.lstatSync,
|
|
595
|
+
statSync: fs4.statSync
|
|
596
|
+
};
|
|
597
|
+
function createFileSystemAdapter(fsMethods) {
|
|
598
|
+
return fsMethods === void 0 ? exports.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
599
|
+
}
|
|
600
|
+
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
// ../../node_modules/@nodelib/fs.stat/out/settings.js
|
|
605
|
+
var require_settings = __commonJS({
|
|
606
|
+
"../../node_modules/@nodelib/fs.stat/out/settings.js"(exports) {
|
|
607
|
+
"use strict";
|
|
608
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
609
|
+
var fs4 = require_fs2(), Settings = class {
|
|
610
|
+
constructor(_options = {}) {
|
|
611
|
+
this._options = _options, this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, !0), this.fs = fs4.createFileSystemAdapter(this._options.fs), this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0);
|
|
612
|
+
}
|
|
613
|
+
_getValue(option, value) {
|
|
614
|
+
return option ?? value;
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
exports.default = Settings;
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
// ../../node_modules/@nodelib/fs.stat/out/index.js
|
|
622
|
+
var require_out = __commonJS({
|
|
623
|
+
"../../node_modules/@nodelib/fs.stat/out/index.js"(exports) {
|
|
624
|
+
"use strict";
|
|
625
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
626
|
+
exports.statSync = exports.stat = exports.Settings = void 0;
|
|
627
|
+
var async = require_async(), sync = require_sync(), settings_1 = require_settings();
|
|
628
|
+
exports.Settings = settings_1.default;
|
|
629
|
+
function stat(path2, optionsOrSettingsOrCallback, callback) {
|
|
630
|
+
if (typeof optionsOrSettingsOrCallback == "function") {
|
|
631
|
+
async.read(path2, getSettings(), optionsOrSettingsOrCallback);
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
async.read(path2, getSettings(optionsOrSettingsOrCallback), callback);
|
|
635
|
+
}
|
|
636
|
+
exports.stat = stat;
|
|
637
|
+
function statSync(path2, optionsOrSettings) {
|
|
638
|
+
let settings = getSettings(optionsOrSettings);
|
|
639
|
+
return sync.read(path2, settings);
|
|
640
|
+
}
|
|
641
|
+
exports.statSync = statSync;
|
|
642
|
+
function getSettings(settingsOrOptions = {}) {
|
|
643
|
+
return settingsOrOptions instanceof settings_1.default ? settingsOrOptions : new settings_1.default(settingsOrOptions);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
// ../../node_modules/queue-microtask/index.js
|
|
649
|
+
var require_queue_microtask = __commonJS({
|
|
650
|
+
"../../node_modules/queue-microtask/index.js"(exports, module) {
|
|
651
|
+
var promise;
|
|
652
|
+
module.exports = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window < "u" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
|
|
653
|
+
throw err;
|
|
654
|
+
}, 0));
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
|
|
658
|
+
// ../../node_modules/run-parallel/index.js
|
|
659
|
+
var require_run_parallel = __commonJS({
|
|
660
|
+
"../../node_modules/run-parallel/index.js"(exports, module) {
|
|
661
|
+
module.exports = runParallel;
|
|
662
|
+
var queueMicrotask2 = require_queue_microtask();
|
|
663
|
+
function runParallel(tasks, cb) {
|
|
664
|
+
let results, pending, keys, isSync = !0;
|
|
665
|
+
Array.isArray(tasks) ? (results = [], pending = tasks.length) : (keys = Object.keys(tasks), results = {}, pending = keys.length);
|
|
666
|
+
function done(err) {
|
|
667
|
+
function end() {
|
|
668
|
+
cb && cb(err, results), cb = null;
|
|
669
|
+
}
|
|
670
|
+
isSync ? queueMicrotask2(end) : end();
|
|
671
|
+
}
|
|
672
|
+
function each(i, err, result) {
|
|
673
|
+
results[i] = result, (--pending === 0 || err) && done(err);
|
|
674
|
+
}
|
|
675
|
+
pending ? keys ? keys.forEach(function(key) {
|
|
676
|
+
tasks[key](function(err, result) {
|
|
677
|
+
each(key, err, result);
|
|
678
|
+
});
|
|
679
|
+
}) : tasks.forEach(function(task, i) {
|
|
680
|
+
task(function(err, result) {
|
|
681
|
+
each(i, err, result);
|
|
682
|
+
});
|
|
683
|
+
}) : done(null), isSync = !1;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
// ../../node_modules/@nodelib/fs.scandir/out/constants.js
|
|
689
|
+
var require_constants = __commonJS({
|
|
690
|
+
"../../node_modules/@nodelib/fs.scandir/out/constants.js"(exports) {
|
|
691
|
+
"use strict";
|
|
692
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
693
|
+
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
|
694
|
+
var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
|
|
695
|
+
if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0)
|
|
696
|
+
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
|
697
|
+
var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10), MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10), SUPPORTED_MAJOR_VERSION = 10, SUPPORTED_MINOR_VERSION = 10, IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION, IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
|
|
698
|
+
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
// ../../node_modules/@nodelib/fs.scandir/out/utils/fs.js
|
|
703
|
+
var require_fs3 = __commonJS({
|
|
704
|
+
"../../node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports) {
|
|
705
|
+
"use strict";
|
|
706
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
707
|
+
exports.createDirentFromStats = void 0;
|
|
708
|
+
var DirentFromStats = class {
|
|
709
|
+
constructor(name, stats) {
|
|
710
|
+
this.name = name, this.isBlockDevice = stats.isBlockDevice.bind(stats), this.isCharacterDevice = stats.isCharacterDevice.bind(stats), this.isDirectory = stats.isDirectory.bind(stats), this.isFIFO = stats.isFIFO.bind(stats), this.isFile = stats.isFile.bind(stats), this.isSocket = stats.isSocket.bind(stats), this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
function createDirentFromStats(name, stats) {
|
|
714
|
+
return new DirentFromStats(name, stats);
|
|
715
|
+
}
|
|
716
|
+
exports.createDirentFromStats = createDirentFromStats;
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
|
|
720
|
+
// ../../node_modules/@nodelib/fs.scandir/out/utils/index.js
|
|
721
|
+
var require_utils2 = __commonJS({
|
|
722
|
+
"../../node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
723
|
+
"use strict";
|
|
724
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
725
|
+
exports.fs = void 0;
|
|
726
|
+
var fs4 = require_fs3();
|
|
727
|
+
exports.fs = fs4;
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
// ../../node_modules/@nodelib/fs.scandir/out/providers/common.js
|
|
732
|
+
var require_common = __commonJS({
|
|
733
|
+
"../../node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) {
|
|
734
|
+
"use strict";
|
|
735
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
736
|
+
exports.joinPathSegments = void 0;
|
|
737
|
+
function joinPathSegments(a, b, separator) {
|
|
738
|
+
return a.endsWith(separator) ? a + b : a + separator + b;
|
|
739
|
+
}
|
|
740
|
+
exports.joinPathSegments = joinPathSegments;
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
|
|
744
|
+
// ../../node_modules/@nodelib/fs.scandir/out/providers/async.js
|
|
745
|
+
var require_async2 = __commonJS({
|
|
746
|
+
"../../node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports) {
|
|
747
|
+
"use strict";
|
|
748
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
749
|
+
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
|
750
|
+
var fsStat = require_out(), rpl = require_run_parallel(), constants_1 = require_constants(), utils = require_utils2(), common = require_common();
|
|
751
|
+
function read(directory, settings, callback) {
|
|
752
|
+
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
753
|
+
readdirWithFileTypes(directory, settings, callback);
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
readdir(directory, settings, callback);
|
|
757
|
+
}
|
|
758
|
+
exports.read = read;
|
|
759
|
+
function readdirWithFileTypes(directory, settings, callback) {
|
|
760
|
+
settings.fs.readdir(directory, { withFileTypes: !0 }, (readdirError, dirents) => {
|
|
761
|
+
if (readdirError !== null) {
|
|
762
|
+
callFailureCallback(callback, readdirError);
|
|
763
|
+
return;
|
|
764
|
+
}
|
|
765
|
+
let entries = dirents.map((dirent) => ({
|
|
766
|
+
dirent,
|
|
767
|
+
name: dirent.name,
|
|
768
|
+
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
|
|
769
|
+
}));
|
|
770
|
+
if (!settings.followSymbolicLinks) {
|
|
771
|
+
callSuccessCallback(callback, entries);
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
let tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
|
|
775
|
+
rpl(tasks, (rplError, rplEntries) => {
|
|
776
|
+
if (rplError !== null) {
|
|
777
|
+
callFailureCallback(callback, rplError);
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
callSuccessCallback(callback, rplEntries);
|
|
781
|
+
});
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
exports.readdirWithFileTypes = readdirWithFileTypes;
|
|
785
|
+
function makeRplTaskEntry(entry, settings) {
|
|
786
|
+
return (done) => {
|
|
787
|
+
if (!entry.dirent.isSymbolicLink()) {
|
|
788
|
+
done(null, entry);
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
settings.fs.stat(entry.path, (statError, stats) => {
|
|
792
|
+
if (statError !== null) {
|
|
793
|
+
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
794
|
+
done(statError);
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
done(null, entry);
|
|
798
|
+
return;
|
|
799
|
+
}
|
|
800
|
+
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats), done(null, entry);
|
|
801
|
+
});
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
function readdir(directory, settings, callback) {
|
|
805
|
+
settings.fs.readdir(directory, (readdirError, names) => {
|
|
806
|
+
if (readdirError !== null) {
|
|
807
|
+
callFailureCallback(callback, readdirError);
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
let tasks = names.map((name) => {
|
|
811
|
+
let path2 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
812
|
+
return (done) => {
|
|
813
|
+
fsStat.stat(path2, settings.fsStatSettings, (error, stats) => {
|
|
814
|
+
if (error !== null) {
|
|
815
|
+
done(error);
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
let entry = {
|
|
819
|
+
name,
|
|
820
|
+
path: path2,
|
|
821
|
+
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
822
|
+
};
|
|
823
|
+
settings.stats && (entry.stats = stats), done(null, entry);
|
|
824
|
+
});
|
|
825
|
+
};
|
|
826
|
+
});
|
|
827
|
+
rpl(tasks, (rplError, entries) => {
|
|
828
|
+
if (rplError !== null) {
|
|
829
|
+
callFailureCallback(callback, rplError);
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
832
|
+
callSuccessCallback(callback, entries);
|
|
833
|
+
});
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
exports.readdir = readdir;
|
|
837
|
+
function callFailureCallback(callback, error) {
|
|
838
|
+
callback(error);
|
|
839
|
+
}
|
|
840
|
+
function callSuccessCallback(callback, result) {
|
|
841
|
+
callback(null, result);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
// ../../node_modules/@nodelib/fs.scandir/out/providers/sync.js
|
|
847
|
+
var require_sync2 = __commonJS({
|
|
848
|
+
"../../node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports) {
|
|
849
|
+
"use strict";
|
|
850
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
851
|
+
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
|
852
|
+
var fsStat = require_out(), constants_1 = require_constants(), utils = require_utils2(), common = require_common();
|
|
853
|
+
function read(directory, settings) {
|
|
854
|
+
return !settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? readdirWithFileTypes(directory, settings) : readdir(directory, settings);
|
|
855
|
+
}
|
|
856
|
+
exports.read = read;
|
|
857
|
+
function readdirWithFileTypes(directory, settings) {
|
|
858
|
+
return settings.fs.readdirSync(directory, { withFileTypes: !0 }).map((dirent) => {
|
|
859
|
+
let entry = {
|
|
860
|
+
dirent,
|
|
861
|
+
name: dirent.name,
|
|
862
|
+
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
|
|
863
|
+
};
|
|
864
|
+
if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks)
|
|
865
|
+
try {
|
|
866
|
+
let stats = settings.fs.statSync(entry.path);
|
|
867
|
+
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
|
|
868
|
+
} catch (error) {
|
|
869
|
+
if (settings.throwErrorOnBrokenSymbolicLink)
|
|
870
|
+
throw error;
|
|
871
|
+
}
|
|
872
|
+
return entry;
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
exports.readdirWithFileTypes = readdirWithFileTypes;
|
|
876
|
+
function readdir(directory, settings) {
|
|
877
|
+
return settings.fs.readdirSync(directory).map((name) => {
|
|
878
|
+
let entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator), stats = fsStat.statSync(entryPath, settings.fsStatSettings), entry = {
|
|
879
|
+
name,
|
|
880
|
+
path: entryPath,
|
|
881
|
+
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
882
|
+
};
|
|
883
|
+
return settings.stats && (entry.stats = stats), entry;
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
exports.readdir = readdir;
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
// ../../node_modules/@nodelib/fs.scandir/out/adapters/fs.js
|
|
891
|
+
var require_fs4 = __commonJS({
|
|
892
|
+
"../../node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports) {
|
|
893
|
+
"use strict";
|
|
894
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
895
|
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
896
|
+
var fs4 = __require("fs");
|
|
897
|
+
exports.FILE_SYSTEM_ADAPTER = {
|
|
898
|
+
lstat: fs4.lstat,
|
|
899
|
+
stat: fs4.stat,
|
|
900
|
+
lstatSync: fs4.lstatSync,
|
|
901
|
+
statSync: fs4.statSync,
|
|
902
|
+
readdir: fs4.readdir,
|
|
903
|
+
readdirSync: fs4.readdirSync
|
|
904
|
+
};
|
|
905
|
+
function createFileSystemAdapter(fsMethods) {
|
|
906
|
+
return fsMethods === void 0 ? exports.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
907
|
+
}
|
|
908
|
+
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
|
|
912
|
+
// ../../node_modules/@nodelib/fs.scandir/out/settings.js
|
|
913
|
+
var require_settings2 = __commonJS({
|
|
914
|
+
"../../node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
|
|
915
|
+
"use strict";
|
|
916
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
917
|
+
var path2 = __require("path"), fsStat = require_out(), fs4 = require_fs4(), Settings = class {
|
|
918
|
+
constructor(_options = {}) {
|
|
919
|
+
this._options = _options, this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !1), this.fs = fs4.createFileSystemAdapter(this._options.fs), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep), this.stats = this._getValue(this._options.stats, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0), this.fsStatSettings = new fsStat.Settings({
|
|
920
|
+
followSymbolicLink: this.followSymbolicLinks,
|
|
921
|
+
fs: this.fs,
|
|
922
|
+
throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
_getValue(option, value) {
|
|
926
|
+
return option ?? value;
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
exports.default = Settings;
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
|
|
933
|
+
// ../../node_modules/@nodelib/fs.scandir/out/index.js
|
|
934
|
+
var require_out2 = __commonJS({
|
|
935
|
+
"../../node_modules/@nodelib/fs.scandir/out/index.js"(exports) {
|
|
936
|
+
"use strict";
|
|
937
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
938
|
+
exports.Settings = exports.scandirSync = exports.scandir = void 0;
|
|
939
|
+
var async = require_async2(), sync = require_sync2(), settings_1 = require_settings2();
|
|
940
|
+
exports.Settings = settings_1.default;
|
|
941
|
+
function scandir(path2, optionsOrSettingsOrCallback, callback) {
|
|
942
|
+
if (typeof optionsOrSettingsOrCallback == "function") {
|
|
943
|
+
async.read(path2, getSettings(), optionsOrSettingsOrCallback);
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
async.read(path2, getSettings(optionsOrSettingsOrCallback), callback);
|
|
947
|
+
}
|
|
948
|
+
exports.scandir = scandir;
|
|
949
|
+
function scandirSync(path2, optionsOrSettings) {
|
|
950
|
+
let settings = getSettings(optionsOrSettings);
|
|
951
|
+
return sync.read(path2, settings);
|
|
952
|
+
}
|
|
953
|
+
exports.scandirSync = scandirSync;
|
|
954
|
+
function getSettings(settingsOrOptions = {}) {
|
|
955
|
+
return settingsOrOptions instanceof settings_1.default ? settingsOrOptions : new settings_1.default(settingsOrOptions);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
|
|
960
|
+
// ../../node_modules/reusify/reusify.js
|
|
961
|
+
var require_reusify = __commonJS({
|
|
962
|
+
"../../node_modules/reusify/reusify.js"(exports, module) {
|
|
963
|
+
"use strict";
|
|
964
|
+
function reusify(Constructor) {
|
|
965
|
+
var head = new Constructor(), tail = head;
|
|
966
|
+
function get() {
|
|
967
|
+
var current = head;
|
|
968
|
+
return current.next ? head = current.next : (head = new Constructor(), tail = head), current.next = null, current;
|
|
969
|
+
}
|
|
970
|
+
function release(obj) {
|
|
971
|
+
tail.next = obj, tail = obj;
|
|
972
|
+
}
|
|
973
|
+
return {
|
|
974
|
+
get,
|
|
975
|
+
release
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
module.exports = reusify;
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
|
|
982
|
+
// ../../node_modules/fastq/queue.js
|
|
983
|
+
var require_queue = __commonJS({
|
|
984
|
+
"../../node_modules/fastq/queue.js"(exports, module) {
|
|
985
|
+
"use strict";
|
|
986
|
+
var reusify = require_reusify();
|
|
987
|
+
function fastqueue(context, worker, _concurrency) {
|
|
988
|
+
if (typeof context == "function" && (_concurrency = worker, worker = context, context = null), !(_concurrency >= 1))
|
|
989
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
990
|
+
var cache = reusify(Task), queueHead = null, queueTail = null, _running = 0, errorHandler = null, self = {
|
|
991
|
+
push,
|
|
992
|
+
drain: noop2,
|
|
993
|
+
saturated: noop2,
|
|
994
|
+
pause,
|
|
995
|
+
paused: !1,
|
|
996
|
+
get concurrency() {
|
|
997
|
+
return _concurrency;
|
|
998
|
+
},
|
|
999
|
+
set concurrency(value) {
|
|
1000
|
+
if (!(value >= 1))
|
|
1001
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
1002
|
+
if (_concurrency = value, !self.paused)
|
|
1003
|
+
for (; queueHead && _running < _concurrency; )
|
|
1004
|
+
_running++, release();
|
|
1005
|
+
},
|
|
1006
|
+
running,
|
|
1007
|
+
resume,
|
|
1008
|
+
idle,
|
|
1009
|
+
length,
|
|
1010
|
+
getQueue,
|
|
1011
|
+
unshift,
|
|
1012
|
+
empty: noop2,
|
|
1013
|
+
kill,
|
|
1014
|
+
killAndDrain,
|
|
1015
|
+
error,
|
|
1016
|
+
abort
|
|
1017
|
+
};
|
|
1018
|
+
return self;
|
|
1019
|
+
function running() {
|
|
1020
|
+
return _running;
|
|
1021
|
+
}
|
|
1022
|
+
function pause() {
|
|
1023
|
+
self.paused = !0;
|
|
1024
|
+
}
|
|
1025
|
+
function length() {
|
|
1026
|
+
for (var current = queueHead, counter = 0; current; )
|
|
1027
|
+
current = current.next, counter++;
|
|
1028
|
+
return counter;
|
|
1029
|
+
}
|
|
1030
|
+
function getQueue() {
|
|
1031
|
+
for (var current = queueHead, tasks = []; current; )
|
|
1032
|
+
tasks.push(current.value), current = current.next;
|
|
1033
|
+
return tasks;
|
|
1034
|
+
}
|
|
1035
|
+
function resume() {
|
|
1036
|
+
if (self.paused) {
|
|
1037
|
+
if (self.paused = !1, queueHead === null) {
|
|
1038
|
+
_running++, release();
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
for (; queueHead && _running < _concurrency; )
|
|
1042
|
+
_running++, release();
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
function idle() {
|
|
1046
|
+
return _running === 0 && self.length() === 0;
|
|
1047
|
+
}
|
|
1048
|
+
function push(value, done) {
|
|
1049
|
+
var current = cache.get();
|
|
1050
|
+
current.context = context, current.release = release, current.value = value, current.callback = done || noop2, current.errorHandler = errorHandler, _running >= _concurrency || self.paused ? queueTail ? (queueTail.next = current, queueTail = current) : (queueHead = current, queueTail = current, self.saturated()) : (_running++, worker.call(context, current.value, current.worked));
|
|
1051
|
+
}
|
|
1052
|
+
function unshift(value, done) {
|
|
1053
|
+
var current = cache.get();
|
|
1054
|
+
current.context = context, current.release = release, current.value = value, current.callback = done || noop2, current.errorHandler = errorHandler, _running >= _concurrency || self.paused ? queueHead ? (current.next = queueHead, queueHead = current) : (queueHead = current, queueTail = current, self.saturated()) : (_running++, worker.call(context, current.value, current.worked));
|
|
1055
|
+
}
|
|
1056
|
+
function release(holder) {
|
|
1057
|
+
holder && cache.release(holder);
|
|
1058
|
+
var next = queueHead;
|
|
1059
|
+
next && _running <= _concurrency ? self.paused ? _running-- : (queueTail === queueHead && (queueTail = null), queueHead = next.next, next.next = null, worker.call(context, next.value, next.worked), queueTail === null && self.empty()) : --_running === 0 && self.drain();
|
|
1060
|
+
}
|
|
1061
|
+
function kill() {
|
|
1062
|
+
queueHead = null, queueTail = null, self.drain = noop2;
|
|
1063
|
+
}
|
|
1064
|
+
function killAndDrain() {
|
|
1065
|
+
queueHead = null, queueTail = null, self.drain(), self.drain = noop2;
|
|
1066
|
+
}
|
|
1067
|
+
function abort() {
|
|
1068
|
+
var current = queueHead;
|
|
1069
|
+
for (queueHead = null, queueTail = null; current; ) {
|
|
1070
|
+
var next = current.next, callback = current.callback, errorHandler2 = current.errorHandler, val = current.value, context2 = current.context;
|
|
1071
|
+
current.value = null, current.callback = noop2, current.errorHandler = null, current.next = null, errorHandler2 && errorHandler2(new Error("abort"), val), callback.call(context2, new Error("abort")), cache.release(current), current = next;
|
|
1072
|
+
}
|
|
1073
|
+
self.drain = noop2;
|
|
1074
|
+
}
|
|
1075
|
+
function error(handler) {
|
|
1076
|
+
errorHandler = handler;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
function noop2() {
|
|
1080
|
+
}
|
|
1081
|
+
function Task() {
|
|
1082
|
+
this.value = null, this.callback = noop2, this.next = null, this.release = noop2, this.context = null, this.errorHandler = null;
|
|
1083
|
+
var self = this;
|
|
1084
|
+
this.worked = function(err, result) {
|
|
1085
|
+
var callback = self.callback, errorHandler = self.errorHandler, val = self.value;
|
|
1086
|
+
self.value = null, self.callback = noop2, self.errorHandler && errorHandler(err, val), callback.call(self.context, err, result), self.release(self);
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
function queueAsPromised(context, worker, _concurrency) {
|
|
1090
|
+
typeof context == "function" && (_concurrency = worker, worker = context, context = null);
|
|
1091
|
+
function asyncWrapper(arg, cb) {
|
|
1092
|
+
worker.call(this, arg).then(function(res) {
|
|
1093
|
+
cb(null, res);
|
|
1094
|
+
}, cb);
|
|
1095
|
+
}
|
|
1096
|
+
var queue = fastqueue(context, asyncWrapper, _concurrency), pushCb = queue.push, unshiftCb = queue.unshift;
|
|
1097
|
+
return queue.push = push, queue.unshift = unshift, queue.drained = drained, queue;
|
|
1098
|
+
function push(value) {
|
|
1099
|
+
var p = new Promise(function(resolve, reject) {
|
|
1100
|
+
pushCb(value, function(err, result) {
|
|
1101
|
+
if (err) {
|
|
1102
|
+
reject(err);
|
|
1103
|
+
return;
|
|
1104
|
+
}
|
|
1105
|
+
resolve(result);
|
|
1106
|
+
});
|
|
1107
|
+
});
|
|
1108
|
+
return p.catch(noop2), p;
|
|
1109
|
+
}
|
|
1110
|
+
function unshift(value) {
|
|
1111
|
+
var p = new Promise(function(resolve, reject) {
|
|
1112
|
+
unshiftCb(value, function(err, result) {
|
|
1113
|
+
if (err) {
|
|
1114
|
+
reject(err);
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
resolve(result);
|
|
1118
|
+
});
|
|
1119
|
+
});
|
|
1120
|
+
return p.catch(noop2), p;
|
|
1121
|
+
}
|
|
1122
|
+
function drained() {
|
|
1123
|
+
var p = new Promise(function(resolve) {
|
|
1124
|
+
process.nextTick(function() {
|
|
1125
|
+
if (queue.idle())
|
|
1126
|
+
resolve();
|
|
1127
|
+
else {
|
|
1128
|
+
var previousDrain = queue.drain;
|
|
1129
|
+
queue.drain = function() {
|
|
1130
|
+
typeof previousDrain == "function" && previousDrain(), resolve(), queue.drain = previousDrain;
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
});
|
|
1134
|
+
});
|
|
1135
|
+
return p;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
module.exports = fastqueue;
|
|
1139
|
+
module.exports.promise = queueAsPromised;
|
|
1140
|
+
}
|
|
1141
|
+
});
|
|
1142
|
+
|
|
1143
|
+
// ../../node_modules/@nodelib/fs.walk/out/readers/common.js
|
|
1144
|
+
var require_common2 = __commonJS({
|
|
1145
|
+
"../../node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) {
|
|
1146
|
+
"use strict";
|
|
1147
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1148
|
+
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
|
|
1149
|
+
function isFatalError(settings, error) {
|
|
1150
|
+
return settings.errorFilter === null ? !0 : !settings.errorFilter(error);
|
|
1151
|
+
}
|
|
1152
|
+
exports.isFatalError = isFatalError;
|
|
1153
|
+
function isAppliedFilter(filter, value) {
|
|
1154
|
+
return filter === null || filter(value);
|
|
1155
|
+
}
|
|
1156
|
+
exports.isAppliedFilter = isAppliedFilter;
|
|
1157
|
+
function replacePathSegmentSeparator(filepath, separator) {
|
|
1158
|
+
return filepath.split(/[/\\]/).join(separator);
|
|
1159
|
+
}
|
|
1160
|
+
exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
|
|
1161
|
+
function joinPathSegments(a, b, separator) {
|
|
1162
|
+
return a === "" ? b : a.endsWith(separator) ? a + b : a + separator + b;
|
|
1163
|
+
}
|
|
1164
|
+
exports.joinPathSegments = joinPathSegments;
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
|
|
1168
|
+
// ../../node_modules/@nodelib/fs.walk/out/readers/reader.js
|
|
1169
|
+
var require_reader = __commonJS({
|
|
1170
|
+
"../../node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) {
|
|
1171
|
+
"use strict";
|
|
1172
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1173
|
+
var common = require_common2(), Reader = class {
|
|
1174
|
+
constructor(_root, _settings) {
|
|
1175
|
+
this._root = _root, this._settings = _settings, this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
|
|
1176
|
+
}
|
|
1177
|
+
};
|
|
1178
|
+
exports.default = Reader;
|
|
1179
|
+
}
|
|
1180
|
+
});
|
|
1181
|
+
|
|
1182
|
+
// ../../node_modules/@nodelib/fs.walk/out/readers/async.js
|
|
1183
|
+
var require_async3 = __commonJS({
|
|
1184
|
+
"../../node_modules/@nodelib/fs.walk/out/readers/async.js"(exports) {
|
|
1185
|
+
"use strict";
|
|
1186
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1187
|
+
var events_1 = __require("events"), fsScandir = require_out2(), fastq = require_queue(), common = require_common2(), reader_1 = require_reader(), AsyncReader = class extends reader_1.default {
|
|
1188
|
+
constructor(_root, _settings) {
|
|
1189
|
+
super(_root, _settings), this._settings = _settings, this._scandir = fsScandir.scandir, this._emitter = new events_1.EventEmitter(), this._queue = fastq(this._worker.bind(this), this._settings.concurrency), this._isFatalError = !1, this._isDestroyed = !1, this._queue.drain = () => {
|
|
1190
|
+
this._isFatalError || this._emitter.emit("end");
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
read() {
|
|
1194
|
+
return this._isFatalError = !1, this._isDestroyed = !1, setImmediate(() => {
|
|
1195
|
+
this._pushToQueue(this._root, this._settings.basePath);
|
|
1196
|
+
}), this._emitter;
|
|
1197
|
+
}
|
|
1198
|
+
get isDestroyed() {
|
|
1199
|
+
return this._isDestroyed;
|
|
1200
|
+
}
|
|
1201
|
+
destroy() {
|
|
1202
|
+
if (this._isDestroyed)
|
|
1203
|
+
throw new Error("The reader is already destroyed");
|
|
1204
|
+
this._isDestroyed = !0, this._queue.killAndDrain();
|
|
1205
|
+
}
|
|
1206
|
+
onEntry(callback) {
|
|
1207
|
+
this._emitter.on("entry", callback);
|
|
1208
|
+
}
|
|
1209
|
+
onError(callback) {
|
|
1210
|
+
this._emitter.once("error", callback);
|
|
1211
|
+
}
|
|
1212
|
+
onEnd(callback) {
|
|
1213
|
+
this._emitter.once("end", callback);
|
|
1214
|
+
}
|
|
1215
|
+
_pushToQueue(directory, base) {
|
|
1216
|
+
let queueItem = { directory, base };
|
|
1217
|
+
this._queue.push(queueItem, (error) => {
|
|
1218
|
+
error !== null && this._handleError(error);
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
_worker(item, done) {
|
|
1222
|
+
this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
|
|
1223
|
+
if (error !== null) {
|
|
1224
|
+
done(error, void 0);
|
|
1225
|
+
return;
|
|
1226
|
+
}
|
|
1227
|
+
for (let entry of entries)
|
|
1228
|
+
this._handleEntry(entry, item.base);
|
|
1229
|
+
done(null, void 0);
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
_handleError(error) {
|
|
1233
|
+
this._isDestroyed || !common.isFatalError(this._settings, error) || (this._isFatalError = !0, this._isDestroyed = !0, this._emitter.emit("error", error));
|
|
1234
|
+
}
|
|
1235
|
+
_handleEntry(entry, base) {
|
|
1236
|
+
if (this._isDestroyed || this._isFatalError)
|
|
1237
|
+
return;
|
|
1238
|
+
let fullpath = entry.path;
|
|
1239
|
+
base !== void 0 && (entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator)), common.isAppliedFilter(this._settings.entryFilter, entry) && this._emitEntry(entry), entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry) && this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
|
|
1240
|
+
}
|
|
1241
|
+
_emitEntry(entry) {
|
|
1242
|
+
this._emitter.emit("entry", entry);
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1245
|
+
exports.default = AsyncReader;
|
|
1246
|
+
}
|
|
1247
|
+
});
|
|
1248
|
+
|
|
1249
|
+
// ../../node_modules/@nodelib/fs.walk/out/providers/async.js
|
|
1250
|
+
var require_async4 = __commonJS({
|
|
1251
|
+
"../../node_modules/@nodelib/fs.walk/out/providers/async.js"(exports) {
|
|
1252
|
+
"use strict";
|
|
1253
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1254
|
+
var async_1 = require_async3(), AsyncProvider = class {
|
|
1255
|
+
constructor(_root, _settings) {
|
|
1256
|
+
this._root = _root, this._settings = _settings, this._reader = new async_1.default(this._root, this._settings), this._storage = [];
|
|
1257
|
+
}
|
|
1258
|
+
read(callback) {
|
|
1259
|
+
this._reader.onError((error) => {
|
|
1260
|
+
callFailureCallback(callback, error);
|
|
1261
|
+
}), this._reader.onEntry((entry) => {
|
|
1262
|
+
this._storage.push(entry);
|
|
1263
|
+
}), this._reader.onEnd(() => {
|
|
1264
|
+
callSuccessCallback(callback, this._storage);
|
|
1265
|
+
}), this._reader.read();
|
|
1266
|
+
}
|
|
1267
|
+
};
|
|
1268
|
+
exports.default = AsyncProvider;
|
|
1269
|
+
function callFailureCallback(callback, error) {
|
|
1270
|
+
callback(error);
|
|
1271
|
+
}
|
|
1272
|
+
function callSuccessCallback(callback, entries) {
|
|
1273
|
+
callback(null, entries);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
|
|
1278
|
+
// ../../node_modules/@nodelib/fs.walk/out/providers/stream.js
|
|
1279
|
+
var require_stream2 = __commonJS({
|
|
1280
|
+
"../../node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports) {
|
|
1281
|
+
"use strict";
|
|
1282
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1283
|
+
var stream_1 = __require("stream"), async_1 = require_async3(), StreamProvider = class {
|
|
1284
|
+
constructor(_root, _settings) {
|
|
1285
|
+
this._root = _root, this._settings = _settings, this._reader = new async_1.default(this._root, this._settings), this._stream = new stream_1.Readable({
|
|
1286
|
+
objectMode: !0,
|
|
1287
|
+
read: () => {
|
|
1288
|
+
},
|
|
1289
|
+
destroy: () => {
|
|
1290
|
+
this._reader.isDestroyed || this._reader.destroy();
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
read() {
|
|
1295
|
+
return this._reader.onError((error) => {
|
|
1296
|
+
this._stream.emit("error", error);
|
|
1297
|
+
}), this._reader.onEntry((entry) => {
|
|
1298
|
+
this._stream.push(entry);
|
|
1299
|
+
}), this._reader.onEnd(() => {
|
|
1300
|
+
this._stream.push(null);
|
|
1301
|
+
}), this._reader.read(), this._stream;
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
exports.default = StreamProvider;
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
|
|
1308
|
+
// ../../node_modules/@nodelib/fs.walk/out/readers/sync.js
|
|
1309
|
+
var require_sync3 = __commonJS({
|
|
1310
|
+
"../../node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports) {
|
|
1311
|
+
"use strict";
|
|
1312
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1313
|
+
var fsScandir = require_out2(), common = require_common2(), reader_1 = require_reader(), SyncReader = class extends reader_1.default {
|
|
1314
|
+
constructor() {
|
|
1315
|
+
super(...arguments), this._scandir = fsScandir.scandirSync, this._storage = [], this._queue = /* @__PURE__ */ new Set();
|
|
1316
|
+
}
|
|
1317
|
+
read() {
|
|
1318
|
+
return this._pushToQueue(this._root, this._settings.basePath), this._handleQueue(), this._storage;
|
|
1319
|
+
}
|
|
1320
|
+
_pushToQueue(directory, base) {
|
|
1321
|
+
this._queue.add({ directory, base });
|
|
1322
|
+
}
|
|
1323
|
+
_handleQueue() {
|
|
1324
|
+
for (let item of this._queue.values())
|
|
1325
|
+
this._handleDirectory(item.directory, item.base);
|
|
1326
|
+
}
|
|
1327
|
+
_handleDirectory(directory, base) {
|
|
1328
|
+
try {
|
|
1329
|
+
let entries = this._scandir(directory, this._settings.fsScandirSettings);
|
|
1330
|
+
for (let entry of entries)
|
|
1331
|
+
this._handleEntry(entry, base);
|
|
1332
|
+
} catch (error) {
|
|
1333
|
+
this._handleError(error);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
_handleError(error) {
|
|
1337
|
+
if (common.isFatalError(this._settings, error))
|
|
1338
|
+
throw error;
|
|
1339
|
+
}
|
|
1340
|
+
_handleEntry(entry, base) {
|
|
1341
|
+
let fullpath = entry.path;
|
|
1342
|
+
base !== void 0 && (entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator)), common.isAppliedFilter(this._settings.entryFilter, entry) && this._pushToStorage(entry), entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry) && this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
|
|
1343
|
+
}
|
|
1344
|
+
_pushToStorage(entry) {
|
|
1345
|
+
this._storage.push(entry);
|
|
1346
|
+
}
|
|
1347
|
+
};
|
|
1348
|
+
exports.default = SyncReader;
|
|
1349
|
+
}
|
|
1350
|
+
});
|
|
1351
|
+
|
|
1352
|
+
// ../../node_modules/@nodelib/fs.walk/out/providers/sync.js
|
|
1353
|
+
var require_sync4 = __commonJS({
|
|
1354
|
+
"../../node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports) {
|
|
1355
|
+
"use strict";
|
|
1356
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1357
|
+
var sync_1 = require_sync3(), SyncProvider = class {
|
|
1358
|
+
constructor(_root, _settings) {
|
|
1359
|
+
this._root = _root, this._settings = _settings, this._reader = new sync_1.default(this._root, this._settings);
|
|
1360
|
+
}
|
|
1361
|
+
read() {
|
|
1362
|
+
return this._reader.read();
|
|
1363
|
+
}
|
|
1364
|
+
};
|
|
1365
|
+
exports.default = SyncProvider;
|
|
1366
|
+
}
|
|
1367
|
+
});
|
|
1368
|
+
|
|
1369
|
+
// ../../node_modules/@nodelib/fs.walk/out/settings.js
|
|
1370
|
+
var require_settings3 = __commonJS({
|
|
1371
|
+
"../../node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
|
|
1372
|
+
"use strict";
|
|
1373
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1374
|
+
var path2 = __require("path"), fsScandir = require_out2(), Settings = class {
|
|
1375
|
+
constructor(_options = {}) {
|
|
1376
|
+
this._options = _options, 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, path2.sep), this.fsScandirSettings = new fsScandir.Settings({
|
|
1377
|
+
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
1378
|
+
fs: this._options.fs,
|
|
1379
|
+
pathSegmentSeparator: this._options.pathSegmentSeparator,
|
|
1380
|
+
stats: this._options.stats,
|
|
1381
|
+
throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
_getValue(option, value) {
|
|
1385
|
+
return option ?? value;
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
exports.default = Settings;
|
|
1389
|
+
}
|
|
1390
|
+
});
|
|
1391
|
+
|
|
1392
|
+
// ../../node_modules/@nodelib/fs.walk/out/index.js
|
|
1393
|
+
var require_out3 = __commonJS({
|
|
1394
|
+
"../../node_modules/@nodelib/fs.walk/out/index.js"(exports) {
|
|
1395
|
+
"use strict";
|
|
1396
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1397
|
+
exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0;
|
|
1398
|
+
var async_1 = require_async4(), stream_1 = require_stream2(), sync_1 = require_sync4(), settings_1 = require_settings3();
|
|
1399
|
+
exports.Settings = settings_1.default;
|
|
1400
|
+
function walk(directory, optionsOrSettingsOrCallback, callback) {
|
|
1401
|
+
if (typeof optionsOrSettingsOrCallback == "function") {
|
|
1402
|
+
new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
|
|
1403
|
+
return;
|
|
1404
|
+
}
|
|
1405
|
+
new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
|
|
1406
|
+
}
|
|
1407
|
+
exports.walk = walk;
|
|
1408
|
+
function walkSync(directory, optionsOrSettings) {
|
|
1409
|
+
let settings = getSettings(optionsOrSettings);
|
|
1410
|
+
return new sync_1.default(directory, settings).read();
|
|
1411
|
+
}
|
|
1412
|
+
exports.walkSync = walkSync;
|
|
1413
|
+
function walkStream(directory, optionsOrSettings) {
|
|
1414
|
+
let settings = getSettings(optionsOrSettings);
|
|
1415
|
+
return new stream_1.default(directory, settings).read();
|
|
1416
|
+
}
|
|
1417
|
+
exports.walkStream = walkStream;
|
|
1418
|
+
function getSettings(settingsOrOptions = {}) {
|
|
1419
|
+
return settingsOrOptions instanceof settings_1.default ? settingsOrOptions : new settings_1.default(settingsOrOptions);
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
});
|
|
1423
|
+
|
|
1424
|
+
// ../../node_modules/fast-glob/out/readers/reader.js
|
|
1425
|
+
var require_reader2 = __commonJS({
|
|
1426
|
+
"../../node_modules/fast-glob/out/readers/reader.js"(exports) {
|
|
1427
|
+
"use strict";
|
|
1428
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1429
|
+
var path2 = __require("path"), fsStat = require_out(), utils = require_utils(), Reader = class {
|
|
1430
|
+
constructor(_settings) {
|
|
1431
|
+
this._settings = _settings, this._fsStatSettings = new fsStat.Settings({
|
|
1432
|
+
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
1433
|
+
fs: this._settings.fs,
|
|
1434
|
+
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
_getFullEntryPath(filepath) {
|
|
1438
|
+
return path2.resolve(this._settings.cwd, filepath);
|
|
1439
|
+
}
|
|
1440
|
+
_makeEntry(stats, pattern) {
|
|
1441
|
+
let entry = {
|
|
1442
|
+
name: pattern,
|
|
1443
|
+
path: pattern,
|
|
1444
|
+
dirent: utils.fs.createDirentFromStats(pattern, stats)
|
|
1445
|
+
};
|
|
1446
|
+
return this._settings.stats && (entry.stats = stats), entry;
|
|
1447
|
+
}
|
|
1448
|
+
_isFatalError(error) {
|
|
1449
|
+
return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
|
|
1450
|
+
}
|
|
1451
|
+
};
|
|
1452
|
+
exports.default = Reader;
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1455
|
+
|
|
1456
|
+
// ../../node_modules/fast-glob/out/readers/stream.js
|
|
1457
|
+
var require_stream3 = __commonJS({
|
|
1458
|
+
"../../node_modules/fast-glob/out/readers/stream.js"(exports) {
|
|
1459
|
+
"use strict";
|
|
1460
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1461
|
+
var stream_1 = __require("stream"), fsStat = require_out(), fsWalk = require_out3(), reader_1 = require_reader2(), ReaderStream = class extends reader_1.default {
|
|
1462
|
+
constructor() {
|
|
1463
|
+
super(...arguments), this._walkStream = fsWalk.walkStream, this._stat = fsStat.stat;
|
|
1464
|
+
}
|
|
1465
|
+
dynamic(root, options) {
|
|
1466
|
+
return this._walkStream(root, options);
|
|
1467
|
+
}
|
|
1468
|
+
static(patterns, options) {
|
|
1469
|
+
let filepaths = patterns.map(this._getFullEntryPath, this), stream = new stream_1.PassThrough({ objectMode: !0 });
|
|
1470
|
+
stream._write = (index, _enc, done) => this._getEntry(filepaths[index], patterns[index], options).then((entry) => {
|
|
1471
|
+
entry !== null && options.entryFilter(entry) && stream.push(entry), index === filepaths.length - 1 && stream.end(), done();
|
|
1472
|
+
}).catch(done);
|
|
1473
|
+
for (let i = 0; i < filepaths.length; i++)
|
|
1474
|
+
stream.write(i);
|
|
1475
|
+
return stream;
|
|
1476
|
+
}
|
|
1477
|
+
_getEntry(filepath, pattern, options) {
|
|
1478
|
+
return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => {
|
|
1479
|
+
if (options.errorFilter(error))
|
|
1480
|
+
return null;
|
|
1481
|
+
throw error;
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
_getStat(filepath) {
|
|
1485
|
+
return new Promise((resolve, reject) => {
|
|
1486
|
+
this._stat(filepath, this._fsStatSettings, (error, stats) => error === null ? resolve(stats) : reject(error));
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
1490
|
+
exports.default = ReaderStream;
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
|
|
1494
|
+
// ../../node_modules/fast-glob/out/readers/async.js
|
|
1495
|
+
var require_async5 = __commonJS({
|
|
1496
|
+
"../../node_modules/fast-glob/out/readers/async.js"(exports) {
|
|
1497
|
+
"use strict";
|
|
1498
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1499
|
+
var fsWalk = require_out3(), reader_1 = require_reader2(), stream_1 = require_stream3(), ReaderAsync = class extends reader_1.default {
|
|
1500
|
+
constructor() {
|
|
1501
|
+
super(...arguments), this._walkAsync = fsWalk.walk, this._readerStream = new stream_1.default(this._settings);
|
|
1502
|
+
}
|
|
1503
|
+
dynamic(root, options) {
|
|
1504
|
+
return new Promise((resolve, reject) => {
|
|
1505
|
+
this._walkAsync(root, options, (error, entries) => {
|
|
1506
|
+
error === null ? resolve(entries) : reject(error);
|
|
1507
|
+
});
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
async static(patterns, options) {
|
|
1511
|
+
let entries = [], stream = this._readerStream.static(patterns, options);
|
|
1512
|
+
return new Promise((resolve, reject) => {
|
|
1513
|
+
stream.once("error", reject), stream.on("data", (entry) => entries.push(entry)), stream.once("end", () => resolve(entries));
|
|
1514
|
+
});
|
|
1515
|
+
}
|
|
1516
|
+
};
|
|
1517
|
+
exports.default = ReaderAsync;
|
|
1518
|
+
}
|
|
1519
|
+
});
|
|
1520
|
+
|
|
1521
|
+
// ../../node_modules/fast-glob/out/providers/matchers/matcher.js
|
|
1522
|
+
var require_matcher = __commonJS({
|
|
1523
|
+
"../../node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
1524
|
+
"use strict";
|
|
1525
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1526
|
+
var utils = require_utils(), Matcher = class {
|
|
1527
|
+
constructor(_patterns, _settings, _micromatchOptions) {
|
|
1528
|
+
this._patterns = _patterns, this._settings = _settings, this._micromatchOptions = _micromatchOptions, this._storage = [], this._fillStorage();
|
|
1529
|
+
}
|
|
1530
|
+
_fillStorage() {
|
|
1531
|
+
for (let pattern of this._patterns) {
|
|
1532
|
+
let segments = this._getPatternSegments(pattern), sections = this._splitSegmentsIntoSections(segments);
|
|
1533
|
+
this._storage.push({
|
|
1534
|
+
complete: sections.length <= 1,
|
|
1535
|
+
pattern,
|
|
1536
|
+
segments,
|
|
1537
|
+
sections
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
_getPatternSegments(pattern) {
|
|
1542
|
+
return utils.pattern.getPatternParts(pattern, this._micromatchOptions).map((part) => utils.pattern.isDynamicPattern(part, this._settings) ? {
|
|
1543
|
+
dynamic: !0,
|
|
1544
|
+
pattern: part,
|
|
1545
|
+
patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
|
|
1546
|
+
} : {
|
|
1547
|
+
dynamic: !1,
|
|
1548
|
+
pattern: part
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
_splitSegmentsIntoSections(segments) {
|
|
1552
|
+
return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
|
|
1553
|
+
}
|
|
1554
|
+
};
|
|
1555
|
+
exports.default = Matcher;
|
|
1556
|
+
}
|
|
1557
|
+
});
|
|
1558
|
+
|
|
1559
|
+
// ../../node_modules/fast-glob/out/providers/matchers/partial.js
|
|
1560
|
+
var require_partial = __commonJS({
|
|
1561
|
+
"../../node_modules/fast-glob/out/providers/matchers/partial.js"(exports) {
|
|
1562
|
+
"use strict";
|
|
1563
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1564
|
+
var matcher_1 = require_matcher(), PartialMatcher = class extends matcher_1.default {
|
|
1565
|
+
match(filepath) {
|
|
1566
|
+
let parts = filepath.split("/"), levels = parts.length, patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
|
|
1567
|
+
for (let pattern of patterns) {
|
|
1568
|
+
let section = pattern.sections[0];
|
|
1569
|
+
if (!pattern.complete && levels > section.length || parts.every((part, index) => {
|
|
1570
|
+
let segment = pattern.segments[index];
|
|
1571
|
+
return !!(segment.dynamic && segment.patternRe.test(part) || !segment.dynamic && segment.pattern === part);
|
|
1572
|
+
}))
|
|
1573
|
+
return !0;
|
|
1574
|
+
}
|
|
1575
|
+
return !1;
|
|
1576
|
+
}
|
|
1577
|
+
};
|
|
1578
|
+
exports.default = PartialMatcher;
|
|
1579
|
+
}
|
|
1580
|
+
});
|
|
1581
|
+
|
|
1582
|
+
// ../../node_modules/fast-glob/out/providers/filters/deep.js
|
|
1583
|
+
var require_deep = __commonJS({
|
|
1584
|
+
"../../node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
1585
|
+
"use strict";
|
|
1586
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1587
|
+
var utils = require_utils(), partial_1 = require_partial(), DeepFilter = class {
|
|
1588
|
+
constructor(_settings, _micromatchOptions) {
|
|
1589
|
+
this._settings = _settings, this._micromatchOptions = _micromatchOptions;
|
|
1590
|
+
}
|
|
1591
|
+
getFilter(basePath, positive, negative) {
|
|
1592
|
+
let matcher = this._getMatcher(positive), negativeRe = this._getNegativePatternsRe(negative);
|
|
1593
|
+
return (entry) => this._filter(basePath, entry, matcher, negativeRe);
|
|
1594
|
+
}
|
|
1595
|
+
_getMatcher(patterns) {
|
|
1596
|
+
return new partial_1.default(patterns, this._settings, this._micromatchOptions);
|
|
1597
|
+
}
|
|
1598
|
+
_getNegativePatternsRe(patterns) {
|
|
1599
|
+
let affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
|
|
1600
|
+
return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
|
|
1601
|
+
}
|
|
1602
|
+
_filter(basePath, entry, matcher, negativeRe) {
|
|
1603
|
+
if (this._isSkippedByDeep(basePath, entry.path) || this._isSkippedSymbolicLink(entry))
|
|
1604
|
+
return !1;
|
|
1605
|
+
let filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
1606
|
+
return this._isSkippedByPositivePatterns(filepath, matcher) ? !1 : this._isSkippedByNegativePatterns(filepath, negativeRe);
|
|
1607
|
+
}
|
|
1608
|
+
_isSkippedByDeep(basePath, entryPath) {
|
|
1609
|
+
return this._settings.deep === 1 / 0 ? !1 : this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
|
|
1610
|
+
}
|
|
1611
|
+
_getEntryLevel(basePath, entryPath) {
|
|
1612
|
+
let entryPathDepth = entryPath.split("/").length;
|
|
1613
|
+
if (basePath === "")
|
|
1614
|
+
return entryPathDepth;
|
|
1615
|
+
let basePathDepth = basePath.split("/").length;
|
|
1616
|
+
return entryPathDepth - basePathDepth;
|
|
1617
|
+
}
|
|
1618
|
+
_isSkippedSymbolicLink(entry) {
|
|
1619
|
+
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
|
1620
|
+
}
|
|
1621
|
+
_isSkippedByPositivePatterns(entryPath, matcher) {
|
|
1622
|
+
return !this._settings.baseNameMatch && !matcher.match(entryPath);
|
|
1623
|
+
}
|
|
1624
|
+
_isSkippedByNegativePatterns(entryPath, patternsRe) {
|
|
1625
|
+
return !utils.pattern.matchAny(entryPath, patternsRe);
|
|
1626
|
+
}
|
|
1627
|
+
};
|
|
1628
|
+
exports.default = DeepFilter;
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
|
|
1632
|
+
// ../../node_modules/fast-glob/out/providers/filters/entry.js
|
|
1633
|
+
var require_entry = __commonJS({
|
|
1634
|
+
"../../node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
1635
|
+
"use strict";
|
|
1636
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1637
|
+
var utils = require_utils(), EntryFilter = class {
|
|
1638
|
+
constructor(_settings, _micromatchOptions) {
|
|
1639
|
+
this._settings = _settings, this._micromatchOptions = _micromatchOptions, this.index = /* @__PURE__ */ new Map();
|
|
1640
|
+
}
|
|
1641
|
+
getFilter(positive, negative) {
|
|
1642
|
+
let [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative), patterns = {
|
|
1643
|
+
positive: {
|
|
1644
|
+
all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
|
|
1645
|
+
},
|
|
1646
|
+
negative: {
|
|
1647
|
+
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 })),
|
|
1648
|
+
relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 }))
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1651
|
+
return (entry) => this._filter(entry, patterns);
|
|
1652
|
+
}
|
|
1653
|
+
_filter(entry, patterns) {
|
|
1654
|
+
let filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
1655
|
+
if (this._settings.unique && this._isDuplicateEntry(filepath) || this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry))
|
|
1656
|
+
return !1;
|
|
1657
|
+
let isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
|
|
1658
|
+
return this._settings.unique && isMatched && this._createIndexRecord(filepath), isMatched;
|
|
1659
|
+
}
|
|
1660
|
+
_isDuplicateEntry(filepath) {
|
|
1661
|
+
return this.index.has(filepath);
|
|
1662
|
+
}
|
|
1663
|
+
_createIndexRecord(filepath) {
|
|
1664
|
+
this.index.set(filepath, void 0);
|
|
1665
|
+
}
|
|
1666
|
+
_onlyFileFilter(entry) {
|
|
1667
|
+
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
1668
|
+
}
|
|
1669
|
+
_onlyDirectoryFilter(entry) {
|
|
1670
|
+
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
1671
|
+
}
|
|
1672
|
+
_isMatchToPatternsSet(filepath, patterns, isDirectory2) {
|
|
1673
|
+
return !(!this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2) || this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2) || this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2));
|
|
1674
|
+
}
|
|
1675
|
+
_isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) {
|
|
1676
|
+
if (patternsRe.length === 0)
|
|
1677
|
+
return !1;
|
|
1678
|
+
let fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
|
|
1679
|
+
return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2);
|
|
1680
|
+
}
|
|
1681
|
+
_isMatchToPatterns(filepath, patternsRe, isDirectory2) {
|
|
1682
|
+
if (patternsRe.length === 0)
|
|
1683
|
+
return !1;
|
|
1684
|
+
let isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
1685
|
+
return !isMatched && isDirectory2 ? utils.pattern.matchAny(filepath + "/", patternsRe) : isMatched;
|
|
1686
|
+
}
|
|
1687
|
+
};
|
|
1688
|
+
exports.default = EntryFilter;
|
|
1689
|
+
}
|
|
1690
|
+
});
|
|
1691
|
+
|
|
1692
|
+
// ../../node_modules/fast-glob/out/providers/filters/error.js
|
|
1693
|
+
var require_error = __commonJS({
|
|
1694
|
+
"../../node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
1695
|
+
"use strict";
|
|
1696
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1697
|
+
var utils = require_utils(), ErrorFilter = class {
|
|
1698
|
+
constructor(_settings) {
|
|
1699
|
+
this._settings = _settings;
|
|
1700
|
+
}
|
|
1701
|
+
getFilter() {
|
|
1702
|
+
return (error) => this._isNonFatalError(error);
|
|
1703
|
+
}
|
|
1704
|
+
_isNonFatalError(error) {
|
|
1705
|
+
return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
|
|
1706
|
+
}
|
|
1707
|
+
};
|
|
1708
|
+
exports.default = ErrorFilter;
|
|
1709
|
+
}
|
|
1710
|
+
});
|
|
1711
|
+
|
|
1712
|
+
// ../../node_modules/fast-glob/out/providers/transformers/entry.js
|
|
1713
|
+
var require_entry2 = __commonJS({
|
|
1714
|
+
"../../node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
1715
|
+
"use strict";
|
|
1716
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1717
|
+
var utils = require_utils(), EntryTransformer = class {
|
|
1718
|
+
constructor(_settings) {
|
|
1719
|
+
this._settings = _settings;
|
|
1720
|
+
}
|
|
1721
|
+
getTransformer() {
|
|
1722
|
+
return (entry) => this._transform(entry);
|
|
1723
|
+
}
|
|
1724
|
+
_transform(entry) {
|
|
1725
|
+
let filepath = entry.path;
|
|
1726
|
+
return this._settings.absolute && (filepath = utils.path.makeAbsolute(this._settings.cwd, filepath), filepath = utils.path.unixify(filepath)), this._settings.markDirectories && entry.dirent.isDirectory() && (filepath += "/"), this._settings.objectMode ? Object.assign(Object.assign({}, entry), { path: filepath }) : filepath;
|
|
1727
|
+
}
|
|
1728
|
+
};
|
|
1729
|
+
exports.default = EntryTransformer;
|
|
1730
|
+
}
|
|
1731
|
+
});
|
|
1732
|
+
|
|
1733
|
+
// ../../node_modules/fast-glob/out/providers/provider.js
|
|
1734
|
+
var require_provider = __commonJS({
|
|
1735
|
+
"../../node_modules/fast-glob/out/providers/provider.js"(exports) {
|
|
1736
|
+
"use strict";
|
|
1737
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1738
|
+
var path2 = __require("path"), deep_1 = require_deep(), entry_1 = require_entry(), error_1 = require_error(), entry_2 = require_entry2(), Provider = class {
|
|
1739
|
+
constructor(_settings) {
|
|
1740
|
+
this._settings = _settings, this.errorFilter = new error_1.default(this._settings), this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()), this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()), this.entryTransformer = new entry_2.default(this._settings);
|
|
1741
|
+
}
|
|
1742
|
+
_getRootDirectory(task) {
|
|
1743
|
+
return path2.resolve(this._settings.cwd, task.base);
|
|
1744
|
+
}
|
|
1745
|
+
_getReaderOptions(task) {
|
|
1746
|
+
let basePath = task.base === "." ? "" : task.base;
|
|
1747
|
+
return {
|
|
1748
|
+
basePath,
|
|
1749
|
+
pathSegmentSeparator: "/",
|
|
1750
|
+
concurrency: this._settings.concurrency,
|
|
1751
|
+
deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
|
|
1752
|
+
entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
|
|
1753
|
+
errorFilter: this.errorFilter.getFilter(),
|
|
1754
|
+
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
1755
|
+
fs: this._settings.fs,
|
|
1756
|
+
stats: this._settings.stats,
|
|
1757
|
+
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
1758
|
+
transform: this.entryTransformer.getTransformer()
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
_getMicromatchOptions() {
|
|
1762
|
+
return {
|
|
1763
|
+
dot: this._settings.dot,
|
|
1764
|
+
matchBase: this._settings.baseNameMatch,
|
|
1765
|
+
nobrace: !this._settings.braceExpansion,
|
|
1766
|
+
nocase: !this._settings.caseSensitiveMatch,
|
|
1767
|
+
noext: !this._settings.extglob,
|
|
1768
|
+
noglobstar: !this._settings.globstar,
|
|
1769
|
+
posix: !0,
|
|
1770
|
+
strictSlashes: !1
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
};
|
|
1774
|
+
exports.default = Provider;
|
|
1775
|
+
}
|
|
1776
|
+
});
|
|
1777
|
+
|
|
1778
|
+
// ../../node_modules/fast-glob/out/providers/async.js
|
|
1779
|
+
var require_async6 = __commonJS({
|
|
1780
|
+
"../../node_modules/fast-glob/out/providers/async.js"(exports) {
|
|
1781
|
+
"use strict";
|
|
1782
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1783
|
+
var async_1 = require_async5(), provider_1 = require_provider(), ProviderAsync = class extends provider_1.default {
|
|
1784
|
+
constructor() {
|
|
1785
|
+
super(...arguments), this._reader = new async_1.default(this._settings);
|
|
1786
|
+
}
|
|
1787
|
+
async read(task) {
|
|
1788
|
+
let root = this._getRootDirectory(task), options = this._getReaderOptions(task);
|
|
1789
|
+
return (await this.api(root, task, options)).map((entry) => options.transform(entry));
|
|
1790
|
+
}
|
|
1791
|
+
api(root, task, options) {
|
|
1792
|
+
return task.dynamic ? this._reader.dynamic(root, options) : this._reader.static(task.patterns, options);
|
|
1793
|
+
}
|
|
1794
|
+
};
|
|
1795
|
+
exports.default = ProviderAsync;
|
|
1796
|
+
}
|
|
1797
|
+
});
|
|
1798
|
+
|
|
1799
|
+
// ../../node_modules/fast-glob/out/providers/stream.js
|
|
1800
|
+
var require_stream4 = __commonJS({
|
|
1801
|
+
"../../node_modules/fast-glob/out/providers/stream.js"(exports) {
|
|
1802
|
+
"use strict";
|
|
1803
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1804
|
+
var stream_1 = __require("stream"), stream_2 = require_stream3(), provider_1 = require_provider(), ProviderStream = class extends provider_1.default {
|
|
1805
|
+
constructor() {
|
|
1806
|
+
super(...arguments), this._reader = new stream_2.default(this._settings);
|
|
1807
|
+
}
|
|
1808
|
+
read(task) {
|
|
1809
|
+
let root = this._getRootDirectory(task), options = this._getReaderOptions(task), source = this.api(root, task, options), destination = new stream_1.Readable({ objectMode: !0, read: () => {
|
|
1810
|
+
} });
|
|
1811
|
+
return source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")), destination.once("close", () => source.destroy()), destination;
|
|
1812
|
+
}
|
|
1813
|
+
api(root, task, options) {
|
|
1814
|
+
return task.dynamic ? this._reader.dynamic(root, options) : this._reader.static(task.patterns, options);
|
|
1815
|
+
}
|
|
1816
|
+
};
|
|
1817
|
+
exports.default = ProviderStream;
|
|
1818
|
+
}
|
|
1819
|
+
});
|
|
1820
|
+
|
|
1821
|
+
// ../../node_modules/fast-glob/out/readers/sync.js
|
|
1822
|
+
var require_sync5 = __commonJS({
|
|
1823
|
+
"../../node_modules/fast-glob/out/readers/sync.js"(exports) {
|
|
1824
|
+
"use strict";
|
|
1825
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1826
|
+
var fsStat = require_out(), fsWalk = require_out3(), reader_1 = require_reader2(), ReaderSync = class extends reader_1.default {
|
|
1827
|
+
constructor() {
|
|
1828
|
+
super(...arguments), this._walkSync = fsWalk.walkSync, this._statSync = fsStat.statSync;
|
|
1829
|
+
}
|
|
1830
|
+
dynamic(root, options) {
|
|
1831
|
+
return this._walkSync(root, options);
|
|
1832
|
+
}
|
|
1833
|
+
static(patterns, options) {
|
|
1834
|
+
let entries = [];
|
|
1835
|
+
for (let pattern of patterns) {
|
|
1836
|
+
let filepath = this._getFullEntryPath(pattern), entry = this._getEntry(filepath, pattern, options);
|
|
1837
|
+
entry === null || !options.entryFilter(entry) || entries.push(entry);
|
|
1838
|
+
}
|
|
1839
|
+
return entries;
|
|
1840
|
+
}
|
|
1841
|
+
_getEntry(filepath, pattern, options) {
|
|
1842
|
+
try {
|
|
1843
|
+
let stats = this._getStat(filepath);
|
|
1844
|
+
return this._makeEntry(stats, pattern);
|
|
1845
|
+
} catch (error) {
|
|
1846
|
+
if (options.errorFilter(error))
|
|
1847
|
+
return null;
|
|
1848
|
+
throw error;
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
_getStat(filepath) {
|
|
1852
|
+
return this._statSync(filepath, this._fsStatSettings);
|
|
1853
|
+
}
|
|
1854
|
+
};
|
|
1855
|
+
exports.default = ReaderSync;
|
|
1856
|
+
}
|
|
1857
|
+
});
|
|
1858
|
+
|
|
1859
|
+
// ../../node_modules/fast-glob/out/providers/sync.js
|
|
1860
|
+
var require_sync6 = __commonJS({
|
|
1861
|
+
"../../node_modules/fast-glob/out/providers/sync.js"(exports) {
|
|
1862
|
+
"use strict";
|
|
1863
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1864
|
+
var sync_1 = require_sync5(), provider_1 = require_provider(), ProviderSync = class extends provider_1.default {
|
|
1865
|
+
constructor() {
|
|
1866
|
+
super(...arguments), this._reader = new sync_1.default(this._settings);
|
|
1867
|
+
}
|
|
1868
|
+
read(task) {
|
|
1869
|
+
let root = this._getRootDirectory(task), options = this._getReaderOptions(task);
|
|
1870
|
+
return this.api(root, task, options).map(options.transform);
|
|
1871
|
+
}
|
|
1872
|
+
api(root, task, options) {
|
|
1873
|
+
return task.dynamic ? this._reader.dynamic(root, options) : this._reader.static(task.patterns, options);
|
|
1874
|
+
}
|
|
1875
|
+
};
|
|
1876
|
+
exports.default = ProviderSync;
|
|
1877
|
+
}
|
|
1878
|
+
});
|
|
1879
|
+
|
|
1880
|
+
// ../../node_modules/fast-glob/out/settings.js
|
|
1881
|
+
var require_settings4 = __commonJS({
|
|
1882
|
+
"../../node_modules/fast-glob/out/settings.js"(exports) {
|
|
1883
|
+
"use strict";
|
|
1884
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1885
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
1886
|
+
var fs4 = __require("fs"), os = __require("os"), CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
1887
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
1888
|
+
lstat: fs4.lstat,
|
|
1889
|
+
lstatSync: fs4.lstatSync,
|
|
1890
|
+
stat: fs4.stat,
|
|
1891
|
+
statSync: fs4.statSync,
|
|
1892
|
+
readdir: fs4.readdir,
|
|
1893
|
+
readdirSync: fs4.readdirSync
|
|
1894
|
+
};
|
|
1895
|
+
var Settings = class {
|
|
1896
|
+
constructor(_options = {}) {
|
|
1897
|
+
this._options = _options, 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, CPU_COUNT), 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);
|
|
1898
|
+
}
|
|
1899
|
+
_getValue(option, value) {
|
|
1900
|
+
return option === void 0 ? value : option;
|
|
1901
|
+
}
|
|
1902
|
+
_getFileSystemMethods(methods = {}) {
|
|
1903
|
+
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
|
1904
|
+
}
|
|
1905
|
+
};
|
|
1906
|
+
exports.default = Settings;
|
|
1907
|
+
}
|
|
1908
|
+
});
|
|
1909
|
+
|
|
1910
|
+
// ../../node_modules/fast-glob/out/index.js
|
|
1911
|
+
var require_out4 = __commonJS({
|
|
1912
|
+
"../../node_modules/fast-glob/out/index.js"(exports, module) {
|
|
1913
|
+
"use strict";
|
|
1914
|
+
var taskManager = require_tasks(), async_1 = require_async6(), stream_1 = require_stream4(), sync_1 = require_sync6(), settings_1 = require_settings4(), utils = require_utils();
|
|
1915
|
+
async function FastGlob(source, options) {
|
|
1916
|
+
assertPatternsInput2(source);
|
|
1917
|
+
let works = getWorks(source, async_1.default, options), result = await Promise.all(works);
|
|
1918
|
+
return utils.array.flatten(result);
|
|
1919
|
+
}
|
|
1920
|
+
(function(FastGlob2) {
|
|
1921
|
+
FastGlob2.glob = FastGlob2, FastGlob2.globSync = sync, FastGlob2.globStream = stream, FastGlob2.async = FastGlob2;
|
|
1922
|
+
function sync(source, options) {
|
|
1923
|
+
assertPatternsInput2(source);
|
|
1924
|
+
let works = getWorks(source, sync_1.default, options);
|
|
1925
|
+
return utils.array.flatten(works);
|
|
1926
|
+
}
|
|
1927
|
+
FastGlob2.sync = sync;
|
|
1928
|
+
function stream(source, options) {
|
|
1929
|
+
assertPatternsInput2(source);
|
|
1930
|
+
let works = getWorks(source, stream_1.default, options);
|
|
1931
|
+
return utils.stream.merge(works);
|
|
1932
|
+
}
|
|
1933
|
+
FastGlob2.stream = stream;
|
|
1934
|
+
function generateTasks2(source, options) {
|
|
1935
|
+
assertPatternsInput2(source);
|
|
1936
|
+
let patterns = [].concat(source), settings = new settings_1.default(options);
|
|
1937
|
+
return taskManager.generate(patterns, settings);
|
|
1938
|
+
}
|
|
1939
|
+
FastGlob2.generateTasks = generateTasks2;
|
|
1940
|
+
function isDynamicPattern2(source, options) {
|
|
1941
|
+
assertPatternsInput2(source);
|
|
1942
|
+
let settings = new settings_1.default(options);
|
|
1943
|
+
return utils.pattern.isDynamicPattern(source, settings);
|
|
1944
|
+
}
|
|
1945
|
+
FastGlob2.isDynamicPattern = isDynamicPattern2;
|
|
1946
|
+
function escapePath(source) {
|
|
1947
|
+
return assertPatternsInput2(source), utils.path.escape(source);
|
|
1948
|
+
}
|
|
1949
|
+
FastGlob2.escapePath = escapePath;
|
|
1950
|
+
function convertPathToPattern2(source) {
|
|
1951
|
+
return assertPatternsInput2(source), utils.path.convertPathToPattern(source);
|
|
1952
|
+
}
|
|
1953
|
+
FastGlob2.convertPathToPattern = convertPathToPattern2;
|
|
1954
|
+
let posix;
|
|
1955
|
+
(function(posix2) {
|
|
1956
|
+
function escapePath2(source) {
|
|
1957
|
+
return assertPatternsInput2(source), utils.path.escapePosixPath(source);
|
|
1958
|
+
}
|
|
1959
|
+
posix2.escapePath = escapePath2;
|
|
1960
|
+
function convertPathToPattern3(source) {
|
|
1961
|
+
return assertPatternsInput2(source), utils.path.convertPosixPathToPattern(source);
|
|
1962
|
+
}
|
|
1963
|
+
posix2.convertPathToPattern = convertPathToPattern3;
|
|
1964
|
+
})(posix = FastGlob2.posix || (FastGlob2.posix = {}));
|
|
1965
|
+
let win32;
|
|
1966
|
+
(function(win322) {
|
|
1967
|
+
function escapePath2(source) {
|
|
1968
|
+
return assertPatternsInput2(source), utils.path.escapeWindowsPath(source);
|
|
1969
|
+
}
|
|
1970
|
+
win322.escapePath = escapePath2;
|
|
1971
|
+
function convertPathToPattern3(source) {
|
|
1972
|
+
return assertPatternsInput2(source), utils.path.convertWindowsPathToPattern(source);
|
|
1973
|
+
}
|
|
1974
|
+
win322.convertPathToPattern = convertPathToPattern3;
|
|
1975
|
+
})(win32 = FastGlob2.win32 || (FastGlob2.win32 = {}));
|
|
1976
|
+
})(FastGlob || (FastGlob = {}));
|
|
1977
|
+
function getWorks(source, _Provider, options) {
|
|
1978
|
+
let patterns = [].concat(source), settings = new settings_1.default(options), tasks = taskManager.generate(patterns, settings), provider = new _Provider(settings);
|
|
1979
|
+
return tasks.map(provider.read, provider);
|
|
1980
|
+
}
|
|
1981
|
+
function assertPatternsInput2(input) {
|
|
1982
|
+
if (![].concat(input).every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)))
|
|
1983
|
+
throw new TypeError("Patterns must be a string (non empty) or an array of strings");
|
|
1984
|
+
}
|
|
1985
|
+
module.exports = FastGlob;
|
|
1986
|
+
}
|
|
1987
|
+
});
|
|
1988
|
+
|
|
1989
|
+
// ../../node_modules/ignore/index.js
|
|
1990
|
+
var require_ignore = __commonJS({
|
|
1991
|
+
"../../node_modules/ignore/index.js"(exports, module) {
|
|
1992
|
+
function makeArray(subject) {
|
|
1993
|
+
return Array.isArray(subject) ? subject : [subject];
|
|
1994
|
+
}
|
|
1995
|
+
var UNDEFINED = void 0, EMPTY = "", SPACE = " ", ESCAPE = "\\", REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/, BOM = "\uFEFF", REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/, REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/, REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/, REGEX_SPLITALL_CRLF = /\r?\n/g, DOUBLE_SLASH = "//", SLASH_CODE = 47, DOT_CODE = 46, SLASH = "/", TMP_KEY_IGNORE = "node-ignore";
|
|
1996
|
+
typeof Symbol < "u" && (TMP_KEY_IGNORE = /* @__PURE__ */ Symbol.for("node-ignore"));
|
|
1997
|
+
var KEY_IGNORE = TMP_KEY_IGNORE, define = (object, key, value) => (Object.defineProperty(object, key, { value }), value), RETURN_FALSE = () => !1, cleanRangeBackSlash = (slashes) => {
|
|
1998
|
+
let { length } = slashes;
|
|
1999
|
+
return slashes.slice(0, length - length % 2);
|
|
2000
|
+
}, POSIX_CLASSES = {
|
|
2001
|
+
alnum: "0-9A-Za-z",
|
|
2002
|
+
alpha: "A-Za-z",
|
|
2003
|
+
blank: " \\t",
|
|
2004
|
+
cntrl: "\\x00-\\x1f\\x7f",
|
|
2005
|
+
digit: "0-9",
|
|
2006
|
+
graph: "!-.0-~",
|
|
2007
|
+
lower: "a-z",
|
|
2008
|
+
print: " -.0-~",
|
|
2009
|
+
punct: "!-.:-@\\[-`{-~",
|
|
2010
|
+
// git's `sane-ctype.h` classifies \v and \f as control, not space,
|
|
2011
|
+
// unlike C's `isspace`
|
|
2012
|
+
space: " \\t\\n\\r",
|
|
2013
|
+
upper: "A-Z",
|
|
2014
|
+
xdigit: "0-9A-Fa-f"
|
|
2015
|
+
}, CLASS_MEMBERS_TO_ESCAPE = "\\]^-[", escapeMember = (char) => CLASS_MEMBERS_TO_ESCAPE.indexOf(char) < 0 ? char : ESCAPE + char, NON_SLASH = "(?!\\/)", classSource = (negated, body) => {
|
|
2016
|
+
if (negated)
|
|
2017
|
+
return `[^\\/${body}]`;
|
|
2018
|
+
let source = `[${body}]`;
|
|
2019
|
+
return new RegExp(source).test("/") ? NON_SLASH + source : source;
|
|
2020
|
+
}, scanBracket = (pattern, start) => {
|
|
2021
|
+
let { length } = pattern, index = start + 1, negated = EMPTY, lead = pattern[index];
|
|
2022
|
+
(lead === "!" || lead === "^") && (negated = "^", index++);
|
|
2023
|
+
let body = EMPTY, prev = EMPTY;
|
|
2024
|
+
for (; ; ) {
|
|
2025
|
+
let char = pattern[index];
|
|
2026
|
+
if (char === UNDEFINED)
|
|
2027
|
+
return null;
|
|
2028
|
+
if (char === ESCAPE) {
|
|
2029
|
+
let escaped = pattern[index + 1];
|
|
2030
|
+
if (escaped === UNDEFINED)
|
|
2031
|
+
return null;
|
|
2032
|
+
body += escapeMember(escaped), prev = escaped, index++;
|
|
2033
|
+
} else if (char === "-" && prev && index + 1 < length && pattern[index + 1] !== "]") {
|
|
2034
|
+
index++;
|
|
2035
|
+
let to = pattern[index];
|
|
2036
|
+
to === ESCAPE && (to = pattern[index += 1]), prev <= to && (body += `-${escapeMember(to)}`), prev = EMPTY;
|
|
2037
|
+
} else if (char === "[" && pattern[index + 1] === ":") {
|
|
2038
|
+
let nameStart = index + 2, end = nameStart;
|
|
2039
|
+
for (; end < length && pattern[end] !== "]"; )
|
|
2040
|
+
end++;
|
|
2041
|
+
if (end === length)
|
|
2042
|
+
return null;
|
|
2043
|
+
if (end > nameStart && pattern[end - 1] === ":") {
|
|
2044
|
+
let expanded = POSIX_CLASSES[pattern.slice(nameStart, end - 1)];
|
|
2045
|
+
if (expanded === UNDEFINED)
|
|
2046
|
+
return null;
|
|
2047
|
+
body += expanded, prev = EMPTY, index = end;
|
|
2048
|
+
} else
|
|
2049
|
+
body += escapeMember("["), prev = "[", index = nameStart - 2;
|
|
2050
|
+
} else
|
|
2051
|
+
body += escapeMember(char), prev = char;
|
|
2052
|
+
if (index++, pattern[index] === "]")
|
|
2053
|
+
return {
|
|
2054
|
+
end: index,
|
|
2055
|
+
source: classSource(negated, body)
|
|
2056
|
+
};
|
|
2057
|
+
}
|
|
2058
|
+
}, NEVER_MATCH = "[]", PLACEHOLDER = "\0", REGEX_RESTORE_PLACEHOLDER = new RegExp(
|
|
2059
|
+
`${PLACEHOLDER}(\\d+)${PLACEHOLDER}`,
|
|
2060
|
+
"g"
|
|
2061
|
+
), TRAILING_WILDCARD = "\uE000", TRAILING_DOUBLESTAR = "\uE001", extractBrackets = (pattern) => {
|
|
2062
|
+
let sources = [], hold = (source) => `${PLACEHOLDER}${sources.push(source) - 1}${PLACEHOLDER}`, { length } = pattern, out = EMPTY, index = 0;
|
|
2063
|
+
for (; index < length; ) {
|
|
2064
|
+
let char = pattern[index];
|
|
2065
|
+
if (char === ESCAPE) {
|
|
2066
|
+
let escaped = pattern[index + 1];
|
|
2067
|
+
escaped === UNDEFINED || escaped === SLASH && index + 2 === length ? out += hold(NEVER_MATCH) : escaped === "*" || escaped === "[" || escaped === SPACE || escaped === ESCAPE ? out += pattern.slice(index, index + 2) : out += hold(
|
|
2068
|
+
REGEX_LITERAL_SPECIAL.test(escaped) ? ESCAPE + escaped : escaped
|
|
2069
|
+
), index += 2;
|
|
2070
|
+
} else if (char === PLACEHOLDER)
|
|
2071
|
+
out += hold(`[${PLACEHOLDER}]`), index++;
|
|
2072
|
+
else if (char === "[") {
|
|
2073
|
+
let scanned = scanBracket(pattern, index);
|
|
2074
|
+
scanned === null ? (out += hold(NEVER_MATCH), index = length) : (out += hold(scanned.source), index = scanned.end + 1);
|
|
2075
|
+
} else
|
|
2076
|
+
out += char, index++;
|
|
2077
|
+
}
|
|
2078
|
+
return {
|
|
2079
|
+
source: out,
|
|
2080
|
+
sources
|
|
2081
|
+
};
|
|
2082
|
+
}, DIRECT = null, REGEX_INNER_SLASH = /\/(?!$)/, REPLACERS = [
|
|
2083
|
+
// Replace (\ ) with ' '
|
|
2084
|
+
// Only a space: an escaped tab or other whitespace is already a literal by
|
|
2085
|
+
// the time it reaches here, and a bare tab must be left as one, not turned
|
|
2086
|
+
// into a space.
|
|
2087
|
+
// (\ ) -> ' '
|
|
2088
|
+
// (\\ ) -> '\\ '
|
|
2089
|
+
// (\\\ ) -> '\\ '
|
|
2090
|
+
[
|
|
2091
|
+
// A run of backslashes is taken whole, from its first one, so no match
|
|
2092
|
+
// ever starts again inside it -- `(\\+?) ` did, which made a long run
|
|
2093
|
+
// quadratic.
|
|
2094
|
+
/(\\+)( ?)/g,
|
|
2095
|
+
(_, run, space) => space ? run.slice(0, run.length - run.length % 2) + SPACE : run,
|
|
2096
|
+
ESCAPE + SPACE
|
|
2097
|
+
],
|
|
2098
|
+
// Escape metacharacters
|
|
2099
|
+
// which is written down by users but means special for regular expressions.
|
|
2100
|
+
// > There are 12 characters with special meanings:
|
|
2101
|
+
// > - the backslash \,
|
|
2102
|
+
// > - the caret ^,
|
|
2103
|
+
// > - the dollar sign $,
|
|
2104
|
+
// > - the period or dot .,
|
|
2105
|
+
// > - the vertical bar or pipe symbol |,
|
|
2106
|
+
// > - the question mark ?,
|
|
2107
|
+
// > - the asterisk or star *,
|
|
2108
|
+
// > - the plus sign +,
|
|
2109
|
+
// > - the opening parenthesis (,
|
|
2110
|
+
// > - the closing parenthesis ),
|
|
2111
|
+
// > - and the opening square bracket [,
|
|
2112
|
+
// > - the opening curly brace {,
|
|
2113
|
+
// > These special characters are often called "metacharacters".
|
|
2114
|
+
[
|
|
2115
|
+
/[\\$.|*+(){^]/g,
|
|
2116
|
+
(match) => `\\${match}`
|
|
2117
|
+
],
|
|
2118
|
+
[
|
|
2119
|
+
// > a question mark (?) matches a single character
|
|
2120
|
+
/(?!\\)\?/g,
|
|
2121
|
+
() => "[^/]",
|
|
2122
|
+
"?"
|
|
2123
|
+
],
|
|
2124
|
+
// leading slash
|
|
2125
|
+
[
|
|
2126
|
+
// > A leading slash matches the beginning of the pathname.
|
|
2127
|
+
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
|
|
2128
|
+
// A leading slash matches the beginning of the pathname
|
|
2129
|
+
/^\//,
|
|
2130
|
+
() => "^",
|
|
2131
|
+
SLASH
|
|
2132
|
+
],
|
|
2133
|
+
// replace special metacharacter slash after the leading slash
|
|
2134
|
+
[
|
|
2135
|
+
/\//g,
|
|
2136
|
+
() => "\\/",
|
|
2137
|
+
SLASH
|
|
2138
|
+
],
|
|
2139
|
+
[
|
|
2140
|
+
// > A leading "**" followed by a slash means match in all directories.
|
|
2141
|
+
// > For example, "**/foo" matches file or directory "foo" anywhere,
|
|
2142
|
+
// > the same as pattern "foo".
|
|
2143
|
+
// > "**/foo/bar" matches file or directory "bar" anywhere that is directly
|
|
2144
|
+
// > under directory "foo".
|
|
2145
|
+
// Notice that the '*'s have been replaced as '\\*'
|
|
2146
|
+
/^\^*(?:\\\*\\\*\\\/)+/,
|
|
2147
|
+
// '**/foo' <-> 'foo'
|
|
2148
|
+
() => "^(?:.*\\/)?",
|
|
2149
|
+
"*"
|
|
2150
|
+
],
|
|
2151
|
+
// starting
|
|
2152
|
+
[
|
|
2153
|
+
// there will be no leading '/'
|
|
2154
|
+
// (which has been replaced by section "leading slash")
|
|
2155
|
+
// If starts with '**', adding a '^' to the regular expression also works
|
|
2156
|
+
DIRECT,
|
|
2157
|
+
(source, pattern) => !source || source[0] === "^" ? source : (REGEX_INNER_SLASH.test(pattern) ? "^" : "(?:^|\\/)") + source
|
|
2158
|
+
],
|
|
2159
|
+
// two globstars
|
|
2160
|
+
[
|
|
2161
|
+
// Use lookahead assertions so that we could match more than one `'/**'`
|
|
2162
|
+
/\\\/\\\*\\\*(?=\\\/|$)/g,
|
|
2163
|
+
// Zero, one or several directories
|
|
2164
|
+
// should not use '*', or it will be replaced by the next replacer
|
|
2165
|
+
// Check if it is not the last `'/**'`
|
|
2166
|
+
(_, index, str) => index + 6 < str.length ? str.slice(index + 6) === "\\/" ? "(?:\\/[^\\/]+)+" : "(?:\\/[^\\/]+)*" : `\\/${TRAILING_DOUBLESTAR}`,
|
|
2167
|
+
"*"
|
|
2168
|
+
],
|
|
2169
|
+
// normal intermediate wildcards
|
|
2170
|
+
[
|
|
2171
|
+
// Never replace escaped '*'
|
|
2172
|
+
// ignore rule '\*' will match the path '*'
|
|
2173
|
+
// 'abc.*/' -> go
|
|
2174
|
+
// 'abc.*' -> skip this rule,
|
|
2175
|
+
// coz trailing single wildcard will be handed by [trailing wildcard]
|
|
2176
|
+
/(^|[^\\]+)(\\\*)+(?=.+)/g,
|
|
2177
|
+
// '*.js' matches '.js'
|
|
2178
|
+
// '*.js' doesn't match 'abc'
|
|
2179
|
+
(_, p1, p2) => {
|
|
2180
|
+
let unescaped = p2.replace(/\\\*/g, "[^\\/]*");
|
|
2181
|
+
return p1 + unescaped;
|
|
2182
|
+
},
|
|
2183
|
+
"*"
|
|
2184
|
+
],
|
|
2185
|
+
// trailing wildcard, held apart from a literal star
|
|
2186
|
+
[
|
|
2187
|
+
// The step above leaves a trailing `*` alone, so a single `\*` is all that
|
|
2188
|
+
// can be left at the end here. Whether it is a wildcard or a literal
|
|
2189
|
+
// turns on the backslashes the user put in front of it: the escaper has
|
|
2190
|
+
// since doubled every one, so what stands here is those `2N` doubled
|
|
2191
|
+
// backslashes and then the star's own escape. An even number of the
|
|
2192
|
+
// original `N` leaves the star unescaped -- a wildcard -- and an odd
|
|
2193
|
+
// number escapes it -- a literal. This runs while the two are still
|
|
2194
|
+
// distinct, before the unescape steps below collapse the literal onto
|
|
2195
|
+
// the very `\*` a wildcard leaves behind.
|
|
2196
|
+
/(^|[^\\])((?:\\\\)*)\\\*$/,
|
|
2197
|
+
(match, p1, p2) => (
|
|
2198
|
+
// `p2` holds the doubled user backslashes; half of them is `N`.
|
|
2199
|
+
p2.length / 2 % 2 === 0 ? p1 + p2 + TRAILING_WILDCARD : match
|
|
2200
|
+
),
|
|
2201
|
+
"*"
|
|
2202
|
+
],
|
|
2203
|
+
[
|
|
2204
|
+
// unescape, revert step 3 except for back slash
|
|
2205
|
+
// For example, if a user escape a '\\*',
|
|
2206
|
+
// after step 3, the result will be '\\\\\\*'
|
|
2207
|
+
/\\\\\\(?=[$.|*+(){^])/g,
|
|
2208
|
+
() => ESCAPE,
|
|
2209
|
+
ESCAPE + ESCAPE
|
|
2210
|
+
],
|
|
2211
|
+
[
|
|
2212
|
+
// '\\\\' -> '\\'
|
|
2213
|
+
/\\\\/g,
|
|
2214
|
+
() => ESCAPE,
|
|
2215
|
+
ESCAPE + ESCAPE
|
|
2216
|
+
],
|
|
2217
|
+
[
|
|
2218
|
+
// Every real bracket expression -- POSIX classes included -- has already
|
|
2219
|
+
// been held aside by `extractBrackets`, so the only `[` left in the
|
|
2220
|
+
// pattern is an escaped, literal one.
|
|
2221
|
+
// `\` is escaped by step 3
|
|
2222
|
+
/\\\[([^\]/]*?)(\\*)($|\])/g,
|
|
2223
|
+
// '\\[bar]' -> '\\\\[bar\\]'
|
|
2224
|
+
(match, range, endEscape, close) => `\\[${range}${cleanRangeBackSlash(endEscape)}${close}`,
|
|
2225
|
+
"["
|
|
2226
|
+
],
|
|
2227
|
+
// ending
|
|
2228
|
+
[
|
|
2229
|
+
// 'js' will not match 'js.'
|
|
2230
|
+
// 'ab' will not match 'abc'
|
|
2231
|
+
DIRECT,
|
|
2232
|
+
// WTF!
|
|
2233
|
+
// https://git-scm.com/docs/gitignore
|
|
2234
|
+
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
|
|
2235
|
+
// which re-fixes #24, #38
|
|
2236
|
+
// > If there is a separator at the end of the pattern then the pattern
|
|
2237
|
+
// > will only match directories, otherwise the pattern can match both
|
|
2238
|
+
// > files and directories.
|
|
2239
|
+
// 'js*' will not match 'a.js'
|
|
2240
|
+
// 'js/' will not match 'a.js'
|
|
2241
|
+
// 'js' will match 'a.js' and 'a.js/'
|
|
2242
|
+
(source) => {
|
|
2243
|
+
let last = source[source.length - 1];
|
|
2244
|
+
return !last || last === TRAILING_WILDCARD || last === TRAILING_DOUBLESTAR ? source : last === SLASH ? `${source}$` : `${source}(?=$|\\/$)`;
|
|
2245
|
+
}
|
|
2246
|
+
]
|
|
2247
|
+
], REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\uE000$/, MODE_IGNORE = "regex", MODE_CHECK_IGNORE = "checkRegex", UNDERSCORE = "_", replaceTrailingWildcard = (_, p1) => `${p1 ? `${p1}[^/]+` : "[^/]*"}(?=$|\\/$)`, REGEX_REPLACE_TRAILING_DOUBLESTAR = /\uE001$/, replaceTrailingDoublestar = () => ".+(?=$|\\/$)", WILDCARD = "[^\\/]*", separatorAfter = (run, at) => {
|
|
2248
|
+
let separator = EMPTY;
|
|
2249
|
+
for (let index = at + 1; index < run.length && !run[index].wildcard; index++)
|
|
2250
|
+
separator += run[index].single;
|
|
2251
|
+
return separator;
|
|
2252
|
+
}, pinWildcards = (source) => {
|
|
2253
|
+
if (source.indexOf(WILDCARD) < 0)
|
|
2254
|
+
return source;
|
|
2255
|
+
let tokens = [], { length } = source, index = 0;
|
|
2256
|
+
for (; index < length; ) {
|
|
2257
|
+
let char = source[index];
|
|
2258
|
+
if (source.startsWith(WILDCARD, index))
|
|
2259
|
+
tokens.push({ wildcard: !0 }), index += WILDCARD.length;
|
|
2260
|
+
else if (char === "[") {
|
|
2261
|
+
let end = index + 1;
|
|
2262
|
+
for (source[end] === "^" && end++, source[end] === "]" && end++; end < length && source[end] !== "]"; )
|
|
2263
|
+
end += source[end] === ESCAPE ? 2 : 1;
|
|
2264
|
+
end++, tokens.push({ single: source.slice(index, end) }), index = end;
|
|
2265
|
+
} else if (char === ESCAPE)
|
|
2266
|
+
tokens.push({ single: source.slice(index, index + 2) }), index += 2;
|
|
2267
|
+
else if (char === "(") {
|
|
2268
|
+
let depth = 0, end = index;
|
|
2269
|
+
do
|
|
2270
|
+
source[end] === ESCAPE ? end++ : source[end] === "(" ? depth++ : source[end] === ")" && depth--, end++;
|
|
2271
|
+
while (end < length && depth > 0);
|
|
2272
|
+
"*+?".indexOf(source[end]) >= 0 && end++, tokens.push({ boundary: source.slice(index, end) }), index = end;
|
|
2273
|
+
} else char === "^" || char === "$" ? (tokens.push({ boundary: char }), index++) : (tokens.push({ single: char }), index++);
|
|
2274
|
+
}
|
|
2275
|
+
let out = EMPTY, run = [], flush = () => {
|
|
2276
|
+
let lastWildcard;
|
|
2277
|
+
run.forEach((token, at) => {
|
|
2278
|
+
token.wildcard && (lastWildcard = at);
|
|
2279
|
+
}), run.forEach((token, at) => {
|
|
2280
|
+
if (!token.wildcard) {
|
|
2281
|
+
out += token.single;
|
|
2282
|
+
return;
|
|
2283
|
+
}
|
|
2284
|
+
out += at === lastWildcard ? WILDCARD : `(?:(?!${separatorAfter(run, at)})[^\\/])*`;
|
|
2285
|
+
}), run = [];
|
|
2286
|
+
};
|
|
2287
|
+
return tokens.forEach((token) => {
|
|
2288
|
+
if (token.boundary === void 0) {
|
|
2289
|
+
run.push(token);
|
|
2290
|
+
return;
|
|
2291
|
+
}
|
|
2292
|
+
flush(), out += token.boundary;
|
|
2293
|
+
}), flush(), out;
|
|
2294
|
+
}, makeRegexPrefix = (pattern) => {
|
|
2295
|
+
let { source, sources } = extractBrackets(pattern), replaced = REPLACERS.reduce(
|
|
2296
|
+
// A pass whose matcher finds nothing hands back the very string it was
|
|
2297
|
+
// given, so asking first costs a search and saves a rewrite. Ten of the
|
|
2298
|
+
// fifteen passes never fire for a typical .gitignore line, and between
|
|
2299
|
+
// them they were 45% of this chain.
|
|
2300
|
+
(prev, [matcher, replacer, required]) => matcher === DIRECT ? replacer(prev, pattern) : required !== UNDEFINED && prev.indexOf(required) < 0 ? prev : matcher.test(prev) ? prev.replace(matcher, replacer.bind(pattern)) : prev,
|
|
2301
|
+
source
|
|
2302
|
+
);
|
|
2303
|
+
return sources.length ? replaced.replace(
|
|
2304
|
+
REGEX_RESTORE_PLACEHOLDER,
|
|
2305
|
+
(match, index) => sources[index]
|
|
2306
|
+
) : replaced;
|
|
2307
|
+
}, checkSourceOf = (body, prefix) => {
|
|
2308
|
+
body[body.length - 1] === SLASH && (prefix = makeRegexPrefix(body.slice(0, -1)));
|
|
2309
|
+
let head = prefix.slice(0, -1), last = prefix[prefix.length - 1];
|
|
2310
|
+
return last === TRAILING_WILDCARD ? `${head}$` : last === TRAILING_DOUBLESTAR ? `${head}.*$` : NEVER_MATCH;
|
|
2311
|
+
}, matchesBasename = (body) => {
|
|
2312
|
+
let index = body.indexOf(SLASH);
|
|
2313
|
+
return index < 0 || index === body.length - 1;
|
|
2314
|
+
}, basenameOf = (path2) => {
|
|
2315
|
+
let end = path2.length - 1, index = path2.lastIndexOf(
|
|
2316
|
+
SLASH,
|
|
2317
|
+
path2[end] === SLASH ? end - 1 : end
|
|
2318
|
+
);
|
|
2319
|
+
return index < 0 ? path2 : path2.slice(index + 1);
|
|
2320
|
+
}, parentOf = (path2) => {
|
|
2321
|
+
if (path2.charCodeAt(0) === SLASH_CODE || path2.indexOf(DOUBLE_SLASH) >= 0) {
|
|
2322
|
+
let slices = path2.split(SLASH).filter(Boolean);
|
|
2323
|
+
return slices.pop(), slices.length ? slices.join(SLASH) + SLASH : EMPTY;
|
|
2324
|
+
}
|
|
2325
|
+
let end = path2.length - 1, cut = path2.lastIndexOf(
|
|
2326
|
+
SLASH,
|
|
2327
|
+
path2.charCodeAt(end) === SLASH_CODE ? end - 1 : end
|
|
2328
|
+
);
|
|
2329
|
+
return cut < 0 ? EMPTY : path2.slice(0, cut + 1);
|
|
2330
|
+
}, isString = (subject) => typeof subject == "string", checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern), splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean), IgnoreRule = class {
|
|
2331
|
+
constructor(pattern, mark, body, ignoreCase, negative, prefix) {
|
|
2332
|
+
this.pattern = pattern, this.mark = mark, this.negative = negative, define(this, "body", body), define(this, "ignoreCase", ignoreCase), define(this, "regexPrefix", prefix);
|
|
2333
|
+
}
|
|
2334
|
+
// Worked out on first use and kept behind an own property, the way `regex`
|
|
2335
|
+
// caches itself in `_regex`. Deciding it in the constructor instead would
|
|
2336
|
+
// add a fourth `defineProperty` to every rule ever built, which cost 4% of
|
|
2337
|
+
// every compile -- including the compiles of rules that are never matched
|
|
2338
|
+
// against anything.
|
|
2339
|
+
get _basenameOnly() {
|
|
2340
|
+
return define(this, "_basenameOnly", matchesBasename(this.body));
|
|
2341
|
+
}
|
|
2342
|
+
get regex() {
|
|
2343
|
+
let key = UNDERSCORE + MODE_IGNORE;
|
|
2344
|
+
return this[key] ? this[key] : this._make(MODE_IGNORE, key);
|
|
2345
|
+
}
|
|
2346
|
+
get checkRegex() {
|
|
2347
|
+
let key = UNDERSCORE + MODE_CHECK_IGNORE;
|
|
2348
|
+
return this[key] ? this[key] : this._make(MODE_CHECK_IGNORE, key);
|
|
2349
|
+
}
|
|
2350
|
+
_make(mode, key) {
|
|
2351
|
+
let str = pinWildcards(
|
|
2352
|
+
mode === MODE_IGNORE ? this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, replaceTrailingWildcard).replace(REGEX_REPLACE_TRAILING_DOUBLESTAR, replaceTrailingDoublestar) : checkSourceOf(this.body, this.regexPrefix)
|
|
2353
|
+
), regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
|
|
2354
|
+
return define(this, key, regex);
|
|
2355
|
+
}
|
|
2356
|
+
}, isLineEnd = (char) => char === "\r" || char === `
|
|
2357
|
+
`, trimEnd = (body) => {
|
|
2358
|
+
let end = body.length;
|
|
2359
|
+
for (; end && isLineEnd(body[end - 1]); )
|
|
2360
|
+
end--;
|
|
2361
|
+
let lineEnd = end;
|
|
2362
|
+
for (; end && body[end - 1] === SPACE; )
|
|
2363
|
+
end--;
|
|
2364
|
+
if (end === lineEnd)
|
|
2365
|
+
return body.slice(0, end);
|
|
2366
|
+
let backslashes = 0;
|
|
2367
|
+
for (; backslashes < end && body[end - backslashes - 1] === ESCAPE; )
|
|
2368
|
+
backslashes++;
|
|
2369
|
+
return backslashes % 2 ? body.slice(0, end - 1) + SPACE : body.slice(0, end);
|
|
2370
|
+
}, createRule = ({
|
|
2371
|
+
pattern,
|
|
2372
|
+
mark
|
|
2373
|
+
}, ignoreCase) => {
|
|
2374
|
+
let body = pattern[0] === BOM ? pattern.slice(1) : pattern;
|
|
2375
|
+
if (body[0] === "#")
|
|
2376
|
+
return;
|
|
2377
|
+
let negative = !1;
|
|
2378
|
+
body[0] === "!" && (negative = !0, body = body.slice(1));
|
|
2379
|
+
let last = body[body.length - 1];
|
|
2380
|
+
if ((last === SPACE || last === "\r" || last === `
|
|
2381
|
+
`) && (body = trimEnd(body)), !body)
|
|
2382
|
+
return;
|
|
2383
|
+
body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
|
|
2384
|
+
let regexPrefix = makeRegexPrefix(body);
|
|
2385
|
+
return new IgnoreRule(
|
|
2386
|
+
pattern,
|
|
2387
|
+
mark,
|
|
2388
|
+
body,
|
|
2389
|
+
ignoreCase,
|
|
2390
|
+
negative,
|
|
2391
|
+
regexPrefix
|
|
2392
|
+
);
|
|
2393
|
+
}, RuleManager = class {
|
|
2394
|
+
constructor(ignoreCase) {
|
|
2395
|
+
this._ignoreCase = ignoreCase, this._rules = [], this._basenameCount = 0;
|
|
2396
|
+
}
|
|
2397
|
+
_add(pattern) {
|
|
2398
|
+
if (pattern && pattern[KEY_IGNORE]) {
|
|
2399
|
+
this._rules = this._rules.concat(pattern._rules._rules), this._basenameCount += pattern._rules._basenameCount, this._added = !0;
|
|
2400
|
+
return;
|
|
2401
|
+
}
|
|
2402
|
+
isString(pattern) && (pattern = {
|
|
2403
|
+
pattern
|
|
2404
|
+
});
|
|
2405
|
+
let rule = checkPattern(pattern.pattern) && createRule(pattern, this._ignoreCase);
|
|
2406
|
+
rule && (this._added = !0, this._rules.push(rule), matchesBasename(rule.body) && this._basenameCount++);
|
|
2407
|
+
}
|
|
2408
|
+
// @param {Array<string> | string | Ignore} pattern
|
|
2409
|
+
add(pattern) {
|
|
2410
|
+
return this._added = !1, makeArray(
|
|
2411
|
+
isString(pattern) ? splitPattern(pattern) : pattern
|
|
2412
|
+
).forEach(this._add, this), this._added && (this._literalRules = UNDEFINED), this._added;
|
|
2413
|
+
}
|
|
2414
|
+
// Match the literal 'abc/' for `checkIgnore`, last rule wins. Only a rule
|
|
2415
|
+
// ending in a wildcard can match it (see `checkSourceOf`), so the rest
|
|
2416
|
+
// are left out once, rather than tested or compiled for every path.
|
|
2417
|
+
testLiteral(path2) {
|
|
2418
|
+
let rules = this._literalRules || (this._literalRules = this._rules.filter(
|
|
2419
|
+
({ body }) => body[body.length - (body[body.length - 1] === SLASH ? 2 : 1)] === "*"
|
|
2420
|
+
)), ignored = !1, unignored = !1, matchedRule;
|
|
2421
|
+
for (let index = rules.length - 1; index >= 0; index--) {
|
|
2422
|
+
let rule = rules[index];
|
|
2423
|
+
if (rule.checkRegex.test(path2)) {
|
|
2424
|
+
ignored = !rule.negative, unignored = rule.negative, matchedRule = rule.negative ? UNDEFINED : rule;
|
|
2425
|
+
break;
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
let ret = {
|
|
2429
|
+
ignored,
|
|
2430
|
+
unignored
|
|
2431
|
+
};
|
|
2432
|
+
return matchedRule && (ret.rule = matchedRule), ret;
|
|
2433
|
+
}
|
|
2434
|
+
// Test one single path without recursively checking parent directories
|
|
2435
|
+
//
|
|
2436
|
+
// - checkUnignored `boolean` whether should check if the path is unignored,
|
|
2437
|
+
// setting `checkUnignored` to `false` could reduce additional
|
|
2438
|
+
// path matching.
|
|
2439
|
+
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
2440
|
+
// @returns {TestResult} true if a file is ignored
|
|
2441
|
+
test(path2, checkUnignored, mode) {
|
|
2442
|
+
let ignored = !1, unignored = !1, matchedRule, rules = this._rules, { length } = rules, shortcut = this._basenameCount * 2 >= length, basename = shortcut ? basenameOf(path2) : path2;
|
|
2443
|
+
for (let index = 0; index < length; index++) {
|
|
2444
|
+
let rule = rules[index], { negative } = rule;
|
|
2445
|
+
!(unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) && rule[mode].test(
|
|
2446
|
+
shortcut && rule._basenameOnly ? basename : path2
|
|
2447
|
+
) && (ignored = !negative, unignored = negative, matchedRule = negative ? UNDEFINED : rule);
|
|
2448
|
+
}
|
|
2449
|
+
let ret = {
|
|
2450
|
+
ignored,
|
|
2451
|
+
unignored
|
|
2452
|
+
};
|
|
2453
|
+
return matchedRule && (ret.rule = matchedRule), ret;
|
|
2454
|
+
}
|
|
2455
|
+
}, throwError = (message, Ctor) => {
|
|
2456
|
+
throw new Ctor(message);
|
|
2457
|
+
}, checkPath = (path2, originalPath, doThrow) => isString(path2) ? path2 ? checkPath.isNotRelative(path2) ? doThrow(
|
|
2458
|
+
`path should be a \`path.relative()\`d string, but got "${originalPath}"`,
|
|
2459
|
+
RangeError
|
|
2460
|
+
) : !0 : doThrow("path must not be empty", TypeError) : doThrow(
|
|
2461
|
+
`path must be a string, but got \`${originalPath}\``,
|
|
2462
|
+
TypeError
|
|
2463
|
+
), isNotRelative = (path2) => {
|
|
2464
|
+
let first = path2.charCodeAt(0);
|
|
2465
|
+
if (first === SLASH_CODE)
|
|
2466
|
+
return !0;
|
|
2467
|
+
if (first !== DOT_CODE)
|
|
2468
|
+
return !1;
|
|
2469
|
+
if (path2.length === 1)
|
|
2470
|
+
return !0;
|
|
2471
|
+
let second = path2.charCodeAt(1);
|
|
2472
|
+
return second === SLASH_CODE ? !0 : second !== DOT_CODE ? !1 : path2.length === 2 || path2.charCodeAt(2) === SLASH_CODE;
|
|
2473
|
+
};
|
|
2474
|
+
checkPath.isNotRelative = isNotRelative;
|
|
2475
|
+
checkPath.convert = (p) => p;
|
|
2476
|
+
var Ignore = class {
|
|
2477
|
+
constructor({
|
|
2478
|
+
ignorecase = !0,
|
|
2479
|
+
ignoreCase = ignorecase,
|
|
2480
|
+
allowRelativePaths = !1
|
|
2481
|
+
} = {}) {
|
|
2482
|
+
define(this, KEY_IGNORE, !0), this._rules = new RuleManager(ignoreCase), this._strictPathCheck = !allowRelativePaths, this._initCache();
|
|
2483
|
+
}
|
|
2484
|
+
_initCache() {
|
|
2485
|
+
this._ignoreCache = /* @__PURE__ */ Object.create(null), this._testCache = /* @__PURE__ */ Object.create(null);
|
|
2486
|
+
}
|
|
2487
|
+
add(pattern) {
|
|
2488
|
+
return this._rules.add(pattern) && this._initCache(), this;
|
|
2489
|
+
}
|
|
2490
|
+
// legacy
|
|
2491
|
+
addPattern(pattern) {
|
|
2492
|
+
return this.add(pattern);
|
|
2493
|
+
}
|
|
2494
|
+
// @returns {TestResult}
|
|
2495
|
+
_test(originalPath, cache, checkUnignored) {
|
|
2496
|
+
let path2 = originalPath && checkPath.convert(originalPath);
|
|
2497
|
+
return checkPath(
|
|
2498
|
+
path2,
|
|
2499
|
+
originalPath,
|
|
2500
|
+
this._strictPathCheck ? throwError : RETURN_FALSE
|
|
2501
|
+
), this._t(path2, cache, checkUnignored);
|
|
2502
|
+
}
|
|
2503
|
+
checkIgnore(path2) {
|
|
2504
|
+
if (path2.charCodeAt(path2.length - 1) !== SLASH_CODE)
|
|
2505
|
+
return this.test(path2);
|
|
2506
|
+
let dir = this._t(path2, this._testCache, !0);
|
|
2507
|
+
if (dir.ignored)
|
|
2508
|
+
return dir;
|
|
2509
|
+
let literal = this._rules.testLiteral(path2);
|
|
2510
|
+
return literal.ignored || literal.unignored ? literal : dir;
|
|
2511
|
+
}
|
|
2512
|
+
_t(path2, cache, checkUnignored) {
|
|
2513
|
+
if (path2 in cache)
|
|
2514
|
+
return cache[path2];
|
|
2515
|
+
let parentPath = parentOf(path2), parent = parentPath ? this._t(parentPath, cache, checkUnignored) : UNDEFINED;
|
|
2516
|
+
return cache[path2] = parent && parent.ignored ? parent : this._rules.test(path2, checkUnignored, MODE_IGNORE);
|
|
2517
|
+
}
|
|
2518
|
+
ignores(path2) {
|
|
2519
|
+
return this._test(path2, this._ignoreCache, !1).ignored;
|
|
2520
|
+
}
|
|
2521
|
+
createFilter() {
|
|
2522
|
+
return (path2) => !this.ignores(path2);
|
|
2523
|
+
}
|
|
2524
|
+
filter(paths) {
|
|
2525
|
+
return makeArray(paths).filter(this.createFilter());
|
|
2526
|
+
}
|
|
2527
|
+
// @returns {TestResult}
|
|
2528
|
+
test(path2) {
|
|
2529
|
+
return this._test(path2, this._testCache, !0);
|
|
2530
|
+
}
|
|
2531
|
+
}, factory = (options) => new Ignore(options), isPathValid = (path2) => checkPath(path2 && checkPath.convert(path2), path2, RETURN_FALSE), setupWindows = () => {
|
|
2532
|
+
let makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
2533
|
+
checkPath.convert = makePosix;
|
|
2534
|
+
let REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
2535
|
+
checkPath.isNotRelative = (path2) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path2) || isNotRelative(path2);
|
|
2536
|
+
};
|
|
2537
|
+
// Detect `process` so that it can run in browsers.
|
|
2538
|
+
typeof process < "u" && process.platform === "win32" && setupWindows();
|
|
2539
|
+
module.exports = factory;
|
|
2540
|
+
factory.default = factory;
|
|
2541
|
+
module.exports.isPathValid = isPathValid;
|
|
2542
|
+
define(module.exports, /* @__PURE__ */ Symbol.for("setupWindows"), setupWindows);
|
|
2543
|
+
}
|
|
2544
|
+
});
|
|
2545
|
+
|
|
2546
|
+
// ../../node_modules/globby/index.js
|
|
2547
|
+
import process3 from "node:process";
|
|
2548
|
+
import fs3 from "node:fs";
|
|
2549
|
+
import nodePath from "node:path";
|
|
2550
|
+
|
|
2551
|
+
// ../../node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js
|
|
2552
|
+
import { on, once } from "node:events";
|
|
2553
|
+
import { PassThrough as PassThroughStream } from "node:stream";
|
|
2554
|
+
import { finished } from "node:stream/promises";
|
|
2555
|
+
function mergeStreams(streams) {
|
|
2556
|
+
if (!Array.isArray(streams))
|
|
2557
|
+
throw new TypeError(`Expected an array, got \`${typeof streams}\`.`);
|
|
2558
|
+
for (let stream of streams)
|
|
2559
|
+
validateStream(stream);
|
|
2560
|
+
let objectMode = streams.some(({ readableObjectMode }) => readableObjectMode), highWaterMark = getHighWaterMark(streams, objectMode), passThroughStream = new MergedStream({
|
|
2561
|
+
objectMode,
|
|
2562
|
+
writableHighWaterMark: highWaterMark,
|
|
2563
|
+
readableHighWaterMark: highWaterMark
|
|
2564
|
+
});
|
|
2565
|
+
for (let stream of streams)
|
|
2566
|
+
passThroughStream.add(stream);
|
|
2567
|
+
return streams.length === 0 && endStream(passThroughStream), passThroughStream;
|
|
2568
|
+
}
|
|
2569
|
+
var getHighWaterMark = (streams, objectMode) => {
|
|
2570
|
+
if (streams.length === 0)
|
|
2571
|
+
return 16384;
|
|
2572
|
+
let highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark);
|
|
2573
|
+
return Math.max(...highWaterMarks);
|
|
2574
|
+
}, MergedStream = class extends PassThroughStream {
|
|
2575
|
+
#streams = /* @__PURE__ */ new Set([]);
|
|
2576
|
+
#ended = /* @__PURE__ */ new Set([]);
|
|
2577
|
+
#aborted = /* @__PURE__ */ new Set([]);
|
|
2578
|
+
#onFinished;
|
|
2579
|
+
add(stream) {
|
|
2580
|
+
validateStream(stream), !this.#streams.has(stream) && (this.#streams.add(stream), this.#onFinished ??= onMergedStreamFinished(this, this.#streams), endWhenStreamsDone({
|
|
2581
|
+
passThroughStream: this,
|
|
2582
|
+
stream,
|
|
2583
|
+
streams: this.#streams,
|
|
2584
|
+
ended: this.#ended,
|
|
2585
|
+
aborted: this.#aborted,
|
|
2586
|
+
onFinished: this.#onFinished
|
|
2587
|
+
}), stream.pipe(this, { end: !1 }));
|
|
2588
|
+
}
|
|
2589
|
+
remove(stream) {
|
|
2590
|
+
return validateStream(stream), this.#streams.has(stream) ? (stream.unpipe(this), !0) : !1;
|
|
2591
|
+
}
|
|
2592
|
+
}, onMergedStreamFinished = async (passThroughStream, streams) => {
|
|
2593
|
+
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT);
|
|
2594
|
+
let controller = new AbortController();
|
|
2595
|
+
try {
|
|
2596
|
+
await Promise.race([
|
|
2597
|
+
onMergedStreamEnd(passThroughStream, controller),
|
|
2598
|
+
onInputStreamsUnpipe(passThroughStream, streams, controller)
|
|
2599
|
+
]);
|
|
2600
|
+
} finally {
|
|
2601
|
+
controller.abort(), updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT);
|
|
2602
|
+
}
|
|
2603
|
+
}, onMergedStreamEnd = async (passThroughStream, { signal }) => {
|
|
2604
|
+
await finished(passThroughStream, { signal, cleanup: !0 });
|
|
2605
|
+
}, onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => {
|
|
2606
|
+
for await (let [unpipedStream] of on(passThroughStream, "unpipe", { signal }))
|
|
2607
|
+
streams.has(unpipedStream) && unpipedStream.emit(unpipeEvent);
|
|
2608
|
+
}, validateStream = (stream) => {
|
|
2609
|
+
if (typeof stream?.pipe != "function")
|
|
2610
|
+
throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
2611
|
+
}, endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished }) => {
|
|
2612
|
+
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
2613
|
+
let controller = new AbortController();
|
|
2614
|
+
try {
|
|
2615
|
+
await Promise.race([
|
|
2616
|
+
afterMergedStreamFinished(onFinished, stream),
|
|
2617
|
+
onInputStreamEnd({ passThroughStream, stream, streams, ended, aborted, controller }),
|
|
2618
|
+
onInputStreamUnpipe({ stream, streams, ended, aborted, controller })
|
|
2619
|
+
]);
|
|
2620
|
+
} finally {
|
|
2621
|
+
controller.abort(), updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
2622
|
+
}
|
|
2623
|
+
streams.size === ended.size + aborted.size && (ended.size === 0 && aborted.size > 0 ? abortStream(passThroughStream) : endStream(passThroughStream));
|
|
2624
|
+
}, isAbortError = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE", afterMergedStreamFinished = async (onFinished, stream) => {
|
|
2625
|
+
try {
|
|
2626
|
+
await onFinished, abortStream(stream);
|
|
2627
|
+
} catch (error) {
|
|
2628
|
+
isAbortError(error) ? abortStream(stream) : errorStream(stream, error);
|
|
2629
|
+
}
|
|
2630
|
+
}, onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
2631
|
+
try {
|
|
2632
|
+
await finished(stream, { signal, cleanup: !0, readable: !0, writable: !1 }), streams.has(stream) && ended.add(stream);
|
|
2633
|
+
} catch (error) {
|
|
2634
|
+
if (signal.aborted || !streams.has(stream))
|
|
2635
|
+
return;
|
|
2636
|
+
isAbortError(error) ? aborted.add(stream) : errorStream(passThroughStream, error);
|
|
2637
|
+
}
|
|
2638
|
+
}, onInputStreamUnpipe = async ({ stream, streams, ended, aborted, controller: { signal } }) => {
|
|
2639
|
+
await once(stream, unpipeEvent, { signal }), streams.delete(stream), ended.delete(stream), aborted.delete(stream);
|
|
2640
|
+
}, unpipeEvent = /* @__PURE__ */ Symbol("unpipe"), endStream = (stream) => {
|
|
2641
|
+
stream.writable && stream.end();
|
|
2642
|
+
}, abortStream = (stream) => {
|
|
2643
|
+
(stream.readable || stream.writable) && stream.destroy();
|
|
2644
|
+
}, errorStream = (stream, error) => {
|
|
2645
|
+
stream.destroyed || (stream.once("error", noop), stream.destroy(error));
|
|
2646
|
+
}, noop = () => {
|
|
2647
|
+
}, updateMaxListeners = (passThroughStream, increment) => {
|
|
2648
|
+
let maxListeners = passThroughStream.getMaxListeners();
|
|
2649
|
+
maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY && passThroughStream.setMaxListeners(maxListeners + increment);
|
|
2650
|
+
}, PASSTHROUGH_LISTENERS_COUNT = 2, PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
2651
|
+
|
|
2652
|
+
// ../../node_modules/globby/index.js
|
|
2653
|
+
var import_fast_glob2 = __toESM(require_out4(), 1);
|
|
2654
|
+
|
|
2655
|
+
// ../../node_modules/path-type/index.js
|
|
2656
|
+
import fs from "node:fs";
|
|
2657
|
+
import fsPromises from "node:fs/promises";
|
|
2658
|
+
async function isType(fsStatType, statsMethodName, filePath) {
|
|
2659
|
+
if (typeof filePath != "string")
|
|
2660
|
+
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
|
2661
|
+
try {
|
|
2662
|
+
return (await fsPromises[fsStatType](filePath))[statsMethodName]();
|
|
2663
|
+
} catch (error) {
|
|
2664
|
+
if (error.code === "ENOENT")
|
|
2665
|
+
return !1;
|
|
2666
|
+
throw error;
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
function isTypeSync(fsStatType, statsMethodName, filePath) {
|
|
2670
|
+
if (typeof filePath != "string")
|
|
2671
|
+
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
|
2672
|
+
try {
|
|
2673
|
+
return fs[fsStatType](filePath)[statsMethodName]();
|
|
2674
|
+
} catch (error) {
|
|
2675
|
+
if (error.code === "ENOENT")
|
|
2676
|
+
return !1;
|
|
2677
|
+
throw error;
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
var isFile = isType.bind(void 0, "stat", "isFile"), isDirectory = isType.bind(void 0, "stat", "isDirectory"), isSymlink = isType.bind(void 0, "lstat", "isSymbolicLink"), isFileSync = isTypeSync.bind(void 0, "statSync", "isFile"), isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory"), isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink");
|
|
2681
|
+
|
|
2682
|
+
// ../../node_modules/globby/ignore.js
|
|
2683
|
+
var import_fast_glob = __toESM(require_out4(), 1), import_ignore = __toESM(require_ignore(), 1);
|
|
2684
|
+
import process2 from "node:process";
|
|
2685
|
+
import fs2 from "node:fs";
|
|
2686
|
+
import fsPromises2 from "node:fs/promises";
|
|
2687
|
+
import path from "node:path";
|
|
2688
|
+
|
|
2689
|
+
// ../../node_modules/globby/utilities.js
|
|
2690
|
+
var isNegativePattern = (pattern) => pattern[0] === "!";
|
|
2691
|
+
|
|
2692
|
+
// ../../node_modules/globby/ignore.js
|
|
2693
|
+
var defaultIgnoredDirectories = [
|
|
2694
|
+
"**/node_modules",
|
|
2695
|
+
"**/flow-typed",
|
|
2696
|
+
"**/coverage",
|
|
2697
|
+
"**/.git"
|
|
2698
|
+
], ignoreFilesGlobOptions = {
|
|
2699
|
+
absolute: !0,
|
|
2700
|
+
dot: !0
|
|
2701
|
+
}, GITIGNORE_FILES_PATTERN = "**/.gitignore", applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + path.posix.join(base, pattern.slice(1)) : path.posix.join(base, pattern), parseIgnoreFile = (file, cwd) => {
|
|
2702
|
+
let base = slash(path.relative(cwd, path.dirname(file.filePath)));
|
|
2703
|
+
return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
|
|
2704
|
+
}, toRelativePath = (fileOrDirectory, cwd) => {
|
|
2705
|
+
if (cwd = slash(cwd), path.isAbsolute(fileOrDirectory)) {
|
|
2706
|
+
if (slash(fileOrDirectory).startsWith(cwd))
|
|
2707
|
+
return path.relative(cwd, fileOrDirectory);
|
|
2708
|
+
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
|
|
2709
|
+
}
|
|
2710
|
+
return fileOrDirectory;
|
|
2711
|
+
}, getIsIgnoredPredicate = (files, cwd) => {
|
|
2712
|
+
let patterns = files.flatMap((file) => parseIgnoreFile(file, cwd)), ignores = (0, import_ignore.default)().add(patterns);
|
|
2713
|
+
return (fileOrDirectory) => (fileOrDirectory = toPath(fileOrDirectory), fileOrDirectory = toRelativePath(fileOrDirectory, cwd), fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : !1);
|
|
2714
|
+
}, normalizeOptions = (options = {}) => ({
|
|
2715
|
+
cwd: toPath(options.cwd) ?? process2.cwd(),
|
|
2716
|
+
suppressErrors: !!options.suppressErrors,
|
|
2717
|
+
deep: typeof options.deep == "number" ? options.deep : Number.POSITIVE_INFINITY,
|
|
2718
|
+
ignore: [...options.ignore ?? [], ...defaultIgnoredDirectories]
|
|
2719
|
+
}), isIgnoredByIgnoreFiles = async (patterns, options) => {
|
|
2720
|
+
let { cwd, suppressErrors, deep, ignore } = normalizeOptions(options), paths = await (0, import_fast_glob.default)(patterns, {
|
|
2721
|
+
cwd,
|
|
2722
|
+
suppressErrors,
|
|
2723
|
+
deep,
|
|
2724
|
+
ignore,
|
|
2725
|
+
...ignoreFilesGlobOptions
|
|
2726
|
+
}), files = await Promise.all(
|
|
2727
|
+
paths.map(async (filePath) => ({
|
|
2728
|
+
filePath,
|
|
2729
|
+
content: await fsPromises2.readFile(filePath, "utf8")
|
|
2730
|
+
}))
|
|
2731
|
+
);
|
|
2732
|
+
return getIsIgnoredPredicate(files, cwd);
|
|
2733
|
+
}, isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
|
2734
|
+
let { cwd, suppressErrors, deep, ignore } = normalizeOptions(options), files = import_fast_glob.default.sync(patterns, {
|
|
2735
|
+
cwd,
|
|
2736
|
+
suppressErrors,
|
|
2737
|
+
deep,
|
|
2738
|
+
ignore,
|
|
2739
|
+
...ignoreFilesGlobOptions
|
|
2740
|
+
}).map((filePath) => ({
|
|
2741
|
+
filePath,
|
|
2742
|
+
content: fs2.readFileSync(filePath, "utf8")
|
|
2743
|
+
}));
|
|
2744
|
+
return getIsIgnoredPredicate(files, cwd);
|
|
2745
|
+
}, isGitIgnored = (options) => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options), isGitIgnoredSync = (options) => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);
|
|
2746
|
+
|
|
2747
|
+
// ../../node_modules/globby/index.js
|
|
2748
|
+
var assertPatternsInput = (patterns) => {
|
|
2749
|
+
if (patterns.some((pattern) => typeof pattern != "string"))
|
|
2750
|
+
throw new TypeError("Patterns must be a string or an array of strings");
|
|
2751
|
+
}, normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
2752
|
+
let path2 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
2753
|
+
return nodePath.isAbsolute(path2) ? path2 : nodePath.join(cwd, path2);
|
|
2754
|
+
}, getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
2755
|
+
let extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
2756
|
+
return files ? files.map((file) => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`)) : [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
2757
|
+
}, directoryToGlob = async (directoryPaths, {
|
|
2758
|
+
cwd = process3.cwd(),
|
|
2759
|
+
files,
|
|
2760
|
+
extensions
|
|
2761
|
+
} = {}) => (await Promise.all(
|
|
2762
|
+
directoryPaths.map(async (directoryPath) => await isDirectory(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath)
|
|
2763
|
+
)).flat(), directoryToGlobSync = (directoryPaths, {
|
|
2764
|
+
cwd = process3.cwd(),
|
|
2765
|
+
files,
|
|
2766
|
+
extensions
|
|
2767
|
+
} = {}) => directoryPaths.flatMap((directoryPath) => isDirectorySync(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath), toPatternsArray = (patterns) => (patterns = [...new Set([patterns].flat())], assertPatternsInput(patterns), patterns), checkCwdOption = (cwd) => {
|
|
2768
|
+
if (!cwd)
|
|
2769
|
+
return;
|
|
2770
|
+
let stat;
|
|
2771
|
+
try {
|
|
2772
|
+
stat = fs3.statSync(cwd);
|
|
2773
|
+
} catch {
|
|
2774
|
+
return;
|
|
2775
|
+
}
|
|
2776
|
+
if (!stat.isDirectory())
|
|
2777
|
+
throw new Error("The `cwd` option must be a path to a directory");
|
|
2778
|
+
}, normalizeOptions2 = (options = {}) => (options = {
|
|
2779
|
+
...options,
|
|
2780
|
+
ignore: options.ignore ?? [],
|
|
2781
|
+
expandDirectories: options.expandDirectories ?? !0,
|
|
2782
|
+
cwd: toPath(options.cwd)
|
|
2783
|
+
}, checkCwdOption(options.cwd), options), normalizeArguments = (function_) => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)), normalizeArgumentsSync = (function_) => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)), getIgnoreFilesPatterns = (options) => {
|
|
2784
|
+
let { ignoreFiles, gitignore } = options, patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];
|
|
2785
|
+
return gitignore && patterns.push(GITIGNORE_FILES_PATTERN), patterns;
|
|
2786
|
+
}, getFilter = async (options) => {
|
|
2787
|
+
let ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
2788
|
+
return createFilterFunction(
|
|
2789
|
+
ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options)
|
|
2790
|
+
);
|
|
2791
|
+
}, getFilterSync = (options) => {
|
|
2792
|
+
let ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
2793
|
+
return createFilterFunction(
|
|
2794
|
+
ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options)
|
|
2795
|
+
);
|
|
2796
|
+
}, createFilterFunction = (isIgnored) => {
|
|
2797
|
+
let seen = /* @__PURE__ */ new Set();
|
|
2798
|
+
return (fastGlobResult) => {
|
|
2799
|
+
let pathKey = nodePath.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
2800
|
+
return seen.has(pathKey) || isIgnored && isIgnored(pathKey) ? !1 : (seen.add(pathKey), !0);
|
|
2801
|
+
};
|
|
2802
|
+
}, unionFastGlobResults = (results, filter) => results.flat().filter((fastGlobResult) => filter(fastGlobResult)), convertNegativePatterns = (patterns, options) => {
|
|
2803
|
+
let tasks = [];
|
|
2804
|
+
for (; patterns.length > 0; ) {
|
|
2805
|
+
let index = patterns.findIndex((pattern) => isNegativePattern(pattern));
|
|
2806
|
+
if (index === -1) {
|
|
2807
|
+
tasks.push({ patterns, options });
|
|
2808
|
+
break;
|
|
2809
|
+
}
|
|
2810
|
+
let ignorePattern = patterns[index].slice(1);
|
|
2811
|
+
for (let task of tasks)
|
|
2812
|
+
task.options.ignore.push(ignorePattern);
|
|
2813
|
+
index !== 0 && tasks.push({
|
|
2814
|
+
patterns: patterns.slice(0, index),
|
|
2815
|
+
options: {
|
|
2816
|
+
...options,
|
|
2817
|
+
ignore: [
|
|
2818
|
+
...options.ignore,
|
|
2819
|
+
ignorePattern
|
|
2820
|
+
]
|
|
2821
|
+
}
|
|
2822
|
+
}), patterns = patterns.slice(index + 1);
|
|
2823
|
+
}
|
|
2824
|
+
return tasks;
|
|
2825
|
+
}, normalizeExpandDirectoriesOption = (options, cwd) => ({
|
|
2826
|
+
...cwd ? { cwd } : {},
|
|
2827
|
+
...Array.isArray(options) ? { files: options } : options
|
|
2828
|
+
}), generateTasks = async (patterns, options) => {
|
|
2829
|
+
let globTasks = convertNegativePatterns(patterns, options), { cwd, expandDirectories } = options;
|
|
2830
|
+
if (!expandDirectories)
|
|
2831
|
+
return globTasks;
|
|
2832
|
+
let directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
2833
|
+
return Promise.all(
|
|
2834
|
+
globTasks.map(async (task) => {
|
|
2835
|
+
let { patterns: patterns2, options: options2 } = task;
|
|
2836
|
+
return [
|
|
2837
|
+
patterns2,
|
|
2838
|
+
options2.ignore
|
|
2839
|
+
] = await Promise.all([
|
|
2840
|
+
directoryToGlob(patterns2, directoryToGlobOptions),
|
|
2841
|
+
directoryToGlob(options2.ignore, { cwd })
|
|
2842
|
+
]), { patterns: patterns2, options: options2 };
|
|
2843
|
+
})
|
|
2844
|
+
);
|
|
2845
|
+
}, generateTasksSync = (patterns, options) => {
|
|
2846
|
+
let globTasks = convertNegativePatterns(patterns, options), { cwd, expandDirectories } = options;
|
|
2847
|
+
if (!expandDirectories)
|
|
2848
|
+
return globTasks;
|
|
2849
|
+
let directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
2850
|
+
return globTasks.map((task) => {
|
|
2851
|
+
let { patterns: patterns2, options: options2 } = task;
|
|
2852
|
+
return patterns2 = directoryToGlobSync(patterns2, directoryToGlobSyncOptions), options2.ignore = directoryToGlobSync(options2.ignore, { cwd }), { patterns: patterns2, options: options2 };
|
|
2853
|
+
});
|
|
2854
|
+
}, globby = normalizeArguments(async (patterns, options) => {
|
|
2855
|
+
let [
|
|
2856
|
+
tasks,
|
|
2857
|
+
filter
|
|
2858
|
+
] = await Promise.all([
|
|
2859
|
+
generateTasks(patterns, options),
|
|
2860
|
+
getFilter(options)
|
|
2861
|
+
]), results = await Promise.all(tasks.map((task) => (0, import_fast_glob2.default)(task.patterns, task.options)));
|
|
2862
|
+
return unionFastGlobResults(results, filter);
|
|
2863
|
+
}), globbySync = normalizeArgumentsSync((patterns, options) => {
|
|
2864
|
+
let tasks = generateTasksSync(patterns, options), filter = getFilterSync(options), results = tasks.map((task) => import_fast_glob2.default.sync(task.patterns, task.options));
|
|
2865
|
+
return unionFastGlobResults(results, filter);
|
|
2866
|
+
}), globbyStream = normalizeArgumentsSync((patterns, options) => {
|
|
2867
|
+
let tasks = generateTasksSync(patterns, options), filter = getFilterSync(options), streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options));
|
|
2868
|
+
return mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult));
|
|
2869
|
+
}), isDynamicPattern = normalizeArgumentsSync(
|
|
2870
|
+
(patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options))
|
|
2871
|
+
), generateGlobTasks = normalizeArguments(generateTasks), generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync), { convertPathToPattern } = import_fast_glob2.default;
|
|
2872
|
+
export {
|
|
2873
|
+
convertPathToPattern,
|
|
2874
|
+
generateGlobTasks,
|
|
2875
|
+
generateGlobTasksSync,
|
|
2876
|
+
globby,
|
|
2877
|
+
globbyStream,
|
|
2878
|
+
globbySync,
|
|
2879
|
+
isDynamicPattern,
|
|
2880
|
+
isGitIgnored,
|
|
2881
|
+
isGitIgnoredSync,
|
|
2882
|
+
isIgnoredByIgnoreFiles,
|
|
2883
|
+
isIgnoredByIgnoreFilesSync
|
|
2884
|
+
};
|