@socketsecurity/lib 6.0.8 → 6.0.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/CHANGELOG.md +28 -0
- package/README.md +8 -9
- package/dist/abort/signal.d.ts +1 -1
- package/dist/abort/signal.js +1 -1
- package/dist/ai/agent-context.d.mts +1 -1
- package/dist/ai/agent-context.js +3 -2
- package/dist/ai/backends.d.mts +3 -3
- package/dist/ai/backends.js +2 -2
- package/dist/ai/billing-context.d.mts +74 -0
- package/dist/ai/billing-context.js +129 -0
- package/dist/ai/credentials.d.mts +39 -5
- package/dist/ai/credentials.js +61 -6
- package/dist/ai/discover.d.mts +4 -0
- package/dist/ai/discover.js +4 -0
- package/dist/ai/exec.d.mts +1 -1
- package/dist/ai/exec.js +1 -1
- package/dist/ai/http.d.mts +8 -8
- package/dist/ai/http.js +6 -6
- package/dist/ai/profiles.d.mts +9 -10
- package/dist/ai/profiles.js +0 -5
- package/dist/ai/role.d.mts +58 -0
- package/dist/ai/role.js +96 -0
- package/dist/ai/route-heuristic.d.mts +177 -0
- package/dist/ai/route-heuristic.js +194 -0
- package/dist/ai/route.d.mts +31 -17
- package/dist/ai/route.js +35 -19
- package/dist/ai/spawn.d.mts +34 -1
- package/dist/ai/spawn.js +115 -3
- package/dist/ai/subagent-status.d.mts +2 -0
- package/dist/ai/subagent-status.js +2 -0
- package/dist/ai/tier.d.mts +1 -1
- package/dist/ai/types.d.mts +19 -2
- package/dist/ai/worktree.d.mts +1 -1
- package/dist/ai/worktree.js +3 -2
- package/dist/argv/parse.d.ts +2 -0
- package/dist/argv/parse.js +2 -0
- package/dist/bin/_internal.d.ts +1 -1
- package/dist/bin/_internal.js +1 -1
- package/dist/bin/prim.cjs +19253 -13937
- package/dist/bin/resolve.js +1 -1
- package/dist/bin/shadow.js +2 -1
- package/dist/bin/which.d.ts +28 -3
- package/dist/bin/which.js +45 -3
- package/dist/cacache/_internal.d.ts +10 -2
- package/dist/cacache/_internal.js +6 -10
- package/dist/cache/ttl/_internal.d.ts +33 -0
- package/dist/cache/ttl/_internal.js +68 -0
- package/dist/cache/ttl/browser.d.ts +56 -0
- package/dist/cache/ttl/browser.js +257 -0
- package/dist/cache/ttl/store.js +11 -34
- package/dist/cache/ttl/types.d.ts +46 -3
- package/dist/checks/primordials-defaults.d.ts +5 -5
- package/dist/checks/primordials-defaults.js +5 -5
- package/dist/checks/primordials.d.ts +1 -1
- package/dist/checks/primordials.js +25 -17
- package/dist/cli/check-primordials.d.ts +6 -1
- package/dist/cli/check-primordials.js +14 -5
- package/dist/cli/check.js +1 -1
- package/dist/cli/socket-lib.d.ts +1 -1
- package/dist/cli/socket-lib.js +3 -3
- package/dist/colors/socket-palette.d.ts +1 -1
- package/dist/compression/brotli.d.ts +6 -2
- package/dist/compression/brotli.js +5 -1
- package/dist/compression/gzip.d.ts +6 -2
- package/dist/compression/gzip.js +7 -2
- package/dist/config/layers.d.ts +53 -0
- package/dist/config/layers.js +83 -0
- package/dist/constants/agents.d.ts +3 -0
- package/dist/constants/agents.js +3 -0
- package/dist/constants/node.d.ts +14 -0
- package/dist/constants/node.js +14 -0
- package/dist/constants/package-default-node-range.js +1 -5
- package/dist/constants/packages.d.ts +5 -0
- package/dist/constants/packages.js +5 -0
- package/dist/constants/platform.d.ts +1 -1
- package/dist/constants/platform.js +1 -1
- package/dist/constants/socket.js +1 -1
- package/dist/constants/typescript.d.ts +5 -0
- package/dist/constants/typescript.js +5 -0
- package/dist/debug/_internal.d.ts +22 -7
- package/dist/debug/_internal.js +33 -15
- package/dist/debug/caller-info.js +1 -1
- package/dist/debug/namespace.js +11 -8
- package/dist/debug/output.d.ts +12 -1
- package/dist/debug/output.js +33 -16
- package/dist/dlx/binary-cache.js +1 -1
- package/dist/dlx/binary-resolution.js +8 -5
- package/dist/dlx/firewall.js +1 -1
- package/dist/dlx/lockfile.js +1 -1
- package/dist/eco/npm/npm/parse-lockfile.js +3 -2
- package/dist/eco/npm/vlt/exec.d.ts +1 -1
- package/dist/eco/npm/vlt/exec.js +1 -1
- package/dist/eco/npm/yarnpkg/yarn/parse-lockfile.js +1 -1
- package/dist/env/agents.d.ts +6 -0
- package/dist/env/agents.js +29 -0
- package/dist/env/flags.d.ts +12 -0
- package/dist/env/flags.js +23 -0
- package/dist/env/github-status.js +2 -2
- package/dist/env/providers.d.ts +6 -0
- package/dist/env/providers.js +23 -0
- package/dist/env/proxy.js +1 -1
- package/dist/env/rewire.d.ts +37 -3
- package/dist/env/rewire.js +60 -29
- package/dist/env/runtimes.d.ts +9 -0
- package/dist/env/runtimes.js +53 -0
- package/dist/env/socket-cli.d.ts +5 -2
- package/dist/env/socket-cli.js +6 -3
- package/dist/env/xdg.d.ts +17 -0
- package/dist/env/xdg.js +21 -1
- package/dist/errors/predicates.d.ts +3 -2
- package/dist/errors/predicates.js +5 -3
- package/dist/events/exit/_internal.d.ts +1 -23
- package/dist/external/@npmcli/package-json.js +3570 -4905
- package/dist/external/@npmcli/promise-spawn.js +2 -2
- package/dist/external/@sinclair/typebox/value.js +5 -4
- package/dist/external/@socketregistry/yocto-spinner.js +3 -3
- package/dist/external/@yarnpkg/extensions.js +1 -1
- package/dist/external/adm-zip.d.ts +82 -0
- package/dist/external/adm-zip.js +2 -2
- package/dist/external/cacache.d.ts +87 -0
- package/dist/external/debug.d.ts +22 -0
- package/dist/external/debug.js +11 -4
- package/dist/external/del.d.ts +1 -0
- package/dist/external/external-pack.d.ts +12 -0
- package/dist/external/external-pack.js +42 -35
- package/dist/external/fast-glob.d.ts +8 -0
- package/dist/external/fast-sort.d.ts +1 -0
- package/dist/external/get-east-asian-width.d.ts +5 -0
- package/dist/external/get-east-asian-width.js +8 -1
- package/dist/external/has-flag.d.ts +1 -0
- package/dist/external/inquirer-pack.d.ts +18 -0
- package/dist/external/libnpmexec.d.ts +35 -0
- package/dist/external/libnpmpack.d.ts +1 -0
- package/dist/external/make-fetch-happen.d.ts +13 -0
- package/dist/external/normalize-package-data.d.ts +4 -0
- package/dist/external/npm-core.d.ts +14 -0
- package/dist/external/npm-pack.d.ts +24 -0
- package/dist/external/npm-pack.js +28934 -31885
- package/dist/external/npm-package-arg.d.ts +4 -0
- package/dist/external/p-map.js +8 -1
- package/dist/external/pacote.d.ts +15 -0
- package/dist/external/pico-pack.d.ts +16 -0
- package/dist/external/pico-pack.js +38 -23
- package/dist/external/picomatch.d.ts +96 -0
- package/dist/external/pony-cause.d.ts +14 -0
- package/dist/external/semver.d.ts +60 -0
- package/dist/external/semver.js +1459 -4
- package/dist/external/shell-quote.d.ts +51 -0
- package/dist/external/shell-quote.js +55 -15
- package/dist/external/signal-exit.d.ts +1 -0
- package/dist/external/spdx-correct.d.ts +4 -0
- package/dist/external/spdx-expression-parse.d.ts +4 -0
- package/dist/external/spdx-pack.d.ts +10 -0
- package/dist/external/std-env.d.ts +284 -0
- package/dist/external/std-env.js +323 -0
- package/dist/external/streaming-iterables.d.ts +11 -0
- package/dist/external/supports-color.d.ts +1 -0
- package/dist/external/tar-fs.d.ts +31 -0
- package/dist/external/tar-fs.js +63 -16
- package/dist/external/validate-npm-package-name.d.ts +4 -0
- package/dist/external/which.d.ts +25 -0
- package/dist/external/which.js +2 -2
- package/dist/external/yargs-parser.d.ts +2 -0
- package/dist/external/yargs-parser.js +11 -3
- package/dist/external/yoctocolors-cjs.d.ts +51 -0
- package/dist/external-tools/bazel/asset-names.d.ts +1 -1
- package/dist/external-tools/bazel/from-download.d.ts +1 -1
- package/dist/external-tools/bazel/resolve.d.ts +3 -0
- package/dist/external-tools/bazel/resolve.js +3 -0
- package/dist/external-tools/cdxgen/asset-names.d.ts +5 -5
- package/dist/external-tools/cdxgen/asset-names.js +3 -3
- package/dist/external-tools/cdxgen/from-download.d.ts +2 -2
- package/dist/external-tools/cdxgen/from-download.js +1 -1
- package/dist/external-tools/cdxgen/resolve.d.ts +4 -1
- package/dist/external-tools/cdxgen/resolve.js +4 -1
- package/dist/external-tools/cdxgen/types.d.ts +1 -1
- package/dist/external-tools/from-download.d.ts +2 -2
- package/dist/external-tools/from-download.js +1 -1
- package/dist/external-tools/janus/asset-names.d.ts +4 -1
- package/dist/external-tools/janus/asset-names.js +3 -0
- package/dist/external-tools/janus/from-download.d.ts +3 -3
- package/dist/external-tools/janus/from-download.js +2 -2
- package/dist/external-tools/janus/resolve.d.ts +3 -0
- package/dist/external-tools/janus/resolve.js +3 -0
- package/dist/external-tools/jre/asset-names.d.ts +3 -1
- package/dist/external-tools/jre/asset-names.js +2 -0
- package/dist/external-tools/jre/detect-platform-arch.js +1 -1
- package/dist/external-tools/jre/from-download.d.ts +1 -1
- package/dist/external-tools/manifest.d.ts +5 -3
- package/dist/external-tools/manifest.js +5 -3
- package/dist/external-tools/opengrep/asset-names.d.ts +1 -1
- package/dist/external-tools/opengrep/resolve.d.ts +3 -0
- package/dist/external-tools/opengrep/resolve.js +3 -0
- package/dist/external-tools/python/asset-names.d.ts +3 -1
- package/dist/external-tools/python/asset-names.js +8 -4
- package/dist/external-tools/python/pin.js +3 -1
- package/dist/external-tools/python/resolve.d.ts +3 -0
- package/dist/external-tools/python/resolve.js +3 -0
- package/dist/external-tools/python/uv-install.d.ts +89 -0
- package/dist/external-tools/python/uv-install.js +165 -0
- package/dist/external-tools/sbt/resolve.d.ts +3 -0
- package/dist/external-tools/sbt/resolve.js +3 -0
- package/dist/external-tools/skillspector/from-uv.d.ts +30 -0
- package/dist/external-tools/skillspector/from-uv.js +56 -0
- package/dist/external-tools/skillspector/resolve.d.ts +18 -3
- package/dist/external-tools/skillspector/resolve.js +21 -8
- package/dist/external-tools/skillspector/types.d.ts +3 -1
- package/dist/external-tools/synp/resolve.d.ts +3 -0
- package/dist/external-tools/synp/resolve.js +3 -0
- package/dist/external-tools/trivy/asset-names.d.ts +1 -1
- package/dist/external-tools/trivy/resolve.d.ts +3 -0
- package/dist/external-tools/trivy/resolve.js +3 -0
- package/dist/external-tools/trufflehog/asset-names.d.ts +4 -1
- package/dist/external-tools/trufflehog/asset-names.js +3 -0
- package/dist/external-tools/trufflehog/from-download.d.ts +1 -1
- package/dist/external-tools/trufflehog/resolve.d.ts +3 -0
- package/dist/external-tools/trufflehog/resolve.js +3 -0
- package/dist/external-tools/uv/asset-names.d.ts +36 -0
- package/dist/external-tools/uv/asset-names.js +73 -0
- package/dist/external-tools/uv/from-download.d.ts +17 -0
- package/dist/external-tools/uv/from-download.js +50 -0
- package/dist/external-tools/uv/from-path.d.ts +5 -0
- package/dist/external-tools/uv/from-path.js +22 -0
- package/dist/external-tools/uv/from-vfs.d.ts +7 -0
- package/dist/external-tools/uv/from-vfs.js +26 -0
- package/dist/external-tools/uv/resolve.d.ts +28 -0
- package/dist/external-tools/uv/resolve.js +64 -0
- package/dist/external-tools/uv/types.d.ts +24 -0
- package/dist/external-tools/uv/types.js +2 -0
- package/dist/fleet/repo-config.d.ts +55 -0
- package/dist/fleet/repo-config.js +81 -0
- package/dist/fs/_internal.d.ts +1 -1
- package/dist/fs/_internal.js +1 -1
- package/dist/fs/access.d.ts +2 -0
- package/dist/fs/access.js +2 -0
- package/dist/fs/copy.d.ts +88 -0
- package/dist/fs/copy.js +89 -0
- package/dist/fs/find.js +1 -2
- package/dist/fs/inspect.d.ts +2 -2
- package/dist/fs/read-file.js +3 -4
- package/dist/fs/safe.js +2 -2
- package/dist/git/_internal.js +7 -3
- package/dist/github/commit.d.ts +92 -0
- package/dist/github/commit.js +113 -0
- package/dist/github/ghsa.js +1 -1
- package/dist/github/refs-graphql.js +1 -1
- package/dist/github/refs.js +10 -15
- package/dist/github/request.js +1 -1
- package/dist/github/token.d.ts +5 -2
- package/dist/github/token.js +6 -4
- package/dist/github/workflow-runs.d.ts +107 -0
- package/dist/github/workflow-runs.js +98 -0
- package/dist/globs/_internal.js +1 -1
- package/dist/http-request/_internal.d.ts +1 -1
- package/dist/http-request/browser.d.ts +6 -0
- package/dist/http-request/browser.js +4 -3
- package/dist/http-request/checksum-file.js +1 -1
- package/dist/http-request/download.js +2 -0
- package/dist/http-request/headers.d.ts +1 -1
- package/dist/http-request/headers.js +2 -2
- package/dist/http-request/request-attempt.js +6 -3
- package/dist/http-request/request-types.d.ts +10 -1
- package/dist/http-request/request.js +2 -2
- package/dist/http-request/user-agent.d.ts +23 -2
- package/dist/http-request/user-agent.js +48 -6
- package/dist/integrity.d.ts +127 -78
- package/dist/integrity.js +170 -84
- package/dist/json/format.js +4 -1
- package/dist/logger/_internal.d.ts +13 -15
- package/dist/logger/_internal.js +21 -21
- package/dist/logger/colors.d.ts +10 -5
- package/dist/logger/colors.js +7 -14
- package/dist/logger/console-methods.js +2 -2
- package/dist/logger/console.d.ts +1 -0
- package/dist/logger/console.js +9 -9
- package/dist/logger/node.js +2 -1
- package/dist/logger/symbols-builder.js +7 -8
- package/dist/logger/symbols.js +8 -8
- package/dist/native-messaging/install.js +1 -1
- package/dist/native-messaging/rate-limit.d.ts +4 -1
- package/dist/native-messaging/rate-limit.js +4 -1
- package/dist/node/events.d.ts +3 -0
- package/dist/node/events.js +3 -0
- package/dist/node/fs.d.ts +1 -1
- package/dist/node/module.d.ts +73 -2
- package/dist/node/module.js +97 -12
- package/dist/node/timers-promises.d.ts +3 -0
- package/dist/node/timers-promises.js +3 -0
- package/dist/node/url.d.ts +3 -0
- package/dist/node/url.js +3 -0
- package/dist/npm/meta-cache.d.ts +183 -0
- package/dist/npm/meta-cache.js +318 -0
- package/dist/npm/meta-slice.d.ts +27 -0
- package/dist/npm/meta-slice.js +68 -0
- package/dist/npm/meta-types.d.ts +282 -0
- package/dist/npm/meta-types.js +2 -0
- package/dist/npm/meta.d.ts +125 -0
- package/dist/npm/meta.js +347 -0
- package/dist/npm/registry.d.ts +212 -0
- package/dist/npm/registry.js +284 -0
- package/dist/objects/getters.d.ts +1 -1
- package/dist/objects/getters.js +1 -1
- package/dist/objects/predicates.js +1 -1
- package/dist/packages/exports.js +2 -2
- package/dist/packages/isolation.js +1 -1
- package/dist/packages/manifest.d.ts +29 -0
- package/dist/packages/manifest.js +44 -9
- package/dist/packages/metadata-extensions.js +2 -4
- package/dist/packages/normalize.js +1 -1
- package/dist/packages/provenance.d.ts +8 -0
- package/dist/packages/provenance.js +10 -2
- package/dist/packages/specs.js +1 -1
- package/dist/packages/tarball.js +1 -2
- package/dist/packages/validation.d.ts +0 -10
- package/dist/packages/validation.js +0 -14
- package/dist/paths/_internal.d.ts +1 -7
- package/dist/paths/_internal.js +9 -15
- package/dist/paths/conversion.js +1 -1
- package/dist/paths/exts.d.ts +30 -0
- package/dist/paths/exts.js +30 -0
- package/dist/paths/filenames.d.ts +6 -0
- package/dist/paths/filenames.js +6 -0
- package/dist/paths/globs.d.ts +6 -0
- package/dist/paths/globs.js +6 -0
- package/dist/paths/normalize.js +1 -1
- package/dist/paths/predicates.js +2 -1
- package/dist/paths/resolve.js +19 -14
- package/dist/paths/socket.d.ts +81 -30
- package/dist/paths/socket.js +102 -28
- package/dist/perf/metrics.js +1 -1
- package/dist/perf/report.js +5 -3
- package/dist/pkg-ext/data.js +0 -2
- package/dist/primordials/globals.d.ts +1 -1
- package/dist/primordials/globals.js +1 -1
- package/dist/primordials/headers.d.ts +13 -1
- package/dist/primordials/headers.js +13 -1
- package/dist/primordials/process.d.ts +1 -1
- package/dist/primordials/process.js +1 -1
- package/dist/primordials/url.d.ts +18 -0
- package/dist/primordials/url.js +18 -0
- package/dist/process/spawn/child.js +3 -5
- package/dist/promises/_internal.d.ts +1 -1
- package/dist/promises/_internal.js +1 -2
- package/dist/promises/options.js +3 -3
- package/dist/regexps/spec.js +1 -1
- package/dist/releases/socket-btm-binary-naming.js +12 -1
- package/dist/schema/validate.js +1 -1
- package/dist/secrets/_internal.d.ts +1 -1
- package/dist/secrets/_internal.js +1 -1
- package/dist/secrets/broker.d.ts +35 -0
- package/dist/secrets/broker.js +72 -0
- package/dist/secrets/find.d.ts +8 -6
- package/dist/secrets/find.js +17 -3
- package/dist/secrets/keychain.d.ts +10 -1
- package/dist/secrets/keychain.js +10 -1
- package/dist/secrets/rc.js +1 -1
- package/dist/secrets/socket-api-token.d.ts +1 -1
- package/dist/secrets/socket-api-token.js +1 -1
- package/dist/secrets/types.d.ts +1 -1
- package/dist/smol/detect.js +1 -1
- package/dist/smol/http.d.ts +2 -0
- package/dist/smol/http.js +3 -1
- package/dist/smol/https.d.ts +2 -0
- package/dist/smol/https.js +3 -1
- package/dist/smol/manifest.js +1 -1
- package/dist/smol/path.js +1 -1
- package/dist/smol/primordial.js +1 -1
- package/dist/smol/purl.js +1 -1
- package/dist/smol/versions.js +1 -1
- package/dist/smol/vfs.js +1 -1
- package/dist/sorts/_internal.d.ts +2 -4
- package/dist/sorts/_internal.js +1 -7
- package/dist/sorts/semver.js +2 -2
- package/dist/spinner/create-spinner-class.js +1 -1
- package/dist/spinner/format.js +2 -4
- package/dist/stdio/footer.js +8 -7
- package/dist/stdio/progress.js +1 -1
- package/dist/stdio/prompts.d.ts +8 -23
- package/dist/stdio/prompts.js +28 -52
- package/dist/strings/format.js +1 -1
- package/dist/strings/predicates.d.ts +2 -2
- package/dist/strings/search.js +2 -2
- package/dist/strings/types.d.ts +4 -0
- package/dist/strings/width.d.ts +1 -0
- package/dist/strings/width.js +17 -8
- package/dist/themes/context.d.ts +18 -3
- package/dist/themes/context.js +28 -14
- package/dist/versions/_internal.d.ts +43 -13
- package/dist/versions/_internal.js +27 -15
- package/dist/versions/compare.d.ts +16 -10
- package/dist/versions/compare.js +36 -16
- package/dist/versions/parse.js +1 -1
- package/dist/versions/range.js +3 -2
- package/dist/words/pluralize.js +4 -1
- package/llms.txt +63 -0
- package/package.json +271 -40
package/dist/external/p-map.js
CHANGED
|
@@ -21,7 +21,14 @@ var __name = (target, value) => __defProp(target, "name", {
|
|
|
21
21
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
22
22
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
23
23
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
24
|
-
var __esmMin = (fn, res) => () =>
|
|
24
|
+
var __esmMin = (fn, res, err) => () => {
|
|
25
|
+
if (err) throw err[0];
|
|
26
|
+
try {
|
|
27
|
+
return fn && (res = fn(fn = 0)), res;
|
|
28
|
+
} catch (e) {
|
|
29
|
+
throw err = [e], e;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
25
32
|
var __exportAll = (all, no_symbols) => {
|
|
26
33
|
let target = {};
|
|
27
34
|
for (var name in all) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class RegistryFetcher {
|
|
2
|
+
constructor(spec: string, opts?: any)
|
|
3
|
+
cache: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface Pacote {
|
|
7
|
+
RegistryFetcher: typeof RegistryFetcher
|
|
8
|
+
extract(spec: string, dest: string, opts?: any): Promise<any>
|
|
9
|
+
manifest(spec: string, opts?: any): Promise<any>
|
|
10
|
+
packument(spec: string, opts?: any): Promise<any>
|
|
11
|
+
tarball(spec: string, opts?: any): Promise<Buffer>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare const pacote: Pacote
|
|
15
|
+
export default pacote
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as delTypes from 'del'
|
|
2
|
+
import type * as fastGlobTypes from 'fast-glob'
|
|
3
|
+
import type picomatchType from 'picomatch'
|
|
4
|
+
|
|
5
|
+
export interface PicoPack {
|
|
6
|
+
del: Pick<typeof delTypes, 'deleteAsync' | 'deleteSync'>
|
|
7
|
+
glob: {
|
|
8
|
+
glob: typeof fastGlobTypes.glob
|
|
9
|
+
globStream: typeof fastGlobTypes.globStream
|
|
10
|
+
globSync: typeof fastGlobTypes.sync
|
|
11
|
+
}
|
|
12
|
+
picomatch: typeof picomatchType
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const picoPack: PicoPack
|
|
16
|
+
export default picoPack
|
|
@@ -16,7 +16,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
16
16
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
17
17
|
var __getProtoOf = Object.getPrototypeOf;
|
|
18
18
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19
|
-
var __esmMin = (fn, res) => () =>
|
|
19
|
+
var __esmMin = (fn, res, err) => () => {
|
|
20
|
+
if (err) throw err[0];
|
|
21
|
+
try {
|
|
22
|
+
return fn && (res = fn(fn = 0)), res;
|
|
23
|
+
} catch (e) {
|
|
24
|
+
throw err = [e], e;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
20
27
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
21
28
|
var __exportAll = (all, no_symbols) => {
|
|
22
29
|
let target = {};
|
|
@@ -52,20 +59,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
52
59
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
53
60
|
|
|
54
61
|
//#endregion
|
|
55
|
-
let node_fs = require("
|
|
62
|
+
let node_fs = require("fs");
|
|
56
63
|
node_fs = __toESM(node_fs, 1);
|
|
57
|
-
let node_fs_promises = require("
|
|
64
|
+
let node_fs_promises = require("fs/promises");
|
|
58
65
|
node_fs_promises = __toESM(node_fs_promises, 1);
|
|
59
|
-
let node_path = require("
|
|
66
|
+
let node_path = require("path");
|
|
60
67
|
node_path = __toESM(node_path, 1);
|
|
61
|
-
let node_process = require("
|
|
68
|
+
let node_process = require("process");
|
|
62
69
|
node_process = __toESM(node_process, 1);
|
|
63
|
-
let node_events = require("
|
|
64
|
-
let node_stream = require("
|
|
65
|
-
let node_stream_promises = require("
|
|
66
|
-
let node_util = require("
|
|
67
|
-
let node_child_process = require("
|
|
68
|
-
let node_url = require("
|
|
70
|
+
let node_events = require("events");
|
|
71
|
+
let node_stream = require("stream");
|
|
72
|
+
let node_stream_promises = require("stream/promises");
|
|
73
|
+
let node_util = require("util");
|
|
74
|
+
let node_child_process = require("child_process");
|
|
75
|
+
let node_url = require("url");
|
|
69
76
|
|
|
70
77
|
const { ArrayIsArray: _p_ArrayIsArray, ArrayPrototypeFlatMap: _p_ArrayPrototypeFlatMap, ArrayPrototypeUnshift: _p_ArrayPrototypeUnshift } = require('../primordials/array.js')
|
|
71
78
|
|
|
@@ -945,7 +952,8 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
945
952
|
};
|
|
946
953
|
const extglobClose = (token) => {
|
|
947
954
|
const literal = input.slice(token.startIndex, state.index + 1);
|
|
948
|
-
const
|
|
955
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
956
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
949
957
|
if ((token.type === "plus" || token.type === "star") && analysis.risky) {
|
|
950
958
|
const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
|
|
951
959
|
const open = tokens[token.tokensIndex];
|
|
@@ -1071,7 +1079,8 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1071
1079
|
if (inner.includes(":")) {
|
|
1072
1080
|
const idx = prev.value.lastIndexOf("[");
|
|
1073
1081
|
const pre = prev.value.slice(0, idx);
|
|
1074
|
-
const
|
|
1082
|
+
const rest = prev.value.slice(idx + 2);
|
|
1083
|
+
const posix = POSIX_REGEX_SOURCE[rest];
|
|
1075
1084
|
if (posix) {
|
|
1076
1085
|
prev.value = pre + posix;
|
|
1077
1086
|
state.backtrack = true;
|
|
@@ -2593,7 +2602,7 @@ var require_to_regex_range = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
2593
2602
|
let nines = 1;
|
|
2594
2603
|
let zeros = 1;
|
|
2595
2604
|
let stop = countNines(min, nines);
|
|
2596
|
-
let stops = new _p_SetCtor([max]);
|
|
2605
|
+
let stops = /* @__PURE__ */ new _p_SetCtor([max]);
|
|
2597
2606
|
while (min <= stop && stop <= max) {
|
|
2598
2607
|
stops.add(stop);
|
|
2599
2608
|
nines += 1;
|
|
@@ -4577,7 +4586,8 @@ var require_async$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4577
4586
|
callSuccessCallback(callback, entries);
|
|
4578
4587
|
return;
|
|
4579
4588
|
}
|
|
4580
|
-
|
|
4589
|
+
const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
|
|
4590
|
+
rpl(tasks, (rplError, rplEntries) => {
|
|
4581
4591
|
if (rplError !== null) {
|
|
4582
4592
|
callFailureCallback(callback, rplError);
|
|
4583
4593
|
return;
|
|
@@ -4613,7 +4623,7 @@ var require_async$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4613
4623
|
callFailureCallback(callback, readdirError);
|
|
4614
4624
|
return;
|
|
4615
4625
|
}
|
|
4616
|
-
|
|
4626
|
+
const tasks = names.map((name) => {
|
|
4617
4627
|
const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
4618
4628
|
return (done) => {
|
|
4619
4629
|
fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
|
|
@@ -4630,7 +4640,8 @@ var require_async$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4630
4640
|
done(null, entry);
|
|
4631
4641
|
});
|
|
4632
4642
|
};
|
|
4633
|
-
})
|
|
4643
|
+
});
|
|
4644
|
+
rpl(tasks, (rplError, entries) => {
|
|
4634
4645
|
if (rplError !== null) {
|
|
4635
4646
|
callFailureCallback(callback, rplError);
|
|
4636
4647
|
return;
|
|
@@ -6432,14 +6443,15 @@ var init_ignore = __esmMin((() => {
|
|
|
6432
6443
|
ignore,
|
|
6433
6444
|
...ignoreFilesGlobOptions
|
|
6434
6445
|
});
|
|
6435
|
-
|
|
6446
|
+
const files = await _p_PromiseAll(paths.map(async (filePath) => ({
|
|
6436
6447
|
filePath,
|
|
6437
6448
|
content: await node_fs_promises.default.readFile(filePath, "utf8")
|
|
6438
|
-
})))
|
|
6449
|
+
})));
|
|
6450
|
+
return getIsIgnoredPredicate(files, cwd);
|
|
6439
6451
|
};
|
|
6440
6452
|
isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
|
6441
6453
|
const { cwd, suppressErrors, deep, ignore } = normalizeOptions$1(options);
|
|
6442
|
-
|
|
6454
|
+
const files = import_out$1.default.sync(patterns, {
|
|
6443
6455
|
cwd,
|
|
6444
6456
|
suppressErrors,
|
|
6445
6457
|
deep,
|
|
@@ -6448,7 +6460,8 @@ var init_ignore = __esmMin((() => {
|
|
|
6448
6460
|
}).map((filePath) => ({
|
|
6449
6461
|
filePath,
|
|
6450
6462
|
content: node_fs.default.readFileSync(filePath, "utf8")
|
|
6451
|
-
}))
|
|
6463
|
+
}));
|
|
6464
|
+
return getIsIgnoredPredicate(files, cwd);
|
|
6452
6465
|
};
|
|
6453
6466
|
}));
|
|
6454
6467
|
|
|
@@ -6595,12 +6608,14 @@ var init_globby = __esmMin((() => {
|
|
|
6595
6608
|
};
|
|
6596
6609
|
globby = normalizeArguments(async (patterns, options) => {
|
|
6597
6610
|
const [tasks, filter] = await _p_PromiseAll([generateTasks(patterns, options), getFilter(options)]);
|
|
6598
|
-
|
|
6611
|
+
const results = await _p_PromiseAll(tasks.map((task) => (0, import_out.default)(task.patterns, task.options)));
|
|
6612
|
+
return unionFastGlobResults(results, filter);
|
|
6599
6613
|
});
|
|
6600
6614
|
globbySync = normalizeArgumentsSync((patterns, options) => {
|
|
6601
6615
|
const tasks = generateTasksSync(patterns, options);
|
|
6602
6616
|
const filter = getFilterSync(options);
|
|
6603
|
-
|
|
6617
|
+
const results = tasks.map((task) => import_out.default.sync(task.patterns, task.options));
|
|
6618
|
+
return unionFastGlobResults(results, filter);
|
|
6604
6619
|
});
|
|
6605
6620
|
globbyStream = normalizeArgumentsSync((patterns, options) => {
|
|
6606
6621
|
const tasks = generateTasksSync(patterns, options);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picomatch options for glob pattern matching.
|
|
3
|
+
*/
|
|
4
|
+
export interface PicomatchOptions {
|
|
5
|
+
/**
|
|
6
|
+
* When true, the glob will match the basename of the path.
|
|
7
|
+
*
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
basename?: boolean
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* When true, the glob will match case-insensitively.
|
|
14
|
+
*
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
nocase?: boolean
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* When true, allow matching dotfiles (files starting with '.').
|
|
21
|
+
*
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
dot?: boolean
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Glob patterns to ignore.
|
|
28
|
+
*/
|
|
29
|
+
ignore?: string | string[]
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* When true, a leading '!' will negate the glob.
|
|
33
|
+
*
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
negate?: boolean
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* When true, match against Windows paths. Defaults to os.platform() ===
|
|
40
|
+
* 'win32'.
|
|
41
|
+
*/
|
|
42
|
+
windows?: boolean
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* When true, convert backslashes to forward slashes in paths.
|
|
46
|
+
*
|
|
47
|
+
* @default true on Windows
|
|
48
|
+
*/
|
|
49
|
+
normalize?: boolean
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Function to call on each match result.
|
|
53
|
+
*/
|
|
54
|
+
onMatch?: (result: unknown) => void
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Function to call on each result.
|
|
58
|
+
*/
|
|
59
|
+
onResult?: (result: unknown) => void
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Format function for transforming paths.
|
|
63
|
+
*/
|
|
64
|
+
format?: (input: string) => string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Matcher function returned by picomatch. Tests if a string matches the glob
|
|
69
|
+
* pattern.
|
|
70
|
+
*/
|
|
71
|
+
export type Matcher = (input: string) => boolean
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Creates a matcher function from a glob pattern. The returned function takes a
|
|
75
|
+
* string to match as its argument.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ;```ts
|
|
79
|
+
* import picomatch from './external/picomatch.js'
|
|
80
|
+
*
|
|
81
|
+
* const isMatch = picomatch('*.js')
|
|
82
|
+
* isMatch('test.js') // true
|
|
83
|
+
* isMatch('test.ts') // false
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @param pattern - Glob pattern to match against.
|
|
87
|
+
* @param options - Picomatch options.
|
|
88
|
+
*
|
|
89
|
+
* @returns Matcher function that tests strings against the pattern
|
|
90
|
+
*/
|
|
91
|
+
declare function picomatch(
|
|
92
|
+
pattern: string | string[],
|
|
93
|
+
options?: PicomatchOptions,
|
|
94
|
+
): Matcher
|
|
95
|
+
|
|
96
|
+
export default picomatch
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class ErrorWithCause extends Error {
|
|
2
|
+
constructor(message: string, options?: { cause?: unknown })
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function findCauseByReference(
|
|
6
|
+
error: Error,
|
|
7
|
+
reference: Error,
|
|
8
|
+
): Error | undefined
|
|
9
|
+
|
|
10
|
+
export function getErrorCause(error: Error): Error | undefined
|
|
11
|
+
|
|
12
|
+
export function stackWithCauses(error: Error): string
|
|
13
|
+
|
|
14
|
+
export function messageWithCauses(error: Error): string
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface SemVerParsed {
|
|
2
|
+
version: string
|
|
3
|
+
major: number
|
|
4
|
+
minor: number
|
|
5
|
+
patch: number
|
|
6
|
+
prerelease: ReadonlyArray<string | number>
|
|
7
|
+
build: readonly string[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function coerce(version: string | number): { version: string } | null
|
|
11
|
+
export function compare(v1: string, v2: string): -1 | 0 | 1
|
|
12
|
+
export function satisfies(
|
|
13
|
+
version: string,
|
|
14
|
+
range: string,
|
|
15
|
+
options?: RangeOptions | boolean,
|
|
16
|
+
): boolean
|
|
17
|
+
export function parse(version: string): SemVerParsed | null
|
|
18
|
+
export function inc(
|
|
19
|
+
version: string,
|
|
20
|
+
release: string,
|
|
21
|
+
identifier?: string,
|
|
22
|
+
): string | null
|
|
23
|
+
export function eq(version1: string, version2: string): boolean
|
|
24
|
+
export function gt(version1: string, version2: string): boolean
|
|
25
|
+
export function gte(version1: string, version2: string): boolean
|
|
26
|
+
export function lt(version1: string, version2: string): boolean
|
|
27
|
+
export function lte(version1: string, version2: string): boolean
|
|
28
|
+
export function valid(
|
|
29
|
+
version: string,
|
|
30
|
+
options?: RangeOptions | boolean,
|
|
31
|
+
): string | null
|
|
32
|
+
export interface RangeOptions {
|
|
33
|
+
includePrerelease?: boolean
|
|
34
|
+
loose?: boolean
|
|
35
|
+
}
|
|
36
|
+
export function maxSatisfying(
|
|
37
|
+
versions: string[],
|
|
38
|
+
range: string,
|
|
39
|
+
options?: RangeOptions | boolean,
|
|
40
|
+
): string | null
|
|
41
|
+
export function minSatisfying(
|
|
42
|
+
versions: string[],
|
|
43
|
+
range: string,
|
|
44
|
+
options?: RangeOptions | boolean,
|
|
45
|
+
): string | null
|
|
46
|
+
export function sort(versions: string[]): string[]
|
|
47
|
+
export function rsort(versions: string[]): string[]
|
|
48
|
+
export function diff(
|
|
49
|
+
version1: string,
|
|
50
|
+
version2: string,
|
|
51
|
+
):
|
|
52
|
+
| 'major'
|
|
53
|
+
| 'premajor'
|
|
54
|
+
| 'minor'
|
|
55
|
+
| 'preminor'
|
|
56
|
+
| 'patch'
|
|
57
|
+
| 'prepatch'
|
|
58
|
+
| 'prerelease'
|
|
59
|
+
| 'release'
|
|
60
|
+
| null
|