@aussieljk/forkbook 0.0.0-stage → 0.0.1-10
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 +59 -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/inter-LICENSE.txt +92 -0
- package/assets/browser/inter-variable-italic.woff2 +0 -0
- package/assets/browser/inter-variable.woff2 +0 -0
- package/assets/browser/mirror-ball.png +0 -0
- package/assets/builder-vite/iframe.html +83 -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 +85 -0
- package/dist/.build-stamp +0 -0
- package/dist/_browser-chunks/Color-X63I7FHI.js +1025 -0
- package/dist/_browser-chunks/DocsRenderer-JXND3PVQ.js +10 -0
- package/dist/_browser-chunks/WithTooltip-5S6F2P7L.js +198 -0
- package/dist/_browser-chunks/chunk-2JDQ35OA.js +247 -0
- package/dist/_browser-chunks/chunk-2JT76G3E.js +104 -0
- package/dist/_browser-chunks/chunk-3HM3VWJS.js +2604 -0
- package/dist/_browser-chunks/chunk-3M5T7BW4.js +43 -0
- package/dist/_browser-chunks/chunk-46Z7NGAS.js +41 -0
- package/dist/_browser-chunks/chunk-4ATQOMJB.js +30 -0
- package/dist/_browser-chunks/chunk-4KIQBRD2.js +17 -0
- package/dist/_browser-chunks/chunk-5H4KFI44.js +386 -0
- package/dist/_browser-chunks/chunk-5I7E4GMO.js +62 -0
- package/dist/_browser-chunks/chunk-5WMXI5GW.js +816 -0
- package/dist/_browser-chunks/chunk-5Z65SURM.js +108 -0
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/chunk-6ELMKWKX.js +22 -0
- package/dist/_browser-chunks/chunk-76222HQR.js +253 -0
- package/dist/_browser-chunks/chunk-7DQREF4S.js +218 -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-BNP234B4.js +80 -0
- package/dist/_browser-chunks/chunk-C5TKXHTM.js +82 -0
- package/dist/_browser-chunks/chunk-CNED6RYH.js +18 -0
- package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
- package/dist/_browser-chunks/chunk-DRQKCCAG.js +136 -0
- package/dist/_browser-chunks/chunk-DS2WQZGO.js +1956 -0
- package/dist/_browser-chunks/chunk-DYNTDJ3O.js +155 -0
- package/dist/_browser-chunks/chunk-ECQ75MKQ.js +0 -0
- package/dist/_browser-chunks/chunk-ENKK74N4.js +12 -0
- package/dist/_browser-chunks/chunk-EQKMUQF3.js +224 -0
- package/dist/_browser-chunks/chunk-FENFYI4X.js +698 -0
- package/dist/_browser-chunks/chunk-FRAOQJDI.js +95 -0
- package/dist/_browser-chunks/chunk-GNZY6LOW.js +10116 -0
- package/dist/_browser-chunks/chunk-GRO2ZYEJ.js +157 -0
- package/dist/_browser-chunks/chunk-I4ATZPNZ.js +34 -0
- package/dist/_browser-chunks/chunk-IE4ULIOQ.js +14 -0
- package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
- package/dist/_browser-chunks/chunk-IMSF75WX.js +42 -0
- package/dist/_browser-chunks/chunk-IWQGIXJS.js +14 -0
- package/dist/_browser-chunks/chunk-JPUOQJUI.js +8 -0
- package/dist/_browser-chunks/chunk-JWSKPMPC.js +73 -0
- package/dist/_browser-chunks/chunk-KBK7GKBN.js +35 -0
- package/dist/_browser-chunks/chunk-KYSD26D6.js +1966 -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-LTCXWKZO.js +2935 -0
- package/dist/_browser-chunks/chunk-LYYXDWR2.js +411 -0
- package/dist/_browser-chunks/chunk-MJIDTL3X.js +78 -0
- package/dist/_browser-chunks/chunk-MLBOOZL4.js +67 -0
- package/dist/_browser-chunks/chunk-N3NRW5XX.js +117 -0
- package/dist/_browser-chunks/chunk-N5WQGLI7.js +11 -0
- package/dist/_browser-chunks/chunk-NA4ITZTK.js +324 -0
- package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
- package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
- package/dist/_browser-chunks/chunk-NQUD4B7H.js +91 -0
- package/dist/_browser-chunks/chunk-NTUHL5NS.js +54 -0
- package/dist/_browser-chunks/chunk-NULBREPZ.js +43 -0
- package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
- package/dist/_browser-chunks/chunk-O24AZJZ7.js +56 -0
- package/dist/_browser-chunks/chunk-ONTSNQON.js +20 -0
- package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
- package/dist/_browser-chunks/chunk-OVH3USFB.js +20 -0
- package/dist/_browser-chunks/chunk-OZZPSYQR.js +14 -0
- package/dist/_browser-chunks/chunk-PJSMZ27A.js +13 -0
- package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -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-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-TTBPZQ24.js +3551 -0
- package/dist/_browser-chunks/chunk-UMDO3KB7.js +205 -0
- package/dist/_browser-chunks/chunk-UMGDO2ZM.js +169 -0
- package/dist/_browser-chunks/chunk-V5U45XXZ.js +24 -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-XKTORVEQ.js +255 -0
- package/dist/_browser-chunks/chunk-XTQCLWVH.js +1500 -0
- package/dist/_browser-chunks/chunk-YI2IBIQS.js +7 -0
- package/dist/_browser-chunks/chunk-ZEHRUHTA.js +6 -0
- package/dist/_browser-chunks/chunk-ZHKZKFY4.js +199 -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-PDBJ2EGV.js +282 -0
- package/dist/_node-chunks/builder-manager-VLL26RPG.js +1139 -0
- package/dist/_node-chunks/chunk-3CSGIJKG.js +499 -0
- package/dist/_node-chunks/chunk-3W4KR5GX.js +2609 -0
- package/dist/_node-chunks/chunk-5NRWU7S2.js +194 -0
- package/dist/_node-chunks/chunk-5SMIGUYF.js +102 -0
- package/dist/_node-chunks/chunk-63LPGIV4.js +1049 -0
- package/dist/_node-chunks/chunk-6DHTL5G2.js +35 -0
- package/dist/_node-chunks/chunk-6DRVJCYP.js +299 -0
- package/dist/_node-chunks/chunk-7CV4VEA2.js +620 -0
- package/dist/_node-chunks/chunk-7KD5DKGZ.js +79 -0
- package/dist/_node-chunks/chunk-7O2UIVID.js +82 -0
- package/dist/_node-chunks/chunk-7OY4VMAT.js +90 -0
- package/dist/_node-chunks/chunk-AAL6X7YG.js +1986 -0
- package/dist/_node-chunks/chunk-ACSO4HQP.js +32 -0
- package/dist/_node-chunks/chunk-BDU3ZUMK.js +98 -0
- package/dist/_node-chunks/chunk-BMJPOQ2S.js +11 -0
- package/dist/_node-chunks/chunk-BNEC3EBC.js +28 -0
- package/dist/_node-chunks/chunk-BPL3ERBH.js +347 -0
- package/dist/_node-chunks/chunk-BXDMSX3D.js +30600 -0
- package/dist/_node-chunks/chunk-C3PLG47Q.js +25 -0
- package/dist/_node-chunks/chunk-CEDR5CNM.js +74 -0
- package/dist/_node-chunks/chunk-CKE4R4NL.js +26 -0
- package/dist/_node-chunks/chunk-CSFNS7HA.js +21 -0
- package/dist/_node-chunks/chunk-CZ3V3HHK.js +223 -0
- package/dist/_node-chunks/chunk-DNV3LPV3.js +33 -0
- package/dist/_node-chunks/chunk-DPILYJH4.js +33 -0
- package/dist/_node-chunks/chunk-DQ44ZAEM.js +25 -0
- package/dist/_node-chunks/chunk-DR7NW2MI.js +104 -0
- package/dist/_node-chunks/chunk-DRCP3DQF.js +209 -0
- package/dist/_node-chunks/chunk-EBWZKN2I.js +1297 -0
- package/dist/_node-chunks/chunk-ECOW63CV.js +92 -0
- package/dist/_node-chunks/chunk-ENBDAHOV.js +18 -0
- package/dist/_node-chunks/chunk-FAEOR2AW.js +40 -0
- package/dist/_node-chunks/chunk-FERXOKZY.js +80 -0
- package/dist/_node-chunks/chunk-FJFB7TWU.js +495 -0
- package/dist/_node-chunks/chunk-FQGQ5KHN.js +63 -0
- package/dist/_node-chunks/chunk-FR2ZDWKJ.js +45 -0
- package/dist/_node-chunks/chunk-FRBE7ES4.js +59 -0
- package/dist/_node-chunks/chunk-FWAF5NBL.js +20 -0
- package/dist/_node-chunks/chunk-FXBZWUW3.js +7044 -0
- package/dist/_node-chunks/chunk-FZ453CHY.js +25 -0
- package/dist/_node-chunks/chunk-G2ZUFOHU.js +68 -0
- package/dist/_node-chunks/chunk-GBVWRZHP.js +23 -0
- package/dist/_node-chunks/chunk-GGE7TBVX.js +121 -0
- package/dist/_node-chunks/chunk-GJSYGBI5.js +47 -0
- package/dist/_node-chunks/chunk-GKHLTHYM.js +4744 -0
- package/dist/_node-chunks/chunk-GQYATLH6.js +3708 -0
- package/dist/_node-chunks/chunk-HCP5DG52.js +2743 -0
- package/dist/_node-chunks/chunk-HVOSLI2K.js +20 -0
- package/dist/_node-chunks/chunk-ID3WA6WR.js +171 -0
- package/dist/_node-chunks/chunk-IGOX6TUG.js +95 -0
- package/dist/_node-chunks/chunk-IL7YA7QJ.js +148 -0
- package/dist/_node-chunks/chunk-IUPE4SU2.js +688 -0
- package/dist/_node-chunks/chunk-JVWXCB3L.js +7179 -0
- package/dist/_node-chunks/chunk-K4O2ZAMU.js +57 -0
- package/dist/_node-chunks/chunk-KRWR44KT.js +25 -0
- package/dist/_node-chunks/chunk-KWNBN3DV.js +132 -0
- package/dist/_node-chunks/chunk-LG3NMXCM.js +20 -0
- package/dist/_node-chunks/chunk-LH5QBX2U.js +1001 -0
- package/dist/_node-chunks/chunk-LX2XSPPL.js +59 -0
- package/dist/_node-chunks/chunk-M4QNXI37.js +21 -0
- package/dist/_node-chunks/chunk-MBPHOLXB.js +1218 -0
- package/dist/_node-chunks/chunk-MIWBXEUH.js +26 -0
- package/dist/_node-chunks/chunk-MKUA4ZCG.js +1193 -0
- package/dist/_node-chunks/chunk-MQC7ZY6L.js +5468 -0
- package/dist/_node-chunks/chunk-MRCPS4S3.js +48 -0
- package/dist/_node-chunks/chunk-MY7UVHPL.js +153 -0
- package/dist/_node-chunks/chunk-ND323XCC.js +33 -0
- package/dist/_node-chunks/chunk-NGFFEW2B.js +972 -0
- package/dist/_node-chunks/chunk-OPG46TLN.js +1119 -0
- package/dist/_node-chunks/chunk-PEL4YXU6.js +19 -0
- package/dist/_node-chunks/chunk-QFXAGOIO.js +115 -0
- package/dist/_node-chunks/chunk-QGC3UWR5.js +110 -0
- package/dist/_node-chunks/chunk-QGVU7IFS.js +414 -0
- package/dist/_node-chunks/chunk-QOFBJXPH.js +1525 -0
- package/dist/_node-chunks/chunk-QVLHVO4X.js +532 -0
- package/dist/_node-chunks/chunk-R2ZCFA7I.js +60 -0
- package/dist/_node-chunks/chunk-RC4HPD5Q.js +26 -0
- package/dist/_node-chunks/chunk-RJXAXHDJ.js +415 -0
- package/dist/_node-chunks/chunk-SGEPJMTU.js +1094 -0
- package/dist/_node-chunks/chunk-SYUOBOB5.js +35 -0
- package/dist/_node-chunks/chunk-T5VZYRL2.js +40 -0
- package/dist/_node-chunks/chunk-T6IU66AM.js +69 -0
- package/dist/_node-chunks/chunk-THDTJJMO.js +611 -0
- package/dist/_node-chunks/chunk-TNFH4Y4G.js +1133 -0
- package/dist/_node-chunks/chunk-TY2ZY7AO.js +155 -0
- package/dist/_node-chunks/chunk-TZIT6SZP.js +49 -0
- package/dist/_node-chunks/chunk-VG2KFIOW.js +45 -0
- package/dist/_node-chunks/chunk-VSHYJR23.js +56 -0
- package/dist/_node-chunks/chunk-VUMGWJ6Y.js +844 -0
- package/dist/_node-chunks/chunk-WVRM6DQU.js +3767 -0
- package/dist/_node-chunks/chunk-YU5TVYPS.js +87 -0
- package/dist/_node-chunks/chunk-ZBWAA2EY.js +2106 -0
- package/dist/_node-chunks/chunk-ZD5TUA6I.js +20 -0
- package/dist/_node-chunks/chunk-ZFLK7MY5.js +144 -0
- package/dist/_node-chunks/dist-7OJKTBKL.js +27 -0
- package/dist/_node-chunks/dist-MWP6WLW4.js +16 -0
- package/dist/_node-chunks/local-runtime-V5YTRN24.js +78 -0
- package/dist/_node-chunks/mdx-plugin-CBOD52VP.js +7813 -0
- package/dist/_node-chunks/monorepo-GF6H53U4.js +121 -0
- package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-K4TTV2DQ.js +121 -0
- package/dist/_node-chunks/optimized-tests-KOTSVWTN.js +22 -0
- package/dist/_node-chunks/pattern-copy-play-M2QNC4IZ.js +807 -0
- package/dist/_node-chunks/postinstallAddon-WXKJL6DP.js +20 -0
- package/dist/_node-chunks/rehype-external-links-3IDE4CYH.js +121 -0
- package/dist/_node-chunks/rehype-slug-GKB3WS3U.js +52 -0
- package/dist/_node-chunks/relaxed-limits-C6QU365N.js +117 -0
- package/dist/_node-chunks/run-TMVS3KKA.js +4792 -0
- package/dist/_node-chunks/run-XWBUPXLN.js +103 -0
- package/dist/_node-chunks/session-id-VMH57SKN.js +23 -0
- package/dist/_node-chunks/setup-KEEJK4WI.js +278 -0
- package/dist/_node-chunks/vitest.config.4.template-74HEE4WJ.js +54 -0
- package/dist/actions/decorator.d.ts +7 -0
- package/dist/actions/decorator.js +44 -0
- package/dist/actions/index.d.ts +67 -0
- package/dist/actions/index.js +29 -0
- package/dist/addon-a11y/index.d.ts +52 -0
- package/dist/addon-a11y/index.js +17 -0
- package/dist/addon-a11y/manager.js +1432 -0
- package/dist/addon-a11y/preset.js +18 -0
- package/dist/addon-a11y/preview.d.ts +17 -0
- package/dist/addon-a11y/preview.js +16 -0
- package/dist/addon-docs/blocks.d.ts +1080 -0
- package/dist/addon-docs/blocks.js +2537 -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 +23 -0
- package/dist/addon-links/manager.js +14 -0
- package/dist/addon-links/preview.d.ts +6 -0
- package/dist/addon-links/preview.js +12 -0
- package/dist/addon-links/react/index.d.ts +25 -0
- package/dist/addon-links/react/index.js +55 -0
- package/dist/addon-mcp/preset.js +1353 -0
- package/dist/addon-mcp/preview.js +29 -0
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +1129 -0
- package/dist/addon-ondevice-actions/index.d.ts +4 -0
- package/dist/addon-ondevice-actions/index.js +11 -0
- package/dist/addon-ondevice-actions/register.js +11 -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 +942 -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 +1550 -0
- package/dist/babel/index.js +55 -0
- package/dist/backgrounds/index.d.ts +6 -0
- package/dist/backgrounds/index.js +15 -0
- package/dist/bin/core.js +1706 -0
- package/dist/bin/dispatcher.js +45 -0
- package/dist/bin/loader.js +116 -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-BCoJQE-f.d.ts +602 -0
- package/dist/chunk-BGhyFTJO.d.ts +115 -0
- package/dist/chunk-BGkgZp-H.d.ts +214 -0
- package/dist/chunk-BXLImeLy.d.ts +197 -0
- package/dist/chunk-Bpi2tz-6.d.ts +511 -0
- package/dist/chunk-C6PAgHLT.d.ts +12 -0
- package/dist/chunk-CFk6djyM.d.ts +55 -0
- package/dist/chunk-CNqjcOmK.d.ts +15 -0
- package/dist/chunk-CT2iXaHz.d.ts +179 -0
- package/dist/chunk-CV4-Z2pn.d.ts +30 -0
- package/dist/chunk-CYuvV2sR.d.ts +282 -0
- package/dist/chunk-Ct9xd6IM.d.ts +65 -0
- package/dist/chunk-D0NUmzXp.d.ts +253 -0
- package/dist/chunk-D7DwV41f.d.ts +3622 -0
- package/dist/chunk-DDd8BhTY.d.ts +79 -0
- package/dist/chunk-DROZ9oel.d.ts +669 -0
- package/dist/chunk-DaVb55-_.d.ts +124 -0
- package/dist/chunk-DgRNfmj_.d.ts +40 -0
- package/dist/chunk-DgzPaTw9.d.ts +61 -0
- package/dist/chunk-Dm-iHJ-s.d.ts +59 -0
- package/dist/chunk-DoIGKY33.d.ts +666 -0
- package/dist/chunk-Dr3R0DXk.d.ts +40 -0
- package/dist/chunk-Dw_4ad2Y.d.ts +34 -0
- package/dist/chunk-Fg1Fm__9.d.ts +13091 -0
- package/dist/chunk-FjDVzZTj.d.ts +62 -0
- package/dist/chunk-Susgfkap.d.ts +20 -0
- package/dist/chunk-XP8oHzpE.d.ts +6 -0
- package/dist/chunk-pcFXCimE.d.ts +741 -0
- package/dist/cli/index.d.ts +321 -0
- package/dist/cli/index.js +703 -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 +65 -0
- package/dist/common/index.d.ts +1091 -0
- package/dist/common/index.js +358 -0
- package/dist/components/index.d.ts +1727 -0
- package/dist/components/index.js +7982 -0
- package/dist/core-events/index.d.ts +156 -0
- package/dist/core-events/index.js +138 -0
- package/dist/core-server/index.d.ts +2200 -0
- package/dist/core-server/index.js +4577 -0
- package/dist/core-server/presets/common-manager.js +3744 -0
- package/dist/core-server/presets/common-override-preset.js +83 -0
- package/dist/core-server/presets/common-preset.js +2194 -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 +2077 -0
- package/dist/csf-tools/index.d.ts +1161 -0
- package/dist/csf-tools/index.js +738 -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 +2597 -0
- package/dist/manager/_manager-chunks/globals-runtime-BKQscPdC.js +5661 -0
- package/dist/manager/_manager-chunks/globals-runtime-BY3epqww.js +1807 -0
- package/dist/manager/_manager-chunks/globals-runtime-BdGkqNEt.js +45 -0
- package/dist/manager/_manager-chunks/globals-runtime-Bj5KDUJi.js +8935 -0
- package/dist/manager/_manager-chunks/globals-runtime-Bs75QQ_I.js +9987 -0
- package/dist/manager/_manager-chunks/globals-runtime-BweHuXkK.js +6838 -0
- package/dist/manager/_manager-chunks/globals-runtime-CA8AuIRT.js +7617 -0
- package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
- package/dist/manager/_manager-chunks/globals-runtime-CJL1dQtn.js +4674 -0
- package/dist/manager/_manager-chunks/globals-runtime-CfurFwS_.js +121 -0
- package/dist/manager/_manager-chunks/globals-runtime-CvIgTRVu.js +1190 -0
- package/dist/manager/_manager-chunks/globals-runtime-DBba3I9c.js +5307 -0
- package/dist/manager/_manager-chunks/globals-runtime-DvV_TF3-.js +12214 -0
- package/dist/manager/_manager-chunks/globals-runtime-DwFqpqya.js +722 -0
- package/dist/manager/_manager-chunks/globals-runtime-NwJK8t0T.js +9274 -0
- package/dist/manager/_manager-chunks/globals-runtime-WZKaeKm9.js +4091 -0
- package/dist/manager/_manager-chunks/globals-runtime-wjkxyMn0.js +5283 -0
- package/dist/manager/_manager-chunks/runtime-5B2mWjEm.js +294 -0
- package/dist/manager/_manager-chunks/runtime-5o_11Jae.js +78 -0
- package/dist/manager/_manager-chunks/runtime-B_nqedQW.js +197 -0
- package/dist/manager/_manager-chunks/runtime-BdGkqNEt.js +45 -0
- package/dist/manager/_manager-chunks/runtime-Bs3bEhuy.js +1232 -0
- package/dist/manager/_manager-chunks/runtime-CBQsKmch.js +2351 -0
- package/dist/manager/_manager-chunks/runtime-DG61zYUm.js +1158 -0
- package/dist/manager/_manager-chunks/runtime-DtCVCy4G.js +6841 -0
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/runtime-eBAgOym6.js +9010 -0
- package/dist/manager/_manager-chunks/runtime-j9yqh0tr.js +1023 -0
- package/dist/manager/_manager-chunks/runtime-jj8qYc2n.js +3488 -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 +3247 -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 +526 -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 +59 -0
- package/dist/nextjs-vite/node/index.d.ts +6 -0
- package/dist/nextjs-vite/node/index.js +20 -0
- package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
- package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
- package/dist/nextjs-vite/preset.js +727 -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 +27 -0
- package/dist/nextjs-vite-plugin/index.js +908 -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 +488 -0
- package/dist/node-logger/index.js +41 -0
- package/dist/oxc-parser/index.d.ts +99 -0
- package/dist/oxc-parser/index.js +273 -0
- package/dist/oxc-parser/worker.js +37 -0
- package/dist/preview/_chunks/runtime-BJwGQok8.js +3873 -0
- package/dist/preview/_chunks/runtime-BPwAnlRx.js +10411 -0
- package/dist/preview/_chunks/runtime-BUnOhg9h.js +6838 -0
- package/dist/preview/_chunks/runtime-BZ4pNS3g.js +284 -0
- package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
- package/dist/preview/_chunks/runtime-BdGkqNEt.js +45 -0
- package/dist/preview/_chunks/runtime-BgPhfM5P.js +3681 -0
- package/dist/preview/_chunks/runtime-BhSZ1Mwt.js +5262 -0
- package/dist/preview/_chunks/runtime-BsMjBzuq.js +53 -0
- package/dist/preview/_chunks/runtime-C1jgT6tJ.js +4091 -0
- package/dist/preview/_chunks/runtime-CkOhMcXf.js +387 -0
- package/dist/preview/_chunks/runtime-WapFVPAh.js +8484 -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 +149 -0
- package/dist/preview-errors.d.ts +186 -0
- package/dist/preview-errors.js +56 -0
- package/dist/react/docgen/docgen-worker.js +37 -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 +22 -0
- package/dist/react/index.d.ts +119 -0
- package/dist/react/index.js +28 -0
- package/dist/react/preset.js +300 -0
- package/dist/react/preview.d.ts +2 -0
- package/dist/react/preview.js +12 -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 +1362 -0
- package/dist/react-native/metro/node.d.ts +83 -0
- package/dist/react-native/metro/node.js +22 -0
- package/dist/react-native/metro/withForkbook.d.ts +2269 -0
- package/dist/react-native/metro/withForkbook.js +139 -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 +119 -0
- package/dist/react-native-theming/index.js +316 -0
- package/dist/react-native-ui/index.d.ts +129 -0
- package/dist/react-native-ui/index.js +1448 -0
- package/dist/react-native-ui-common/index.d.ts +229 -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 +209 -0
- package/dist/router/index.js +1259 -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 +101 -0
- package/dist/test/index.d.ts +158 -0
- package/dist/test/index.js +19656 -0
- package/dist/theming/create.d.ts +15 -0
- package/dist/theming/create.js +12 -0
- package/dist/theming/index.d.ts +54 -0
- package/dist/theming/index.js +536 -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 +1030 -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,1119 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_upaeg5sjpn from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_upaeg5sjpn from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_upaeg5sjpn from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_upaeg5sjpn.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_upaeg5sjpn.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_upaeg5sjpn.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
__commonJS
|
|
14
|
+
} from "./chunk-FQGQ5KHN.js";
|
|
15
|
+
|
|
16
|
+
// ../../node_modules/picomatch/lib/constants.js
|
|
17
|
+
var require_constants = __commonJS({
|
|
18
|
+
"../../node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
19
|
+
"use strict";
|
|
20
|
+
var WIN_NO_SLASH = "[^\\\\/]", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = "(?:\\/|$)", START_ANCHOR = "(?:^|\\/)", DOTS_SLASH = `\\.{1,2}${END_ANCHOR}`, NO_DOT = "(?!\\.)", NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!\\.{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = "[^.\\/]", STAR = `${QMARK}*?`, SEP = "/", POSIX_CHARS = {
|
|
21
|
+
DOT_LITERAL: "\\.",
|
|
22
|
+
PLUS_LITERAL: "\\+",
|
|
23
|
+
QMARK_LITERAL: "\\?",
|
|
24
|
+
SLASH_LITERAL: "\\/",
|
|
25
|
+
ONE_CHAR,
|
|
26
|
+
QMARK,
|
|
27
|
+
END_ANCHOR,
|
|
28
|
+
DOTS_SLASH,
|
|
29
|
+
NO_DOT,
|
|
30
|
+
NO_DOTS,
|
|
31
|
+
NO_DOT_SLASH,
|
|
32
|
+
NO_DOTS_SLASH,
|
|
33
|
+
QMARK_NO_DOT,
|
|
34
|
+
STAR,
|
|
35
|
+
START_ANCHOR,
|
|
36
|
+
SEP
|
|
37
|
+
}, WINDOWS_CHARS = {
|
|
38
|
+
...POSIX_CHARS,
|
|
39
|
+
SLASH_LITERAL: "[\\\\/]",
|
|
40
|
+
QMARK: WIN_NO_SLASH,
|
|
41
|
+
STAR: `${WIN_NO_SLASH}*?`,
|
|
42
|
+
DOTS_SLASH: "\\.{1,2}(?:[\\\\/]|$)",
|
|
43
|
+
NO_DOT: "(?!\\.)",
|
|
44
|
+
NO_DOTS: "(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",
|
|
45
|
+
NO_DOT_SLASH: "(?!\\.{0,1}(?:[\\\\/]|$))",
|
|
46
|
+
NO_DOTS_SLASH: "(?!\\.{1,2}(?:[\\\\/]|$))",
|
|
47
|
+
QMARK_NO_DOT: "[^.\\\\/]",
|
|
48
|
+
START_ANCHOR: "(?:^|[\\\\/])",
|
|
49
|
+
END_ANCHOR: "(?:[\\\\/]|$)",
|
|
50
|
+
SEP: "\\"
|
|
51
|
+
}, POSIX_REGEX_SOURCE = {
|
|
52
|
+
__proto__: null,
|
|
53
|
+
alnum: "a-zA-Z0-9",
|
|
54
|
+
alpha: "a-zA-Z",
|
|
55
|
+
ascii: "\\x00-\\x7F",
|
|
56
|
+
blank: " \\t",
|
|
57
|
+
cntrl: "\\x00-\\x1F\\x7F",
|
|
58
|
+
digit: "0-9",
|
|
59
|
+
graph: "\\x21-\\x7E",
|
|
60
|
+
lower: "a-z",
|
|
61
|
+
print: "\\x20-\\x7E ",
|
|
62
|
+
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
63
|
+
space: " \\t\\r\\n\\v\\f",
|
|
64
|
+
upper: "A-Z",
|
|
65
|
+
word: "A-Za-z0-9_",
|
|
66
|
+
xdigit: "A-Fa-f0-9"
|
|
67
|
+
};
|
|
68
|
+
module.exports = {
|
|
69
|
+
DEFAULT_MAX_EXTGLOB_RECURSION: 0,
|
|
70
|
+
MAX_LENGTH: 1024 * 64,
|
|
71
|
+
POSIX_REGEX_SOURCE,
|
|
72
|
+
// regular expressions
|
|
73
|
+
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
74
|
+
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
75
|
+
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
76
|
+
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
77
|
+
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
78
|
+
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
79
|
+
// Replace globs with equivalent patterns to reduce parsing time.
|
|
80
|
+
REPLACEMENTS: {
|
|
81
|
+
__proto__: null,
|
|
82
|
+
"***": "*",
|
|
83
|
+
"**/**": "**",
|
|
84
|
+
"**/**/**": "**"
|
|
85
|
+
},
|
|
86
|
+
// Digits
|
|
87
|
+
CHAR_0: 48,
|
|
88
|
+
/* 0 */
|
|
89
|
+
CHAR_9: 57,
|
|
90
|
+
/* 9 */
|
|
91
|
+
// Alphabet chars.
|
|
92
|
+
CHAR_UPPERCASE_A: 65,
|
|
93
|
+
/* A */
|
|
94
|
+
CHAR_LOWERCASE_A: 97,
|
|
95
|
+
/* a */
|
|
96
|
+
CHAR_UPPERCASE_Z: 90,
|
|
97
|
+
/* Z */
|
|
98
|
+
CHAR_LOWERCASE_Z: 122,
|
|
99
|
+
/* z */
|
|
100
|
+
CHAR_LEFT_PARENTHESES: 40,
|
|
101
|
+
/* ( */
|
|
102
|
+
CHAR_RIGHT_PARENTHESES: 41,
|
|
103
|
+
/* ) */
|
|
104
|
+
CHAR_ASTERISK: 42,
|
|
105
|
+
/* * */
|
|
106
|
+
// Non-alphabetic chars.
|
|
107
|
+
CHAR_AMPERSAND: 38,
|
|
108
|
+
/* & */
|
|
109
|
+
CHAR_AT: 64,
|
|
110
|
+
/* @ */
|
|
111
|
+
CHAR_BACKWARD_SLASH: 92,
|
|
112
|
+
/* \ */
|
|
113
|
+
CHAR_CARRIAGE_RETURN: 13,
|
|
114
|
+
/* \r */
|
|
115
|
+
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
116
|
+
/* ^ */
|
|
117
|
+
CHAR_COLON: 58,
|
|
118
|
+
/* : */
|
|
119
|
+
CHAR_COMMA: 44,
|
|
120
|
+
/* , */
|
|
121
|
+
CHAR_DOT: 46,
|
|
122
|
+
/* . */
|
|
123
|
+
CHAR_DOUBLE_QUOTE: 34,
|
|
124
|
+
/* " */
|
|
125
|
+
CHAR_EQUAL: 61,
|
|
126
|
+
/* = */
|
|
127
|
+
CHAR_EXCLAMATION_MARK: 33,
|
|
128
|
+
/* ! */
|
|
129
|
+
CHAR_FORM_FEED: 12,
|
|
130
|
+
/* \f */
|
|
131
|
+
CHAR_FORWARD_SLASH: 47,
|
|
132
|
+
/* / */
|
|
133
|
+
CHAR_GRAVE_ACCENT: 96,
|
|
134
|
+
/* ` */
|
|
135
|
+
CHAR_HASH: 35,
|
|
136
|
+
/* # */
|
|
137
|
+
CHAR_HYPHEN_MINUS: 45,
|
|
138
|
+
/* - */
|
|
139
|
+
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
140
|
+
/* < */
|
|
141
|
+
CHAR_LEFT_CURLY_BRACE: 123,
|
|
142
|
+
/* { */
|
|
143
|
+
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
144
|
+
/* [ */
|
|
145
|
+
CHAR_LINE_FEED: 10,
|
|
146
|
+
/* \n */
|
|
147
|
+
CHAR_NO_BREAK_SPACE: 160,
|
|
148
|
+
/* \u00A0 */
|
|
149
|
+
CHAR_PERCENT: 37,
|
|
150
|
+
/* % */
|
|
151
|
+
CHAR_PLUS: 43,
|
|
152
|
+
/* + */
|
|
153
|
+
CHAR_QUESTION_MARK: 63,
|
|
154
|
+
/* ? */
|
|
155
|
+
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
156
|
+
/* > */
|
|
157
|
+
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
158
|
+
/* } */
|
|
159
|
+
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
160
|
+
/* ] */
|
|
161
|
+
CHAR_SEMICOLON: 59,
|
|
162
|
+
/* ; */
|
|
163
|
+
CHAR_SINGLE_QUOTE: 39,
|
|
164
|
+
/* ' */
|
|
165
|
+
CHAR_SPACE: 32,
|
|
166
|
+
/* */
|
|
167
|
+
CHAR_TAB: 9,
|
|
168
|
+
/* \t */
|
|
169
|
+
CHAR_UNDERSCORE: 95,
|
|
170
|
+
/* _ */
|
|
171
|
+
CHAR_VERTICAL_LINE: 124,
|
|
172
|
+
/* | */
|
|
173
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
174
|
+
/* \uFEFF */
|
|
175
|
+
/**
|
|
176
|
+
* Create EXTGLOB_CHARS
|
|
177
|
+
*/
|
|
178
|
+
extglobChars(chars) {
|
|
179
|
+
return {
|
|
180
|
+
"!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
|
|
181
|
+
"?": { type: "qmark", open: "(?:", close: ")?" },
|
|
182
|
+
"+": { type: "plus", open: "(?:", close: ")+" },
|
|
183
|
+
"*": { type: "star", open: "(?:", close: ")*" },
|
|
184
|
+
"@": { type: "at", open: "(?:", close: ")" }
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
/**
|
|
188
|
+
* Create GLOB_CHARS
|
|
189
|
+
*/
|
|
190
|
+
globChars(win32) {
|
|
191
|
+
return win32 === !0 ? WINDOWS_CHARS : POSIX_CHARS;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// ../../node_modules/picomatch/lib/utils.js
|
|
198
|
+
var require_utils = __commonJS({
|
|
199
|
+
"../../node_modules/picomatch/lib/utils.js"(exports) {
|
|
200
|
+
"use strict";
|
|
201
|
+
var {
|
|
202
|
+
REGEX_BACKSLASH,
|
|
203
|
+
REGEX_REMOVE_BACKSLASH,
|
|
204
|
+
REGEX_SPECIAL_CHARS,
|
|
205
|
+
REGEX_SPECIAL_CHARS_GLOBAL
|
|
206
|
+
} = require_constants();
|
|
207
|
+
exports.isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val);
|
|
208
|
+
exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
|
|
209
|
+
exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
|
|
210
|
+
exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
|
|
211
|
+
exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
212
|
+
exports.isWindows = () => {
|
|
213
|
+
if (typeof navigator < "u" && navigator.platform) {
|
|
214
|
+
let platform = navigator.platform.toLowerCase();
|
|
215
|
+
return platform === "win32" || platform === "windows";
|
|
216
|
+
}
|
|
217
|
+
return typeof process < "u" && process.platform ? process.platform === "win32" : !1;
|
|
218
|
+
};
|
|
219
|
+
exports.removeBackslashes = (str) => str.replace(REGEX_REMOVE_BACKSLASH, (match) => match === "\\" ? "" : match);
|
|
220
|
+
exports.escapeLast = (input, char, lastIdx) => {
|
|
221
|
+
let idx = input.lastIndexOf(char, lastIdx);
|
|
222
|
+
return idx === -1 ? input : input[idx - 1] === "\\" ? exports.escapeLast(input, char, idx - 1) : `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
223
|
+
};
|
|
224
|
+
exports.removePrefix = (input, state = {}) => {
|
|
225
|
+
let output = input;
|
|
226
|
+
return output.startsWith("./") && (output = output.slice(2), state.prefix = "./"), output;
|
|
227
|
+
};
|
|
228
|
+
exports.wrapOutput = (input, state = {}, options = {}) => {
|
|
229
|
+
let prepend = options.contains ? "" : "^", append = options.contains ? "" : "$", output = `${prepend}(?:${input})${append}`;
|
|
230
|
+
return state.negated === !0 && (output = `(?:^(?!${output}).*$)`), output;
|
|
231
|
+
};
|
|
232
|
+
exports.basename = (path, { windows } = {}) => {
|
|
233
|
+
let segs = path.split(windows ? /[\\/]/ : "/"), last = segs[segs.length - 1];
|
|
234
|
+
return last === "" ? segs[segs.length - 2] : last;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// ../../node_modules/picomatch/lib/scan.js
|
|
240
|
+
var require_scan = __commonJS({
|
|
241
|
+
"../../node_modules/picomatch/lib/scan.js"(exports, module) {
|
|
242
|
+
"use strict";
|
|
243
|
+
var utils = require_utils(), {
|
|
244
|
+
CHAR_ASTERISK,
|
|
245
|
+
/* * */
|
|
246
|
+
CHAR_AT,
|
|
247
|
+
/* @ */
|
|
248
|
+
CHAR_BACKWARD_SLASH,
|
|
249
|
+
/* \ */
|
|
250
|
+
CHAR_COMMA,
|
|
251
|
+
/* , */
|
|
252
|
+
CHAR_DOT,
|
|
253
|
+
/* . */
|
|
254
|
+
CHAR_EXCLAMATION_MARK,
|
|
255
|
+
/* ! */
|
|
256
|
+
CHAR_FORWARD_SLASH,
|
|
257
|
+
/* / */
|
|
258
|
+
CHAR_LEFT_CURLY_BRACE,
|
|
259
|
+
/* { */
|
|
260
|
+
CHAR_LEFT_PARENTHESES,
|
|
261
|
+
/* ( */
|
|
262
|
+
CHAR_LEFT_SQUARE_BRACKET,
|
|
263
|
+
/* [ */
|
|
264
|
+
CHAR_PLUS,
|
|
265
|
+
/* + */
|
|
266
|
+
CHAR_QUESTION_MARK,
|
|
267
|
+
/* ? */
|
|
268
|
+
CHAR_RIGHT_CURLY_BRACE,
|
|
269
|
+
/* } */
|
|
270
|
+
CHAR_RIGHT_PARENTHESES,
|
|
271
|
+
/* ) */
|
|
272
|
+
CHAR_RIGHT_SQUARE_BRACKET
|
|
273
|
+
/* ] */
|
|
274
|
+
} = require_constants(), isPathSeparator = (code) => code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH, depth = (token) => {
|
|
275
|
+
token.isPrefix !== !0 && (token.depth = token.isGlobstar ? 1 / 0 : 1);
|
|
276
|
+
}, scan = (input, options) => {
|
|
277
|
+
let opts = options || {}, length = input.length - 1, scanToEnd = opts.parts === !0 || opts.tokens === !0 || opts.scanToEnd === !0, slashes = [], tokens = [], parts = [], str = input, index = -1, start = 0, lastIndex = 0, isBrace = !1, isBracket = !1, isGlob = !1, isExtglob = !1, isGlobstar = !1, braceEscaped = !1, backslashes = !1, negated = !1, negatedExtglob = !1, finished = !1, braces = 0, prev, code, token = { value: "", depth: 0, isGlob: !1 }, eos = () => index >= length, peek = () => str.charCodeAt(index + 1), advance = () => (prev = code, str.charCodeAt(++index));
|
|
278
|
+
for (; index < length; ) {
|
|
279
|
+
code = advance();
|
|
280
|
+
let next;
|
|
281
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
282
|
+
backslashes = token.backslashes = !0, code = advance(), code === CHAR_LEFT_CURLY_BRACE && (braceEscaped = !0);
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
if (braceEscaped === !0 || code === CHAR_LEFT_CURLY_BRACE) {
|
|
286
|
+
for (braces++; eos() !== !0 && (code = advance()); ) {
|
|
287
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
288
|
+
backslashes = token.backslashes = !0, advance();
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
if (code === CHAR_LEFT_CURLY_BRACE) {
|
|
292
|
+
braces++;
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
if (braceEscaped !== !0 && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
|
|
296
|
+
if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
|
|
297
|
+
continue;
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
if (braceEscaped !== !0 && code === CHAR_COMMA) {
|
|
301
|
+
if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
|
|
302
|
+
continue;
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
if (code === CHAR_RIGHT_CURLY_BRACE && (braces--, braces === 0)) {
|
|
306
|
+
braceEscaped = !1, isBrace = token.isBrace = !0, finished = !0;
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (scanToEnd === !0)
|
|
311
|
+
continue;
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
if (code === CHAR_FORWARD_SLASH) {
|
|
315
|
+
if (slashes.push(index), tokens.push(token), token = { value: "", depth: 0, isGlob: !1 }, finished === !0) continue;
|
|
316
|
+
if (prev === CHAR_DOT && index === start + 1) {
|
|
317
|
+
start += 2;
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
lastIndex = index + 1;
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
if (opts.noext !== !0 && (code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === !0 && peek() === CHAR_LEFT_PARENTHESES) {
|
|
324
|
+
if (isGlob = token.isGlob = !0, isExtglob = token.isExtglob = !0, finished = !0, code === CHAR_EXCLAMATION_MARK && index === start && (negatedExtglob = !0), scanToEnd === !0) {
|
|
325
|
+
let parens = 0;
|
|
326
|
+
for (; eos() !== !0 && (code = advance()); ) {
|
|
327
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
328
|
+
backslashes = token.backslashes = !0, advance();
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
if (code === CHAR_LEFT_PARENTHESES) {
|
|
332
|
+
parens++;
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
|
|
336
|
+
finished = !0;
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
if (code === CHAR_ASTERISK) {
|
|
345
|
+
if (prev === CHAR_ASTERISK && (isGlobstar = token.isGlobstar = !0), isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
|
|
346
|
+
continue;
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
if (code === CHAR_QUESTION_MARK) {
|
|
350
|
+
if (isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
|
|
351
|
+
continue;
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
if (code === CHAR_LEFT_SQUARE_BRACKET) {
|
|
355
|
+
for (; eos() !== !0 && (next = advance()); ) {
|
|
356
|
+
if (next === CHAR_BACKWARD_SLASH) {
|
|
357
|
+
backslashes = token.backslashes = !0, advance();
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
361
|
+
isBracket = token.isBracket = !0, isGlob = token.isGlob = !0, finished = !0;
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
if (scanToEnd === !0)
|
|
366
|
+
continue;
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
if (opts.nonegate !== !0 && code === CHAR_EXCLAMATION_MARK && index === start) {
|
|
370
|
+
negated = token.negated = !0, start++;
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
if (opts.noparen !== !0 && code === CHAR_LEFT_PARENTHESES) {
|
|
374
|
+
if (isGlob = token.isGlob = !0, scanToEnd === !0) {
|
|
375
|
+
let parens = 1;
|
|
376
|
+
for (; eos() !== !0 && (code = advance()); ) {
|
|
377
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
378
|
+
backslashes = token.backslashes = !0, advance();
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
if (code === CHAR_LEFT_PARENTHESES) {
|
|
382
|
+
parens++;
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
|
|
386
|
+
finished = !0;
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
if (isGlob === !0) {
|
|
395
|
+
if (finished = !0, scanToEnd === !0)
|
|
396
|
+
continue;
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
opts.noext === !0 && (isExtglob = !1, isGlob = !1);
|
|
401
|
+
let base = str, prefix = "", glob = "";
|
|
402
|
+
start > 0 && (prefix = str.slice(0, start), str = str.slice(start), lastIndex -= start), base && isGlob === !0 && lastIndex > 0 ? (base = str.slice(0, lastIndex), glob = str.slice(lastIndex)) : isGlob === !0 ? (base = "", glob = str) : base = str, base && base !== "" && base !== "/" && base !== str && isPathSeparator(base.charCodeAt(base.length - 1)) && (base = base.slice(0, -1)), opts.unescape === !0 && (glob && (glob = utils.removeBackslashes(glob)), base && backslashes === !0 && (base = utils.removeBackslashes(base)));
|
|
403
|
+
let state = {
|
|
404
|
+
prefix,
|
|
405
|
+
input,
|
|
406
|
+
start,
|
|
407
|
+
base,
|
|
408
|
+
glob,
|
|
409
|
+
isBrace,
|
|
410
|
+
isBracket,
|
|
411
|
+
isGlob,
|
|
412
|
+
isExtglob,
|
|
413
|
+
isGlobstar,
|
|
414
|
+
negated,
|
|
415
|
+
negatedExtglob
|
|
416
|
+
};
|
|
417
|
+
if (opts.tokens === !0 && (state.maxDepth = 0, isPathSeparator(code) || tokens.push(token), state.tokens = tokens), opts.parts === !0 || opts.tokens === !0) {
|
|
418
|
+
let prevIndex;
|
|
419
|
+
for (let idx = 0; idx < slashes.length; idx++) {
|
|
420
|
+
let n2 = prevIndex !== void 0 ? prevIndex + 1 : start, i = slashes[idx], value2 = input.slice(n2, i);
|
|
421
|
+
opts.tokens && (idx === 0 && start !== 0 ? (tokens[idx].isPrefix = !0, tokens[idx].value = prefix) : tokens[idx].value = value2, depth(tokens[idx]), state.maxDepth += tokens[idx].depth), i >= start && (parts.push(value2), prevIndex = i);
|
|
422
|
+
}
|
|
423
|
+
let n = prevIndex !== void 0 ? prevIndex + 1 : start, value = input.slice(n);
|
|
424
|
+
parts.push(value), opts.tokens && prevIndex && prevIndex + 1 < input.length && (tokens[tokens.length - 1].value = value, depth(tokens[tokens.length - 1]), state.maxDepth += tokens[tokens.length - 1].depth), state.slashes = slashes, state.parts = parts;
|
|
425
|
+
}
|
|
426
|
+
return state;
|
|
427
|
+
};
|
|
428
|
+
module.exports = scan;
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
// ../../node_modules/picomatch/lib/parse.js
|
|
433
|
+
var require_parse = __commonJS({
|
|
434
|
+
"../../node_modules/picomatch/lib/parse.js"(exports, module) {
|
|
435
|
+
"use strict";
|
|
436
|
+
var constants = require_constants(), utils = require_utils(), {
|
|
437
|
+
MAX_LENGTH,
|
|
438
|
+
POSIX_REGEX_SOURCE,
|
|
439
|
+
REGEX_NON_SPECIAL_CHARS,
|
|
440
|
+
REGEX_SPECIAL_CHARS_BACKREF,
|
|
441
|
+
REPLACEMENTS
|
|
442
|
+
} = constants, expandRange = (args, options) => {
|
|
443
|
+
if (typeof options.expandRange == "function")
|
|
444
|
+
return options.expandRange(...args, options);
|
|
445
|
+
args.sort();
|
|
446
|
+
let value = `[${args.join("-")}]`;
|
|
447
|
+
try {
|
|
448
|
+
new RegExp(value);
|
|
449
|
+
} catch {
|
|
450
|
+
return args.map((v) => utils.escapeRegex(v)).join("..");
|
|
451
|
+
}
|
|
452
|
+
return value;
|
|
453
|
+
}, syntaxError = (type, char) => `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`, splitTopLevel = (input) => {
|
|
454
|
+
let parts = [], bracket = 0, paren = 0, quote = 0, value = "", escaped = !1;
|
|
455
|
+
for (let ch of input) {
|
|
456
|
+
if (escaped === !0) {
|
|
457
|
+
value += ch, escaped = !1;
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
if (ch === "\\") {
|
|
461
|
+
value += ch, escaped = !0;
|
|
462
|
+
continue;
|
|
463
|
+
}
|
|
464
|
+
if (ch === '"') {
|
|
465
|
+
quote = quote === 1 ? 0 : 1, value += ch;
|
|
466
|
+
continue;
|
|
467
|
+
}
|
|
468
|
+
if (quote === 0) {
|
|
469
|
+
if (ch === "[")
|
|
470
|
+
bracket++;
|
|
471
|
+
else if (ch === "]" && bracket > 0)
|
|
472
|
+
bracket--;
|
|
473
|
+
else if (bracket === 0) {
|
|
474
|
+
if (ch === "(")
|
|
475
|
+
paren++;
|
|
476
|
+
else if (ch === ")" && paren > 0)
|
|
477
|
+
paren--;
|
|
478
|
+
else if (ch === "|" && paren === 0) {
|
|
479
|
+
parts.push(value), value = "";
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
value += ch;
|
|
485
|
+
}
|
|
486
|
+
return parts.push(value), parts;
|
|
487
|
+
}, isPlainBranch = (branch) => {
|
|
488
|
+
let escaped = !1;
|
|
489
|
+
for (let ch of branch) {
|
|
490
|
+
if (escaped === !0) {
|
|
491
|
+
escaped = !1;
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
if (ch === "\\") {
|
|
495
|
+
escaped = !0;
|
|
496
|
+
continue;
|
|
497
|
+
}
|
|
498
|
+
if (/[?*+@!()[\]{}]/.test(ch))
|
|
499
|
+
return !1;
|
|
500
|
+
}
|
|
501
|
+
return !0;
|
|
502
|
+
}, normalizeSimpleBranch = (branch) => {
|
|
503
|
+
let value = branch.trim(), changed = !0;
|
|
504
|
+
for (; changed === !0; )
|
|
505
|
+
changed = !1, /^@\([^\\()[\]{}|]+\)$/.test(value) && (value = value.slice(2, -1), changed = !0);
|
|
506
|
+
if (isPlainBranch(value))
|
|
507
|
+
return value.replace(/\\(.)/g, "$1");
|
|
508
|
+
}, hasRepeatedCharPrefixOverlap = (branches) => {
|
|
509
|
+
let values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
510
|
+
for (let i = 0; i < values.length; i++)
|
|
511
|
+
for (let j = i + 1; j < values.length; j++) {
|
|
512
|
+
let a = values[i], b = values[j], char = a[0];
|
|
513
|
+
if (!(!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) && (a === b || a.startsWith(b) || b.startsWith(a)))
|
|
514
|
+
return !0;
|
|
515
|
+
}
|
|
516
|
+
return !1;
|
|
517
|
+
}, parseRepeatedExtglob = (pattern, requireEnd = !0) => {
|
|
518
|
+
if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(")
|
|
519
|
+
return;
|
|
520
|
+
let bracket = 0, paren = 0, quote = 0, escaped = !1;
|
|
521
|
+
for (let i = 1; i < pattern.length; i++) {
|
|
522
|
+
let ch = pattern[i];
|
|
523
|
+
if (escaped === !0) {
|
|
524
|
+
escaped = !1;
|
|
525
|
+
continue;
|
|
526
|
+
}
|
|
527
|
+
if (ch === "\\") {
|
|
528
|
+
escaped = !0;
|
|
529
|
+
continue;
|
|
530
|
+
}
|
|
531
|
+
if (ch === '"') {
|
|
532
|
+
quote = quote === 1 ? 0 : 1;
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
if (quote !== 1) {
|
|
536
|
+
if (ch === "[") {
|
|
537
|
+
bracket++;
|
|
538
|
+
continue;
|
|
539
|
+
}
|
|
540
|
+
if (ch === "]" && bracket > 0) {
|
|
541
|
+
bracket--;
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
if (!(bracket > 0)) {
|
|
545
|
+
if (ch === "(") {
|
|
546
|
+
paren++;
|
|
547
|
+
continue;
|
|
548
|
+
}
|
|
549
|
+
if (ch === ")" && (paren--, paren === 0))
|
|
550
|
+
return requireEnd === !0 && i !== pattern.length - 1 ? void 0 : {
|
|
551
|
+
type: pattern[0],
|
|
552
|
+
body: pattern.slice(2, i),
|
|
553
|
+
end: i
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}, buildCharClassStar = (chars) => `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`, getStarExtglobSequenceChars = (pattern) => {
|
|
559
|
+
let index = 0, chars = [];
|
|
560
|
+
for (; index < pattern.length; ) {
|
|
561
|
+
let match = parseRepeatedExtglob(pattern.slice(index), !1);
|
|
562
|
+
if (!match || match.type !== "*")
|
|
563
|
+
return;
|
|
564
|
+
let branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
|
|
565
|
+
if (branches.length !== 1)
|
|
566
|
+
return;
|
|
567
|
+
let branch = normalizeSimpleBranch(branches[0]);
|
|
568
|
+
if (!branch || branch.length !== 1)
|
|
569
|
+
return;
|
|
570
|
+
chars.push(branch), index += match.end + 1;
|
|
571
|
+
}
|
|
572
|
+
if (!(chars.length < 1))
|
|
573
|
+
return chars;
|
|
574
|
+
}, repeatedExtglobRecursion = (pattern) => {
|
|
575
|
+
let depth = 0, value = pattern.trim(), match = parseRepeatedExtglob(value);
|
|
576
|
+
for (; match; )
|
|
577
|
+
depth++, value = match.body.trim(), match = parseRepeatedExtglob(value);
|
|
578
|
+
return depth;
|
|
579
|
+
}, analyzeRepeatedExtglob = (body, options) => {
|
|
580
|
+
if (options.maxExtglobRecursion === !1)
|
|
581
|
+
return { risky: !1 };
|
|
582
|
+
let max = typeof options.maxExtglobRecursion == "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION, branches = splitTopLevel(body).map((branch) => branch.trim());
|
|
583
|
+
if (branches.length > 1 && (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)))
|
|
584
|
+
return { risky: !0 };
|
|
585
|
+
let safeChars = [], sawStarSequence = !1, combinable = !0;
|
|
586
|
+
for (let branch of branches) {
|
|
587
|
+
let chars = getStarExtglobSequenceChars(branch);
|
|
588
|
+
if (chars) {
|
|
589
|
+
sawStarSequence = !0, safeChars.push(...chars);
|
|
590
|
+
continue;
|
|
591
|
+
}
|
|
592
|
+
let literal = normalizeSimpleBranch(branch);
|
|
593
|
+
if (literal && literal.length === 1) {
|
|
594
|
+
safeChars.push(literal);
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
if (combinable = !1, repeatedExtglobRecursion(branch) > max)
|
|
598
|
+
return { risky: !0 };
|
|
599
|
+
}
|
|
600
|
+
return sawStarSequence ? combinable ? { risky: !0, safeOutput: buildCharClassStar([...new Set(safeChars)]) } : { risky: !0 } : { risky: !1 };
|
|
601
|
+
}, parse = (input, options) => {
|
|
602
|
+
if (typeof input != "string")
|
|
603
|
+
throw new TypeError("Expected a string");
|
|
604
|
+
input = REPLACEMENTS[input] || input;
|
|
605
|
+
let opts = { ...options }, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
|
|
606
|
+
if (len > max)
|
|
607
|
+
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
608
|
+
let bos = { type: "bos", value: "", output: opts.prepend || "" }, tokens = [bos], capture = opts.capture ? "" : "?:", PLATFORM_CHARS = constants.globChars(opts.windows), EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS), {
|
|
609
|
+
DOT_LITERAL,
|
|
610
|
+
PLUS_LITERAL,
|
|
611
|
+
SLASH_LITERAL,
|
|
612
|
+
ONE_CHAR,
|
|
613
|
+
DOTS_SLASH,
|
|
614
|
+
NO_DOT,
|
|
615
|
+
NO_DOT_SLASH,
|
|
616
|
+
NO_DOTS_SLASH,
|
|
617
|
+
QMARK,
|
|
618
|
+
QMARK_NO_DOT,
|
|
619
|
+
STAR,
|
|
620
|
+
START_ANCHOR
|
|
621
|
+
} = PLATFORM_CHARS, globstar = (opts2) => `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, nodot = opts.dot ? "" : NO_DOT, qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT, star = opts.bash === !0 ? globstar(opts) : STAR;
|
|
622
|
+
opts.capture && (star = `(${star})`), typeof opts.noext == "boolean" && (opts.noextglob = opts.noext);
|
|
623
|
+
let state = {
|
|
624
|
+
input,
|
|
625
|
+
index: -1,
|
|
626
|
+
start: 0,
|
|
627
|
+
dot: opts.dot === !0,
|
|
628
|
+
consumed: "",
|
|
629
|
+
output: "",
|
|
630
|
+
prefix: "",
|
|
631
|
+
backtrack: !1,
|
|
632
|
+
negated: !1,
|
|
633
|
+
brackets: 0,
|
|
634
|
+
braces: 0,
|
|
635
|
+
parens: 0,
|
|
636
|
+
quotes: 0,
|
|
637
|
+
globstar: !1,
|
|
638
|
+
tokens
|
|
639
|
+
};
|
|
640
|
+
input = utils.removePrefix(input, state), len = input.length;
|
|
641
|
+
let extglobs = [], braces = [], stack = [], prev = bos, value, eos = () => state.index === len - 1, peek = state.peek = (n = 1) => input[state.index + n], advance = state.advance = () => input[++state.index] || "", remaining = () => input.slice(state.index + 1), consume = (value2 = "", num = 0) => {
|
|
642
|
+
state.consumed += value2, state.index += num;
|
|
643
|
+
}, append = (token) => {
|
|
644
|
+
state.output += token.output != null ? token.output : token.value, consume(token.value);
|
|
645
|
+
}, negate = () => {
|
|
646
|
+
let count = 1;
|
|
647
|
+
for (; peek() === "!" && (peek(2) !== "(" || peek(3) === "?"); )
|
|
648
|
+
advance(), state.start++, count++;
|
|
649
|
+
return count % 2 === 0 ? !1 : (state.negated = !0, state.start++, !0);
|
|
650
|
+
}, increment = (type) => {
|
|
651
|
+
state[type]++, stack.push(type);
|
|
652
|
+
}, decrement = (type) => {
|
|
653
|
+
state[type]--, stack.pop();
|
|
654
|
+
}, push = (tok) => {
|
|
655
|
+
if (prev.type === "globstar") {
|
|
656
|
+
let isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"), isExtglob = tok.extglob === !0 || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
|
|
657
|
+
tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob && (state.output = state.output.slice(0, -prev.output.length), prev.type = "star", prev.value = "*", prev.output = star, state.output += prev.output);
|
|
658
|
+
}
|
|
659
|
+
if (extglobs.length && tok.type !== "paren" && (extglobs[extglobs.length - 1].inner += tok.value), (tok.value || tok.output) && append(tok), prev && prev.type === "text" && tok.type === "text") {
|
|
660
|
+
prev.output = (prev.output || prev.value) + tok.value, prev.value += tok.value;
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
tok.prev = prev, tokens.push(tok), prev = tok;
|
|
664
|
+
}, extglobOpen = (type, value2) => {
|
|
665
|
+
let token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
|
|
666
|
+
token.prev = prev, token.parens = state.parens, token.output = state.output, token.startIndex = state.index, token.tokensIndex = tokens.length;
|
|
667
|
+
let output = (opts.capture ? "(" : "") + token.open;
|
|
668
|
+
increment("parens"), push({ type, value: value2, output: state.output ? "" : ONE_CHAR }), push({ type: "paren", extglob: !0, value: advance(), output }), extglobs.push(token);
|
|
669
|
+
}, extglobClose = (token) => {
|
|
670
|
+
let literal = input.slice(token.startIndex, state.index + 1), body = input.slice(token.startIndex + 2, state.index), analysis = analyzeRepeatedExtglob(body, opts);
|
|
671
|
+
if ((token.type === "plus" || token.type === "star") && analysis.risky) {
|
|
672
|
+
let safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0, open = tokens[token.tokensIndex];
|
|
673
|
+
open.type = "text", open.value = literal, open.output = safeOutput || utils.escapeRegex(literal);
|
|
674
|
+
for (let i = token.tokensIndex + 1; i < tokens.length; i++)
|
|
675
|
+
tokens[i].value = "", tokens[i].output = "", delete tokens[i].suffix;
|
|
676
|
+
state.output = token.output + open.output, state.backtrack = !0, push({ type: "paren", extglob: !0, value, output: "" }), decrement("parens");
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
let output = token.close + (opts.capture ? ")" : ""), rest;
|
|
680
|
+
if (token.type === "negate") {
|
|
681
|
+
let extglobStar = star;
|
|
682
|
+
if (token.inner && token.inner.length > 1 && token.inner.includes("/") && (extglobStar = globstar(opts)), (extglobStar !== star || eos() || /^\)+$/.test(remaining())) && (output = token.close = `)$))${extglobStar}`), token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
683
|
+
let expression = parse(rest, { ...options, fastpaths: !1 }).output;
|
|
684
|
+
output = token.close = `)${expression})${extglobStar})`;
|
|
685
|
+
}
|
|
686
|
+
token.prev.type === "bos" && (state.negatedExtglob = !0);
|
|
687
|
+
}
|
|
688
|
+
push({ type: "paren", extglob: !0, value, output }), decrement("parens");
|
|
689
|
+
};
|
|
690
|
+
if (opts.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
691
|
+
let backslashes = !1, output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => first === "\\" ? (backslashes = !0, m) : first === "?" ? esc ? esc + first + (rest ? QMARK.repeat(rest.length) : "") : index === 0 ? qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "") : QMARK.repeat(chars.length) : first === "." ? DOT_LITERAL.repeat(chars.length) : first === "*" ? esc ? esc + first + (rest ? star : "") : star : esc ? m : `\\${m}`);
|
|
692
|
+
return backslashes === !0 && (opts.unescape === !0 ? output = output.replace(/\\/g, "") : output = output.replace(/\\+/g, (m) => m.length % 2 === 0 ? "\\\\" : m ? "\\" : "")), output === input && opts.contains === !0 ? (state.output = input, state) : (state.output = utils.wrapOutput(output, state, options), state);
|
|
693
|
+
}
|
|
694
|
+
for (; !eos(); ) {
|
|
695
|
+
if (value = advance(), value === "\0")
|
|
696
|
+
continue;
|
|
697
|
+
if (value === "\\") {
|
|
698
|
+
let next = peek();
|
|
699
|
+
if (next === "/" && opts.bash !== !0 || next === "." || next === ";")
|
|
700
|
+
continue;
|
|
701
|
+
if (!next) {
|
|
702
|
+
value += "\\", push({ type: "text", value });
|
|
703
|
+
continue;
|
|
704
|
+
}
|
|
705
|
+
let match = /^\\+/.exec(remaining()), slashes = 0;
|
|
706
|
+
if (match && match[0].length > 2 && (slashes = match[0].length, state.index += slashes, slashes % 2 !== 0 && (value += "\\")), opts.unescape === !0 ? value = advance() : value += advance(), state.brackets === 0) {
|
|
707
|
+
push({ type: "text", value });
|
|
708
|
+
continue;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
|
|
712
|
+
if (opts.posix !== !1 && value === ":") {
|
|
713
|
+
let inner = prev.value.slice(1);
|
|
714
|
+
if (inner.includes("[") && (prev.posix = !0, inner.includes(":"))) {
|
|
715
|
+
let idx = prev.value.lastIndexOf("["), pre = prev.value.slice(0, idx), rest2 = prev.value.slice(idx + 2), posix = POSIX_REGEX_SOURCE[rest2];
|
|
716
|
+
if (posix) {
|
|
717
|
+
prev.value = pre + posix, state.backtrack = !0, advance(), !bos.output && tokens.indexOf(prev) === 1 && (bos.output = ONE_CHAR);
|
|
718
|
+
continue;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
(value === "[" && peek() !== ":" || value === "-" && peek() === "]") && (value = `\\${value}`), value === "]" && (prev.value === "[" || prev.value === "[^") && (value = `\\${value}`), opts.posix === !0 && value === "!" && prev.value === "[" && (value = "^"), prev.value += value, append({ value });
|
|
723
|
+
continue;
|
|
724
|
+
}
|
|
725
|
+
if (state.quotes === 1 && value !== '"') {
|
|
726
|
+
value = utils.escapeRegex(value), prev.value += value, append({ value });
|
|
727
|
+
continue;
|
|
728
|
+
}
|
|
729
|
+
if (value === '"') {
|
|
730
|
+
state.quotes = state.quotes === 1 ? 0 : 1, opts.keepQuotes === !0 && push({ type: "text", value });
|
|
731
|
+
continue;
|
|
732
|
+
}
|
|
733
|
+
if (value === "(") {
|
|
734
|
+
increment("parens"), push({ type: "paren", value });
|
|
735
|
+
continue;
|
|
736
|
+
}
|
|
737
|
+
if (value === ")") {
|
|
738
|
+
if (state.parens === 0 && opts.strictBrackets === !0)
|
|
739
|
+
throw new SyntaxError(syntaxError("opening", "("));
|
|
740
|
+
let extglob = extglobs[extglobs.length - 1];
|
|
741
|
+
if (extglob && state.parens === extglob.parens + 1) {
|
|
742
|
+
extglobClose(extglobs.pop());
|
|
743
|
+
continue;
|
|
744
|
+
}
|
|
745
|
+
push({ type: "paren", value, output: state.parens ? ")" : "\\)" }), decrement("parens");
|
|
746
|
+
continue;
|
|
747
|
+
}
|
|
748
|
+
if (value === "[") {
|
|
749
|
+
if (opts.nobracket === !0 || !remaining().includes("]")) {
|
|
750
|
+
if (opts.nobracket !== !0 && opts.strictBrackets === !0)
|
|
751
|
+
throw new SyntaxError(syntaxError("closing", "]"));
|
|
752
|
+
value = `\\${value}`;
|
|
753
|
+
} else
|
|
754
|
+
increment("brackets");
|
|
755
|
+
push({ type: "bracket", value });
|
|
756
|
+
continue;
|
|
757
|
+
}
|
|
758
|
+
if (value === "]") {
|
|
759
|
+
if (opts.nobracket === !0 || prev && prev.type === "bracket" && prev.value.length === 1) {
|
|
760
|
+
push({ type: "text", value, output: `\\${value}` });
|
|
761
|
+
continue;
|
|
762
|
+
}
|
|
763
|
+
if (state.brackets === 0) {
|
|
764
|
+
if (opts.strictBrackets === !0)
|
|
765
|
+
throw new SyntaxError(syntaxError("opening", "["));
|
|
766
|
+
push({ type: "text", value, output: `\\${value}` });
|
|
767
|
+
continue;
|
|
768
|
+
}
|
|
769
|
+
decrement("brackets");
|
|
770
|
+
let prevValue = prev.value.slice(1);
|
|
771
|
+
if (prev.posix !== !0 && prevValue[0] === "^" && !prevValue.includes("/") && (value = `/${value}`), prev.value += value, append({ value }), opts.literalBrackets === !1 || utils.hasRegexChars(prevValue))
|
|
772
|
+
continue;
|
|
773
|
+
let escaped = utils.escapeRegex(prev.value);
|
|
774
|
+
if (state.output = state.output.slice(0, -prev.value.length), opts.literalBrackets === !0) {
|
|
775
|
+
state.output += escaped, prev.value = escaped;
|
|
776
|
+
continue;
|
|
777
|
+
}
|
|
778
|
+
prev.value = `(${capture}${escaped}|${prev.value})`, state.output += prev.value;
|
|
779
|
+
continue;
|
|
780
|
+
}
|
|
781
|
+
if (value === "{" && opts.nobrace !== !0) {
|
|
782
|
+
increment("braces");
|
|
783
|
+
let open = {
|
|
784
|
+
type: "brace",
|
|
785
|
+
value,
|
|
786
|
+
output: "(",
|
|
787
|
+
outputIndex: state.output.length,
|
|
788
|
+
tokensIndex: state.tokens.length
|
|
789
|
+
};
|
|
790
|
+
braces.push(open), push(open);
|
|
791
|
+
continue;
|
|
792
|
+
}
|
|
793
|
+
if (value === "}") {
|
|
794
|
+
let brace = braces[braces.length - 1];
|
|
795
|
+
if (opts.nobrace === !0 || !brace) {
|
|
796
|
+
push({ type: "text", value, output: value });
|
|
797
|
+
continue;
|
|
798
|
+
}
|
|
799
|
+
let output = ")";
|
|
800
|
+
if (brace.dots === !0) {
|
|
801
|
+
let arr = tokens.slice(), range = [];
|
|
802
|
+
for (let i = arr.length - 1; i >= 0 && (tokens.pop(), arr[i].type !== "brace"); i--)
|
|
803
|
+
arr[i].type !== "dots" && range.unshift(arr[i].value);
|
|
804
|
+
output = expandRange(range, opts), state.backtrack = !0;
|
|
805
|
+
}
|
|
806
|
+
if (brace.comma !== !0 && brace.dots !== !0) {
|
|
807
|
+
let out = state.output.slice(0, brace.outputIndex), toks = state.tokens.slice(brace.tokensIndex);
|
|
808
|
+
brace.value = brace.output = "\\{", value = output = "\\}", state.output = out;
|
|
809
|
+
for (let t of toks)
|
|
810
|
+
state.output += t.output || t.value;
|
|
811
|
+
}
|
|
812
|
+
push({ type: "brace", value, output }), decrement("braces"), braces.pop();
|
|
813
|
+
continue;
|
|
814
|
+
}
|
|
815
|
+
if (value === "|") {
|
|
816
|
+
extglobs.length > 0 && extglobs[extglobs.length - 1].conditions++, push({ type: "text", value });
|
|
817
|
+
continue;
|
|
818
|
+
}
|
|
819
|
+
if (value === ",") {
|
|
820
|
+
let output = value, brace = braces[braces.length - 1];
|
|
821
|
+
brace && stack[stack.length - 1] === "braces" && (brace.comma = !0, output = "|"), push({ type: "comma", value, output });
|
|
822
|
+
continue;
|
|
823
|
+
}
|
|
824
|
+
if (value === "/") {
|
|
825
|
+
if (prev.type === "dot" && state.index === state.start + 1) {
|
|
826
|
+
state.start = state.index + 1, state.consumed = "", state.output = "", tokens.pop(), prev = bos;
|
|
827
|
+
continue;
|
|
828
|
+
}
|
|
829
|
+
push({ type: "slash", value, output: SLASH_LITERAL });
|
|
830
|
+
continue;
|
|
831
|
+
}
|
|
832
|
+
if (value === ".") {
|
|
833
|
+
if (state.braces > 0 && prev.type === "dot") {
|
|
834
|
+
prev.value === "." && (prev.output = DOT_LITERAL);
|
|
835
|
+
let brace = braces[braces.length - 1];
|
|
836
|
+
prev.type = "dots", prev.output += value, prev.value += value, brace.dots = !0;
|
|
837
|
+
continue;
|
|
838
|
+
}
|
|
839
|
+
if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
|
|
840
|
+
push({ type: "text", value, output: DOT_LITERAL });
|
|
841
|
+
continue;
|
|
842
|
+
}
|
|
843
|
+
push({ type: "dot", value, output: DOT_LITERAL });
|
|
844
|
+
continue;
|
|
845
|
+
}
|
|
846
|
+
if (value === "?") {
|
|
847
|
+
if (!(prev && prev.value === "(") && opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
|
|
848
|
+
extglobOpen("qmark", value);
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
if (prev && prev.type === "paren") {
|
|
852
|
+
let next = peek(), output = value;
|
|
853
|
+
(prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) && (output = `\\${value}`), push({ type: "text", value, output });
|
|
854
|
+
continue;
|
|
855
|
+
}
|
|
856
|
+
if (opts.dot !== !0 && (prev.type === "slash" || prev.type === "bos")) {
|
|
857
|
+
push({ type: "qmark", value, output: QMARK_NO_DOT });
|
|
858
|
+
continue;
|
|
859
|
+
}
|
|
860
|
+
push({ type: "qmark", value, output: QMARK });
|
|
861
|
+
continue;
|
|
862
|
+
}
|
|
863
|
+
if (value === "!") {
|
|
864
|
+
if (opts.noextglob !== !0 && peek() === "(" && (peek(2) !== "?" || !/[!=<:]/.test(peek(3)))) {
|
|
865
|
+
extglobOpen("negate", value);
|
|
866
|
+
continue;
|
|
867
|
+
}
|
|
868
|
+
if (opts.nonegate !== !0 && state.index === 0) {
|
|
869
|
+
negate();
|
|
870
|
+
continue;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
if (value === "+") {
|
|
874
|
+
if (opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
|
|
875
|
+
extglobOpen("plus", value);
|
|
876
|
+
continue;
|
|
877
|
+
}
|
|
878
|
+
if (prev && prev.value === "(" || opts.regex === !1) {
|
|
879
|
+
push({ type: "plus", value, output: PLUS_LITERAL });
|
|
880
|
+
continue;
|
|
881
|
+
}
|
|
882
|
+
if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
|
|
883
|
+
push({ type: "plus", value });
|
|
884
|
+
continue;
|
|
885
|
+
}
|
|
886
|
+
push({ type: "plus", value: PLUS_LITERAL });
|
|
887
|
+
continue;
|
|
888
|
+
}
|
|
889
|
+
if (value === "@") {
|
|
890
|
+
if (opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
|
|
891
|
+
push({ type: "at", extglob: !0, value, output: "" });
|
|
892
|
+
continue;
|
|
893
|
+
}
|
|
894
|
+
push({ type: "text", value });
|
|
895
|
+
continue;
|
|
896
|
+
}
|
|
897
|
+
if (value !== "*") {
|
|
898
|
+
(value === "$" || value === "^") && (value = `\\${value}`);
|
|
899
|
+
let match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
|
|
900
|
+
match && (value += match[0], state.index += match[0].length), push({ type: "text", value });
|
|
901
|
+
continue;
|
|
902
|
+
}
|
|
903
|
+
if (prev && (prev.type === "globstar" || prev.star === !0)) {
|
|
904
|
+
prev.type = "star", prev.star = !0, prev.value += value, prev.output = star, state.backtrack = !0, state.globstar = !0, consume(value);
|
|
905
|
+
continue;
|
|
906
|
+
}
|
|
907
|
+
let rest = remaining();
|
|
908
|
+
if (opts.noextglob !== !0 && /^\([^?]/.test(rest)) {
|
|
909
|
+
extglobOpen("star", value);
|
|
910
|
+
continue;
|
|
911
|
+
}
|
|
912
|
+
if (prev.type === "star") {
|
|
913
|
+
if (opts.noglobstar === !0) {
|
|
914
|
+
consume(value);
|
|
915
|
+
continue;
|
|
916
|
+
}
|
|
917
|
+
let prior = prev.prev, before = prior.prev, isStart = prior.type === "slash" || prior.type === "bos", afterStar = before && (before.type === "star" || before.type === "globstar");
|
|
918
|
+
if (opts.bash === !0 && (!isStart || rest[0] && rest[0] !== "/")) {
|
|
919
|
+
push({ type: "star", value, output: "" });
|
|
920
|
+
continue;
|
|
921
|
+
}
|
|
922
|
+
let isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"), isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
|
|
923
|
+
if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
|
|
924
|
+
push({ type: "star", value, output: "" });
|
|
925
|
+
continue;
|
|
926
|
+
}
|
|
927
|
+
for (; rest.slice(0, 3) === "/**"; ) {
|
|
928
|
+
let after = input[state.index + 4];
|
|
929
|
+
if (after && after !== "/")
|
|
930
|
+
break;
|
|
931
|
+
rest = rest.slice(3), consume("/**", 3);
|
|
932
|
+
}
|
|
933
|
+
let isEnd = eos() || state.parens > 0 && rest === ")".repeat(state.parens) && !extglobs.some((extglob) => extglob.type === "negate");
|
|
934
|
+
if (prior.type === "bos" && eos()) {
|
|
935
|
+
prev.type = "globstar", prev.value += value, prev.output = globstar(opts), state.output = prev.output, state.globstar = !0, consume(value);
|
|
936
|
+
continue;
|
|
937
|
+
}
|
|
938
|
+
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && isEnd) {
|
|
939
|
+
state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = "globstar", prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"), prev.value += value, state.globstar = !0, state.output += prior.output + prev.output, consume(value);
|
|
940
|
+
continue;
|
|
941
|
+
}
|
|
942
|
+
if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
|
|
943
|
+
let end = rest[1] !== void 0 ? "|$" : "";
|
|
944
|
+
state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = "globstar", prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`, prev.value += value, state.output += prior.output + prev.output, state.globstar = !0, consume(value + advance()), push({ type: "slash", value: "/", output: "" });
|
|
945
|
+
continue;
|
|
946
|
+
}
|
|
947
|
+
if (prior.type === "bos" && rest[0] === "/") {
|
|
948
|
+
prev.type = "globstar", prev.value += value, prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`, state.output = prev.output, state.globstar = !0, consume(value + advance()), push({ type: "slash", value: "/", output: "" });
|
|
949
|
+
continue;
|
|
950
|
+
}
|
|
951
|
+
state.output = state.output.slice(0, -prev.output.length), prev.type = "globstar", prev.output = globstar(opts), prev.value += value, state.output += prev.output, state.globstar = !0, consume(value);
|
|
952
|
+
continue;
|
|
953
|
+
}
|
|
954
|
+
let token = { type: "star", value, output: star };
|
|
955
|
+
if (opts.bash === !0) {
|
|
956
|
+
token.output = ".*?", (prev.type === "bos" || prev.type === "slash") && (token.output = nodot + token.output), push(token);
|
|
957
|
+
continue;
|
|
958
|
+
}
|
|
959
|
+
if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === !0) {
|
|
960
|
+
token.output = value, push(token);
|
|
961
|
+
continue;
|
|
962
|
+
}
|
|
963
|
+
(state.index === state.start || prev.type === "slash" || prev.type === "dot") && (prev.type === "dot" ? (state.output += NO_DOT_SLASH, prev.output += NO_DOT_SLASH) : opts.dot === !0 ? (state.output += NO_DOTS_SLASH, prev.output += NO_DOTS_SLASH) : (state.output += nodot, prev.output += nodot), peek() !== "*" && (state.output += ONE_CHAR, prev.output += ONE_CHAR)), push(token);
|
|
964
|
+
}
|
|
965
|
+
for (; state.brackets > 0; ) {
|
|
966
|
+
if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", "]"));
|
|
967
|
+
state.output = utils.escapeLast(state.output, "["), decrement("brackets");
|
|
968
|
+
}
|
|
969
|
+
for (; state.parens > 0; ) {
|
|
970
|
+
if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", ")"));
|
|
971
|
+
state.output = utils.escapeLast(state.output, "("), decrement("parens");
|
|
972
|
+
}
|
|
973
|
+
for (; state.braces > 0; ) {
|
|
974
|
+
if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", "}"));
|
|
975
|
+
state.output = utils.escapeLast(state.output, "{"), decrement("braces");
|
|
976
|
+
}
|
|
977
|
+
if (opts.strictSlashes !== !0 && (prev.type === "star" || prev.type === "bracket") && push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }), state.backtrack === !0) {
|
|
978
|
+
state.output = "";
|
|
979
|
+
for (let token of state.tokens)
|
|
980
|
+
state.output += token.output != null ? token.output : token.value, token.suffix && (state.output += token.suffix);
|
|
981
|
+
}
|
|
982
|
+
return state;
|
|
983
|
+
};
|
|
984
|
+
parse.fastpaths = (input, options) => {
|
|
985
|
+
let opts = { ...options }, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
|
|
986
|
+
if (len > max)
|
|
987
|
+
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
988
|
+
input = REPLACEMENTS[input] || input;
|
|
989
|
+
let {
|
|
990
|
+
DOT_LITERAL,
|
|
991
|
+
SLASH_LITERAL,
|
|
992
|
+
ONE_CHAR,
|
|
993
|
+
DOTS_SLASH,
|
|
994
|
+
NO_DOT,
|
|
995
|
+
NO_DOTS,
|
|
996
|
+
NO_DOTS_SLASH,
|
|
997
|
+
STAR,
|
|
998
|
+
START_ANCHOR
|
|
999
|
+
} = constants.globChars(opts.windows), nodot = opts.dot ? NO_DOTS : NO_DOT, slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT, capture = opts.capture ? "" : "?:", state = { negated: !1, prefix: "" }, star = opts.bash === !0 ? ".*?" : STAR;
|
|
1000
|
+
opts.capture && (star = `(${star})`);
|
|
1001
|
+
let globstar = (opts2) => opts2.noglobstar === !0 ? star : `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, create = (str) => {
|
|
1002
|
+
switch (str) {
|
|
1003
|
+
case "*":
|
|
1004
|
+
return `${nodot}${ONE_CHAR}${star}`;
|
|
1005
|
+
case ".*":
|
|
1006
|
+
return `${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1007
|
+
case "*.*":
|
|
1008
|
+
return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1009
|
+
case "*/*":
|
|
1010
|
+
return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
|
|
1011
|
+
case "**":
|
|
1012
|
+
return nodot + globstar(opts);
|
|
1013
|
+
case "**/*":
|
|
1014
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
|
|
1015
|
+
case "**/*.*":
|
|
1016
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1017
|
+
case "**/.*":
|
|
1018
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1019
|
+
default: {
|
|
1020
|
+
let match = /^(.*?)\.(\w+)$/.exec(str);
|
|
1021
|
+
if (!match) return;
|
|
1022
|
+
let source2 = create(match[1]);
|
|
1023
|
+
return source2 ? source2 + DOT_LITERAL + match[2] : void 0;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}, output = utils.removePrefix(input, state), source = create(output);
|
|
1027
|
+
return source && opts.strictSlashes !== !0 && (source += `${SLASH_LITERAL}?`), source;
|
|
1028
|
+
};
|
|
1029
|
+
module.exports = parse;
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1032
|
+
|
|
1033
|
+
// ../../node_modules/picomatch/lib/picomatch.js
|
|
1034
|
+
var require_picomatch = __commonJS({
|
|
1035
|
+
"../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
1036
|
+
"use strict";
|
|
1037
|
+
var scan = require_scan(), parse = require_parse(), utils = require_utils(), constants = require_constants(), isObject = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch = (glob, options, returnState = !1) => {
|
|
1038
|
+
if (Array.isArray(glob)) {
|
|
1039
|
+
let fns = glob.map((input) => picomatch(input, options, returnState));
|
|
1040
|
+
return (str) => {
|
|
1041
|
+
for (let isMatch of fns) {
|
|
1042
|
+
let state2 = isMatch(str);
|
|
1043
|
+
if (state2) return state2;
|
|
1044
|
+
}
|
|
1045
|
+
return !1;
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
let isState = isObject(glob) && glob.tokens && glob.input;
|
|
1049
|
+
if (glob === "" || typeof glob != "string" && !isState)
|
|
1050
|
+
throw new TypeError("Expected pattern to be a non-empty string");
|
|
1051
|
+
let opts = options || {}, posix = opts.windows, regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, !1, !0), state = regex.state;
|
|
1052
|
+
delete regex.state;
|
|
1053
|
+
let isIgnored = () => !1;
|
|
1054
|
+
if (opts.ignore) {
|
|
1055
|
+
let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
1056
|
+
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
1057
|
+
}
|
|
1058
|
+
let matcher = (input, returnObject = !1) => {
|
|
1059
|
+
let { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }), result = { glob, state, regex, posix, input, output, match, isMatch };
|
|
1060
|
+
return typeof opts.onResult == "function" && opts.onResult(result), isMatch === !1 ? (result.isMatch = !1, returnObject ? result : !1) : isIgnored(input) ? (typeof opts.onIgnore == "function" && opts.onIgnore(result), result.isMatch = !1, returnObject ? result : !1) : (typeof opts.onMatch == "function" && opts.onMatch(result), returnObject ? result : !0);
|
|
1061
|
+
};
|
|
1062
|
+
return returnState && (matcher.state = state), matcher;
|
|
1063
|
+
};
|
|
1064
|
+
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
1065
|
+
if (typeof input != "string")
|
|
1066
|
+
throw new TypeError("Expected input to be a string");
|
|
1067
|
+
if (input === "")
|
|
1068
|
+
return { isMatch: !1, output: "" };
|
|
1069
|
+
let opts = options || {}, format = opts.format || (posix ? utils.toPosixSlashes : null), match = input === glob, output = match && format ? format(input) : input;
|
|
1070
|
+
return match === !1 && (output = format ? format(input) : input, match = output === glob), (match === !1 || opts.capture === !0) && (opts.matchBase === !0 || opts.basename === !0 ? match = picomatch.matchBase(input, regex, options, posix) : match = regex.exec(output)), { isMatch: !!match, match, output };
|
|
1071
|
+
};
|
|
1072
|
+
picomatch.matchBase = (input, glob, options, posix = options && options.windows) => (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input, { windows: posix }));
|
|
1073
|
+
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
1074
|
+
picomatch.parse = (pattern, options) => Array.isArray(pattern) ? pattern.map((p) => picomatch.parse(p, options)) : parse(pattern, { ...options, fastpaths: !1 });
|
|
1075
|
+
picomatch.scan = (input, options) => scan(input, options);
|
|
1076
|
+
picomatch.compileRe = (state, options, returnOutput = !1, returnState = !1) => {
|
|
1077
|
+
if (returnOutput === !0)
|
|
1078
|
+
return state.output;
|
|
1079
|
+
let opts = options || {}, prepend = opts.contains ? "" : "^", append = opts.contains ? "" : "$", source = `${prepend}(?:${state.output})${append}`;
|
|
1080
|
+
state && state.negated === !0 && (source = `^(?!${source}).*$`);
|
|
1081
|
+
let regex = picomatch.toRegex(source, options);
|
|
1082
|
+
return returnState === !0 && (regex.state = state), regex;
|
|
1083
|
+
};
|
|
1084
|
+
picomatch.makeRe = (input, options = {}, returnOutput = !1, returnState = !1) => {
|
|
1085
|
+
if (!input || typeof input != "string")
|
|
1086
|
+
throw new TypeError("Expected a non-empty string");
|
|
1087
|
+
let parsed = { negated: !1, fastpaths: !0 };
|
|
1088
|
+
return options.fastpaths !== !1 && (input[0] === "." || input[0] === "*") && (parsed.output = parse.fastpaths(input, options)), parsed.output || (parsed = parse(input, options)), picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
1089
|
+
};
|
|
1090
|
+
picomatch.toRegex = (source, options) => {
|
|
1091
|
+
try {
|
|
1092
|
+
let opts = options || {};
|
|
1093
|
+
return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
|
|
1094
|
+
} catch (err) {
|
|
1095
|
+
if (options && options.debug === !0) throw err;
|
|
1096
|
+
return /$^/;
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
picomatch.constants = constants;
|
|
1100
|
+
module.exports = picomatch;
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
|
|
1104
|
+
// ../../node_modules/picomatch/index.js
|
|
1105
|
+
var require_picomatch2 = __commonJS({
|
|
1106
|
+
"../../node_modules/picomatch/index.js"(exports, module) {
|
|
1107
|
+
"use strict";
|
|
1108
|
+
var pico = require_picomatch(), utils = require_utils();
|
|
1109
|
+
function picomatch(glob, options, returnState = !1) {
|
|
1110
|
+
return options && (options.windows === null || options.windows === void 0) && (options = { ...options, windows: utils.isWindows() }), pico(glob, options, returnState);
|
|
1111
|
+
}
|
|
1112
|
+
Object.assign(picomatch, pico);
|
|
1113
|
+
module.exports = picomatch;
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
|
|
1117
|
+
export {
|
|
1118
|
+
require_picomatch2 as require_picomatch
|
|
1119
|
+
};
|