pxnpm 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +276 -2
- package/bin/{pxnpm.cjs → pnpm.cjs} +2 -2
- package/bin/{pxnpx.cjs → pnpx.cjs} +1 -1
- package/dist/node_modules/.modules.yaml +92 -98
- package/dist/node_modules/.pnpm/lock.yaml +303 -412
- package/dist/node_modules/{set-blocking → @isaacs/cliui}/LICENSE.txt +1 -1
- package/dist/node_modules/@isaacs/cliui/build/index.cjs +317 -0
- package/dist/node_modules/@isaacs/cliui/build/index.d.cts +43 -0
- package/dist/node_modules/@isaacs/cliui/build/lib/index.js +302 -0
- package/dist/node_modules/@isaacs/cliui/index.mjs +14 -0
- package/dist/node_modules/@isaacs/cliui/package.json +86 -0
- package/dist/node_modules/@npmcli/agent/lib/agents.js +206 -0
- package/dist/node_modules/@npmcli/agent/lib/dns.js +53 -0
- package/dist/node_modules/@npmcli/agent/lib/errors.js +61 -0
- package/dist/node_modules/@npmcli/agent/lib/index.js +56 -0
- package/dist/node_modules/@npmcli/agent/lib/options.js +86 -0
- package/dist/node_modules/@npmcli/agent/lib/proxy.js +88 -0
- package/dist/node_modules/@npmcli/agent/package.json +60 -0
- package/dist/node_modules/@npmcli/fs/lib/cp/index.js +1 -1
- package/dist/node_modules/@npmcli/fs/lib/cp/polyfill.js +2 -2
- package/dist/node_modules/@npmcli/fs/lib/index.js +11 -10
- package/dist/node_modules/@npmcli/fs/lib/move-file.js +78 -0
- package/dist/node_modules/@npmcli/fs/lib/readdir-scoped.js +20 -0
- package/dist/node_modules/@npmcli/fs/lib/with-temp-dir.js +4 -6
- package/dist/node_modules/@npmcli/fs/package.json +13 -11
- package/dist/node_modules/@pkgjs/parseargs/LICENSE +201 -0
- package/dist/node_modules/@pkgjs/parseargs/index.js +396 -0
- package/dist/node_modules/@pkgjs/parseargs/internal/errors.js +47 -0
- package/dist/node_modules/@pkgjs/parseargs/internal/primordials.js +393 -0
- package/dist/node_modules/@pkgjs/parseargs/internal/util.js +14 -0
- package/dist/node_modules/@pkgjs/parseargs/internal/validators.js +89 -0
- package/dist/node_modules/@pkgjs/parseargs/package.json +36 -0
- package/dist/node_modules/@pkgjs/parseargs/utils.js +198 -0
- package/dist/node_modules/abbrev/lib/index.js +50 -0
- package/dist/node_modules/abbrev/package.json +33 -11
- package/dist/node_modules/agent-base/LICENSE +22 -0
- package/dist/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
- package/dist/node_modules/agent-base/dist/helpers.js +66 -0
- package/dist/node_modules/agent-base/dist/helpers.js.map +1 -0
- package/dist/node_modules/agent-base/dist/index.d.ts.map +1 -0
- package/dist/node_modules/agent-base/dist/index.js +175 -0
- package/dist/node_modules/agent-base/dist/index.js.map +1 -0
- package/dist/node_modules/agent-base/package.json +26 -41
- package/dist/node_modules/ansi-regex/index.js +3 -5
- package/dist/node_modules/ansi-regex/license +1 -1
- package/dist/node_modules/ansi-regex/package.json +9 -6
- package/dist/node_modules/ansi-styles/index.js +223 -0
- package/dist/node_modules/ansi-styles/license +9 -0
- package/dist/node_modules/ansi-styles/package.json +54 -0
- package/dist/node_modules/brace-expansion/index.js +86 -84
- package/dist/node_modules/brace-expansion/package.json +3 -4
- package/dist/node_modules/cacache/lib/content/read.js +10 -86
- package/dist/node_modules/cacache/lib/content/rm.js +2 -4
- package/dist/node_modules/cacache/lib/content/write.js +42 -25
- package/dist/node_modules/cacache/lib/entry-index.js +26 -100
- package/dist/node_modules/cacache/lib/get.js +1 -56
- package/dist/node_modules/cacache/lib/index.js +0 -3
- package/dist/node_modules/cacache/lib/memoization.js +2 -2
- package/dist/node_modules/cacache/lib/rm.js +5 -5
- package/dist/node_modules/cacache/lib/util/glob.js +7 -0
- package/dist/node_modules/cacache/lib/util/tmp.js +3 -10
- package/dist/node_modules/cacache/lib/verify.js +31 -31
- package/dist/node_modules/cacache/node_modules/fs-minipass/lib/index.js +443 -0
- package/dist/node_modules/cacache/node_modules/fs-minipass/package.json +54 -0
- package/dist/node_modules/cacache/package.json +23 -25
- package/dist/node_modules/color-convert/LICENSE +21 -0
- package/dist/node_modules/color-convert/conversions.js +839 -0
- package/dist/node_modules/color-convert/index.js +81 -0
- package/dist/node_modules/color-convert/package.json +48 -0
- package/dist/node_modules/color-convert/route.js +97 -0
- package/dist/node_modules/color-name/LICENSE +8 -0
- package/dist/node_modules/color-name/index.js +152 -0
- package/dist/node_modules/color-name/package.json +28 -0
- package/dist/node_modules/{safe-buffer → cross-spawn}/LICENSE +1 -1
- package/dist/node_modules/cross-spawn/index.js +39 -0
- package/dist/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/dist/node_modules/cross-spawn/lib/parse.js +91 -0
- package/dist/node_modules/cross-spawn/lib/util/escape.js +45 -0
- package/dist/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/dist/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/dist/node_modules/cross-spawn/package.json +73 -0
- package/dist/node_modules/debug/package.json +4 -3
- package/dist/node_modules/debug/src/node.js +2 -2
- package/dist/node_modules/eastasianwidth/eastasianwidth.js +311 -0
- package/dist/node_modules/eastasianwidth/package.json +18 -0
- package/dist/node_modules/emoji-regex/RGI_Emoji.js +6 -0
- package/dist/node_modules/emoji-regex/es2015/RGI_Emoji.js +6 -0
- package/dist/node_modules/emoji-regex/es2015/index.js +1 -1
- package/dist/node_modules/emoji-regex/es2015/text.js +1 -1
- package/dist/node_modules/emoji-regex/index.js +1 -1
- package/dist/node_modules/emoji-regex/package.json +13 -11
- package/dist/node_modules/emoji-regex/text.js +1 -1
- package/dist/node_modules/{infer-owner → foreground-child}/LICENSE +1 -1
- package/dist/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +1 -0
- package/dist/node_modules/foreground-child/dist/commonjs/all-signals.js +58 -0
- package/dist/node_modules/foreground-child/dist/commonjs/all-signals.js.map +1 -0
- package/dist/node_modules/foreground-child/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/foreground-child/dist/commonjs/index.js +121 -0
- package/dist/node_modules/foreground-child/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/foreground-child/dist/commonjs/package.json +3 -0
- package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +1 -0
- package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.js +38 -0
- package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map +1 -0
- package/dist/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +1 -0
- package/dist/node_modules/foreground-child/dist/commonjs/watchdog.js +50 -0
- package/dist/node_modules/foreground-child/dist/commonjs/watchdog.js.map +1 -0
- package/dist/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +1 -0
- package/dist/node_modules/foreground-child/dist/esm/all-signals.js +52 -0
- package/dist/node_modules/foreground-child/dist/esm/all-signals.js.map +1 -0
- package/dist/node_modules/foreground-child/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/foreground-child/dist/esm/index.js +113 -0
- package/dist/node_modules/foreground-child/dist/esm/index.js.map +1 -0
- package/dist/node_modules/foreground-child/dist/esm/package.json +3 -0
- package/dist/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +1 -0
- package/dist/node_modules/foreground-child/dist/esm/proxy-signals.js +34 -0
- package/dist/node_modules/foreground-child/dist/esm/proxy-signals.js.map +1 -0
- package/dist/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +1 -0
- package/dist/node_modules/foreground-child/dist/esm/watchdog.js +46 -0
- package/dist/node_modules/foreground-child/dist/esm/watchdog.js.map +1 -0
- package/dist/node_modules/foreground-child/package.json +111 -0
- package/dist/node_modules/{cacache/node_modules/minimatch → fs-minipass/node_modules/minipass}/LICENSE +1 -1
- package/dist/node_modules/fs-minipass/node_modules/minipass/package.json +56 -0
- package/dist/node_modules/glob/LICENSE +1 -7
- package/dist/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/glob.js +247 -0
- package/dist/node_modules/glob/dist/commonjs/glob.js.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/dist/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/dist/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/index.js +68 -0
- package/dist/node_modules/glob/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/package.json +3 -0
- package/dist/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/pattern.js +219 -0
- package/dist/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/dist/node_modules/glob/dist/commonjs/processor.js.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/dist/node_modules/glob/dist/commonjs/walker.js.map +1 -0
- package/dist/node_modules/glob/dist/esm/bin.d.mts +3 -0
- package/dist/node_modules/glob/dist/esm/bin.d.mts.map +1 -0
- package/dist/node_modules/glob/dist/esm/bin.mjs +270 -0
- package/dist/node_modules/glob/dist/esm/bin.mjs.map +1 -0
- package/dist/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/esm/glob.js +243 -0
- package/dist/node_modules/glob/dist/esm/glob.js.map +1 -0
- package/dist/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/dist/node_modules/glob/dist/esm/has-magic.js.map +1 -0
- package/dist/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/esm/ignore.js +115 -0
- package/dist/node_modules/glob/dist/esm/ignore.js.map +1 -0
- package/dist/node_modules/glob/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/esm/index.js +55 -0
- package/dist/node_modules/glob/dist/esm/index.js.map +1 -0
- package/dist/node_modules/glob/dist/esm/package.json +3 -0
- package/dist/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/esm/pattern.js +215 -0
- package/dist/node_modules/glob/dist/esm/pattern.js.map +1 -0
- package/dist/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/esm/processor.js +294 -0
- package/dist/node_modules/glob/dist/esm/processor.js.map +1 -0
- package/dist/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
- package/dist/node_modules/glob/dist/esm/walker.js +381 -0
- package/dist/node_modules/glob/dist/esm/walker.js.map +1 -0
- package/dist/node_modules/glob/package.json +79 -35
- package/dist/node_modules/{agentkeepalive → http-proxy-agent}/LICENSE +2 -3
- package/dist/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -0
- package/dist/node_modules/http-proxy-agent/dist/index.js +142 -8
- package/dist/node_modules/http-proxy-agent/dist/index.js.map +1 -1
- package/dist/node_modules/http-proxy-agent/package.json +22 -32
- package/dist/node_modules/https-proxy-agent/LICENSE +22 -0
- package/dist/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -0
- package/dist/node_modules/https-proxy-agent/dist/index.js +169 -8
- package/dist/node_modules/https-proxy-agent/dist/index.js.map +1 -1
- package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -0
- package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js +47 -12
- package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -1
- package/dist/node_modules/https-proxy-agent/package.json +25 -31
- package/dist/node_modules/jackspeak/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/jackspeak/dist/commonjs/index.js +1010 -0
- package/dist/node_modules/jackspeak/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/jackspeak/dist/commonjs/package.json +3 -0
- package/dist/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +1 -0
- package/dist/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +1 -0
- package/dist/node_modules/jackspeak/dist/commonjs/parse-args.js +50 -0
- package/dist/node_modules/jackspeak/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/jackspeak/dist/esm/index.js +1000 -0
- package/dist/node_modules/jackspeak/dist/esm/index.js.map +1 -0
- package/dist/node_modules/jackspeak/dist/esm/package.json +3 -0
- package/dist/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +1 -0
- package/dist/node_modules/jackspeak/dist/esm/parse-args.js +26 -0
- package/dist/node_modules/jackspeak/dist/esm/parse-args.js.map +1 -0
- package/dist/node_modules/jackspeak/package.json +95 -0
- package/dist/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
- package/dist/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/dist/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/dist/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/dist/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/lru-cache/dist/esm/index.js +1542 -0
- package/dist/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/dist/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/dist/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/dist/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/dist/node_modules/lru-cache/package.json +66 -46
- package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +28 -1
- package/dist/node_modules/make-fetch-happen/lib/options.js +2 -0
- package/dist/node_modules/make-fetch-happen/lib/remote.js +13 -3
- package/dist/node_modules/make-fetch-happen/package.json +19 -23
- package/dist/node_modules/minimatch/LICENSE +1 -1
- package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/ast.js +592 -0
- package/dist/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
- package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/escape.js +22 -0
- package/dist/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/index.js +1017 -0
- package/dist/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/dist/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
- package/dist/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/ast.js +588 -0
- package/dist/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
- package/dist/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/escape.js +18 -0
- package/dist/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/index.js +1001 -0
- package/dist/node_modules/minimatch/dist/esm/index.js.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/package.json +3 -0
- package/dist/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- package/dist/node_modules/minimatch/dist/esm/unescape.js +20 -0
- package/dist/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- package/dist/node_modules/minimatch/package.json +62 -13
- package/dist/node_modules/minipass/LICENSE +1 -1
- package/dist/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/minipass/dist/commonjs/index.js +1028 -0
- package/dist/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/dist/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/minipass/dist/esm/index.js +1018 -0
- package/dist/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/dist/node_modules/minipass/dist/esm/package.json +3 -0
- package/dist/node_modules/minipass/package.json +62 -36
- package/dist/node_modules/minipass-collect/LICENSE +1 -1
- package/dist/node_modules/minipass-collect/index.js +1 -1
- package/dist/node_modules/minipass-collect/package.json +7 -6
- package/dist/node_modules/minipass-fetch/lib/blob.js +1 -1
- package/dist/node_modules/minipass-fetch/lib/body.js +2 -2
- package/dist/node_modules/minipass-fetch/lib/index.js +16 -4
- package/dist/node_modules/minipass-fetch/lib/request.js +2 -1
- package/dist/node_modules/minipass-fetch/package.json +15 -13
- package/dist/node_modules/minipass-flush/node_modules/minipass/LICENSE +15 -0
- package/dist/node_modules/minipass-flush/node_modules/minipass/index.js +649 -0
- package/dist/node_modules/minipass-flush/node_modules/minipass/package.json +56 -0
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +15 -0
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/index.js +649 -0
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/package.json +56 -0
- package/dist/node_modules/minipass-sized/node_modules/minipass/LICENSE +15 -0
- package/dist/node_modules/minipass-sized/node_modules/minipass/index.js +649 -0
- package/dist/node_modules/minipass-sized/node_modules/minipass/package.json +56 -0
- package/dist/node_modules/minizlib/node_modules/minipass/LICENSE +15 -0
- package/dist/node_modules/minizlib/node_modules/minipass/index.js +649 -0
- package/dist/node_modules/minizlib/node_modules/minipass/package.json +56 -0
- package/dist/node_modules/ms/index.js +1 -1
- package/dist/node_modules/ms/package.json +4 -5
- package/dist/node_modules/node-gyp/.release-please-manifest.json +3 -0
- package/dist/node_modules/node-gyp/bin/node-gyp.js +27 -29
- package/dist/node_modules/node-gyp/gyp/.release-please-manifest.json +3 -0
- package/dist/node_modules/node-gyp/gyp/data/ninja/build.ninja +4 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +12 -14
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +1 -1
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +3 -1
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +4 -2
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/common.py +67 -17
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +98 -5
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +5 -1
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +4 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +11 -15
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +4 -4
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +3 -6
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +10 -3
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +1 -4
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +3 -4
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +62 -31
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +47 -52
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +33 -5
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +12 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +2 -5
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/input.py +27 -42
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +12 -23
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +4 -5
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +20 -21
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +53 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +21 -20
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +3 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +177 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +23 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +15 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +108 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +252 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +83 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +359 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +61 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +192 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/markers.py +252 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +825 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +90 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +1030 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/tags.py +553 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/utils.py +172 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/version.py +563 -0
- package/dist/node_modules/node-gyp/gyp/pyproject.toml +84 -5
- package/dist/node_modules/node-gyp/gyp/release-please-config.json +11 -0
- package/dist/node_modules/node-gyp/lib/build.js +110 -96
- package/dist/node_modules/node-gyp/lib/clean.js +5 -5
- package/dist/node_modules/node-gyp/lib/configure.js +172 -204
- package/dist/node_modules/node-gyp/lib/create-config-gypi.js +14 -11
- package/dist/node_modules/node-gyp/lib/download.js +39 -0
- package/dist/node_modules/node-gyp/lib/find-node-directory.js +5 -5
- package/dist/node_modules/node-gyp/lib/find-python.js +128 -162
- package/dist/node_modules/node-gyp/lib/find-visualstudio.js +260 -133
- package/dist/node_modules/node-gyp/lib/install.js +27 -70
- package/dist/node_modules/node-gyp/lib/list.js +14 -15
- package/dist/node_modules/node-gyp/lib/log.js +168 -0
- package/dist/node_modules/node-gyp/lib/node-gyp.js +147 -174
- package/dist/node_modules/node-gyp/lib/process-release.js +22 -23
- package/dist/node_modules/node-gyp/lib/rebuild.js +1 -2
- package/dist/node_modules/node-gyp/lib/remove.js +18 -21
- package/dist/node_modules/node-gyp/lib/util.js +62 -45
- package/dist/node_modules/{cacache/node_modules/glob → node-gyp/node_modules/isexe}/LICENSE +1 -1
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.d.ts.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.js +46 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.js.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/options.d.ts.map +1 -0
- package/dist/node_modules/{@tootallnate/once/dist/types.js → node-gyp/node_modules/isexe/dist/cjs/options.js} +1 -1
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/options.js.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/package.json +3 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.d.ts.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.js +67 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.js.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.d.ts.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.js +62 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.js.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.d.ts.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.js +16 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.js.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.d.ts.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.js +2 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.js.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/package.json +3 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.d.ts.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.js +62 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.js.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.d.ts.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.js +57 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.js.map +1 -0
- package/dist/node_modules/node-gyp/node_modules/isexe/package.json +96 -0
- package/dist/node_modules/node-gyp/node_modules/which/bin/which.js +52 -0
- package/dist/node_modules/node-gyp/node_modules/which/lib/index.js +111 -0
- package/dist/node_modules/node-gyp/node_modules/which/package.json +57 -0
- package/dist/node_modules/node-gyp/package.json +12 -12
- package/dist/node_modules/node-gyp/release-please-config.json +40 -0
- package/dist/node_modules/nopt/bin/nopt.js +7 -34
- package/dist/node_modules/nopt/lib/debug.js +5 -0
- package/dist/node_modules/nopt/lib/nopt-lib.js +479 -0
- package/dist/node_modules/nopt/lib/nopt.js +21 -506
- package/dist/node_modules/nopt/lib/type-defs.js +91 -0
- package/dist/node_modules/nopt/package.json +13 -15
- package/dist/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/package-json-from-dist/dist/commonjs/index.js +124 -0
- package/dist/node_modules/package-json-from-dist/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/package-json-from-dist/dist/commonjs/package.json +3 -0
- package/dist/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/package-json-from-dist/dist/esm/index.js +119 -0
- package/dist/node_modules/package-json-from-dist/dist/esm/index.js.map +1 -0
- package/dist/node_modules/package-json-from-dist/dist/esm/package.json +3 -0
- package/dist/node_modules/package-json-from-dist/package.json +68 -0
- package/dist/node_modules/path-key/index.js +16 -0
- package/dist/node_modules/path-key/license +9 -0
- package/dist/node_modules/path-key/package.json +39 -0
- package/dist/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
- package/dist/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/dist/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/path-scurry/dist/esm/index.js +1979 -0
- package/dist/node_modules/path-scurry/dist/esm/index.js.map +1 -0
- package/dist/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/dist/node_modules/path-scurry/package.json +89 -0
- package/dist/node_modules/{inflight → proc-log}/LICENSE +1 -1
- package/dist/node_modules/proc-log/lib/index.js +153 -0
- package/dist/node_modules/proc-log/package.json +45 -0
- package/dist/node_modules/semver/bin/semver.js +5 -14
- package/dist/node_modules/semver/classes/range.js +4 -3
- package/dist/node_modules/semver/classes/semver.js +1 -1
- package/dist/node_modules/semver/functions/coerce.js +13 -5
- package/dist/node_modules/semver/internal/lrucache.js +40 -0
- package/dist/node_modules/semver/internal/re.js +7 -2
- package/dist/node_modules/semver/package.json +8 -18
- package/dist/node_modules/shebang-command/index.js +19 -0
- package/dist/node_modules/shebang-command/license +9 -0
- package/dist/node_modules/shebang-command/package.json +34 -0
- package/dist/node_modules/shebang-regex/index.js +2 -0
- package/dist/node_modules/shebang-regex/license +9 -0
- package/dist/node_modules/shebang-regex/package.json +35 -0
- package/dist/node_modules/signal-exit/LICENSE.txt +1 -1
- package/dist/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
- package/dist/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- package/dist/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
- package/dist/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
- package/dist/node_modules/signal-exit/dist/cjs/index.js +279 -0
- package/dist/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
- package/dist/node_modules/signal-exit/dist/cjs/package.json +3 -0
- package/dist/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
- package/dist/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- package/dist/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
- package/dist/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
- package/dist/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- package/dist/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
- package/dist/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
- package/dist/node_modules/signal-exit/dist/mjs/index.js +275 -0
- package/dist/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
- package/dist/node_modules/signal-exit/dist/mjs/package.json +3 -0
- package/dist/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
- package/dist/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- package/dist/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
- package/dist/node_modules/signal-exit/package.json +87 -19
- package/dist/node_modules/socks/build/common/helpers.js +5 -1
- package/dist/node_modules/socks/build/common/helpers.js.map +1 -1
- package/dist/node_modules/socks/package.json +1 -1
- package/dist/node_modules/socks-proxy-agent/LICENSE +22 -0
- package/dist/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -0
- package/dist/node_modules/socks-proxy-agent/dist/index.js +134 -146
- package/dist/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
- package/dist/node_modules/socks-proxy-agent/package.json +33 -72
- package/dist/node_modules/ssri/lib/index.js +158 -102
- package/dist/node_modules/ssri/package.json +14 -12
- package/dist/node_modules/string-width/index.js +26 -19
- package/dist/node_modules/string-width/license +1 -1
- package/dist/node_modules/string-width/package.json +12 -9
- package/dist/node_modules/string-width-cjs/index.js +47 -0
- package/dist/node_modules/string-width-cjs/license +9 -0
- package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +10 -0
- package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/license +9 -0
- package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/package.json +55 -0
- package/dist/node_modules/{delegates/License → string-width-cjs/node_modules/emoji-regex/LICENSE-MIT.txt} +1 -1
- package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
- package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
- package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +6 -0
- package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/package.json +50 -0
- package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +6 -0
- package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +4 -0
- package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/license +9 -0
- package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/package.json +54 -0
- package/dist/node_modules/string-width-cjs/package.json +56 -0
- package/dist/node_modules/strip-ansi/index.js +13 -3
- package/dist/node_modules/strip-ansi/license +1 -1
- package/dist/node_modules/strip-ansi/package.json +10 -7
- package/dist/node_modules/strip-ansi-cjs/index.js +4 -0
- package/dist/node_modules/strip-ansi-cjs/license +9 -0
- package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
- package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license +9 -0
- package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
- package/dist/node_modules/strip-ansi-cjs/package.json +54 -0
- package/dist/node_modules/unique-filename/package.json +12 -9
- package/dist/node_modules/unique-slug/package.json +10 -7
- package/dist/node_modules/wrap-ansi/index.js +214 -0
- package/dist/node_modules/wrap-ansi/license +9 -0
- package/dist/node_modules/wrap-ansi/package.json +69 -0
- package/dist/node_modules/wrap-ansi-cjs/index.js +216 -0
- package/dist/node_modules/wrap-ansi-cjs/license +9 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license +9 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +163 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license +9 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json +56 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +6 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/package.json +50 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +6 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +47 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/license +9 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/package.json +56 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +4 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license +9 -0
- package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json +54 -0
- package/dist/node_modules/wrap-ansi-cjs/package.json +62 -0
- package/dist/pnpm.cjs +161888 -155937
- package/dist/pnpmrc +0 -7
- package/dist/{scripts/bash.sh → templates/completion.bash} +2 -1
- package/dist/{scripts/fish.sh → templates/completion.fish} +1 -1
- package/dist/templates/completion.ps1 +193 -0
- package/dist/templates/completion.zsh +27 -0
- package/dist/worker.js +5462 -9749
- package/package.json +140 -6
- package/dist/node_modules/@gar/promisify/index.js +0 -36
- package/dist/node_modules/@gar/promisify/package.json +0 -32
- package/dist/node_modules/@npmcli/fs/lib/common/owner-sync.js +0 -96
- package/dist/node_modules/@npmcli/fs/lib/common/owner.js +0 -96
- package/dist/node_modules/@npmcli/fs/lib/copy-file.js +0 -16
- package/dist/node_modules/@npmcli/fs/lib/fs.js +0 -14
- package/dist/node_modules/@npmcli/fs/lib/mkdir.js +0 -19
- package/dist/node_modules/@npmcli/fs/lib/mkdtemp.js +0 -23
- package/dist/node_modules/@npmcli/fs/lib/rm/index.js +0 -22
- package/dist/node_modules/@npmcli/fs/lib/rm/polyfill.js +0 -239
- package/dist/node_modules/@npmcli/fs/lib/with-owner-sync.js +0 -21
- package/dist/node_modules/@npmcli/fs/lib/with-owner.js +0 -21
- package/dist/node_modules/@npmcli/fs/lib/write-file.js +0 -14
- package/dist/node_modules/@npmcli/move-file/lib/index.js +0 -185
- package/dist/node_modules/@npmcli/move-file/package.json +0 -47
- package/dist/node_modules/@tootallnate/once/LICENSE +0 -21
- package/dist/node_modules/@tootallnate/once/dist/index.js +0 -24
- package/dist/node_modules/@tootallnate/once/dist/index.js.map +0 -1
- package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js +0 -3
- package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js.map +0 -1
- package/dist/node_modules/@tootallnate/once/dist/types.js.map +0 -1
- package/dist/node_modules/@tootallnate/once/package.json +0 -52
- package/dist/node_modules/abbrev/abbrev.js +0 -61
- package/dist/node_modules/agent-base/dist/src/index.js +0 -203
- package/dist/node_modules/agent-base/dist/src/index.js.map +0 -1
- package/dist/node_modules/agent-base/dist/src/promisify.js +0 -18
- package/dist/node_modules/agent-base/dist/src/promisify.js.map +0 -1
- package/dist/node_modules/agentkeepalive/browser.js +0 -5
- package/dist/node_modules/agentkeepalive/index.js +0 -5
- package/dist/node_modules/agentkeepalive/lib/agent.js +0 -402
- package/dist/node_modules/agentkeepalive/lib/constants.js +0 -14
- package/dist/node_modules/agentkeepalive/lib/https_agent.js +0 -51
- package/dist/node_modules/agentkeepalive/package.json +0 -56
- package/dist/node_modules/aproba/LICENSE +0 -14
- package/dist/node_modules/aproba/index.js +0 -105
- package/dist/node_modules/aproba/package.json +0 -35
- package/dist/node_modules/are-we-there-yet/lib/index.js +0 -4
- package/dist/node_modules/are-we-there-yet/lib/tracker-base.js +0 -11
- package/dist/node_modules/are-we-there-yet/lib/tracker-group.js +0 -116
- package/dist/node_modules/are-we-there-yet/lib/tracker-stream.js +0 -36
- package/dist/node_modules/are-we-there-yet/lib/tracker.js +0 -32
- package/dist/node_modules/are-we-there-yet/package.json +0 -56
- package/dist/node_modules/cacache/lib/util/fix-owner.js +0 -145
- package/dist/node_modules/cacache/lib/util/move-file.js +0 -56
- package/dist/node_modules/cacache/node_modules/brace-expansion/LICENSE +0 -21
- package/dist/node_modules/cacache/node_modules/brace-expansion/index.js +0 -203
- package/dist/node_modules/cacache/node_modules/brace-expansion/package.json +0 -46
- package/dist/node_modules/cacache/node_modules/glob/common.js +0 -244
- package/dist/node_modules/cacache/node_modules/glob/glob.js +0 -790
- package/dist/node_modules/cacache/node_modules/glob/package.json +0 -55
- package/dist/node_modules/cacache/node_modules/glob/sync.js +0 -486
- package/dist/node_modules/cacache/node_modules/minimatch/lib/path.js +0 -4
- package/dist/node_modules/cacache/node_modules/minimatch/minimatch.js +0 -944
- package/dist/node_modules/cacache/node_modules/minimatch/package.json +0 -35
- package/dist/node_modules/color-support/bin.js +0 -3
- package/dist/node_modules/color-support/browser.js +0 -14
- package/dist/node_modules/color-support/index.js +0 -134
- package/dist/node_modules/color-support/package.json +0 -36
- package/dist/node_modules/concat-map/LICENSE +0 -18
- package/dist/node_modules/concat-map/README.markdown +0 -62
- package/dist/node_modules/concat-map/index.js +0 -13
- package/dist/node_modules/concat-map/package.json +0 -43
- package/dist/node_modules/console-control-strings/LICENSE +0 -13
- package/dist/node_modules/console-control-strings/README.md~ +0 -140
- package/dist/node_modules/console-control-strings/index.js +0 -125
- package/dist/node_modules/console-control-strings/package.json +0 -27
- package/dist/node_modules/debug/node_modules/ms/index.js +0 -162
- package/dist/node_modules/debug/node_modules/ms/package.json +0 -37
- package/dist/node_modules/delegates/index.js +0 -121
- package/dist/node_modules/delegates/package.json +0 -13
- package/dist/node_modules/fs.realpath/LICENSE +0 -43
- package/dist/node_modules/fs.realpath/index.js +0 -66
- package/dist/node_modules/fs.realpath/old.js +0 -303
- package/dist/node_modules/fs.realpath/package.json +0 -26
- package/dist/node_modules/gauge/lib/base-theme.js +0 -18
- package/dist/node_modules/gauge/lib/error.js +0 -24
- package/dist/node_modules/gauge/lib/has-color.js +0 -4
- package/dist/node_modules/gauge/lib/index.js +0 -289
- package/dist/node_modules/gauge/lib/plumbing.js +0 -50
- package/dist/node_modules/gauge/lib/process.js +0 -3
- package/dist/node_modules/gauge/lib/progress-bar.js +0 -41
- package/dist/node_modules/gauge/lib/render-template.js +0 -222
- package/dist/node_modules/gauge/lib/set-immediate.js +0 -7
- package/dist/node_modules/gauge/lib/set-interval.js +0 -3
- package/dist/node_modules/gauge/lib/spin.js +0 -5
- package/dist/node_modules/gauge/lib/template-item.js +0 -87
- package/dist/node_modules/gauge/lib/theme-set.js +0 -122
- package/dist/node_modules/gauge/lib/themes.js +0 -56
- package/dist/node_modules/gauge/lib/wide-truncate.js +0 -31
- package/dist/node_modules/gauge/package.json +0 -66
- package/dist/node_modules/glob/common.js +0 -238
- package/dist/node_modules/glob/glob.js +0 -790
- package/dist/node_modules/glob/sync.js +0 -486
- package/dist/node_modules/has-unicode/LICENSE +0 -14
- package/dist/node_modules/has-unicode/index.js +0 -16
- package/dist/node_modules/has-unicode/package.json +0 -30
- package/dist/node_modules/http-proxy-agent/dist/agent.js +0 -145
- package/dist/node_modules/http-proxy-agent/dist/agent.js.map +0 -1
- package/dist/node_modules/https-proxy-agent/dist/agent.js +0 -177
- package/dist/node_modules/https-proxy-agent/dist/agent.js.map +0 -1
- package/dist/node_modules/humanize-ms/LICENSE +0 -17
- package/dist/node_modules/humanize-ms/index.js +0 -24
- package/dist/node_modules/humanize-ms/package.json +0 -37
- package/dist/node_modules/infer-owner/index.js +0 -71
- package/dist/node_modules/infer-owner/package.json +0 -26
- package/dist/node_modules/inflight/inflight.js +0 -54
- package/dist/node_modules/inflight/package.json +0 -29
- package/dist/node_modules/inherits/LICENSE +0 -16
- package/dist/node_modules/inherits/inherits.js +0 -9
- package/dist/node_modules/inherits/inherits_browser.js +0 -27
- package/dist/node_modules/inherits/package.json +0 -29
- package/dist/node_modules/lru-cache/index.js +0 -1227
- package/dist/node_modules/lru-cache/index.mjs +0 -1227
- package/dist/node_modules/make-fetch-happen/lib/agent.js +0 -214
- package/dist/node_modules/make-fetch-happen/lib/dns.js +0 -49
- package/dist/node_modules/minimatch/minimatch.js +0 -947
- package/dist/node_modules/node-gyp/.github/workflows/release-please-v9.yml +0 -57
- package/dist/node_modules/node-gyp/.github/workflows/release-please.yml +0 -56
- package/dist/node_modules/node-gyp/.github/workflows/tests.yml +0 -59
- package/dist/node_modules/node-gyp/.github/workflows/visual-studio.yml +0 -37
- package/dist/node_modules/node-gyp/gyp/.flake8 +0 -4
- package/dist/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml +0 -36
- package/dist/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml +0 -45
- package/dist/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml +0 -32
- package/dist/node_modules/node-gyp/gyp/.github/workflows/release-please.yml +0 -16
- package/dist/node_modules/node-gyp/gyp/tools/README +0 -15
- package/dist/node_modules/node-gyp/gyp/tools/Xcode/README +0 -5
- package/dist/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +0 -27
- package/dist/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +0 -226
- package/dist/node_modules/node-gyp/gyp/tools/emacs/README +0 -12
- package/dist/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el +0 -63
- package/dist/node_modules/node-gyp/gyp/tools/emacs/gyp.el +0 -275
- package/dist/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh +0 -7
- package/dist/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp +0 -1105
- package/dist/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified +0 -1107
- package/dist/node_modules/node-gyp/gyp/tools/graphviz.py +0 -102
- package/dist/node_modules/node-gyp/gyp/tools/pretty_gyp.py +0 -156
- package/dist/node_modules/node-gyp/gyp/tools/pretty_sln.py +0 -181
- package/dist/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +0 -339
- package/dist/node_modules/node-gyp/update-gyp.py +0 -64
- package/dist/node_modules/npmlog/lib/log.js +0 -404
- package/dist/node_modules/npmlog/package.json +0 -51
- package/dist/node_modules/once/once.js +0 -42
- package/dist/node_modules/once/package.json +0 -33
- package/dist/node_modules/path-is-absolute/index.js +0 -20
- package/dist/node_modules/path-is-absolute/license +0 -21
- package/dist/node_modules/path-is-absolute/package.json +0 -43
- package/dist/node_modules/promise-inflight/LICENSE +0 -14
- package/dist/node_modules/promise-inflight/inflight.js +0 -36
- package/dist/node_modules/promise-inflight/package.json +0 -24
- package/dist/node_modules/readable-stream/LICENSE +0 -47
- package/dist/node_modules/readable-stream/errors-browser.js +0 -127
- package/dist/node_modules/readable-stream/errors.js +0 -116
- package/dist/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/dist/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
- package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
- package/dist/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
- package/dist/node_modules/readable-stream/lib/_stream_transform.js +0 -190
- package/dist/node_modules/readable-stream/lib/_stream_writable.js +0 -641
- package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
- package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
- package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
- package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
- package/dist/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/dist/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
- package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
- package/dist/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
- package/dist/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/dist/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/dist/node_modules/readable-stream/package.json +0 -68
- package/dist/node_modules/readable-stream/readable-browser.js +0 -9
- package/dist/node_modules/readable-stream/readable.js +0 -16
- package/dist/node_modules/rimraf/LICENSE +0 -15
- package/dist/node_modules/rimraf/bin.js +0 -68
- package/dist/node_modules/rimraf/package.json +0 -32
- package/dist/node_modules/rimraf/rimraf.js +0 -360
- package/dist/node_modules/safe-buffer/index.js +0 -65
- package/dist/node_modules/safe-buffer/package.json +0 -51
- package/dist/node_modules/semver/node_modules/lru-cache/LICENSE +0 -15
- package/dist/node_modules/semver/node_modules/lru-cache/index.js +0 -334
- package/dist/node_modules/semver/node_modules/lru-cache/package.json +0 -34
- package/dist/node_modules/set-blocking/index.js +0 -7
- package/dist/node_modules/set-blocking/package.json +0 -42
- package/dist/node_modules/signal-exit/index.js +0 -202
- package/dist/node_modules/signal-exit/signals.js +0 -53
- package/dist/node_modules/string_decoder/LICENSE +0 -48
- package/dist/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/dist/node_modules/string_decoder/package.json +0 -34
- package/dist/node_modules/util-deprecate/LICENSE +0 -24
- package/dist/node_modules/util-deprecate/browser.js +0 -67
- package/dist/node_modules/util-deprecate/node.js +0 -6
- package/dist/node_modules/util-deprecate/package.json +0 -27
- package/dist/node_modules/wide-align/LICENSE +0 -14
- package/dist/node_modules/wide-align/align.js +0 -65
- package/dist/node_modules/wide-align/package.json +0 -33
- package/dist/node_modules/wrappy/LICENSE +0 -15
- package/dist/node_modules/wrappy/package.json +0 -29
- package/dist/node_modules/wrappy/wrappy.js +0 -33
- package/dist/scripts/zsh.sh +0 -18
- /package/dist/node_modules/@npmcli/fs/lib/{errors.js → cp/errors.js} +0 -0
- /package/dist/node_modules/{cacache/node_modules/brace-expansion → brace-expansion}/.github/FUNDING.yml +0 -0
- /package/dist/node_modules/{color-support → cacache/node_modules/fs-minipass}/LICENSE +0 -0
- /package/dist/node_modules/{minipass → fs-minipass/node_modules/minipass}/index.js +0 -0
- /package/dist/node_modules/{once → node-gyp/node_modules/which}/LICENSE +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// give it a pattern, and it'll be able to tell you if
|
|
2
|
+
// a given path should be ignored.
|
|
3
|
+
// Ignoring a path ignores its children if the pattern ends in /**
|
|
4
|
+
// Ignores are always parsed in dot:true mode
|
|
5
|
+
import { Minimatch } from 'minimatch';
|
|
6
|
+
import { Pattern } from './pattern.js';
|
|
7
|
+
const defaultPlatform = (typeof process === 'object' &&
|
|
8
|
+
process &&
|
|
9
|
+
typeof process.platform === 'string') ?
|
|
10
|
+
process.platform
|
|
11
|
+
: 'linux';
|
|
12
|
+
/**
|
|
13
|
+
* Class used to process ignored patterns
|
|
14
|
+
*/
|
|
15
|
+
export class Ignore {
|
|
16
|
+
relative;
|
|
17
|
+
relativeChildren;
|
|
18
|
+
absolute;
|
|
19
|
+
absoluteChildren;
|
|
20
|
+
platform;
|
|
21
|
+
mmopts;
|
|
22
|
+
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
|
|
23
|
+
this.relative = [];
|
|
24
|
+
this.absolute = [];
|
|
25
|
+
this.relativeChildren = [];
|
|
26
|
+
this.absoluteChildren = [];
|
|
27
|
+
this.platform = platform;
|
|
28
|
+
this.mmopts = {
|
|
29
|
+
dot: true,
|
|
30
|
+
nobrace,
|
|
31
|
+
nocase,
|
|
32
|
+
noext,
|
|
33
|
+
noglobstar,
|
|
34
|
+
optimizationLevel: 2,
|
|
35
|
+
platform,
|
|
36
|
+
nocomment: true,
|
|
37
|
+
nonegate: true,
|
|
38
|
+
};
|
|
39
|
+
for (const ign of ignored)
|
|
40
|
+
this.add(ign);
|
|
41
|
+
}
|
|
42
|
+
add(ign) {
|
|
43
|
+
// this is a little weird, but it gives us a clean set of optimized
|
|
44
|
+
// minimatch matchers, without getting tripped up if one of them
|
|
45
|
+
// ends in /** inside a brace section, and it's only inefficient at
|
|
46
|
+
// the start of the walk, not along it.
|
|
47
|
+
// It'd be nice if the Pattern class just had a .test() method, but
|
|
48
|
+
// handling globstars is a bit of a pita, and that code already lives
|
|
49
|
+
// in minimatch anyway.
|
|
50
|
+
// Another way would be if maybe Minimatch could take its set/globParts
|
|
51
|
+
// as an option, and then we could at least just use Pattern to test
|
|
52
|
+
// for absolute-ness.
|
|
53
|
+
// Yet another way, Minimatch could take an array of glob strings, and
|
|
54
|
+
// a cwd option, and do the right thing.
|
|
55
|
+
const mm = new Minimatch(ign, this.mmopts);
|
|
56
|
+
for (let i = 0; i < mm.set.length; i++) {
|
|
57
|
+
const parsed = mm.set[i];
|
|
58
|
+
const globParts = mm.globParts[i];
|
|
59
|
+
/* c8 ignore start */
|
|
60
|
+
if (!parsed || !globParts) {
|
|
61
|
+
throw new Error('invalid pattern object');
|
|
62
|
+
}
|
|
63
|
+
// strip off leading ./ portions
|
|
64
|
+
// https://github.com/isaacs/node-glob/issues/570
|
|
65
|
+
while (parsed[0] === '.' && globParts[0] === '.') {
|
|
66
|
+
parsed.shift();
|
|
67
|
+
globParts.shift();
|
|
68
|
+
}
|
|
69
|
+
/* c8 ignore stop */
|
|
70
|
+
const p = new Pattern(parsed, globParts, 0, this.platform);
|
|
71
|
+
const m = new Minimatch(p.globString(), this.mmopts);
|
|
72
|
+
const children = globParts[globParts.length - 1] === '**';
|
|
73
|
+
const absolute = p.isAbsolute();
|
|
74
|
+
if (absolute)
|
|
75
|
+
this.absolute.push(m);
|
|
76
|
+
else
|
|
77
|
+
this.relative.push(m);
|
|
78
|
+
if (children) {
|
|
79
|
+
if (absolute)
|
|
80
|
+
this.absoluteChildren.push(m);
|
|
81
|
+
else
|
|
82
|
+
this.relativeChildren.push(m);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
ignored(p) {
|
|
87
|
+
const fullpath = p.fullpath();
|
|
88
|
+
const fullpaths = `${fullpath}/`;
|
|
89
|
+
const relative = p.relative() || '.';
|
|
90
|
+
const relatives = `${relative}/`;
|
|
91
|
+
for (const m of this.relative) {
|
|
92
|
+
if (m.match(relative) || m.match(relatives))
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
for (const m of this.absolute) {
|
|
96
|
+
if (m.match(fullpath) || m.match(fullpaths))
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
childrenIgnored(p) {
|
|
102
|
+
const fullpath = p.fullpath() + '/';
|
|
103
|
+
const relative = (p.relative() || '.') + '/';
|
|
104
|
+
for (const m of this.relativeChildren) {
|
|
105
|
+
if (m.match(relative))
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
for (const m of this.absoluteChildren) {
|
|
109
|
+
if (m.match(fullpath))
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=ignore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;AAE7C,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAStC,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CACrC,CAAC,CAAC;IACD,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEX;;GAEG;AACH,MAAM,OAAO,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAiB;IACzB,MAAM,CAAkB;IAExB,YACE,OAAiB,EACjB,EACE,O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AAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;QAC1D,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;QAC1D,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,eAAe,CAAC,CAAO;QACrB,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAA;QACnC,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,GAAG,GAAG,CAAA;QAC5C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;QACpC,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;QACpC,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n add?: (ignore: string) => void\n}\n\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n platform: NodeJS.Platform\n mmopts: MinimatchOptions\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts,\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n this.platform = platform\n this.mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n for (const ign of ignored) this.add(ign)\n }\n\n add(ign: string) {\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n const mm = new Minimatch(ign, this.mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n /* c8 ignore start */\n if (!parsed || !globParts) {\n throw new Error('invalid pattern object')\n }\n // strip off leading ./ portions\n // https://github.com/isaacs/node-glob/issues/570\n while (parsed[0] === '.' && globParts[0] === '.') {\n parsed.shift()\n globParts.shift()\n }\n /* c8 ignore stop */\n const p = new Pattern(parsed, globParts, 0, this.platform)\n const m = new Minimatch(p.globString(), this.mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) return true\n }\n return false\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,YAAY,EACV,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YA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AG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AASxE,eAAO,MAAM,UAAU,uBAAiB,CAAA;AACxC,eAAO,MAAM,MAAM;;CAAsD,CAAA;AACzE,eAAO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,OAAO;;CAElB,CAAA;AACF,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAEF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgBf,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { escape, unescape } from 'minimatch';
|
|
2
|
+
import { Glob } from './glob.js';
|
|
3
|
+
import { hasMagic } from './has-magic.js';
|
|
4
|
+
export { escape, unescape } from 'minimatch';
|
|
5
|
+
export { Glob } from './glob.js';
|
|
6
|
+
export { hasMagic } from './has-magic.js';
|
|
7
|
+
export { Ignore } from './ignore.js';
|
|
8
|
+
export function globStreamSync(pattern, options = {}) {
|
|
9
|
+
return new Glob(pattern, options).streamSync();
|
|
10
|
+
}
|
|
11
|
+
export function globStream(pattern, options = {}) {
|
|
12
|
+
return new Glob(pattern, options).stream();
|
|
13
|
+
}
|
|
14
|
+
export function globSync(pattern, options = {}) {
|
|
15
|
+
return new Glob(pattern, options).walkSync();
|
|
16
|
+
}
|
|
17
|
+
async function glob_(pattern, options = {}) {
|
|
18
|
+
return new Glob(pattern, options).walk();
|
|
19
|
+
}
|
|
20
|
+
export function globIterateSync(pattern, options = {}) {
|
|
21
|
+
return new Glob(pattern, options).iterateSync();
|
|
22
|
+
}
|
|
23
|
+
export function globIterate(pattern, options = {}) {
|
|
24
|
+
return new Glob(pattern, options).iterate();
|
|
25
|
+
}
|
|
26
|
+
// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc
|
|
27
|
+
export const streamSync = globStreamSync;
|
|
28
|
+
export const stream = Object.assign(globStream, { sync: globStreamSync });
|
|
29
|
+
export const iterateSync = globIterateSync;
|
|
30
|
+
export const iterate = Object.assign(globIterate, {
|
|
31
|
+
sync: globIterateSync,
|
|
32
|
+
});
|
|
33
|
+
export const sync = Object.assign(globSync, {
|
|
34
|
+
stream: globStreamSync,
|
|
35
|
+
iterate: globIterateSync,
|
|
36
|
+
});
|
|
37
|
+
export const glob = Object.assign(glob_, {
|
|
38
|
+
glob: glob_,
|
|
39
|
+
globSync,
|
|
40
|
+
sync,
|
|
41
|
+
globStream,
|
|
42
|
+
stream,
|
|
43
|
+
globStreamSync,
|
|
44
|
+
streamSync,
|
|
45
|
+
globIterate,
|
|
46
|
+
iterate,
|
|
47
|
+
globIterateSync,
|
|
48
|
+
iterateSync,
|
|
49
|
+
Glob,
|
|
50
|
+
hasMagic,
|
|
51
|
+
escape,
|
|
52
|
+
unescape,
|
|
53
|
+
});
|
|
54
|
+
glob.glob = glob;
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAS5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAQ5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAOhC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAyBpC,MAAM,UAAU,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AAsBD,MAAM,UAAU,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAA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AK,EAAE;IACvC,IAAI,EAAE,KAAK;IACX,QAAQ;IACR,IAAI;IACJ,UAAU;IACV,MAAM;IACN,cAAc;IACd,UAAU;IACV,WAAW;IACX,OAAO;IACP,eAAe;IACf,WAAW;IACX,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,QAAQ;CACT,CAAC,CAAA;AACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\nexport { escape, unescape } from 'minimatch'\nexport type {\n FSOption,\n Path,\n WalkOptions,\n WalkOptionsWithFileTypesTrue,\n WalkOptionsWithFileTypesUnset,\n} from 'path-scurry'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport { Ignore } from './ignore.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass<Path, Path>\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass<string, string>\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset,\n): Minipass<string, string>\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass<Path, Path> | Minipass<string, string>\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass<string, string>\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass<Path, Path>\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Minipass<string, string>\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass<Path, Path> | Minipass<string, string>\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions,\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Promise<string[]>\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Promise<Path[]>\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Promise<string[]>\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions,\n): Promise<Path[] | string[]>\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Generator<string, void, void>\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Generator<Path, void, void>\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Generator<string, void, void>\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions,\n): Generator<Path, void, void> | Generator<string, void, void>\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): AsyncGenerator<string, void, void>\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): AsyncGenerator<Path, void, void>\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): AsyncGenerator<string, void, void>\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions,\n): AsyncGenerator<Path, void, void> | AsyncGenerator<string, void, void>\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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AO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IASd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
// this is just a very light wrapper around 2 arrays with an offset index
|
|
2
|
+
import { GLOBSTAR } from 'minimatch';
|
|
3
|
+
const isPatternList = (pl) => pl.length >= 1;
|
|
4
|
+
const isGlobList = (gl) => gl.length >= 1;
|
|
5
|
+
/**
|
|
6
|
+
* An immutable-ish view on an array of glob parts and their parsed
|
|
7
|
+
* results
|
|
8
|
+
*/
|
|
9
|
+
export class Pattern {
|
|
10
|
+
#patternList;
|
|
11
|
+
#globList;
|
|
12
|
+
#index;
|
|
13
|
+
length;
|
|
14
|
+
#platform;
|
|
15
|
+
#rest;
|
|
16
|
+
#globString;
|
|
17
|
+
#isDrive;
|
|
18
|
+
#isUNC;
|
|
19
|
+
#isAbsolute;
|
|
20
|
+
#followGlobstar = true;
|
|
21
|
+
constructor(patternList, globList, index, platform) {
|
|
22
|
+
if (!isPatternList(patternList)) {
|
|
23
|
+
throw new TypeError('empty pattern list');
|
|
24
|
+
}
|
|
25
|
+
if (!isGlobList(globList)) {
|
|
26
|
+
throw new TypeError('empty glob list');
|
|
27
|
+
}
|
|
28
|
+
if (globList.length !== patternList.length) {
|
|
29
|
+
throw new TypeError('mismatched pattern list and glob list lengths');
|
|
30
|
+
}
|
|
31
|
+
this.length = patternList.length;
|
|
32
|
+
if (index < 0 || index >= this.length) {
|
|
33
|
+
throw new TypeError('index out of range');
|
|
34
|
+
}
|
|
35
|
+
this.#patternList = patternList;
|
|
36
|
+
this.#globList = globList;
|
|
37
|
+
this.#index = index;
|
|
38
|
+
this.#platform = platform;
|
|
39
|
+
// normalize root entries of absolute patterns on initial creation.
|
|
40
|
+
if (this.#index === 0) {
|
|
41
|
+
// c: => ['c:/']
|
|
42
|
+
// C:/ => ['C:/']
|
|
43
|
+
// C:/x => ['C:/', 'x']
|
|
44
|
+
// //host/share => ['//host/share/']
|
|
45
|
+
// //host/share/ => ['//host/share/']
|
|
46
|
+
// //host/share/x => ['//host/share/', 'x']
|
|
47
|
+
// /etc => ['/', 'etc']
|
|
48
|
+
// / => ['/']
|
|
49
|
+
if (this.isUNC()) {
|
|
50
|
+
// '' / '' / 'host' / 'share'
|
|
51
|
+
const [p0, p1, p2, p3, ...prest] = this.#patternList;
|
|
52
|
+
const [g0, g1, g2, g3, ...grest] = this.#globList;
|
|
53
|
+
if (prest[0] === '') {
|
|
54
|
+
// ends in /
|
|
55
|
+
prest.shift();
|
|
56
|
+
grest.shift();
|
|
57
|
+
}
|
|
58
|
+
const p = [p0, p1, p2, p3, ''].join('/');
|
|
59
|
+
const g = [g0, g1, g2, g3, ''].join('/');
|
|
60
|
+
this.#patternList = [p, ...prest];
|
|
61
|
+
this.#globList = [g, ...grest];
|
|
62
|
+
this.length = this.#patternList.length;
|
|
63
|
+
}
|
|
64
|
+
else if (this.isDrive() || this.isAbsolute()) {
|
|
65
|
+
const [p1, ...prest] = this.#patternList;
|
|
66
|
+
const [g1, ...grest] = this.#globList;
|
|
67
|
+
if (prest[0] === '') {
|
|
68
|
+
// ends in /
|
|
69
|
+
prest.shift();
|
|
70
|
+
grest.shift();
|
|
71
|
+
}
|
|
72
|
+
const p = p1 + '/';
|
|
73
|
+
const g = g1 + '/';
|
|
74
|
+
this.#patternList = [p, ...prest];
|
|
75
|
+
this.#globList = [g, ...grest];
|
|
76
|
+
this.length = this.#patternList.length;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The first entry in the parsed list of patterns
|
|
82
|
+
*/
|
|
83
|
+
pattern() {
|
|
84
|
+
return this.#patternList[this.#index];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* true of if pattern() returns a string
|
|
88
|
+
*/
|
|
89
|
+
isString() {
|
|
90
|
+
return typeof this.#patternList[this.#index] === 'string';
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* true of if pattern() returns GLOBSTAR
|
|
94
|
+
*/
|
|
95
|
+
isGlobstar() {
|
|
96
|
+
return this.#patternList[this.#index] === GLOBSTAR;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* true if pattern() returns a regexp
|
|
100
|
+
*/
|
|
101
|
+
isRegExp() {
|
|
102
|
+
return this.#patternList[this.#index] instanceof RegExp;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The /-joined set of glob parts that make up this pattern
|
|
106
|
+
*/
|
|
107
|
+
globString() {
|
|
108
|
+
return (this.#globString =
|
|
109
|
+
this.#globString ||
|
|
110
|
+
(this.#index === 0 ?
|
|
111
|
+
this.isAbsolute() ?
|
|
112
|
+
this.#globList[0] + this.#globList.slice(1).join('/')
|
|
113
|
+
: this.#globList.join('/')
|
|
114
|
+
: this.#globList.slice(this.#index).join('/')));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* true if there are more pattern parts after this one
|
|
118
|
+
*/
|
|
119
|
+
hasMore() {
|
|
120
|
+
return this.length > this.#index + 1;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The rest of the pattern after this part, or null if this is the end
|
|
124
|
+
*/
|
|
125
|
+
rest() {
|
|
126
|
+
if (this.#rest !== undefined)
|
|
127
|
+
return this.#rest;
|
|
128
|
+
if (!this.hasMore())
|
|
129
|
+
return (this.#rest = null);
|
|
130
|
+
this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform);
|
|
131
|
+
this.#rest.#isAbsolute = this.#isAbsolute;
|
|
132
|
+
this.#rest.#isUNC = this.#isUNC;
|
|
133
|
+
this.#rest.#isDrive = this.#isDrive;
|
|
134
|
+
return this.#rest;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* true if the pattern represents a //unc/path/ on windows
|
|
138
|
+
*/
|
|
139
|
+
isUNC() {
|
|
140
|
+
const pl = this.#patternList;
|
|
141
|
+
return this.#isUNC !== undefined ?
|
|
142
|
+
this.#isUNC
|
|
143
|
+
: (this.#isUNC =
|
|
144
|
+
this.#platform === 'win32' &&
|
|
145
|
+
this.#index === 0 &&
|
|
146
|
+
pl[0] === '' &&
|
|
147
|
+
pl[1] === '' &&
|
|
148
|
+
typeof pl[2] === 'string' &&
|
|
149
|
+
!!pl[2] &&
|
|
150
|
+
typeof pl[3] === 'string' &&
|
|
151
|
+
!!pl[3]);
|
|
152
|
+
}
|
|
153
|
+
// pattern like C:/...
|
|
154
|
+
// split = ['C:', ...]
|
|
155
|
+
// XXX: would be nice to handle patterns like `c:*` to test the cwd
|
|
156
|
+
// in c: for *, but I don't know of a way to even figure out what that
|
|
157
|
+
// cwd is without actually chdir'ing into it?
|
|
158
|
+
/**
|
|
159
|
+
* True if the pattern starts with a drive letter on Windows
|
|
160
|
+
*/
|
|
161
|
+
isDrive() {
|
|
162
|
+
const pl = this.#patternList;
|
|
163
|
+
return this.#isDrive !== undefined ?
|
|
164
|
+
this.#isDrive
|
|
165
|
+
: (this.#isDrive =
|
|
166
|
+
this.#platform === 'win32' &&
|
|
167
|
+
this.#index === 0 &&
|
|
168
|
+
this.length > 1 &&
|
|
169
|
+
typeof pl[0] === 'string' &&
|
|
170
|
+
/^[a-z]:$/i.test(pl[0]));
|
|
171
|
+
}
|
|
172
|
+
// pattern = '/' or '/...' or '/x/...'
|
|
173
|
+
// split = ['', ''] or ['', ...] or ['', 'x', ...]
|
|
174
|
+
// Drive and UNC both considered absolute on windows
|
|
175
|
+
/**
|
|
176
|
+
* True if the pattern is rooted on an absolute path
|
|
177
|
+
*/
|
|
178
|
+
isAbsolute() {
|
|
179
|
+
const pl = this.#patternList;
|
|
180
|
+
return this.#isAbsolute !== undefined ?
|
|
181
|
+
this.#isAbsolute
|
|
182
|
+
: (this.#isAbsolute =
|
|
183
|
+
(pl[0] === '' && pl.length > 1) ||
|
|
184
|
+
this.isDrive() ||
|
|
185
|
+
this.isUNC());
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* consume the root of the pattern, and return it
|
|
189
|
+
*/
|
|
190
|
+
root() {
|
|
191
|
+
const p = this.#patternList[0];
|
|
192
|
+
return (typeof p === 'string' && this.isAbsolute() && this.#index === 0) ?
|
|
193
|
+
p
|
|
194
|
+
: '';
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Check to see if the current globstar pattern is allowed to follow
|
|
198
|
+
* a symbolic link.
|
|
199
|
+
*/
|
|
200
|
+
checkFollowGlobstar() {
|
|
201
|
+
return !(this.#index === 0 ||
|
|
202
|
+
!this.isGlobstar() ||
|
|
203
|
+
!this.#followGlobstar);
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Mark that the current globstar pattern is following a symbolic link
|
|
207
|
+
*/
|
|
208
|
+
markFollowGlobstar() {
|
|
209
|
+
if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
|
|
210
|
+
return false;
|
|
211
|
+
this.#followGlobstar = false;
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=pattern.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAChB,MAAM,UAAU,GAAG,CAAC,EAAY,EAAkB,EAAE,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAM,OAAO,OA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C,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAChE,CAAC,CAAC;YACD,CAAC;YACH,CAAC,CAAC,EAAE,CAAA;IACR,CAAC;IAED;;;OAGG;IACH,mBAAmB;QACjB,OAAO,CAAC,CACN,IAAI,CAAC,MAAM,KAAK,CAAC;YACjB,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,CAAC,IAAI,CAAC,eAAe,CACtB,CAAA;IACH,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAClE,OAAO,KAAK,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[],\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform,\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index] as MMPattern\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0 ?\n this.isAbsolute() ?\n this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform,\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined ?\n this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined ?\n this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined ?\n this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return (\n typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ) ?\n p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGxC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;CAM3C;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CA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