@socketsecurity/lib 6.0.3 → 6.0.5
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 +22 -0
- package/dist/_virtual/_rolldown/runtime.js +45 -0
- package/dist/abort/signal.js +53 -59
- package/dist/ai/discover.js +110 -110
- package/dist/ai/profiles.js +94 -65
- package/dist/ai/spawn.js +172 -194
- package/dist/ai/types.js +1 -17
- package/dist/ai/worktree.js +160 -183
- package/dist/ansi/constants.js +16 -38
- package/dist/ansi/strip.js +44 -41
- package/dist/archives/_internal.js +64 -73
- package/dist/archives/detect.js +30 -43
- package/dist/archives/extract.js +43 -50
- package/dist/archives/tar.js +197 -228
- package/dist/archives/types.js +1 -17
- package/dist/archives/zip.js +85 -121
- package/dist/argv/flag-predicates.js +203 -101
- package/dist/argv/flag-types.js +96 -113
- package/dist/argv/parse-args-string.d.ts +16 -14
- package/dist/argv/parse-args-string.js +42 -39
- package/dist/argv/parse.js +145 -163
- package/dist/arrays/_internal.js +65 -48
- package/dist/arrays/chunk.js +51 -40
- package/dist/arrays/join.js +87 -35
- package/dist/arrays/predicates.js +46 -28
- package/dist/arrays/unique.js +45 -31
- package/dist/bin/_internal.js +34 -42
- package/dist/bin/check-primordials.js +175 -233
- package/dist/bin/check.js +51 -72
- package/dist/bin/exec.js +70 -74
- package/dist/bin/find.js +151 -134
- package/dist/bin/resolve.js +180 -246
- package/dist/bin/shadow.js +24 -33
- package/dist/bin/socket-lib.js +51 -73
- package/dist/bin/types.js +1 -17
- package/dist/bin/which.js +211 -146
- package/dist/cacache/_internal.js +25 -40
- package/dist/cacache/clear.js +79 -72
- package/dist/cacache/read.js +48 -46
- package/dist/cacache/tmp.js +29 -36
- package/dist/cacache/types.js +1 -17
- package/dist/cacache/write.js +43 -48
- package/dist/cache/ttl/store.js +232 -288
- package/dist/cache/ttl/types.js +1 -17
- package/dist/checks/primordials-defaults.js +83 -89
- package/dist/checks/primordials.js +225 -277
- package/dist/colors/convert.js +45 -37
- package/dist/colors/palette.js +88 -45
- package/dist/colors/socket-palette.js +74 -84
- package/dist/colors/types.js +1 -17
- package/dist/compression/_internal.js +57 -72
- package/dist/compression/brotli.js +94 -127
- package/dist/compression/gzip.js +95 -121
- package/dist/compression/types.js +1 -17
- package/dist/constants/agents.js +61 -113
- package/dist/constants/encoding.js +19 -42
- package/dist/constants/github.js +12 -30
- package/dist/constants/licenses.js +48 -63
- package/dist/constants/lifecycle-script-names.js +31 -45
- package/dist/constants/maintained-node-versions.js +22 -37
- package/dist/constants/node.js +226 -167
- package/dist/constants/package-default-node-range.js +16 -41
- package/dist/constants/package-default-socket-categories.js +12 -30
- package/dist/constants/packages.js +77 -126
- package/dist/constants/platform.js +27 -49
- package/dist/constants/sentinels.js +23 -48
- package/dist/constants/socket.js +42 -87
- package/dist/constants/testing.js +15 -34
- package/dist/constants/time.js +16 -36
- package/dist/constants/typescript.js +32 -52
- package/dist/cover/code.js +111 -142
- package/dist/cover/formatters.js +118 -101
- package/dist/cover/type.js +50 -76
- package/dist/cover/types.js +1 -17
- package/dist/crypto/hash.js +54 -46
- package/dist/debug/_internal.js +62 -71
- package/dist/debug/caller-info.js +53 -64
- package/dist/debug/namespace.js +80 -90
- package/dist/debug/output.js +172 -188
- package/dist/debug/types.js +1 -17
- package/dist/dlx/_internal.js +24 -43
- package/dist/dlx/arborist.js +162 -160
- package/dist/dlx/binary-cache.js +228 -200
- package/dist/dlx/binary-download.js +172 -211
- package/dist/dlx/binary-resolution.js +165 -157
- package/dist/dlx/binary-types.js +1 -17
- package/dist/dlx/binary.js +149 -189
- package/dist/dlx/cache.js +45 -30
- package/dist/dlx/detect.js +245 -159
- package/dist/dlx/dir.js +67 -51
- package/dist/dlx/firewall.js +62 -100
- package/dist/dlx/lockfile.js +122 -127
- package/dist/dlx/manifest.js +264 -274
- package/dist/dlx/package.js +241 -244
- package/dist/dlx/packages.js +99 -96
- package/dist/dlx/paths.js +73 -59
- package/dist/dlx/spec.js +52 -60
- package/dist/dlx/types.js +1 -17
- package/dist/eco/cargo/lockfile-format.js +19 -36
- package/dist/eco/cargo/manifest-format.js +17 -35
- package/dist/eco/cargo/parse-lockfile.js +210 -237
- package/dist/eco/manifest/analyze-lockfile.js +46 -63
- package/dist/eco/manifest/detect-format.js +66 -90
- package/dist/eco/manifest/find-packages.js +39 -64
- package/dist/eco/manifest/get-package-versions.js +27 -48
- package/dist/eco/manifest/get-package.js +21 -40
- package/dist/eco/manifest/manifest-error.js +14 -35
- package/dist/eco/manifest/parse-lockfile.js +40 -86
- package/dist/eco/manifest/parse-manifest.js +26 -43
- package/dist/eco/manifest/parse.js +26 -47
- package/dist/eco/manifest/types.js +1 -17
- package/dist/eco/npm/bun/exec.js +23 -32
- package/dist/eco/npm/manifest-format.js +21 -35
- package/dist/eco/npm/npm/exec.js +51 -61
- package/dist/eco/npm/npm/extract-package-name-from-path.js +28 -50
- package/dist/eco/npm/npm/flags.js +80 -52
- package/dist/eco/npm/npm/lockfile-format.js +21 -40
- package/dist/eco/npm/npm/parse-git-url.js +26 -40
- package/dist/eco/npm/npm/parse-lockfile.js +184 -210
- package/dist/eco/npm/parse-package-json.js +71 -102
- package/dist/eco/npm/pnpm/detect-pnpm-version.js +22 -43
- package/dist/eco/npm/pnpm/exec.js +51 -62
- package/dist/eco/npm/pnpm/flags.js +75 -68
- package/dist/eco/npm/pnpm/lockfile-format.js +19 -36
- package/dist/eco/npm/pnpm/parse-lockfile.js +235 -259
- package/dist/eco/npm/pnpm/parse-pnpm-package-id-v5.js +37 -47
- package/dist/eco/npm/pnpm/parse-pnpm-package-id-v6-v9.js +36 -49
- package/dist/eco/npm/script.js +82 -90
- package/dist/eco/npm/vlt/exec.js +24 -32
- package/dist/eco/npm/yarnpkg/yarn/exec.js +60 -59
- package/dist/eco/npm/yarnpkg/yarn/lockfile-format.js +20 -36
- package/dist/eco/npm/yarnpkg/yarn/parse-lockfile.js +194 -242
- package/dist/eco/npm/yarnpkg/yarn/parse-yarn-descriptor.js +37 -61
- package/dist/eco/purl.js +50 -60
- package/dist/eco/types.js +1 -17
- package/dist/effects/pulse-frames.js +64 -65
- package/dist/effects/shimmer-keyframes.js +71 -52
- package/dist/effects/shimmer-terminal.js +81 -50
- package/dist/effects/shimmer.js +290 -153
- package/dist/env/boolean.js +42 -43
- package/dist/env/case-insensitive.js +54 -39
- package/dist/env/ci.js +29 -31
- package/dist/env/debug.js +28 -31
- package/dist/env/github.js +144 -59
- package/dist/env/home.js +38 -31
- package/dist/env/locale.js +59 -39
- package/dist/env/node-auth-token.js +28 -31
- package/dist/env/node-env.js +28 -31
- package/dist/env/npm.js +94 -47
- package/dist/env/number.js +50 -51
- package/dist/env/package-manager.js +95 -83
- package/dist/env/path.js +28 -31
- package/dist/env/pre-commit.js +30 -32
- package/dist/env/proxy.js +121 -122
- package/dist/env/rewire.js +204 -96
- package/dist/env/shell.js +28 -31
- package/dist/env/socket-cli.js +233 -81
- package/dist/env/socket.js +521 -156
- package/dist/env/string.js +43 -44
- package/dist/env/temp-dir.js +59 -39
- package/dist/env/term.js +28 -31
- package/dist/env/test.js +65 -43
- package/dist/env/types.js +1 -17
- package/dist/env/windows.js +78 -43
- package/dist/env/xdg.js +62 -39
- package/dist/errors/message.js +40 -46
- package/dist/errors/predicates.js +61 -49
- package/dist/errors/stack.js +24 -36
- package/dist/events/exit/_internal.js +86 -103
- package/dist/events/exit/handler.js +48 -55
- package/dist/events/exit/intercept.js +49 -70
- package/dist/events/exit/lifecycle.js +92 -101
- package/dist/events/exit/signals.js +25 -31
- package/dist/events/exit/types.js +1 -17
- package/dist/events/warning/handler.js +43 -40
- package/dist/events/warning/suppress.js +111 -90
- package/dist/external/@npmcli/package-json/lib/read-package.js +132 -153
- package/dist/external/@npmcli/package-json/lib/sort.js +73 -105
- package/dist/external/@npmcli/package-json.js +12705 -15140
- package/dist/external/@npmcli/promise-spawn.js +451 -472
- package/dist/external/@sinclair/typebox/value.js +7443 -9002
- package/dist/external/@sinclair/typebox.js +7516 -7885
- package/dist/external/@socketregistry/is-unicode-supported.js +31 -39
- package/dist/external/@socketregistry/packageurl-js.js +6127 -7369
- package/dist/external/@socketregistry/yocto-spinner.js +394 -455
- package/dist/external/@yarnpkg/extensions.js +435 -1022
- package/dist/external/adm-zip.js +2313 -2673
- package/dist/external/debug.js +700 -687
- package/dist/external/external-pack.js +2658 -3171
- package/dist/external/fast-sort.js +124 -138
- package/dist/external/get-east-asian-width.js +70 -64
- package/dist/external/libnpmexec.js +28 -31
- package/dist/external/npm-pack.js +43617 -50137
- package/dist/external/p-map.js +198 -222
- package/dist/external/pico-pack.js +6735 -7304
- package/dist/external/pony-cause.js +143 -139
- package/dist/external/shell-quote.js +226 -0
- package/dist/external/spdx-pack.js +1283 -1403
- package/dist/external/streaming-iterables.js +835 -1052
- package/dist/external/tar-fs.js +2769 -3048
- package/dist/external/which.js +267 -251
- package/dist/external/yargs-parser.js +851 -1074
- package/dist/external-tools/bazel/asset-names.js +98 -90
- package/dist/external-tools/bazel/from-download.js +52 -46
- package/dist/external-tools/bazel/from-path.js +27 -38
- package/dist/external-tools/bazel/read-bazel-version-file.js +35 -57
- package/dist/external-tools/bazel/resolve-asset-url.js +24 -39
- package/dist/external-tools/bazel/resolve-bazel-version.js +34 -56
- package/dist/external-tools/bazel/resolve.js +44 -58
- package/dist/external-tools/bazel/types.js +1 -17
- package/dist/external-tools/cdxgen/asset-names.js +59 -66
- package/dist/external-tools/cdxgen/from-download.js +52 -80
- package/dist/external-tools/cdxgen/from-path.js +19 -37
- package/dist/external-tools/cdxgen/from-vfs.js +22 -43
- package/dist/external-tools/cdxgen/resolve.js +48 -63
- package/dist/external-tools/cdxgen/types.js +1 -17
- package/dist/external-tools/from-download.js +107 -67
- package/dist/external-tools/janus/asset-names.js +44 -51
- package/dist/external-tools/janus/from-download.js +45 -70
- package/dist/external-tools/janus/from-path.js +19 -37
- package/dist/external-tools/janus/from-vfs.js +22 -43
- package/dist/external-tools/janus/resolve.js +45 -63
- package/dist/external-tools/janus/types.js +1 -17
- package/dist/external-tools/jre/asset-names.js +109 -82
- package/dist/external-tools/jre/detect-platform-arch.js +25 -49
- package/dist/external-tools/jre/from-download.js +71 -67
- package/dist/external-tools/jre/from-java-home.js +27 -54
- package/dist/external-tools/jre/from-path.js +27 -49
- package/dist/external-tools/jre/from-vfs.js +39 -60
- package/dist/external-tools/jre/resolve.js +55 -68
- package/dist/external-tools/jre/types.js +1 -17
- package/dist/external-tools/manifest.js +130 -150
- package/dist/external-tools/opengrep/asset-names.js +60 -72
- package/dist/external-tools/opengrep/from-download.js +58 -80
- package/dist/external-tools/opengrep/from-path.js +19 -37
- package/dist/external-tools/opengrep/from-vfs.js +23 -43
- package/dist/external-tools/opengrep/resolve.js +43 -63
- package/dist/external-tools/opengrep/types.js +1 -17
- package/dist/external-tools/sbt/asset-names.js +21 -30
- package/dist/external-tools/sbt/from-download.js +50 -61
- package/dist/external-tools/sbt/from-path.js +23 -38
- package/dist/external-tools/sbt/from-vfs.js +30 -44
- package/dist/external-tools/sbt/resolve.js +45 -63
- package/dist/external-tools/sbt/types.js +1 -17
- package/dist/external-tools/synp/asset-names.js +11 -29
- package/dist/external-tools/synp/from-download.js +24 -41
- package/dist/external-tools/synp/from-path.js +19 -37
- package/dist/external-tools/synp/from-vfs.js +22 -43
- package/dist/external-tools/synp/resolve.js +43 -62
- package/dist/external-tools/synp/types.js +1 -17
- package/dist/external-tools/trivy/asset-names.js +51 -62
- package/dist/external-tools/trivy/from-download.js +42 -64
- package/dist/external-tools/trivy/from-path.js +19 -37
- package/dist/external-tools/trivy/from-vfs.js +22 -43
- package/dist/external-tools/trivy/resolve.js +43 -63
- package/dist/external-tools/trivy/types.js +1 -17
- package/dist/external-tools/trufflehog/asset-names.js +54 -66
- package/dist/external-tools/trufflehog/from-download.js +44 -62
- package/dist/external-tools/trufflehog/from-path.js +21 -37
- package/dist/external-tools/trufflehog/from-vfs.js +26 -43
- package/dist/external-tools/trufflehog/resolve.js +43 -63
- package/dist/external-tools/trufflehog/types.js +1 -17
- package/dist/external-tools/uv/asset-names.js +64 -74
- package/dist/external-tools/uv/from-download.js +44 -65
- package/dist/external-tools/uv/from-path.js +19 -37
- package/dist/external-tools/uv/from-vfs.js +22 -43
- package/dist/external-tools/uv/resolve.js +42 -63
- package/dist/external-tools/uv/types.js +1 -17
- package/dist/fs/_internal.js +40 -42
- package/dist/fs/access.js +57 -54
- package/dist/fs/encoding.js +80 -97
- package/dist/fs/find-up.js +126 -125
- package/dist/fs/inspect.js +168 -99
- package/dist/fs/path-cache.js +31 -32
- package/dist/fs/read-dir.js +102 -79
- package/dist/fs/read-file.js +177 -118
- package/dist/fs/read-json-cache.js +150 -134
- package/dist/fs/read-json.js +172 -187
- package/dist/fs/resolve-module.js +35 -58
- package/dist/fs/safe.js +278 -169
- package/dist/fs/types.js +1 -17
- package/dist/fs/unique.js +52 -48
- package/dist/fs/validate.js +56 -40
- package/dist/fs/write-json.js +109 -75
- package/dist/git/_internal.js +251 -216
- package/dist/git/changed.js +191 -74
- package/dist/git/repo.js +118 -104
- package/dist/git/staged.js +172 -62
- package/dist/git/types.js +1 -17
- package/dist/git/unstaged.js +175 -62
- package/dist/github/constants.js +25 -33
- package/dist/github/errors.js +46 -38
- package/dist/github/fetch.js +137 -82
- package/dist/github/ghsa.js +217 -151
- package/dist/github/refs-cache.js +54 -43
- package/dist/github/refs-graphql.js +97 -89
- package/dist/github/refs-rest.js +70 -101
- package/dist/github/refs.js +105 -64
- package/dist/github/token.js +96 -48
- package/dist/github/types.js +1 -17
- package/dist/globs/_internal.js +73 -82
- package/dist/globs/defaults.js +40 -59
- package/dist/globs/match.js +93 -77
- package/dist/globs/matcher.js +104 -92
- package/dist/globs/stream.js +43 -55
- package/dist/globs/types.js +1 -17
- package/dist/http-request/_internal.js +11 -38
- package/dist/http-request/browser-fetch.js +19 -29
- package/dist/http-request/browser.js +188 -206
- package/dist/http-request/checksums.js +101 -65
- package/dist/http-request/download-types.js +1 -17
- package/dist/http-request/download.js +195 -196
- package/dist/http-request/errors.js +39 -47
- package/dist/http-request/headers.js +95 -80
- package/dist/http-request/http-request.js +10 -35
- package/dist/http-request/node.js +71 -97
- package/dist/http-request/request-attempt.js +232 -285
- package/dist/http-request/request-types.js +1 -17
- package/dist/http-request/request.js +106 -108
- package/dist/http-request/response-reader.js +47 -51
- package/dist/http-request/response-types.js +22 -38
- package/dist/http-request/user-agent.js +73 -55
- package/dist/integrity.js +105 -106
- package/dist/ipc/_internal.js +34 -48
- package/dist/ipc/directory.js +55 -63
- package/dist/ipc/paths.js +52 -45
- package/dist/ipc/types.js +1 -17
- package/dist/ipc/write.js +81 -74
- package/dist/ipc-cli/get.js +29 -56
- package/dist/ipc-cli/types.js +1 -17
- package/dist/json/edit.js +182 -242
- package/dist/json/format.js +202 -103
- package/dist/json/parse.js +206 -109
- package/dist/json/types.js +1 -17
- package/dist/links/create.js +93 -60
- package/dist/links/types.js +1 -17
- package/dist/logger/_internal.js +109 -73
- package/dist/logger/browser.js +45 -56
- package/dist/logger/colors.js +31 -49
- package/dist/logger/console.js +89 -112
- package/dist/logger/default.js +19 -33
- package/dist/logger/logger.js +5 -29
- package/dist/logger/node.js +793 -854
- package/dist/logger/symbols-builder.js +54 -56
- package/dist/logger/symbols.js +135 -118
- package/dist/logger/types.js +1 -17
- package/dist/memo/_internal.js +39 -49
- package/dist/memo/async.js +133 -117
- package/dist/memo/clear.js +25 -34
- package/dist/memo/decorator.js +43 -37
- package/dist/memo/memoize.js +97 -88
- package/dist/memo/once.js +42 -41
- package/dist/memo/types.js +1 -17
- package/dist/memo/weak.js +45 -41
- package/dist/node/async-hooks.js +9 -30
- package/dist/node/child-process.js +9 -30
- package/dist/node/crypto.js +9 -30
- package/dist/node/events.js +9 -30
- package/dist/node/fs-promises.js +9 -30
- package/dist/node/fs.js +9 -30
- package/dist/node/http.js +9 -30
- package/dist/node/https.js +9 -30
- package/dist/node/module.js +20 -34
- package/dist/node/os.js +9 -30
- package/dist/node/path.js +9 -30
- package/dist/node/timers-promises.js +9 -30
- package/dist/node/url.js +9 -30
- package/dist/node/util.js +9 -30
- package/dist/objects/getters.js +185 -126
- package/dist/objects/inspect.js +85 -52
- package/dist/objects/mutate.js +96 -76
- package/dist/objects/predicates.js +112 -59
- package/dist/objects/sort.js +120 -76
- package/dist/objects/types.js +1 -17
- package/dist/packages/edit-class.js +198 -265
- package/dist/packages/edit.js +79 -86
- package/dist/packages/exports.js +146 -157
- package/dist/packages/isolation.js +159 -209
- package/dist/packages/licenses.js +207 -189
- package/dist/packages/manifest.js +134 -172
- package/dist/packages/normalize.js +91 -102
- package/dist/packages/operations.d.ts +2 -0
- package/dist/packages/operations.js +283 -254
- package/dist/packages/provenance.js +195 -245
- package/dist/packages/specs.js +94 -84
- package/dist/packages/types.js +1 -17
- package/dist/packages/validation.js +49 -50
- package/dist/paths/_internal.js +82 -86
- package/dist/paths/conversion.js +112 -65
- package/dist/paths/dirnames.js +17 -42
- package/dist/paths/exts.js +23 -54
- package/dist/paths/filenames.js +21 -50
- package/dist/paths/globs.js +15 -38
- package/dist/paths/normalize.js +215 -236
- package/dist/paths/packages.js +34 -49
- package/dist/paths/predicates.js +184 -106
- package/dist/paths/resolve.js +146 -128
- package/dist/paths/rewire.js +108 -72
- package/dist/paths/socket.js +252 -132
- package/dist/paths/walk.js +55 -60
- package/dist/perf/_internal.js +10 -28
- package/dist/perf/enabled.js +21 -30
- package/dist/perf/metrics.js +81 -67
- package/dist/perf/report.js +79 -80
- package/dist/perf/timer.js +180 -126
- package/dist/perf/types.js +1 -17
- package/dist/pkg-ext/data.js +29 -82
- package/dist/pkg-ext/types.js +1 -17
- package/dist/primordials/array.js +120 -198
- package/dist/primordials/buffer.js +28 -51
- package/dist/primordials/date.js +26 -51
- package/dist/primordials/error.js +33 -59
- package/dist/primordials/function.js +21 -41
- package/dist/primordials/globals.js +25 -48
- package/dist/primordials/json.js +14 -30
- package/dist/primordials/map-set.js +88 -152
- package/dist/primordials/math.js +59 -116
- package/dist/primordials/number.js +41 -76
- package/dist/primordials/object.js +56 -116
- package/dist/primordials/promise.js +28 -52
- package/dist/primordials/reflect.js +24 -52
- package/dist/primordials/regexp.js +25 -47
- package/dist/primordials/string.js +114 -167
- package/dist/primordials/symbol.js +40 -72
- package/dist/primordials/uncurry.js +38 -55
- package/dist/primordials/url.js +27 -66
- package/dist/process/_internal.js +7 -32
- package/dist/process/abort.js +29 -35
- package/dist/process/lock-instance.js +26 -30
- package/dist/process/lock-manager.js +279 -307
- package/dist/process/lock-types.js +1 -17
- package/dist/process/spawn/_internal.js +43 -55
- package/dist/process/spawn/child.js +172 -211
- package/dist/process/spawn/errors.js +116 -113
- package/dist/process/spawn/stdio.js +51 -35
- package/dist/process/spawn/types.js +1 -17
- package/dist/process/transient.js +49 -66
- package/dist/promises/_internal.js +31 -34
- package/dist/promises/iterate.js +238 -102
- package/dist/promises/options.js +123 -101
- package/dist/promises/queue.js +115 -136
- package/dist/promises/resolvers.js +77 -46
- package/dist/promises/retry.js +156 -101
- package/dist/promises/types.js +1 -17
- package/dist/regexps/escape.js +32 -30
- package/dist/regexps/hex.js +16 -33
- package/dist/regexps/spec.js +53 -81
- package/dist/releases/github-archives.js +127 -118
- package/dist/releases/github-asset-url.js +162 -146
- package/dist/releases/github-assets.js +37 -49
- package/dist/releases/github-auth.js +32 -48
- package/dist/releases/github-downloads.js +118 -138
- package/dist/releases/github-listing.js +175 -145
- package/dist/releases/github-retry-config.js +41 -47
- package/dist/releases/github-types.js +1 -17
- package/dist/releases/socket-btm.js +273 -192
- package/dist/schema/parse.js +35 -36
- package/dist/schema/types.js +1 -17
- package/dist/schema/validate.js +118 -99
- package/dist/sea/detect.js +57 -52
- package/dist/secrets/_internal.js +86 -67
- package/dist/secrets/find.js +96 -77
- package/dist/secrets/keychain.js +315 -309
- package/dist/secrets/linux.js +133 -135
- package/dist/secrets/macos.js +151 -147
- package/dist/secrets/rc.js +182 -181
- package/dist/secrets/socket-api-token.js +28 -43
- package/dist/secrets/types.js +1 -17
- package/dist/secrets/windows.js +184 -242
- package/dist/shadow/skip.js +51 -70
- package/dist/shadow/types.js +1 -17
- package/dist/shell/parse.d.ts +26 -0
- package/dist/shell/parse.js +35 -0
- package/dist/shell/quote.d.ts +19 -0
- package/dist/shell/quote.js +30 -0
- package/dist/smol/detect.js +67 -43
- package/dist/smol/http.js +33 -37
- package/dist/smol/https.js +31 -37
- package/dist/smol/manifest.js +33 -37
- package/dist/smol/path.js +33 -37
- package/dist/smol/primordial.js +35 -37
- package/dist/smol/purl.js +34 -37
- package/dist/smol/versions.js +31 -37
- package/dist/smol/vfs.js +46 -38
- package/dist/sorts/_internal.js +14 -40
- package/dist/sorts/natural.js +57 -64
- package/dist/sorts/semver.js +33 -43
- package/dist/sorts/strings.js +24 -30
- package/dist/sorts/types.js +1 -17
- package/dist/spinner/default.js +72 -63
- package/dist/spinner/format.js +86 -71
- package/dist/spinner/spinner.js +749 -797
- package/dist/spinner/types.js +1 -17
- package/dist/spinner/with.js +193 -137
- package/dist/ssri/convert.js +64 -47
- package/dist/ssri/parse.js +38 -37
- package/dist/ssri/validate.js +51 -34
- package/dist/stdio/_internal.js +50 -46
- package/dist/stdio/clear.js +208 -86
- package/dist/stdio/divider.js +170 -97
- package/dist/stdio/footer.js +116 -110
- package/dist/stdio/header.js +117 -90
- package/dist/stdio/progress.js +189 -218
- package/dist/stdio/prompts.js +244 -168
- package/dist/stdio/stderr.js +173 -78
- package/dist/stdio/stdout.js +177 -94
- package/dist/streams/parallel.js +58 -50
- package/dist/streams/transform.js +36 -45
- package/dist/strings/format.js +145 -63
- package/dist/strings/predicates.js +56 -34
- package/dist/strings/search.js +52 -42
- package/dist/strings/transform.js +113 -72
- package/dist/strings/types.js +1 -17
- package/dist/strings/width.js +89 -82
- package/dist/tables/bordered.js +81 -81
- package/dist/tables/padding.js +36 -46
- package/dist/tables/simple.js +62 -70
- package/dist/tables/types.js +1 -17
- package/dist/temporal/instant.js +72 -81
- package/dist/temporal/now.js +40 -31
- package/dist/temporal/slots.js +42 -36
- package/dist/temporal/system.js +36 -36
- package/dist/temporal/temporal.js +11 -41
- package/dist/themes/context.js +131 -69
- package/dist/themes/resolve.js +207 -132
- package/dist/themes/themes.js +225 -194
- package/dist/themes/types.js +1 -17
- package/dist/url/parse.js +48 -51
- package/dist/url/predicates.js +24 -31
- package/dist/url/search-params.js +133 -101
- package/dist/url/types.js +1 -17
- package/dist/versions/_internal.js +31 -33
- package/dist/versions/compare.js +80 -58
- package/dist/versions/modify.js +41 -39
- package/dist/versions/parse.js +88 -64
- package/dist/versions/range.js +58 -41
- package/dist/versions/types.js +1 -17
- package/dist/words/article.js +22 -30
- package/dist/words/capitalize.js +25 -34
- package/dist/words/pluralize.js +23 -31
- package/dist/words/types.js +1 -17
- package/package.json +17 -5
|
@@ -1,4 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Bundled from yargs-parser
|
|
4
|
+
* This is a zero-dependency bundle created by rolldown.
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
//#region \0rolldown/runtime.js
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __name = (target, value) => __defProp(target, "name", {
|
|
11
|
+
value,
|
|
12
|
+
configurable: true
|
|
13
|
+
});
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
18
|
+
var __exportAll = (all, no_symbols) => {
|
|
19
|
+
let target = {};
|
|
20
|
+
for (var name in all) {
|
|
21
|
+
__defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (!no_symbols) {
|
|
27
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
28
|
+
}
|
|
29
|
+
return target;
|
|
30
|
+
};
|
|
31
|
+
var __copyProps = (to, from, except, desc) => {
|
|
32
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
33
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
34
|
+
key = keys[i];
|
|
35
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
36
|
+
__defProp(to, key, {
|
|
37
|
+
get: ((k) => from[k]).bind(null, key),
|
|
38
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return to;
|
|
44
|
+
};
|
|
45
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
let util = require("util");
|
|
49
|
+
let path = require("path");
|
|
50
|
+
let fs = require("fs");
|
|
51
|
+
let node_module = require("node:module");
|
|
52
|
+
|
|
1
53
|
const { ArrayIsArray: _p_ArrayIsArray } = require('../primordials/array.js')
|
|
54
|
+
|
|
2
55
|
const { JSONParse: _p_JSONParse } = require('../primordials/json.js')
|
|
3
56
|
|
|
4
57
|
const { SetCtor: _p_SetCtor } = require('../primordials/map-set.js')
|
|
@@ -13,1104 +66,828 @@ const { RegExpCtor: _p_RegExpCtor } = require('../primordials/regexp.js')
|
|
|
13
66
|
|
|
14
67
|
const { StringPrototypeCharAt: _p_StringPrototypeCharAt, StringPrototypeSubstring: _p_StringPrototypeSubstring } = require('../primordials/string.js')
|
|
15
68
|
|
|
16
|
-
|
|
69
|
+
//#region node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/string-utils.js
|
|
17
70
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var __defProp = Object.defineProperty;
|
|
23
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
24
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
25
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
26
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
27
|
-
var __esm = (fn, res) => function __init() {
|
|
28
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
29
|
-
};
|
|
30
|
-
var __export = (target, all) => {
|
|
31
|
-
for (var name in all)
|
|
32
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
|
-
};
|
|
34
|
-
var __copyProps = (to, from, except, desc) => {
|
|
35
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
36
|
-
for (let key of __getOwnPropNames(from))
|
|
37
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
38
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
39
|
-
}
|
|
40
|
-
return to;
|
|
41
|
-
};
|
|
42
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
43
|
-
|
|
44
|
-
// node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/string-utils.js
|
|
71
|
+
* @license
|
|
72
|
+
* Copyright (c) 2016, Contributors
|
|
73
|
+
* SPDX-License-Identifier: ISC
|
|
74
|
+
*/
|
|
45
75
|
function camelCase(str) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
nextChrUpper = true;
|
|
64
|
-
} else if (chr !== "-" && chr !== "_") {
|
|
65
|
-
camelcase += chr;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return camelcase;
|
|
69
|
-
}
|
|
76
|
+
if (!(str !== str.toLowerCase() && str !== str.toUpperCase())) str = str.toLowerCase();
|
|
77
|
+
if (str.indexOf("-") === -1 && str.indexOf("_") === -1) return str;
|
|
78
|
+
else {
|
|
79
|
+
let camelcase = "";
|
|
80
|
+
let nextChrUpper = false;
|
|
81
|
+
const leadingHyphens = str.match(/^-+/);
|
|
82
|
+
for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) {
|
|
83
|
+
let chr = _p_StringPrototypeCharAt(str, i);
|
|
84
|
+
if (nextChrUpper) {
|
|
85
|
+
nextChrUpper = false;
|
|
86
|
+
chr = chr.toUpperCase();
|
|
87
|
+
}
|
|
88
|
+
if (i !== 0 && (chr === "-" || chr === "_")) nextChrUpper = true;
|
|
89
|
+
else if (chr !== "-" && chr !== "_") camelcase += chr;
|
|
90
|
+
}
|
|
91
|
+
return camelcase;
|
|
92
|
+
}
|
|
70
93
|
}
|
|
71
94
|
function decamelize(str, joinString) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return notCamelcase;
|
|
95
|
+
const lowercase = str.toLowerCase();
|
|
96
|
+
joinString = joinString || "-";
|
|
97
|
+
let notCamelcase = "";
|
|
98
|
+
for (let i = 0; i < str.length; i++) {
|
|
99
|
+
const chrLower = _p_StringPrototypeCharAt(lowercase, i);
|
|
100
|
+
const chrString = _p_StringPrototypeCharAt(str, i);
|
|
101
|
+
if (chrLower !== chrString && i > 0) notCamelcase += `${joinString}${_p_StringPrototypeCharAt(lowercase, i)}`;
|
|
102
|
+
else notCamelcase += chrString;
|
|
103
|
+
}
|
|
104
|
+
return notCamelcase;
|
|
85
105
|
}
|
|
86
106
|
function looksLikeNumber(x) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return true;
|
|
93
|
-
if (/^0[^.]/.test(x))
|
|
94
|
-
return false;
|
|
95
|
-
return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
107
|
+
if (x === null || x === void 0) return false;
|
|
108
|
+
if (typeof x === "number") return true;
|
|
109
|
+
if (/^0x[0-9a-f]+$/i.test(x)) return true;
|
|
110
|
+
if (/^0[^.]/.test(x)) return false;
|
|
111
|
+
return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
96
112
|
}
|
|
97
|
-
var init_string_utils =
|
|
98
|
-
"node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/string-utils.js"() {
|
|
99
|
-
__name(camelCase, "camelCase");
|
|
100
|
-
__name(decamelize, "decamelize");
|
|
101
|
-
__name(looksLikeNumber, "looksLikeNumber");
|
|
102
|
-
}
|
|
103
|
-
});
|
|
113
|
+
var init_string_utils = __esmMin((() => {}));
|
|
104
114
|
|
|
105
|
-
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/tokenize-arg-string.js
|
|
117
|
+
/**
|
|
118
|
+
* @license
|
|
119
|
+
* Copyright (c) 2016, Contributors
|
|
120
|
+
* SPDX-License-Identifier: ISC
|
|
121
|
+
*/
|
|
106
122
|
function tokenizeArgString(argString) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
} else if ((c === "'" || c === '"') && !opening) {
|
|
128
|
-
opening = c;
|
|
129
|
-
}
|
|
130
|
-
if (!args[i])
|
|
131
|
-
args[i] = "";
|
|
132
|
-
args[i] += c;
|
|
133
|
-
}
|
|
134
|
-
return args;
|
|
123
|
+
if (_p_ArrayIsArray(argString)) return argString.map((e) => typeof e !== "string" ? e + "" : e);
|
|
124
|
+
argString = argString.trim();
|
|
125
|
+
let i = 0;
|
|
126
|
+
let prevC = null;
|
|
127
|
+
let c = null;
|
|
128
|
+
let opening = null;
|
|
129
|
+
const args = [];
|
|
130
|
+
for (let ii = 0; ii < argString.length; ii++) {
|
|
131
|
+
prevC = c;
|
|
132
|
+
c = _p_StringPrototypeCharAt(argString, ii);
|
|
133
|
+
if (c === " " && !opening) {
|
|
134
|
+
if (!(prevC === " ")) i++;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (c === opening) opening = null;
|
|
138
|
+
else if ((c === "'" || c === "\"") && !opening) opening = c;
|
|
139
|
+
if (!args[i]) args[i] = "";
|
|
140
|
+
args[i] += c;
|
|
141
|
+
}
|
|
142
|
+
return args;
|
|
135
143
|
}
|
|
136
|
-
var init_tokenize_arg_string =
|
|
137
|
-
"node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/tokenize-arg-string.js"() {
|
|
138
|
-
__name(tokenizeArgString, "tokenizeArgString");
|
|
139
|
-
}
|
|
140
|
-
});
|
|
144
|
+
var init_tokenize_arg_string = __esmMin((() => {}));
|
|
141
145
|
|
|
142
|
-
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/yargs-parser-types.js
|
|
143
148
|
var DefaultValuesForTypeKey;
|
|
144
|
-
var init_yargs_parser_types =
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
var init_yargs_parser_types = __esmMin((() => {
|
|
150
|
+
;
|
|
151
|
+
/**
|
|
152
|
+
* @license
|
|
153
|
+
* Copyright (c) 2016, Contributors
|
|
154
|
+
* SPDX-License-Identifier: ISC
|
|
155
|
+
*/
|
|
156
|
+
(function(DefaultValuesForTypeKey) {
|
|
157
|
+
DefaultValuesForTypeKey["BOOLEAN"] = "boolean";
|
|
158
|
+
DefaultValuesForTypeKey["STRING"] = "string";
|
|
159
|
+
DefaultValuesForTypeKey["NUMBER"] = "number";
|
|
160
|
+
DefaultValuesForTypeKey["ARRAY"] = "array";
|
|
161
|
+
})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));
|
|
162
|
+
}));
|
|
154
163
|
|
|
155
|
-
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/yargs-parser.js
|
|
166
|
+
/**
|
|
167
|
+
* @license
|
|
168
|
+
* Copyright (c) 2016, Contributors
|
|
169
|
+
* SPDX-License-Identifier: ISC
|
|
170
|
+
*/
|
|
156
171
|
function combineAliases(aliases) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
});
|
|
183
|
-
const lastAlias = aliasArray.pop();
|
|
184
|
-
if (lastAlias !== void 0 && typeof lastAlias === "string") {
|
|
185
|
-
combined[lastAlias] = aliasArray;
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
return combined;
|
|
172
|
+
const aliasArrays = [];
|
|
173
|
+
const combined = _p_ObjectCreate(null);
|
|
174
|
+
let change = true;
|
|
175
|
+
_p_ObjectKeys(aliases).forEach(function(key) {
|
|
176
|
+
aliasArrays.push([].concat(aliases[key], key));
|
|
177
|
+
});
|
|
178
|
+
while (change) {
|
|
179
|
+
change = false;
|
|
180
|
+
for (let i = 0; i < aliasArrays.length; i++) for (let ii = i + 1; ii < aliasArrays.length; ii++) if (aliasArrays[i].filter(function(v) {
|
|
181
|
+
return aliasArrays[ii].indexOf(v) !== -1;
|
|
182
|
+
}).length) {
|
|
183
|
+
aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);
|
|
184
|
+
aliasArrays.splice(ii, 1);
|
|
185
|
+
change = true;
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
aliasArrays.forEach(function(aliasArray) {
|
|
190
|
+
aliasArray = aliasArray.filter(function(v, i, self) {
|
|
191
|
+
return self.indexOf(v) === i;
|
|
192
|
+
});
|
|
193
|
+
const lastAlias = aliasArray.pop();
|
|
194
|
+
if (lastAlias !== void 0 && typeof lastAlias === "string") combined[lastAlias] = aliasArray;
|
|
195
|
+
});
|
|
196
|
+
return combined;
|
|
189
197
|
}
|
|
190
198
|
function increment(orig) {
|
|
191
|
-
|
|
199
|
+
return orig !== void 0 ? orig + 1 : 1;
|
|
192
200
|
}
|
|
193
201
|
function sanitizeKey(key) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
return key;
|
|
202
|
+
if (key === "__proto__") return "___proto___";
|
|
203
|
+
return key;
|
|
197
204
|
}
|
|
198
205
|
function stripQuotes(val) {
|
|
199
|
-
|
|
206
|
+
return typeof val === "string" && (val[0] === "'" || val[0] === "\"") && val[val.length - 1] === val[0] ? val.substring(1, val.length - 1) : val;
|
|
200
207
|
}
|
|
201
208
|
var mixin, YargsParser;
|
|
202
|
-
var init_yargs_parser =
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
let o = obj;
|
|
829
|
-
if (!configuration["dot-notation"])
|
|
830
|
-
keys = [keys.join(".")];
|
|
831
|
-
keys.slice(0, -1).forEach(function(key2) {
|
|
832
|
-
key2 = sanitizeKey(key2);
|
|
833
|
-
if (typeof o === "object" && o[key2] === void 0) {
|
|
834
|
-
o[key2] = {};
|
|
835
|
-
}
|
|
836
|
-
if (typeof o[key2] !== "object" || _p_ArrayIsArray(o[key2])) {
|
|
837
|
-
if (_p_ArrayIsArray(o[key2])) {
|
|
838
|
-
o[key2].push({});
|
|
839
|
-
} else {
|
|
840
|
-
o[key2] = [o[key2], {}];
|
|
841
|
-
}
|
|
842
|
-
o = o[key2][o[key2].length - 1];
|
|
843
|
-
} else {
|
|
844
|
-
o = o[key2];
|
|
845
|
-
}
|
|
846
|
-
});
|
|
847
|
-
const key = sanitizeKey(keys[keys.length - 1]);
|
|
848
|
-
const isTypeArray = checkAllAliases(keys.join("."), flags.arrays);
|
|
849
|
-
const isValueArray = _p_ArrayIsArray(value);
|
|
850
|
-
let duplicate = configuration["duplicate-arguments-array"];
|
|
851
|
-
if (!duplicate && checkAllAliases(key, flags.nargs)) {
|
|
852
|
-
duplicate = true;
|
|
853
|
-
if (!isUndefined(o[key]) && flags.nargs[key] === 1 || _p_ArrayIsArray(o[key]) && o[key].length === flags.nargs[key]) {
|
|
854
|
-
o[key] = void 0;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
if (value === increment()) {
|
|
858
|
-
o[key] = increment(o[key]);
|
|
859
|
-
} else if (_p_ArrayIsArray(o[key])) {
|
|
860
|
-
if (duplicate && isTypeArray && isValueArray) {
|
|
861
|
-
o[key] = configuration["flatten-duplicate-arrays"] ? o[key].concat(value) : (_p_ArrayIsArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
|
|
862
|
-
} else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
|
|
863
|
-
o[key] = value;
|
|
864
|
-
} else {
|
|
865
|
-
o[key] = o[key].concat([value]);
|
|
866
|
-
}
|
|
867
|
-
} else if (o[key] === void 0 && isTypeArray) {
|
|
868
|
-
o[key] = isValueArray ? value : [value];
|
|
869
|
-
} else if (duplicate && !(o[key] === void 0 || checkAllAliases(key, flags.counts) || checkAllAliases(key, flags.bools))) {
|
|
870
|
-
o[key] = [o[key], value];
|
|
871
|
-
} else {
|
|
872
|
-
o[key] = value;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
__name(setKey, "setKey");
|
|
876
|
-
function extendAliases(...args2) {
|
|
877
|
-
args2.forEach(function(obj) {
|
|
878
|
-
_p_ObjectKeys(obj || {}).forEach(function(key) {
|
|
879
|
-
if (flags.aliases[key])
|
|
880
|
-
return;
|
|
881
|
-
flags.aliases[key] = [].concat(aliases[key] || []);
|
|
882
|
-
flags.aliases[key].concat(key).forEach(function(x) {
|
|
883
|
-
if (/-/.test(x) && configuration["camel-case-expansion"]) {
|
|
884
|
-
const c = camelCase(x);
|
|
885
|
-
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
|
|
886
|
-
flags.aliases[key].push(c);
|
|
887
|
-
newAliases[c] = true;
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
});
|
|
891
|
-
flags.aliases[key].concat(key).forEach(function(x) {
|
|
892
|
-
if (x.length > 1 && /[A-Z]/.test(x) && configuration["camel-case-expansion"]) {
|
|
893
|
-
const c = decamelize(x, "-");
|
|
894
|
-
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
|
|
895
|
-
flags.aliases[key].push(c);
|
|
896
|
-
newAliases[c] = true;
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
});
|
|
900
|
-
flags.aliases[key].forEach(function(x) {
|
|
901
|
-
flags.aliases[x] = [key].concat(flags.aliases[key].filter(function(y) {
|
|
902
|
-
return x !== y;
|
|
903
|
-
}));
|
|
904
|
-
});
|
|
905
|
-
});
|
|
906
|
-
});
|
|
907
|
-
}
|
|
908
|
-
__name(extendAliases, "extendAliases");
|
|
909
|
-
function checkAllAliases(key, flag) {
|
|
910
|
-
const toCheck = [].concat(flags.aliases[key] || [], key);
|
|
911
|
-
const keys = _p_ObjectKeys(flag);
|
|
912
|
-
const setAlias = toCheck.find((key2) => keys.includes(key2));
|
|
913
|
-
return setAlias ? flag[setAlias] : false;
|
|
914
|
-
}
|
|
915
|
-
__name(checkAllAliases, "checkAllAliases");
|
|
916
|
-
function hasAnyFlag(key) {
|
|
917
|
-
const flagsKeys = _p_ObjectKeys(flags);
|
|
918
|
-
const toCheck = [].concat(flagsKeys.map((k) => flags[k]));
|
|
919
|
-
return toCheck.some(function(flag) {
|
|
920
|
-
return _p_ArrayIsArray(flag) ? flag.includes(key) : flag[key];
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
__name(hasAnyFlag, "hasAnyFlag");
|
|
924
|
-
function hasFlagsMatching(arg, ...patterns) {
|
|
925
|
-
const toCheck = [].concat(...patterns);
|
|
926
|
-
return toCheck.some(function(pattern) {
|
|
927
|
-
const match = arg.match(pattern);
|
|
928
|
-
return match && hasAnyFlag(match[1]);
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
__name(hasFlagsMatching, "hasFlagsMatching");
|
|
932
|
-
function hasAllShortFlags(arg) {
|
|
933
|
-
if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
|
|
934
|
-
return false;
|
|
935
|
-
}
|
|
936
|
-
let hasAllFlags = true;
|
|
937
|
-
let next;
|
|
938
|
-
const letters = arg.slice(1).split("");
|
|
939
|
-
for (let j = 0; j < letters.length; j++) {
|
|
940
|
-
next = arg.slice(j + 2);
|
|
941
|
-
if (!hasAnyFlag(letters[j])) {
|
|
942
|
-
hasAllFlags = false;
|
|
943
|
-
break;
|
|
944
|
-
}
|
|
945
|
-
if (letters[j + 1] && letters[j + 1] === "=" || next === "-" || /[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) || letters[j + 1] && letters[j + 1].match(/\W/)) {
|
|
946
|
-
break;
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
return hasAllFlags;
|
|
950
|
-
}
|
|
951
|
-
__name(hasAllShortFlags, "hasAllShortFlags");
|
|
952
|
-
function isUnknownOptionAsArg(arg) {
|
|
953
|
-
return configuration["unknown-options-as-args"] && isUnknownOption(arg);
|
|
954
|
-
}
|
|
955
|
-
__name(isUnknownOptionAsArg, "isUnknownOptionAsArg");
|
|
956
|
-
function isUnknownOption(arg) {
|
|
957
|
-
arg = arg.replace(/^-{3,}/, "--");
|
|
958
|
-
if (arg.match(negative)) {
|
|
959
|
-
return false;
|
|
960
|
-
}
|
|
961
|
-
if (hasAllShortFlags(arg)) {
|
|
962
|
-
return false;
|
|
963
|
-
}
|
|
964
|
-
const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/;
|
|
965
|
-
const normalFlag = /^-+([^=]+?)$/;
|
|
966
|
-
const flagEndingInHyphen = /^-+([^=]+?)-$/;
|
|
967
|
-
const flagEndingInDigits = /^-+([^=]+?\d+)$/;
|
|
968
|
-
const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/;
|
|
969
|
-
return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);
|
|
970
|
-
}
|
|
971
|
-
__name(isUnknownOption, "isUnknownOption");
|
|
972
|
-
function defaultValue(key) {
|
|
973
|
-
if (!checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts) && `${key}` in defaults) {
|
|
974
|
-
return defaults[key];
|
|
975
|
-
} else {
|
|
976
|
-
return defaultForType(guessType(key));
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
__name(defaultValue, "defaultValue");
|
|
980
|
-
function defaultForType(type) {
|
|
981
|
-
const def = {
|
|
982
|
-
[DefaultValuesForTypeKey.BOOLEAN]: true,
|
|
983
|
-
[DefaultValuesForTypeKey.STRING]: "",
|
|
984
|
-
[DefaultValuesForTypeKey.NUMBER]: void 0,
|
|
985
|
-
[DefaultValuesForTypeKey.ARRAY]: []
|
|
986
|
-
};
|
|
987
|
-
return def[type];
|
|
988
|
-
}
|
|
989
|
-
__name(defaultForType, "defaultForType");
|
|
990
|
-
function guessType(key) {
|
|
991
|
-
let type = DefaultValuesForTypeKey.BOOLEAN;
|
|
992
|
-
if (checkAllAliases(key, flags.strings))
|
|
993
|
-
type = DefaultValuesForTypeKey.STRING;
|
|
994
|
-
else if (checkAllAliases(key, flags.numbers))
|
|
995
|
-
type = DefaultValuesForTypeKey.NUMBER;
|
|
996
|
-
else if (checkAllAliases(key, flags.bools))
|
|
997
|
-
type = DefaultValuesForTypeKey.BOOLEAN;
|
|
998
|
-
else if (checkAllAliases(key, flags.arrays))
|
|
999
|
-
type = DefaultValuesForTypeKey.ARRAY;
|
|
1000
|
-
return type;
|
|
1001
|
-
}
|
|
1002
|
-
__name(guessType, "guessType");
|
|
1003
|
-
function isUndefined(num) {
|
|
1004
|
-
return num === void 0;
|
|
1005
|
-
}
|
|
1006
|
-
__name(isUndefined, "isUndefined");
|
|
1007
|
-
function checkConfiguration() {
|
|
1008
|
-
_p_ObjectKeys(flags.counts).find((key) => {
|
|
1009
|
-
if (checkAllAliases(key, flags.arrays)) {
|
|
1010
|
-
error = Error(__("Invalid configuration: %s, opts.count excludes opts.array.", key));
|
|
1011
|
-
return true;
|
|
1012
|
-
} else if (checkAllAliases(key, flags.nargs)) {
|
|
1013
|
-
error = Error(__("Invalid configuration: %s, opts.count excludes opts.narg.", key));
|
|
1014
|
-
return true;
|
|
1015
|
-
}
|
|
1016
|
-
return false;
|
|
1017
|
-
});
|
|
1018
|
-
}
|
|
1019
|
-
__name(checkConfiguration, "checkConfiguration");
|
|
1020
|
-
return {
|
|
1021
|
-
aliases: _p_ObjectAssign({}, flags.aliases),
|
|
1022
|
-
argv: _p_ObjectAssign(argvReturn, argv),
|
|
1023
|
-
configuration,
|
|
1024
|
-
defaulted: _p_ObjectAssign({}, defaulted),
|
|
1025
|
-
error,
|
|
1026
|
-
newAliases: _p_ObjectAssign({}, newAliases)
|
|
1027
|
-
};
|
|
1028
|
-
}
|
|
1029
|
-
};
|
|
1030
|
-
__name(combineAliases, "combineAliases");
|
|
1031
|
-
__name(increment, "increment");
|
|
1032
|
-
__name(sanitizeKey, "sanitizeKey");
|
|
1033
|
-
__name(stripQuotes, "stripQuotes");
|
|
1034
|
-
}
|
|
1035
|
-
});
|
|
209
|
+
var init_yargs_parser = __esmMin((() => {
|
|
210
|
+
init_tokenize_arg_string();
|
|
211
|
+
init_yargs_parser_types();
|
|
212
|
+
init_string_utils();
|
|
213
|
+
;
|
|
214
|
+
YargsParser = class {
|
|
215
|
+
constructor(_mixin) {
|
|
216
|
+
mixin = _mixin;
|
|
217
|
+
}
|
|
218
|
+
parse(argsInput, options) {
|
|
219
|
+
const opts = _p_ObjectAssign({
|
|
220
|
+
alias: void 0,
|
|
221
|
+
array: void 0,
|
|
222
|
+
boolean: void 0,
|
|
223
|
+
config: void 0,
|
|
224
|
+
configObjects: void 0,
|
|
225
|
+
configuration: void 0,
|
|
226
|
+
coerce: void 0,
|
|
227
|
+
count: void 0,
|
|
228
|
+
default: void 0,
|
|
229
|
+
envPrefix: void 0,
|
|
230
|
+
narg: void 0,
|
|
231
|
+
normalize: void 0,
|
|
232
|
+
string: void 0,
|
|
233
|
+
number: void 0,
|
|
234
|
+
__: void 0,
|
|
235
|
+
key: void 0
|
|
236
|
+
}, options);
|
|
237
|
+
const args = tokenizeArgString(argsInput);
|
|
238
|
+
const inputIsString = typeof argsInput === "string";
|
|
239
|
+
const aliases = combineAliases(_p_ObjectAssign(_p_ObjectCreate(null), opts.alias));
|
|
240
|
+
const configuration = _p_ObjectAssign({
|
|
241
|
+
"boolean-negation": true,
|
|
242
|
+
"camel-case-expansion": true,
|
|
243
|
+
"combine-arrays": false,
|
|
244
|
+
"dot-notation": true,
|
|
245
|
+
"duplicate-arguments-array": true,
|
|
246
|
+
"flatten-duplicate-arrays": true,
|
|
247
|
+
"greedy-arrays": true,
|
|
248
|
+
"halt-at-non-option": false,
|
|
249
|
+
"nargs-eats-options": false,
|
|
250
|
+
"negation-prefix": "no-",
|
|
251
|
+
"parse-numbers": true,
|
|
252
|
+
"parse-positional-numbers": true,
|
|
253
|
+
"populate--": false,
|
|
254
|
+
"set-placeholder-key": false,
|
|
255
|
+
"short-option-groups": true,
|
|
256
|
+
"strip-aliased": false,
|
|
257
|
+
"strip-dashed": false,
|
|
258
|
+
"unknown-options-as-args": false
|
|
259
|
+
}, opts.configuration);
|
|
260
|
+
const defaults = _p_ObjectAssign(_p_ObjectCreate(null), opts.default);
|
|
261
|
+
const configObjects = opts.configObjects || [];
|
|
262
|
+
const envPrefix = opts.envPrefix;
|
|
263
|
+
const notFlagsOption = configuration["populate--"];
|
|
264
|
+
const notFlagsArgv = notFlagsOption ? "--" : "_";
|
|
265
|
+
const newAliases = _p_ObjectCreate(null);
|
|
266
|
+
const defaulted = _p_ObjectCreate(null);
|
|
267
|
+
const __ = opts.__ || mixin.format;
|
|
268
|
+
const flags = {
|
|
269
|
+
aliases: _p_ObjectCreate(null),
|
|
270
|
+
arrays: _p_ObjectCreate(null),
|
|
271
|
+
bools: _p_ObjectCreate(null),
|
|
272
|
+
strings: _p_ObjectCreate(null),
|
|
273
|
+
numbers: _p_ObjectCreate(null),
|
|
274
|
+
counts: _p_ObjectCreate(null),
|
|
275
|
+
normalize: _p_ObjectCreate(null),
|
|
276
|
+
configs: _p_ObjectCreate(null),
|
|
277
|
+
nargs: _p_ObjectCreate(null),
|
|
278
|
+
coercions: _p_ObjectCreate(null),
|
|
279
|
+
keys: []
|
|
280
|
+
};
|
|
281
|
+
const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
|
|
282
|
+
const negatedBoolean = new _p_RegExpCtor("^--" + configuration["negation-prefix"] + "(.+)");
|
|
283
|
+
[].concat(opts.array || []).filter(Boolean).forEach(function(opt) {
|
|
284
|
+
const key = typeof opt === "object" ? opt.key : opt;
|
|
285
|
+
const assignment = _p_ObjectKeys(opt).map(function(key) {
|
|
286
|
+
return {
|
|
287
|
+
boolean: "bools",
|
|
288
|
+
string: "strings",
|
|
289
|
+
number: "numbers"
|
|
290
|
+
}[key];
|
|
291
|
+
}).filter(Boolean).pop();
|
|
292
|
+
if (assignment) flags[assignment][key] = true;
|
|
293
|
+
flags.arrays[key] = true;
|
|
294
|
+
flags.keys.push(key);
|
|
295
|
+
});
|
|
296
|
+
[].concat(opts.boolean || []).filter(Boolean).forEach(function(key) {
|
|
297
|
+
flags.bools[key] = true;
|
|
298
|
+
flags.keys.push(key);
|
|
299
|
+
});
|
|
300
|
+
[].concat(opts.string || []).filter(Boolean).forEach(function(key) {
|
|
301
|
+
flags.strings[key] = true;
|
|
302
|
+
flags.keys.push(key);
|
|
303
|
+
});
|
|
304
|
+
[].concat(opts.number || []).filter(Boolean).forEach(function(key) {
|
|
305
|
+
flags.numbers[key] = true;
|
|
306
|
+
flags.keys.push(key);
|
|
307
|
+
});
|
|
308
|
+
[].concat(opts.count || []).filter(Boolean).forEach(function(key) {
|
|
309
|
+
flags.counts[key] = true;
|
|
310
|
+
flags.keys.push(key);
|
|
311
|
+
});
|
|
312
|
+
[].concat(opts.normalize || []).filter(Boolean).forEach(function(key) {
|
|
313
|
+
flags.normalize[key] = true;
|
|
314
|
+
flags.keys.push(key);
|
|
315
|
+
});
|
|
316
|
+
if (typeof opts.narg === "object") _p_ObjectEntries(opts.narg).forEach(([key, value]) => {
|
|
317
|
+
if (typeof value === "number") {
|
|
318
|
+
flags.nargs[key] = value;
|
|
319
|
+
flags.keys.push(key);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
if (typeof opts.coerce === "object") _p_ObjectEntries(opts.coerce).forEach(([key, value]) => {
|
|
323
|
+
if (typeof value === "function") {
|
|
324
|
+
flags.coercions[key] = value;
|
|
325
|
+
flags.keys.push(key);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
if (typeof opts.config !== "undefined") {
|
|
329
|
+
if (_p_ArrayIsArray(opts.config) || typeof opts.config === "string") [].concat(opts.config).filter(Boolean).forEach(function(key) {
|
|
330
|
+
flags.configs[key] = true;
|
|
331
|
+
});
|
|
332
|
+
else if (typeof opts.config === "object") _p_ObjectEntries(opts.config).forEach(([key, value]) => {
|
|
333
|
+
if (typeof value === "boolean" || typeof value === "function") flags.configs[key] = value;
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
extendAliases(opts.key, aliases, opts.default, flags.arrays);
|
|
337
|
+
_p_ObjectKeys(defaults).forEach(function(key) {
|
|
338
|
+
(flags.aliases[key] || []).forEach(function(alias) {
|
|
339
|
+
defaults[alias] = defaults[key];
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
let error = null;
|
|
343
|
+
checkConfiguration();
|
|
344
|
+
let notFlags = [];
|
|
345
|
+
const argv = _p_ObjectAssign(_p_ObjectCreate(null), { _: [] });
|
|
346
|
+
const argvReturn = {};
|
|
347
|
+
for (let i = 0; i < args.length; i++) {
|
|
348
|
+
const arg = args[i];
|
|
349
|
+
const truncatedArg = arg.replace(/^-{3,}/, "---");
|
|
350
|
+
let broken;
|
|
351
|
+
let key;
|
|
352
|
+
let letters;
|
|
353
|
+
let m;
|
|
354
|
+
let next;
|
|
355
|
+
let value;
|
|
356
|
+
if (arg !== "--" && /^-/.test(arg) && isUnknownOptionAsArg(arg)) pushPositional(arg);
|
|
357
|
+
else if (truncatedArg.match(/^---+(=|$)/)) {
|
|
358
|
+
pushPositional(arg);
|
|
359
|
+
continue;
|
|
360
|
+
} else if (arg.match(/^--.+=/) || !configuration["short-option-groups"] && arg.match(/^-.+=/)) {
|
|
361
|
+
m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
|
|
362
|
+
if (m !== null && _p_ArrayIsArray(m) && m.length >= 3) if (checkAllAliases(m[1], flags.arrays)) i = eatArray(i, m[1], args, m[2]);
|
|
363
|
+
else if (checkAllAliases(m[1], flags.nargs) !== false) i = eatNargs(i, m[1], args, m[2]);
|
|
364
|
+
else setArg(m[1], m[2], true);
|
|
365
|
+
} else if (arg.match(negatedBoolean) && configuration["boolean-negation"]) {
|
|
366
|
+
m = arg.match(negatedBoolean);
|
|
367
|
+
if (m !== null && _p_ArrayIsArray(m) && m.length >= 2) {
|
|
368
|
+
key = m[1];
|
|
369
|
+
setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);
|
|
370
|
+
}
|
|
371
|
+
} else if (arg.match(/^--.+/) || !configuration["short-option-groups"] && arg.match(/^-[^-]+/)) {
|
|
372
|
+
m = arg.match(/^--?(.+)/);
|
|
373
|
+
if (m !== null && _p_ArrayIsArray(m) && m.length >= 2) {
|
|
374
|
+
key = m[1];
|
|
375
|
+
if (checkAllAliases(key, flags.arrays)) i = eatArray(i, key, args);
|
|
376
|
+
else if (checkAllAliases(key, flags.nargs) !== false) i = eatNargs(i, key, args);
|
|
377
|
+
else {
|
|
378
|
+
next = args[i + 1];
|
|
379
|
+
if (next !== void 0 && (!next.match(/^-/) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
|
|
380
|
+
setArg(key, next);
|
|
381
|
+
i++;
|
|
382
|
+
} else if (/^(true|false)$/.test(next)) {
|
|
383
|
+
setArg(key, next);
|
|
384
|
+
i++;
|
|
385
|
+
} else setArg(key, defaultValue(key));
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
} else if (arg.match(/^-.\..+=/)) {
|
|
389
|
+
m = arg.match(/^-([^=]+)=([\s\S]*)$/);
|
|
390
|
+
if (m !== null && _p_ArrayIsArray(m) && m.length >= 3) setArg(m[1], m[2]);
|
|
391
|
+
} else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
|
|
392
|
+
next = args[i + 1];
|
|
393
|
+
m = arg.match(/^-(.\..+)/);
|
|
394
|
+
if (m !== null && _p_ArrayIsArray(m) && m.length >= 2) {
|
|
395
|
+
key = m[1];
|
|
396
|
+
if (next !== void 0 && !next.match(/^-/) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
|
|
397
|
+
setArg(key, next);
|
|
398
|
+
i++;
|
|
399
|
+
} else setArg(key, defaultValue(key));
|
|
400
|
+
}
|
|
401
|
+
} else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
|
|
402
|
+
letters = arg.slice(1, -1).split("");
|
|
403
|
+
broken = false;
|
|
404
|
+
for (let j = 0; j < letters.length; j++) {
|
|
405
|
+
next = arg.slice(j + 2);
|
|
406
|
+
if (letters[j + 1] && letters[j + 1] === "=") {
|
|
407
|
+
value = arg.slice(j + 3);
|
|
408
|
+
key = letters[j];
|
|
409
|
+
if (checkAllAliases(key, flags.arrays)) i = eatArray(i, key, args, value);
|
|
410
|
+
else if (checkAllAliases(key, flags.nargs) !== false) i = eatNargs(i, key, args, value);
|
|
411
|
+
else setArg(key, value);
|
|
412
|
+
broken = true;
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
if (next === "-") {
|
|
416
|
+
setArg(letters[j], next);
|
|
417
|
+
continue;
|
|
418
|
+
}
|
|
419
|
+
if (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && checkAllAliases(next, flags.bools) === false) {
|
|
420
|
+
setArg(letters[j], next);
|
|
421
|
+
broken = true;
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
|
|
425
|
+
setArg(letters[j], next);
|
|
426
|
+
broken = true;
|
|
427
|
+
break;
|
|
428
|
+
} else setArg(letters[j], defaultValue(letters[j]));
|
|
429
|
+
}
|
|
430
|
+
key = arg.slice(-1)[0];
|
|
431
|
+
if (!broken && key !== "-") if (checkAllAliases(key, flags.arrays)) i = eatArray(i, key, args);
|
|
432
|
+
else if (checkAllAliases(key, flags.nargs) !== false) i = eatNargs(i, key, args);
|
|
433
|
+
else {
|
|
434
|
+
next = args[i + 1];
|
|
435
|
+
if (next !== void 0 && (!/^(-|--)[^-]/.test(next) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
|
|
436
|
+
setArg(key, next);
|
|
437
|
+
i++;
|
|
438
|
+
} else if (/^(true|false)$/.test(next)) {
|
|
439
|
+
setArg(key, next);
|
|
440
|
+
i++;
|
|
441
|
+
} else setArg(key, defaultValue(key));
|
|
442
|
+
}
|
|
443
|
+
} else if (arg.match(/^-[0-9]$/) && arg.match(negative) && checkAllAliases(arg.slice(1), flags.bools)) {
|
|
444
|
+
key = arg.slice(1);
|
|
445
|
+
setArg(key, defaultValue(key));
|
|
446
|
+
} else if (arg === "--") {
|
|
447
|
+
notFlags = args.slice(i + 1);
|
|
448
|
+
break;
|
|
449
|
+
} else if (configuration["halt-at-non-option"]) {
|
|
450
|
+
notFlags = args.slice(i);
|
|
451
|
+
break;
|
|
452
|
+
} else pushPositional(arg);
|
|
453
|
+
}
|
|
454
|
+
applyEnvVars(argv, true);
|
|
455
|
+
applyEnvVars(argv, false);
|
|
456
|
+
setConfig(argv);
|
|
457
|
+
setConfigObjects();
|
|
458
|
+
applyDefaultsAndAliases(argv, flags.aliases, defaults, true);
|
|
459
|
+
applyCoercions(argv);
|
|
460
|
+
if (configuration["set-placeholder-key"]) setPlaceholderKeys(argv);
|
|
461
|
+
_p_ObjectKeys(flags.counts).forEach(function(key) {
|
|
462
|
+
if (!hasKey(argv, key.split("."))) setArg(key, 0);
|
|
463
|
+
});
|
|
464
|
+
if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = [];
|
|
465
|
+
notFlags.forEach(function(key) {
|
|
466
|
+
argv[notFlagsArgv].push(key);
|
|
467
|
+
});
|
|
468
|
+
if (configuration["camel-case-expansion"] && configuration["strip-dashed"]) _p_ObjectKeys(argv).filter((key) => key !== "--" && key.includes("-")).forEach((key) => {
|
|
469
|
+
delete argv[key];
|
|
470
|
+
});
|
|
471
|
+
if (configuration["strip-aliased"]) [].concat(..._p_ObjectKeys(aliases).map((k) => aliases[k])).forEach((alias) => {
|
|
472
|
+
if (configuration["camel-case-expansion"] && alias.includes("-")) delete argv[alias.split(".").map((prop) => camelCase(prop)).join(".")];
|
|
473
|
+
delete argv[alias];
|
|
474
|
+
});
|
|
475
|
+
function pushPositional(arg) {
|
|
476
|
+
const maybeCoercedNumber = maybeCoerceNumber("_", arg);
|
|
477
|
+
if (typeof maybeCoercedNumber === "string" || typeof maybeCoercedNumber === "number") argv._.push(maybeCoercedNumber);
|
|
478
|
+
}
|
|
479
|
+
function eatNargs(i, key, args, argAfterEqualSign) {
|
|
480
|
+
let ii;
|
|
481
|
+
let toEat = checkAllAliases(key, flags.nargs);
|
|
482
|
+
toEat = typeof toEat !== "number" || isNaN(toEat) ? 1 : toEat;
|
|
483
|
+
if (toEat === 0) {
|
|
484
|
+
if (!isUndefined(argAfterEqualSign)) error = Error(__("Argument unexpected for: %s", key));
|
|
485
|
+
setArg(key, defaultValue(key));
|
|
486
|
+
return i;
|
|
487
|
+
}
|
|
488
|
+
let available = isUndefined(argAfterEqualSign) ? 0 : 1;
|
|
489
|
+
if (configuration["nargs-eats-options"]) {
|
|
490
|
+
if (args.length - (i + 1) + available < toEat) error = Error(__("Not enough arguments following: %s", key));
|
|
491
|
+
available = toEat;
|
|
492
|
+
} else {
|
|
493
|
+
for (ii = i + 1; ii < args.length; ii++) if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) available++;
|
|
494
|
+
else break;
|
|
495
|
+
if (available < toEat) error = Error(__("Not enough arguments following: %s", key));
|
|
496
|
+
}
|
|
497
|
+
let consumed = _p_MathMin(available, toEat);
|
|
498
|
+
if (!isUndefined(argAfterEqualSign) && consumed > 0) {
|
|
499
|
+
setArg(key, argAfterEqualSign);
|
|
500
|
+
consumed--;
|
|
501
|
+
}
|
|
502
|
+
for (ii = i + 1; ii < consumed + i + 1; ii++) setArg(key, args[ii]);
|
|
503
|
+
return i + consumed;
|
|
504
|
+
}
|
|
505
|
+
function eatArray(i, key, args, argAfterEqualSign) {
|
|
506
|
+
let argsToSet = [];
|
|
507
|
+
let next = argAfterEqualSign || args[i + 1];
|
|
508
|
+
const nargsCount = checkAllAliases(key, flags.nargs);
|
|
509
|
+
if (checkAllAliases(key, flags.bools) && !/^(true|false)$/.test(next)) argsToSet.push(true);
|
|
510
|
+
else if (isUndefined(next) || isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) {
|
|
511
|
+
if (defaults[key] !== void 0) {
|
|
512
|
+
const defVal = defaults[key];
|
|
513
|
+
argsToSet = _p_ArrayIsArray(defVal) ? defVal : [defVal];
|
|
514
|
+
}
|
|
515
|
+
} else {
|
|
516
|
+
if (!isUndefined(argAfterEqualSign)) argsToSet.push(processValue(key, argAfterEqualSign, true));
|
|
517
|
+
for (let ii = i + 1; ii < args.length; ii++) {
|
|
518
|
+
if (!configuration["greedy-arrays"] && argsToSet.length > 0 || nargsCount && typeof nargsCount === "number" && argsToSet.length >= nargsCount) break;
|
|
519
|
+
next = args[ii];
|
|
520
|
+
if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) break;
|
|
521
|
+
i = ii;
|
|
522
|
+
argsToSet.push(processValue(key, next, inputIsString));
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
if (typeof nargsCount === "number" && (nargsCount && argsToSet.length < nargsCount || isNaN(nargsCount) && argsToSet.length === 0)) error = Error(__("Not enough arguments following: %s", key));
|
|
526
|
+
setArg(key, argsToSet);
|
|
527
|
+
return i;
|
|
528
|
+
}
|
|
529
|
+
function setArg(key, val, shouldStripQuotes = inputIsString) {
|
|
530
|
+
if (/-/.test(key) && configuration["camel-case-expansion"]) addNewAlias(key, key.split(".").map(function(prop) {
|
|
531
|
+
return camelCase(prop);
|
|
532
|
+
}).join("."));
|
|
533
|
+
const value = processValue(key, val, shouldStripQuotes);
|
|
534
|
+
const splitKey = key.split(".");
|
|
535
|
+
setKey(argv, splitKey, value);
|
|
536
|
+
if (flags.aliases[key]) flags.aliases[key].forEach(function(x) {
|
|
537
|
+
setKey(argv, x.split("."), value);
|
|
538
|
+
});
|
|
539
|
+
if (splitKey.length > 1 && configuration["dot-notation"]) (flags.aliases[splitKey[0]] || []).forEach(function(x) {
|
|
540
|
+
let keyProperties = x.split(".");
|
|
541
|
+
const a = [].concat(splitKey);
|
|
542
|
+
a.shift();
|
|
543
|
+
keyProperties = keyProperties.concat(a);
|
|
544
|
+
if (!(flags.aliases[key] || []).includes(keyProperties.join("."))) setKey(argv, keyProperties, value);
|
|
545
|
+
});
|
|
546
|
+
if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) [key].concat(flags.aliases[key] || []).forEach(function(key) {
|
|
547
|
+
_p_ObjectDefineProperty(argvReturn, key, {
|
|
548
|
+
enumerable: true,
|
|
549
|
+
get() {
|
|
550
|
+
return val;
|
|
551
|
+
},
|
|
552
|
+
set(value) {
|
|
553
|
+
val = typeof value === "string" ? mixin.normalize(value) : value;
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
function addNewAlias(key, alias) {
|
|
559
|
+
if (!(flags.aliases[key] && flags.aliases[key].length)) {
|
|
560
|
+
flags.aliases[key] = [alias];
|
|
561
|
+
newAliases[alias] = true;
|
|
562
|
+
}
|
|
563
|
+
if (!(flags.aliases[alias] && flags.aliases[alias].length)) addNewAlias(alias, key);
|
|
564
|
+
}
|
|
565
|
+
function processValue(key, val, shouldStripQuotes) {
|
|
566
|
+
if (shouldStripQuotes) val = stripQuotes(val);
|
|
567
|
+
if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
|
|
568
|
+
if (typeof val === "string") val = val === "true";
|
|
569
|
+
}
|
|
570
|
+
let value = _p_ArrayIsArray(val) ? val.map(function(v) {
|
|
571
|
+
return maybeCoerceNumber(key, v);
|
|
572
|
+
}) : maybeCoerceNumber(key, val);
|
|
573
|
+
if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === "boolean")) value = increment();
|
|
574
|
+
if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) if (_p_ArrayIsArray(val)) value = val.map((val) => {
|
|
575
|
+
return mixin.normalize(val);
|
|
576
|
+
});
|
|
577
|
+
else value = mixin.normalize(val);
|
|
578
|
+
return value;
|
|
579
|
+
}
|
|
580
|
+
function maybeCoerceNumber(key, value) {
|
|
581
|
+
if (!configuration["parse-positional-numbers"] && key === "_") return value;
|
|
582
|
+
if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !_p_ArrayIsArray(value)) {
|
|
583
|
+
if (looksLikeNumber(value) && configuration["parse-numbers"] && _p_NumberIsSafeInteger(_p_MathFloor(parseFloat(`${value}`))) || !isUndefined(value) && checkAllAliases(key, flags.numbers)) value = Number(value);
|
|
584
|
+
}
|
|
585
|
+
return value;
|
|
586
|
+
}
|
|
587
|
+
function setConfig(argv) {
|
|
588
|
+
const configLookup = _p_ObjectCreate(null);
|
|
589
|
+
applyDefaultsAndAliases(configLookup, flags.aliases, defaults);
|
|
590
|
+
_p_ObjectKeys(flags.configs).forEach(function(configKey) {
|
|
591
|
+
const configPath = argv[configKey] || configLookup[configKey];
|
|
592
|
+
if (configPath) try {
|
|
593
|
+
let config = null;
|
|
594
|
+
const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
|
|
595
|
+
const resolveConfig = flags.configs[configKey];
|
|
596
|
+
if (typeof resolveConfig === "function") {
|
|
597
|
+
try {
|
|
598
|
+
config = resolveConfig(resolvedConfigPath);
|
|
599
|
+
} catch (e) {
|
|
600
|
+
config = e;
|
|
601
|
+
}
|
|
602
|
+
if (config instanceof Error) {
|
|
603
|
+
error = config;
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
} else config = mixin.require(resolvedConfigPath);
|
|
607
|
+
setConfigObject(config);
|
|
608
|
+
} catch (ex) {
|
|
609
|
+
if (ex.name === "PermissionDenied") error = ex;
|
|
610
|
+
else if (argv[configKey]) error = Error(__("Invalid JSON config file: %s", configPath));
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
function setConfigObject(config, prev) {
|
|
615
|
+
_p_ObjectKeys(config).forEach(function(key) {
|
|
616
|
+
const value = config[key];
|
|
617
|
+
const fullKey = prev ? prev + "." + key : key;
|
|
618
|
+
if (typeof value === "object" && value !== null && !_p_ArrayIsArray(value) && configuration["dot-notation"]) setConfigObject(value, fullKey);
|
|
619
|
+
else if (!hasKey(argv, fullKey.split(".")) || checkAllAliases(fullKey, flags.arrays) && configuration["combine-arrays"]) setArg(fullKey, value);
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
function setConfigObjects() {
|
|
623
|
+
if (typeof configObjects !== "undefined") configObjects.forEach(function(configObject) {
|
|
624
|
+
setConfigObject(configObject);
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
function applyEnvVars(argv, configOnly) {
|
|
628
|
+
if (typeof envPrefix === "undefined") return;
|
|
629
|
+
const prefix = typeof envPrefix === "string" ? envPrefix : "";
|
|
630
|
+
const env = mixin.env();
|
|
631
|
+
_p_ObjectKeys(env).forEach(function(envVar) {
|
|
632
|
+
if (prefix === "" || envVar.lastIndexOf(prefix, 0) === 0) {
|
|
633
|
+
const keys = envVar.split("__").map(function(key, i) {
|
|
634
|
+
if (i === 0) key = _p_StringPrototypeSubstring(key, prefix.length);
|
|
635
|
+
return camelCase(key);
|
|
636
|
+
});
|
|
637
|
+
if ((configOnly && flags.configs[keys.join(".")] || !configOnly) && !hasKey(argv, keys)) setArg(keys.join("."), env[envVar]);
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
function applyCoercions(argv) {
|
|
642
|
+
let coerce;
|
|
643
|
+
const applied = /* @__PURE__ */ new _p_SetCtor();
|
|
644
|
+
_p_ObjectKeys(argv).forEach(function(key) {
|
|
645
|
+
if (!applied.has(key)) {
|
|
646
|
+
coerce = checkAllAliases(key, flags.coercions);
|
|
647
|
+
if (typeof coerce === "function") try {
|
|
648
|
+
const value = maybeCoerceNumber(key, coerce(argv[key]));
|
|
649
|
+
[].concat(flags.aliases[key] || [], key).forEach((ali) => {
|
|
650
|
+
applied.add(ali);
|
|
651
|
+
argv[ali] = value;
|
|
652
|
+
});
|
|
653
|
+
} catch (err) {
|
|
654
|
+
error = err;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
function setPlaceholderKeys(argv) {
|
|
660
|
+
flags.keys.forEach((key) => {
|
|
661
|
+
if (~key.indexOf(".")) return;
|
|
662
|
+
if (typeof argv[key] === "undefined") argv[key] = void 0;
|
|
663
|
+
});
|
|
664
|
+
return argv;
|
|
665
|
+
}
|
|
666
|
+
function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) {
|
|
667
|
+
_p_ObjectKeys(defaults).forEach(function(key) {
|
|
668
|
+
if (!hasKey(obj, key.split("."))) {
|
|
669
|
+
setKey(obj, key.split("."), defaults[key]);
|
|
670
|
+
if (canLog) defaulted[key] = true;
|
|
671
|
+
(aliases[key] || []).forEach(function(x) {
|
|
672
|
+
if (hasKey(obj, x.split("."))) return;
|
|
673
|
+
setKey(obj, x.split("."), defaults[key]);
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
function hasKey(obj, keys) {
|
|
679
|
+
let o = obj;
|
|
680
|
+
if (!configuration["dot-notation"]) keys = [keys.join(".")];
|
|
681
|
+
keys.slice(0, -1).forEach(function(key) {
|
|
682
|
+
o = o[key] || {};
|
|
683
|
+
});
|
|
684
|
+
const key = keys[keys.length - 1];
|
|
685
|
+
if (typeof o !== "object") return false;
|
|
686
|
+
else return key in o;
|
|
687
|
+
}
|
|
688
|
+
function setKey(obj, keys, value) {
|
|
689
|
+
let o = obj;
|
|
690
|
+
if (!configuration["dot-notation"]) keys = [keys.join(".")];
|
|
691
|
+
keys.slice(0, -1).forEach(function(key) {
|
|
692
|
+
key = sanitizeKey(key);
|
|
693
|
+
if (typeof o === "object" && o[key] === void 0) o[key] = {};
|
|
694
|
+
if (typeof o[key] !== "object" || _p_ArrayIsArray(o[key])) {
|
|
695
|
+
if (_p_ArrayIsArray(o[key])) o[key].push({});
|
|
696
|
+
else o[key] = [o[key], {}];
|
|
697
|
+
o = o[key][o[key].length - 1];
|
|
698
|
+
} else o = o[key];
|
|
699
|
+
});
|
|
700
|
+
const key = sanitizeKey(keys[keys.length - 1]);
|
|
701
|
+
const isTypeArray = checkAllAliases(keys.join("."), flags.arrays);
|
|
702
|
+
const isValueArray = _p_ArrayIsArray(value);
|
|
703
|
+
let duplicate = configuration["duplicate-arguments-array"];
|
|
704
|
+
if (!duplicate && checkAllAliases(key, flags.nargs)) {
|
|
705
|
+
duplicate = true;
|
|
706
|
+
if (!isUndefined(o[key]) && flags.nargs[key] === 1 || _p_ArrayIsArray(o[key]) && o[key].length === flags.nargs[key]) o[key] = void 0;
|
|
707
|
+
}
|
|
708
|
+
if (value === increment()) o[key] = increment(o[key]);
|
|
709
|
+
else if (_p_ArrayIsArray(o[key])) if (duplicate && isTypeArray && isValueArray) o[key] = configuration["flatten-duplicate-arrays"] ? o[key].concat(value) : (_p_ArrayIsArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
|
|
710
|
+
else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) o[key] = value;
|
|
711
|
+
else o[key] = o[key].concat([value]);
|
|
712
|
+
else if (o[key] === void 0 && isTypeArray) o[key] = isValueArray ? value : [value];
|
|
713
|
+
else if (duplicate && !(o[key] === void 0 || checkAllAliases(key, flags.counts) || checkAllAliases(key, flags.bools))) o[key] = [o[key], value];
|
|
714
|
+
else o[key] = value;
|
|
715
|
+
}
|
|
716
|
+
function extendAliases(...args) {
|
|
717
|
+
args.forEach(function(obj) {
|
|
718
|
+
_p_ObjectKeys(obj || {}).forEach(function(key) {
|
|
719
|
+
if (flags.aliases[key]) return;
|
|
720
|
+
flags.aliases[key] = [].concat(aliases[key] || []);
|
|
721
|
+
flags.aliases[key].concat(key).forEach(function(x) {
|
|
722
|
+
if (/-/.test(x) && configuration["camel-case-expansion"]) {
|
|
723
|
+
const c = camelCase(x);
|
|
724
|
+
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
|
|
725
|
+
flags.aliases[key].push(c);
|
|
726
|
+
newAliases[c] = true;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
flags.aliases[key].concat(key).forEach(function(x) {
|
|
731
|
+
if (x.length > 1 && /[A-Z]/.test(x) && configuration["camel-case-expansion"]) {
|
|
732
|
+
const c = decamelize(x, "-");
|
|
733
|
+
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
|
|
734
|
+
flags.aliases[key].push(c);
|
|
735
|
+
newAliases[c] = true;
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
flags.aliases[key].forEach(function(x) {
|
|
740
|
+
flags.aliases[x] = [key].concat(flags.aliases[key].filter(function(y) {
|
|
741
|
+
return x !== y;
|
|
742
|
+
}));
|
|
743
|
+
});
|
|
744
|
+
});
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
function checkAllAliases(key, flag) {
|
|
748
|
+
const toCheck = [].concat(flags.aliases[key] || [], key);
|
|
749
|
+
const keys = _p_ObjectKeys(flag);
|
|
750
|
+
const setAlias = toCheck.find((key) => keys.includes(key));
|
|
751
|
+
return setAlias ? flag[setAlias] : false;
|
|
752
|
+
}
|
|
753
|
+
function hasAnyFlag(key) {
|
|
754
|
+
const flagsKeys = _p_ObjectKeys(flags);
|
|
755
|
+
return [].concat(flagsKeys.map((k) => flags[k])).some(function(flag) {
|
|
756
|
+
return _p_ArrayIsArray(flag) ? flag.includes(key) : flag[key];
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
function hasFlagsMatching(arg, ...patterns) {
|
|
760
|
+
return [].concat(...patterns).some(function(pattern) {
|
|
761
|
+
const match = arg.match(pattern);
|
|
762
|
+
return match && hasAnyFlag(match[1]);
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
function hasAllShortFlags(arg) {
|
|
766
|
+
if (arg.match(negative) || !arg.match(/^-[^-]+/)) return false;
|
|
767
|
+
let hasAllFlags = true;
|
|
768
|
+
let next;
|
|
769
|
+
const letters = arg.slice(1).split("");
|
|
770
|
+
for (let j = 0; j < letters.length; j++) {
|
|
771
|
+
next = arg.slice(j + 2);
|
|
772
|
+
if (!hasAnyFlag(letters[j])) {
|
|
773
|
+
hasAllFlags = false;
|
|
774
|
+
break;
|
|
775
|
+
}
|
|
776
|
+
if (letters[j + 1] && letters[j + 1] === "=" || next === "-" || /[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) || letters[j + 1] && letters[j + 1].match(/\W/)) break;
|
|
777
|
+
}
|
|
778
|
+
return hasAllFlags;
|
|
779
|
+
}
|
|
780
|
+
function isUnknownOptionAsArg(arg) {
|
|
781
|
+
return configuration["unknown-options-as-args"] && isUnknownOption(arg);
|
|
782
|
+
}
|
|
783
|
+
function isUnknownOption(arg) {
|
|
784
|
+
arg = arg.replace(/^-{3,}/, "--");
|
|
785
|
+
if (arg.match(negative)) return false;
|
|
786
|
+
if (hasAllShortFlags(arg)) return false;
|
|
787
|
+
return !hasFlagsMatching(arg, /^-+([^=]+?)=[\s\S]*$/, negatedBoolean, /^-+([^=]+?)$/, /^-+([^=]+?)-$/, /^-+([^=]+?\d+)$/, /^-+([^=]+?)\W+.*$/);
|
|
788
|
+
}
|
|
789
|
+
function defaultValue(key) {
|
|
790
|
+
if (!checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts) && `${key}` in defaults) return defaults[key];
|
|
791
|
+
else return defaultForType(guessType(key));
|
|
792
|
+
}
|
|
793
|
+
function defaultForType(type) {
|
|
794
|
+
return {
|
|
795
|
+
[DefaultValuesForTypeKey.BOOLEAN]: true,
|
|
796
|
+
[DefaultValuesForTypeKey.STRING]: "",
|
|
797
|
+
[DefaultValuesForTypeKey.NUMBER]: void 0,
|
|
798
|
+
[DefaultValuesForTypeKey.ARRAY]: []
|
|
799
|
+
}[type];
|
|
800
|
+
}
|
|
801
|
+
function guessType(key) {
|
|
802
|
+
let type = DefaultValuesForTypeKey.BOOLEAN;
|
|
803
|
+
if (checkAllAliases(key, flags.strings)) type = DefaultValuesForTypeKey.STRING;
|
|
804
|
+
else if (checkAllAliases(key, flags.numbers)) type = DefaultValuesForTypeKey.NUMBER;
|
|
805
|
+
else if (checkAllAliases(key, flags.bools)) type = DefaultValuesForTypeKey.BOOLEAN;
|
|
806
|
+
else if (checkAllAliases(key, flags.arrays)) type = DefaultValuesForTypeKey.ARRAY;
|
|
807
|
+
return type;
|
|
808
|
+
}
|
|
809
|
+
function isUndefined(num) {
|
|
810
|
+
return num === void 0;
|
|
811
|
+
}
|
|
812
|
+
function checkConfiguration() {
|
|
813
|
+
_p_ObjectKeys(flags.counts).find((key) => {
|
|
814
|
+
if (checkAllAliases(key, flags.arrays)) {
|
|
815
|
+
error = Error(__("Invalid configuration: %s, opts.count excludes opts.array.", key));
|
|
816
|
+
return true;
|
|
817
|
+
} else if (checkAllAliases(key, flags.nargs)) {
|
|
818
|
+
error = Error(__("Invalid configuration: %s, opts.count excludes opts.narg.", key));
|
|
819
|
+
return true;
|
|
820
|
+
}
|
|
821
|
+
return false;
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
return {
|
|
825
|
+
aliases: _p_ObjectAssign({}, flags.aliases),
|
|
826
|
+
argv: _p_ObjectAssign(argvReturn, argv),
|
|
827
|
+
configuration,
|
|
828
|
+
defaulted: _p_ObjectAssign({}, defaulted),
|
|
829
|
+
error,
|
|
830
|
+
newAliases: _p_ObjectAssign({}, newAliases)
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
}));
|
|
1036
835
|
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
});
|
|
1043
|
-
var import_util, import_path, import_fs, import_node_module, _a, _b, _c, minNodeVersion, nodeVersion, env, require2, parser, yargsParser, lib_default;
|
|
1044
|
-
var init_lib = __esm({
|
|
1045
|
-
"node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/index.js"() {
|
|
1046
|
-
import_util = require("util");
|
|
1047
|
-
import_path = require("path");
|
|
1048
|
-
init_string_utils();
|
|
1049
|
-
init_yargs_parser();
|
|
1050
|
-
import_fs = require("fs");
|
|
1051
|
-
import_node_module = require("node:module");
|
|
1052
|
-
minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 20;
|
|
1053
|
-
nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
|
|
1054
|
-
if (nodeVersion) {
|
|
1055
|
-
const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
|
|
1056
|
-
if (major < minNodeVersion) {
|
|
1057
|
-
throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
env = process ? process.env : {};
|
|
1061
|
-
require2 = import_node_module.createRequire ? (0, import_node_module.createRequire)(__filename) : void 0;
|
|
1062
|
-
parser = new YargsParser({
|
|
1063
|
-
cwd: process.cwd,
|
|
1064
|
-
env: /* @__PURE__ */ __name(() => {
|
|
1065
|
-
return env;
|
|
1066
|
-
}, "env"),
|
|
1067
|
-
format: import_util.format,
|
|
1068
|
-
normalize: import_path.normalize,
|
|
1069
|
-
resolve: import_path.resolve,
|
|
1070
|
-
require: /* @__PURE__ */ __name((path) => {
|
|
1071
|
-
if (typeof require2 !== "undefined") {
|
|
1072
|
-
return require2(path);
|
|
1073
|
-
} else if (path.match(/\.json$/)) {
|
|
1074
|
-
return _p_JSONParse((0, import_fs.readFileSync)(path, "utf8"));
|
|
1075
|
-
} else {
|
|
1076
|
-
throw Error("only .json config files are supported in ESM");
|
|
1077
|
-
}
|
|
1078
|
-
}, "require")
|
|
1079
|
-
});
|
|
1080
|
-
yargsParser = /* @__PURE__ */ __name(function Parser(args, opts) {
|
|
1081
|
-
const result = parser.parse(args.slice(), opts);
|
|
1082
|
-
return result.argv;
|
|
1083
|
-
}, "Parser");
|
|
1084
|
-
yargsParser.detailed = function(args, opts) {
|
|
1085
|
-
return parser.parse(args.slice(), opts);
|
|
1086
|
-
};
|
|
1087
|
-
yargsParser.camelCase = camelCase;
|
|
1088
|
-
yargsParser.decamelize = decamelize;
|
|
1089
|
-
yargsParser.looksLikeNumber = looksLikeNumber;
|
|
1090
|
-
lib_default = yargsParser;
|
|
1091
|
-
}
|
|
836
|
+
//#endregion
|
|
837
|
+
//#region node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/index.js
|
|
838
|
+
var lib_exports = /* @__PURE__ */ __exportAll({
|
|
839
|
+
default: () => yargsParser,
|
|
840
|
+
"module.exports": () => yargsParser
|
|
1092
841
|
});
|
|
842
|
+
var _a, _b, _c, minNodeVersion, nodeVersion, env, require$1, parser, yargsParser;
|
|
843
|
+
var init_lib = __esmMin((() => {
|
|
844
|
+
init_string_utils();
|
|
845
|
+
init_yargs_parser();
|
|
846
|
+
;
|
|
847
|
+
;
|
|
848
|
+
;
|
|
849
|
+
minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 20;
|
|
850
|
+
nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
|
|
851
|
+
/**
|
|
852
|
+
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
|
|
853
|
+
*
|
|
854
|
+
* @license
|
|
855
|
+
* Copyright (c) 2016, Contributors
|
|
856
|
+
* SPDX-License-Identifier: ISC
|
|
857
|
+
*/
|
|
858
|
+
if (nodeVersion) {
|
|
859
|
+
if (Number(nodeVersion.match(/^([^.]+)/)[1]) < minNodeVersion) throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
860
|
+
}
|
|
861
|
+
env = process ? process.env : {};
|
|
862
|
+
require$1 = node_module.createRequire ? (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href) : void 0;
|
|
863
|
+
parser = new YargsParser({
|
|
864
|
+
cwd: process.cwd,
|
|
865
|
+
env: () => {
|
|
866
|
+
return env;
|
|
867
|
+
},
|
|
868
|
+
format: util.format,
|
|
869
|
+
normalize: path.normalize,
|
|
870
|
+
resolve: path.resolve,
|
|
871
|
+
require: (path$1) => {
|
|
872
|
+
if (typeof require$1 !== "undefined") return require$1(path$1);
|
|
873
|
+
else if (path$1.match(/\.json$/)) return _p_JSONParse((0, fs.readFileSync)(path$1, "utf8"));
|
|
874
|
+
else throw Error("only .json config files are supported in ESM");
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
yargsParser = function Parser(args, opts) {
|
|
878
|
+
return parser.parse(args.slice(), opts).argv;
|
|
879
|
+
};
|
|
880
|
+
yargsParser.detailed = function(args, opts) {
|
|
881
|
+
return parser.parse(args.slice(), opts);
|
|
882
|
+
};
|
|
883
|
+
yargsParser.camelCase = camelCase;
|
|
884
|
+
yargsParser.decamelize = decamelize;
|
|
885
|
+
yargsParser.looksLikeNumber = looksLikeNumber;
|
|
886
|
+
}));
|
|
1093
887
|
|
|
1094
|
-
|
|
888
|
+
//#endregion
|
|
889
|
+
//#region src/external/yargs-parser.js
|
|
1095
890
|
module.exports = (init_lib(), __toCommonJS(lib_exports));
|
|
1096
|
-
/*! Bundled license information:
|
|
1097
891
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
yargs-parser/build/lib/yargs-parser-types.js:
|
|
1101
|
-
yargs-parser/build/lib/yargs-parser.js:
|
|
1102
|
-
(**
|
|
1103
|
-
* @license
|
|
1104
|
-
* Copyright (c) 2016, Contributors
|
|
1105
|
-
* SPDX-License-Identifier: ISC
|
|
1106
|
-
*)
|
|
1107
|
-
|
|
1108
|
-
yargs-parser/build/lib/index.js:
|
|
1109
|
-
(**
|
|
1110
|
-
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
|
|
1111
|
-
*
|
|
1112
|
-
* @license
|
|
1113
|
-
* Copyright (c) 2016, Contributors
|
|
1114
|
-
* SPDX-License-Identifier: ISC
|
|
1115
|
-
*)
|
|
1116
|
-
*/
|
|
892
|
+
//#endregion
|
|
893
|
+
exports["module.exports"] = yargsParser;
|