{"version":3,"file":"setup-cpp.mjs","sources":["../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/proxy.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js","../../packages/ci-log/dist/index.js","../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js","../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js","../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js","../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js","../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js","../../node_modules/.pnpm/@sec-ant+readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js","../../node_modules/.pnpm/pretty-ms@9.1.0/node_modules/pretty-ms/index.js","../../node_modules/.pnpm/parse-ms@4.0.0/node_modules/parse-ms/index.js","../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js","../../packages/exec-powershell/dist/index.js","../../node_modules/.pnpm/admina@1.0.1/node_modules/admina/dist/index.node.mjs","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/mixin.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/index.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/is-implemented.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/implementation.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/validate-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/index.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-implemented.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/polyfill.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/generate-name.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/standard-symbols.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/symbol-registry.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-arguments.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-function.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/is-string.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/e-index-of.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/map.js","../../node_modules/.pnpm/next-tick@1.1.0/node_modules/next-tick/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-callable.js","../../node_modules/.pnpm/is-promise@2.2.2/node_modules/is-promise/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/promise.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/primitive-set.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/to-short-string-representation.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/safe-to-string.js","../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js","../../packages/untildify-user/dist/index.js","../../packages/envosman/dist/rc-file.js","../../packages/envosman/dist/add-env.js","../../packages/envosman/dist/utils.js","../../packages/envosman/dist/add-path.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a4/node_modules/time-delta/lib/time-delta.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/range.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/comparator.js","../../node_modules/.pnpm/simple-update-notifier@2.0.0/node_modules/simple-update-notifier/build/index.js","../../node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs","../../packages/setup-apt/dist/alternatives.js","../../packages/setup-apt/dist/apt-env.js","../../packages/setup-apt/dist/get-apt.js","../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js","../../packages/setup-apt/dist/is-installed.js","../../packages/setup-apt/dist/qualify-install.js","../../packages/setup-apt/dist/install.js","../../packages/setup-apt/dist/apt-repository.js","../../packages/setup-apt/dist/apt-key.js","../../packages/setup-brew/dist/install.js","../../packages/setup-brew/dist/install-pack.js","../../src/utils/env/hasDnf.ts","../../src/utils/env/isArch.ts","../../src/utils/env/isUbuntu.ts","../../src/chocolatey/chocolatey.ts","../../src/utils/setup/setupChocoPack.ts","../../src/utils/setup/setupDnfPack.ts","../../src/utils/setup/setupPacmanPack.ts","../../node_modules/.pnpm/patha@0.4.1/node_modules/patha/dist/index.node.mjs","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/tool-cache.js","../../node_modules/.pnpm/retry-as-promised@7.0.4/node_modules/retry-as-promised/dist/index.js","../../src/sevenzip/sevenzip.ts","../../src/utils/setup/extract.ts","../../src/utils/setup/setupBin.ts","../../src/cmake/cmake.ts","../../src/utils/setup/version.ts","../../src/utils/std/index.ts","../../src/python/python.ts","../../src/versions/versions.ts","../../src/utils/env/ubuntu_version.ts","../../src/utils/setup/setupPipPack.ts","../../src/cmakelang/cmakelang.ts","../../src/graphviz/graphviz.ts","../../src/utils/setup/setupDmg.ts","../../src/doxygen/doxygen.ts","../../src/macos-sdk/macos-sdk.ts","../../src/utils/asset/load-assets.ts","../../src/gcc/gcc.ts","../../src/gcovr/gcovr.ts","../../src/infer/infer.ts","../../src/ninja/ninja.ts","../../src/kcov/kcov.ts","../../src/llvm/apple-clang.ts","../../node_modules/.pnpm/msvc-dev-cmd@https+++codeload.github.com+aminya+msvc-dev-cmd+tar.gz+c01f519bd995460228ed3dec4df51df92dc290fd/node_modules/msvc-dev-cmd/lib.js","../../src/vcvarsall/vcvarsall.ts","../../src/installTool.ts","../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js","../../src/llvm/llvm_url.ts","../../src/llvm/llvm.ts","../../src/llvm/llvm_installer.ts","../../src/msvc/msvc.ts","../../src/opencppcoverage/opencppcoverage.ts","../../src/powershell/powershell.ts","../../src/task/task.ts","../../src/cli-options.ts","../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/auth.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/arguments/file-url.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/parameters.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/utils/uint-array.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/template.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/utils/standard-stream.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/arguments/specific.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/values.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/arguments/escape.js","../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js","../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js","../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/default.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/custom.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/log.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/info.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/return/duration.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/arguments/command.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/start.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js","../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js","../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/return/final-error.js","../../node_modules/.pnpm/human-signals@8.0.0/node_modules/human-signals/build/src/realtime.js","../../node_modules/.pnpm/human-signals@8.0.0/node_modules/human-signals/build/src/core.js","../../node_modules/.pnpm/human-signals@8.0.0/node_modules/human-signals/build/src/signals.js","../../node_modules/.pnpm/human-signals@8.0.0/node_modules/human-signals/build/src/main.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/terminate/signal.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/terminate/kill.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/utils/abort-signal.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/terminate/cancel.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/validation.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/utils/deferred.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/arguments/fd-options.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/utils/max-listeners.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/reference.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/incoming.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/forward.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/strict.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/outgoing.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/send.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/graceful.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/terminate/graceful.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/terminate/timeout.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/ipc-input.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/arguments/encoding-option.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/arguments/cwd.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/arguments/options.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/node.js","../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js","../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js","../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js","../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array.js","../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js","../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/string.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/io/max-buffer.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/return/message.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/return/result.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/complete.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/return/reject.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/error.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/type.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/transform/object-mode.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/transform/normalize.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/direction.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/stdio-option.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/native.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/input-option.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/duplicate.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/handle.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/array.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/handle-sync.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/io/strip-newline.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/transform/split.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/transform/validate.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/transform/encoding-transform.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/transform/run-async.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/transform/run-sync.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/transform/generator.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/io/input-sync.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/output.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/io/output-sync.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/resolve/exit-async.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/resolve/exit-sync.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/main-sync.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/resolve/all-sync.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/get-one.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/get-each.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/methods.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/return/early-error.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/stdio/handle-async.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/io/pipeline.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/io/output-async.js","../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js","../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/terminate/cleanup.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/pipe/pipe-arguments.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/pipe/throw.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/pipe/sequence.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/pipe/streaming.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/pipe/abort.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/pipe/setup.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/io/iterate.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/io/contents.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/resolve/wait-stream.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/resolve/stdio.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/resolve/all-async.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/verbose/ipc.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/ipc/buffer-messages.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/resolve/wait-subprocess.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/convert/concurrent.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/convert/shared.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/convert/readable.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/convert/writable.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/convert/duplex.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/convert/iterable.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/convert/add.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/promise.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/main-async.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/bind.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/create.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/command.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/lib/methods/script.js","../../node_modules/.pnpm/execa@9.4.0/node_modules/execa/index.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/options.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js","../../node_modules/.pnpm/which@4.0.0/node_modules/which/lib/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/_iterate.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/normalize-options.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-integer.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-pos-integer.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-length.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-callable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/for-each.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-object.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/error/custom.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/_define-length.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/value/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/object/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/function/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/prototype/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/plain-function/is.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/shim.js","../../node_modules/.pnpm/d@1.0.2/node_modules/d/index.js","../../node_modules/.pnpm/event-emitter@0.3.5/node_modules/event-emitter/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-resolve.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/to-array.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-normalize.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/configure-map.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/plain.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/primitive.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-primitive-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-1.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/async.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/dispose.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max-age.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/valid-timeout.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/max-timeout.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max.js","../../node_modules/.pnpm/lru-queue@0.1.0/node_modules/lru-queue/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/ref-counter.js","../../node_modules/.pnpm/escape-path-with-spaces@1.0.2/node_modules/escape-path-with-spaces/index.js","../../node_modules/.pnpm/escape-quotes@1.0.2/node_modules/escape-quotes/lib/escape-quotes.js","../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/lib/numerous.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/locales/en.js","../../node_modules/.pnpm/is-node@1.0.2/node_modules/is-node/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a4/node_modules/time-delta/locales/en.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/inc.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/diff.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/major.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/minor.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/patch.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/prerelease.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rcompare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-loose.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-build.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/sort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rsort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/eq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/neq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/cmp.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/coerce.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/lrucache.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/satisfies.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/to-comparators.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/max-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-version.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/outside.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/gtr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/ltr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/intersects.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/simplify.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/subset.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/index.js","../../node_modules/.pnpm/node-downloader-helper@2.1.9/node_modules/node-downloader-helper/dist/index.js","../../packages/setup-apt/dist/apt-timeout.js","../../packages/setup-apt/dist/update.js","../../packages/setup-apt/dist/init-apt.js","../../node_modules/.pnpm/replace-ext@2.0.0/node_modules/replace-ext/index.js","../../src/utils/env/arch.ts","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","../../node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/manifest.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/retry-helper.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/opts-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-manual.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/find-made.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/path-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/use-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/index.js","../../src/versions/default_versions.ts","../../node_modules/.pnpm/ubuntu-version@2.0.0/node_modules/ubuntu-version/index.js","../../node_modules/.pnpm/macos-release@3.3.0/node_modules/macos-release/index.js","../../src/utils/env/macos_version.ts","../../src/nala/nala.ts","../../src/vcpkg/vcpkg.ts","../../src/tool.ts","../../src/bazel/bazel.ts","../../src/conan/conan.ts","../../src/meson/meson.ts","../../src/ccache/ccache.ts","../../src/sccache/sccache.ts","../../src/cppcheck/cppcheck.ts","../../src/cpplint/cpplint.ts","../../src/flawfinder/flawfinder.ts","../../src/lizard/lizard.ts","../../src/make/make.ts","../../src/setup-cpp.ts","../../src/check-updates.ts","../../src/compilers.ts"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","export function getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new DecodedURL(proxyVar);\n }\n catch {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new DecodedURL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexport function checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\nclass DecodedURL extends URL {\n _decodedUsername;\n _decodedPassword;\n constructor(url, base) {\n super(url, base);\n this._decodedUsername = decodeURIComponent(super.username);\n this._decodedPassword = decodeURIComponent(super.password);\n }\n get username() {\n return this._decodedUsername;\n }\n get password() {\n return this._decodedPassword;\n }\n}\n//# sourceMappingURL=proxy.js.map","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","import * as core from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nexport function error(err) {\n return GITHUB_ACTIONS ? core.error(err) : console.log(`\\x1b[31m${err}\\x1b[0m`);\n}\nexport function success(msg) {\n return console.log(`\\x1b[32m${msg}\\x1b[0m`);\n}\nexport function warning(msg) {\n return GITHUB_ACTIONS ? core.warning(msg) : console.log(`\\x1b[33m${msg}\\x1b[0m`);\n}\nexport function notice(msg) {\n return GITHUB_ACTIONS ? core.notice(msg) : console.log(`\\x1b[94m${msg}\\x1b[0m`);\n}\nexport function info(msg) {\n return GITHUB_ACTIONS ? core.info(msg) : console.log(msg);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxlQUFlLENBQUE7QUFDckMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUV4QyxNQUFNLFVBQVUsS0FBSyxDQUFDLEdBQW1CO0lBQ3ZDLE9BQU8sY0FBYyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsS0F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W9uIGVycm9yKGVycjogc3RyaW5nIHwgRXJyb3IpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5lcnJvcihlcnIpIDogY29uc29sZS5sb2coYFxceDFiWzMxbSR7ZXJyfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHN1Y2Nlc3MobXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIGNvbnNvbGUubG9nKGBcXHgxYlszMm0ke21zZ31cXHgxYlswbWApXG59XG5cbmV4cG9ydCBmdW5jdGlvbiB3YXJuaW5nKG1zZzogc3RyaW5nKSB7XG4gIHJldHVybiBHSVRIVUJfQUNUSU9OUyA/IGNvcmUud2FybmluZyhtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzMzbSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vdGljZShtc2c6IHN0cmluZykge1xuICByZXR1cm4gR0lUSFVCX0FDVElPTlMgPyBjb3JlLm5vdGljZShtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzk0bSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGluZm8obXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5pbmZvKG1zZykgOiBjb25zb2xlLmxvZyhtc2cpXG59XG4iXX0=","export default function isPlainObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);\n}\n","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n","import {promisify} from 'node:util';\nimport {execFile as execFileCallback, execFileSync as execFileSyncOriginal} from 'node:child_process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\n\nconst execFileOriginal = promisify(execFileCallback);\n\nexport function toPath(urlOrPath) {\n\treturn urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n}\n\nexport function rootDirectory(pathInput) {\n\treturn path.parse(toPath(pathInput)).root;\n}\n\nexport function traversePathUp(startPath) {\n\treturn {\n\t\t* [Symbol.iterator]() {\n\t\t\tlet currentPath = path.resolve(toPath(startPath));\n\t\t\tlet previousPath;\n\n\t\t\twhile (previousPath !== currentPath) {\n\t\t\t\tyield currentPath;\n\t\t\t\tpreviousPath = currentPath;\n\t\t\t\tcurrentPath = path.resolve(currentPath, '..');\n\t\t\t}\n\t\t},\n\t};\n}\n\nconst TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;\n\nexport async function execFile(file, arguments_, options = {}) {\n\treturn execFileOriginal(file, arguments_, {\n\t\tmaxBuffer: TEN_MEGABYTES_IN_BYTES,\n\t\t...options,\n\t});\n}\n\nexport function execFileSync(file, arguments_ = [], options = {}) {\n\treturn execFileSyncOriginal(file, arguments_, {\n\t\tmaxBuffer: TEN_MEGABYTES_IN_BYTES,\n\t\tencoding: 'utf8',\n\t\tstdio: 'pipe',\n\t\t...options,\n\t});\n}\n\nexport * from './default.js';\n","export default function stripFinalNewline(input) {\n\tif (typeof input === 'string') {\n\t\treturn stripFinalNewlineString(input);\n\t}\n\n\tif (!(ArrayBuffer.isView(input) && input.BYTES_PER_ELEMENT === 1)) {\n\t\tthrow new Error('Input must be a string or a Uint8Array');\n\t}\n\n\treturn stripFinalNewlineBinary(input);\n}\n\nconst stripFinalNewlineString = input =>\n\tinput.at(-1) === LF\n\t\t? input.slice(0, input.at(-2) === CR ? -2 : -1)\n\t\t: input;\n\nconst stripFinalNewlineBinary = input =>\n\tinput.at(-1) === LF_BINARY\n\t\t? input.subarray(0, input.at(-2) === CR_BINARY ? -2 : -1)\n\t\t: input;\n\nconst LF = '\\n';\nconst LF_BINARY = LF.codePointAt(0);\nconst CR = '\\r';\nconst CR_BINARY = CR.codePointAt(0);\n","export function isStream(stream, {checkOpen = true} = {}) {\n\treturn stream !== null\n\t\t&& typeof stream === 'object'\n\t\t&& (stream.writable || stream.readable || !checkOpen || (stream.writable === undefined && stream.readable === undefined))\n\t\t&& typeof stream.pipe === 'function';\n}\n\nexport function isWritableStream(stream, {checkOpen = true} = {}) {\n\treturn isStream(stream, {checkOpen})\n\t\t&& (stream.writable || !checkOpen)\n\t\t&& typeof stream.write === 'function'\n\t\t&& typeof stream.end === 'function'\n\t\t&& typeof stream.writable === 'boolean'\n\t\t&& typeof stream.writableObjectMode === 'boolean'\n\t\t&& typeof stream.destroy === 'function'\n\t\t&& typeof stream.destroyed === 'boolean';\n}\n\nexport function isReadableStream(stream, {checkOpen = true} = {}) {\n\treturn isStream(stream, {checkOpen})\n\t\t&& (stream.readable || !checkOpen)\n\t\t&& typeof stream.read === 'function'\n\t\t&& typeof stream.readable === 'boolean'\n\t\t&& typeof stream.readableObjectMode === 'boolean'\n\t\t&& typeof stream.destroy === 'function'\n\t\t&& typeof stream.destroyed === 'boolean';\n}\n\nexport function isDuplexStream(stream, options) {\n\treturn isWritableStream(stream, options)\n\t\t&& isReadableStream(stream, options);\n}\n\nexport function isTransformStream(stream, options) {\n\treturn isDuplexStream(stream, options)\n\t\t&& typeof stream._transform === 'function';\n}\n","const a = Object.getPrototypeOf(\n Object.getPrototypeOf(\n /* istanbul ignore next */\n async function* () {\n }\n ).prototype\n);\nclass c {\n #t;\n #n;\n #r = !1;\n #e = void 0;\n constructor(e, t) {\n this.#t = e, this.#n = t;\n }\n next() {\n const e = () => this.#s();\n return this.#e = this.#e ? this.#e.then(e, e) : e(), this.#e;\n }\n return(e) {\n const t = () => this.#i(e);\n return this.#e ? this.#e.then(t, t) : t();\n }\n async #s() {\n if (this.#r)\n return {\n done: !0,\n value: void 0\n };\n let e;\n try {\n e = await this.#t.read();\n } catch (t) {\n throw this.#e = void 0, this.#r = !0, this.#t.releaseLock(), t;\n }\n return e.done && (this.#e = void 0, this.#r = !0, this.#t.releaseLock()), e;\n }\n async #i(e) {\n if (this.#r)\n return {\n done: !0,\n value: e\n };\n if (this.#r = !0, !this.#n) {\n const t = this.#t.cancel(e);\n return this.#t.releaseLock(), await t, {\n done: !0,\n value: e\n };\n }\n return this.#t.releaseLock(), {\n done: !0,\n value: e\n };\n }\n}\nconst n = Symbol();\nfunction i() {\n return this[n].next();\n}\nObject.defineProperty(i, \"name\", { value: \"next\" });\nfunction o(r) {\n return this[n].return(r);\n}\nObject.defineProperty(o, \"name\", { value: \"return\" });\nconst u = Object.create(a, {\n next: {\n enumerable: !0,\n configurable: !0,\n writable: !0,\n value: i\n },\n return: {\n enumerable: !0,\n configurable: !0,\n writable: !0,\n value: o\n }\n});\nfunction h({ preventCancel: r = !1 } = {}) {\n const e = this.getReader(), t = new c(\n e,\n r\n ), s = Object.create(u);\n return s[n] = t, s;\n}\nexport {\n h as asyncIterator\n};\n","import parseMilliseconds from 'parse-ms';\n\nconst isZero = value => value === 0 || value === 0n;\nconst pluralize = (word, count) => (count === 1 || count === 1n) ? word : `${word}s`;\n\nconst SECOND_ROUNDING_EPSILON = 0.000_000_1;\nconst ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;\n\nexport default function prettyMilliseconds(milliseconds, options) {\n\tconst isBigInt = typeof milliseconds === 'bigint';\n\tif (!isBigInt && !Number.isFinite(milliseconds)) {\n\t\tthrow new TypeError('Expected a finite number or bigint');\n\t}\n\n\toptions = {...options};\n\n\tconst sign = milliseconds < 0 ? '-' : '';\n\tmilliseconds = milliseconds < 0 ? -milliseconds : milliseconds; // Cannot use `Math.abs()` because of BigInt support.\n\n\tif (options.colonNotation) {\n\t\toptions.compact = false;\n\t\toptions.formatSubMilliseconds = false;\n\t\toptions.separateMilliseconds = false;\n\t\toptions.verbose = false;\n\t}\n\n\tif (options.compact) {\n\t\toptions.unitCount = 1;\n\t\toptions.secondsDecimalDigits = 0;\n\t\toptions.millisecondsDecimalDigits = 0;\n\t}\n\n\tlet result = [];\n\n\tconst floorDecimals = (value, decimalDigits) => {\n\t\tconst flooredInterimValue = Math.floor((value * (10 ** decimalDigits)) + SECOND_ROUNDING_EPSILON);\n\t\tconst flooredValue = Math.round(flooredInterimValue) / (10 ** decimalDigits);\n\t\treturn flooredValue.toFixed(decimalDigits);\n\t};\n\n\tconst add = (value, long, short, valueString) => {\n\t\tif (\n\t\t\t(result.length === 0 || !options.colonNotation)\n\t\t\t&& isZero(value)\n\t\t\t&& !(options.colonNotation && short === 'm')) {\n\t\t\treturn;\n\t\t}\n\n\t\tvalueString ??= String(value);\n\t\tif (options.colonNotation) {\n\t\t\tconst wholeDigits = valueString.includes('.') ? valueString.split('.')[0].length : valueString.length;\n\t\t\tconst minLength = result.length > 0 ? 2 : 1;\n\t\t\tvalueString = '0'.repeat(Math.max(0, minLength - wholeDigits)) + valueString;\n\t\t} else {\n\t\t\tvalueString += options.verbose ? ' ' + pluralize(long, value) : short;\n\t\t}\n\n\t\tresult.push(valueString);\n\t};\n\n\tconst parsed = parseMilliseconds(milliseconds);\n\tconst days = BigInt(parsed.days);\n\n\tadd(days / 365n, 'year', 'y');\n\tadd(days % 365n, 'day', 'd');\n\tadd(Number(parsed.hours), 'hour', 'h');\n\tadd(Number(parsed.minutes), 'minute', 'm');\n\n\tif (\n\t\toptions.separateMilliseconds\n\t\t|| options.formatSubMilliseconds\n\t\t|| (!options.colonNotation && milliseconds < 1000)\n\t) {\n\t\tconst seconds = Number(parsed.seconds);\n\t\tconst milliseconds = Number(parsed.milliseconds);\n\t\tconst microseconds = Number(parsed.microseconds);\n\t\tconst nanoseconds = Number(parsed.nanoseconds);\n\n\t\tadd(seconds, 'second', 's');\n\n\t\tif (options.formatSubMilliseconds) {\n\t\t\tadd(milliseconds, 'millisecond', 'ms');\n\t\t\tadd(microseconds, 'microsecond', 'µs');\n\t\t\tadd(nanoseconds, 'nanosecond', 'ns');\n\t\t} else {\n\t\t\tconst millisecondsAndBelow\n\t\t\t\t= milliseconds\n\t\t\t\t+ (microseconds / 1000)\n\t\t\t\t+ (nanoseconds / 1e6);\n\n\t\t\tconst millisecondsDecimalDigits\n\t\t\t\t= typeof options.millisecondsDecimalDigits === 'number'\n\t\t\t\t\t? options.millisecondsDecimalDigits\n\t\t\t\t\t: 0;\n\n\t\t\tconst roundedMilliseconds = millisecondsAndBelow >= 1\n\t\t\t\t? Math.round(millisecondsAndBelow)\n\t\t\t\t: Math.ceil(millisecondsAndBelow);\n\n\t\t\tconst millisecondsString = millisecondsDecimalDigits\n\t\t\t\t? millisecondsAndBelow.toFixed(millisecondsDecimalDigits)\n\t\t\t\t: roundedMilliseconds;\n\n\t\t\tadd(\n\t\t\t\tNumber.parseFloat(millisecondsString),\n\t\t\t\t'millisecond',\n\t\t\t\t'ms',\n\t\t\t\tmillisecondsString,\n\t\t\t);\n\t\t}\n\t} else {\n\t\tconst seconds = (\n\t\t\t(isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds)\n\t\t\t/ 1000\n\t\t) % 60;\n\t\tconst secondsDecimalDigits\n\t\t\t= typeof options.secondsDecimalDigits === 'number'\n\t\t\t\t? options.secondsDecimalDigits\n\t\t\t\t: 1;\n\t\tconst secondsFixed = floorDecimals(seconds, secondsDecimalDigits);\n\t\tconst secondsString = options.keepDecimalsOnWholeSeconds\n\t\t\t? secondsFixed\n\t\t\t: secondsFixed.replace(/\\.0+$/, '');\n\t\tadd(Number.parseFloat(secondsString), 'second', 's', secondsString);\n\t}\n\n\tif (result.length === 0) {\n\t\treturn sign + '0' + (options.verbose ? ' milliseconds' : 'ms');\n\t}\n\n\tconst separator = options.colonNotation ? ':' : ' ';\n\tif (typeof options.unitCount === 'number') {\n\t\tresult = result.slice(0, Math.max(options.unitCount, 1));\n\t}\n\n\treturn sign + result.join(separator);\n}\n","const toZeroIfInfinity = value => Number.isFinite(value) ? value : 0;\n\nfunction parseNumber(milliseconds) {\n\treturn {\n\t\tdays: Math.trunc(milliseconds / 86_400_000),\n\t\thours: Math.trunc(milliseconds / 3_600_000 % 24),\n\t\tminutes: Math.trunc(milliseconds / 60_000 % 60),\n\t\tseconds: Math.trunc(milliseconds / 1000 % 60),\n\t\tmilliseconds: Math.trunc(milliseconds % 1000),\n\t\tmicroseconds: Math.trunc(toZeroIfInfinity(milliseconds * 1000) % 1000),\n\t\tnanoseconds: Math.trunc(toZeroIfInfinity(milliseconds * 1e6) % 1000),\n\t};\n}\n\nfunction parseBigint(milliseconds) {\n\treturn {\n\t\tdays: milliseconds / 86_400_000n,\n\t\thours: milliseconds / 3_600_000n % 24n,\n\t\tminutes: milliseconds / 60_000n % 60n,\n\t\tseconds: milliseconds / 1000n % 60n,\n\t\tmilliseconds: milliseconds % 1000n,\n\t\tmicroseconds: 0n,\n\t\tnanoseconds: 0n,\n\t};\n}\n\nexport default function parseMilliseconds(milliseconds) {\n\tswitch (typeof milliseconds) {\n\t\tcase 'number': {\n\t\t\tif (Number.isFinite(milliseconds)) {\n\t\t\t\treturn parseNumber(milliseconds);\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'bigint': {\n\t\t\treturn parseBigint(milliseconds);\n\t\t}\n\n\t\t// No default\n\t}\n\n\tthrow new TypeError('Expected a finite number or bigint');\n}\n","import {on, once} from 'node:events';\nimport {PassThrough as PassThroughStream, getDefaultHighWaterMark} from 'node:stream';\nimport {finished} from 'node:stream/promises';\n\nexport default function mergeStreams(streams) {\n\tif (!Array.isArray(streams)) {\n\t\tthrow new TypeError(`Expected an array, got \\`${typeof streams}\\`.`);\n\t}\n\n\tfor (const stream of streams) {\n\t\tvalidateStream(stream);\n\t}\n\n\tconst objectMode = streams.some(({readableObjectMode}) => readableObjectMode);\n\tconst highWaterMark = getHighWaterMark(streams, objectMode);\n\tconst passThroughStream = new MergedStream({\n\t\tobjectMode,\n\t\twritableHighWaterMark: highWaterMark,\n\t\treadableHighWaterMark: highWaterMark,\n\t});\n\n\tfor (const stream of streams) {\n\t\tpassThroughStream.add(stream);\n\t}\n\n\treturn passThroughStream;\n}\n\nconst getHighWaterMark = (streams, objectMode) => {\n\tif (streams.length === 0) {\n\t\treturn getDefaultHighWaterMark(objectMode);\n\t}\n\n\tconst highWaterMarks = streams\n\t\t.filter(({readableObjectMode}) => readableObjectMode === objectMode)\n\t\t.map(({readableHighWaterMark}) => readableHighWaterMark);\n\treturn Math.max(...highWaterMarks);\n};\n\nclass MergedStream extends PassThroughStream {\n\t#streams = new Set([]);\n\t#ended = new Set([]);\n\t#aborted = new Set([]);\n\t#onFinished;\n\t#unpipeEvent = Symbol('unpipe');\n\t#streamPromises = new WeakMap();\n\n\tadd(stream) {\n\t\tvalidateStream(stream);\n\n\t\tif (this.#streams.has(stream)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#streams.add(stream);\n\n\t\tthis.#onFinished ??= onMergedStreamFinished(this, this.#streams, this.#unpipeEvent);\n\t\tconst streamPromise = endWhenStreamsDone({\n\t\t\tpassThroughStream: this,\n\t\t\tstream,\n\t\t\tstreams: this.#streams,\n\t\t\tended: this.#ended,\n\t\t\taborted: this.#aborted,\n\t\t\tonFinished: this.#onFinished,\n\t\t\tunpipeEvent: this.#unpipeEvent,\n\t\t});\n\t\tthis.#streamPromises.set(stream, streamPromise);\n\n\t\tstream.pipe(this, {end: false});\n\t}\n\n\tasync remove(stream) {\n\t\tvalidateStream(stream);\n\n\t\tif (!this.#streams.has(stream)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst streamPromise = this.#streamPromises.get(stream);\n\t\tif (streamPromise === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.#streamPromises.delete(stream);\n\n\t\tstream.unpipe(this);\n\t\tawait streamPromise;\n\t\treturn true;\n\t}\n}\n\nconst onMergedStreamFinished = async (passThroughStream, streams, unpipeEvent) => {\n\tupdateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT);\n\tconst controller = new AbortController();\n\n\ttry {\n\t\tawait Promise.race([\n\t\t\tonMergedStreamEnd(passThroughStream, controller),\n\t\t\tonInputStreamsUnpipe(passThroughStream, streams, unpipeEvent, controller),\n\t\t]);\n\t} finally {\n\t\tcontroller.abort();\n\t\tupdateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT);\n\t}\n};\n\nconst onMergedStreamEnd = async (passThroughStream, {signal}) => {\n\ttry {\n\t\tawait finished(passThroughStream, {signal, cleanup: true});\n\t} catch (error) {\n\t\terrorOrAbortStream(passThroughStream, error);\n\t\tthrow error;\n\t}\n};\n\nconst onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, {signal}) => {\n\tfor await (const [unpipedStream] of on(passThroughStream, 'unpipe', {signal})) {\n\t\tif (streams.has(unpipedStream)) {\n\t\t\tunpipedStream.emit(unpipeEvent);\n\t\t}\n\t}\n};\n\nconst validateStream = stream => {\n\tif (typeof stream?.pipe !== 'function') {\n\t\tthrow new TypeError(`Expected a readable stream, got: \\`${typeof stream}\\`.`);\n\t}\n};\n\nconst endWhenStreamsDone = async ({passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent}) => {\n\tupdateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);\n\tconst controller = new AbortController();\n\n\ttry {\n\t\tawait Promise.race([\n\t\t\tafterMergedStreamFinished(onFinished, stream, controller),\n\t\t\tonInputStreamEnd({\n\t\t\t\tpassThroughStream,\n\t\t\t\tstream,\n\t\t\t\tstreams,\n\t\t\t\tended,\n\t\t\t\taborted,\n\t\t\t\tcontroller,\n\t\t\t}),\n\t\t\tonInputStreamUnpipe({\n\t\t\t\tstream,\n\t\t\t\tstreams,\n\t\t\t\tended,\n\t\t\t\taborted,\n\t\t\t\tunpipeEvent,\n\t\t\t\tcontroller,\n\t\t\t}),\n\t\t]);\n\t} finally {\n\t\tcontroller.abort();\n\t\tupdateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);\n\t}\n\n\tif (streams.size > 0 && streams.size === ended.size + aborted.size) {\n\t\tif (ended.size === 0 && aborted.size > 0) {\n\t\t\tabortStream(passThroughStream);\n\t\t} else {\n\t\t\tendStream(passThroughStream);\n\t\t}\n\t}\n};\n\nconst afterMergedStreamFinished = async (onFinished, stream, {signal}) => {\n\ttry {\n\t\tawait onFinished;\n\t\tif (!signal.aborted) {\n\t\t\tabortStream(stream);\n\t\t}\n\t} catch (error) {\n\t\tif (!signal.aborted) {\n\t\t\terrorOrAbortStream(stream, error);\n\t\t}\n\t}\n};\n\nconst onInputStreamEnd = async ({passThroughStream, stream, streams, ended, aborted, controller: {signal}}) => {\n\ttry {\n\t\tawait finished(stream, {\n\t\t\tsignal,\n\t\t\tcleanup: true,\n\t\t\treadable: true,\n\t\t\twritable: false,\n\t\t});\n\t\tif (streams.has(stream)) {\n\t\t\tended.add(stream);\n\t\t}\n\t} catch (error) {\n\t\tif (signal.aborted || !streams.has(stream)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isAbortError(error)) {\n\t\t\taborted.add(stream);\n\t\t} else {\n\t\t\terrorStream(passThroughStream, error);\n\t\t}\n\t}\n};\n\nconst onInputStreamUnpipe = async ({stream, streams, ended, aborted, unpipeEvent, controller: {signal}}) => {\n\tawait once(stream, unpipeEvent, {signal});\n\n\tif (!stream.readable) {\n\t\treturn once(signal, 'abort', {signal});\n\t}\n\n\tstreams.delete(stream);\n\tended.delete(stream);\n\taborted.delete(stream);\n};\n\nconst endStream = stream => {\n\tif (stream.writable) {\n\t\tstream.end();\n\t}\n};\n\nconst errorOrAbortStream = (stream, error) => {\n\tif (isAbortError(error)) {\n\t\tabortStream(stream);\n\t} else {\n\t\terrorStream(stream, error);\n\t}\n};\n\n// This is the error thrown by `finished()` on `stream.destroy()`\nconst isAbortError = error => error?.code === 'ERR_STREAM_PREMATURE_CLOSE';\n\nconst abortStream = stream => {\n\tif (stream.readable || stream.writable) {\n\t\tstream.destroy();\n\t}\n};\n\n// `stream.destroy(error)` crashes the process with `uncaughtException` if no `error` event listener exists on `stream`.\n// We take care of error handling on user behalf, so we do not want this to happen.\nconst errorStream = (stream, error) => {\n\tif (!stream.destroyed) {\n\t\tstream.once('error', noop);\n\t\tstream.destroy(error);\n\t}\n};\n\nconst noop = () => {};\n\nconst updateMaxListeners = (passThroughStream, increment) => {\n\tconst maxListeners = passThroughStream.getMaxListeners();\n\tif (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) {\n\t\tpassThroughStream.setMaxListeners(maxListeners + increment);\n\t}\n};\n\n// Number of times `passThroughStream.on()` is called regardless of streams:\n// - once due to `finished(passThroughStream)`\n// - once due to `on(passThroughStream)`\nconst PASSTHROUGH_LISTENERS_COUNT = 2;\n\n// Number of times `passThroughStream.on()` is called per stream:\n// - once due to `stream.pipe(passThroughStream)`\nconst PASSTHROUGH_LISTENERS_PER_STREAM = 1;\n","import * as execa from \"execa\";\nimport which from \"which\";\n/** The cached powershell path */\nlet powershell;\n/**\n * Asynchronously execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns A promise to the execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershell(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execa(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns The execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershellSync(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execaSync(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Get the path to the powershell executable.\n *\n * @note It prefers `pwsh` over `powershell`\n * @note It caches the path for the subsequent calls to this function\n */\nexport function getPowerShell() {\n if (powershell === undefined) {\n const maybePwsh = which.sync(\"pwsh\", { nothrow: true });\n if (maybePwsh !== null) {\n powershell = maybePwsh;\n }\n const maybePowerShell = which.sync(\"powershell\", { nothrow: true });\n if (maybePowerShell !== null) {\n powershell = maybePowerShell;\n }\n }\n if (powershell === undefined) {\n throw new Error(\"Could not find powershell\");\n }\n return powershell;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLGlDQUFpQztBQUNqQyxJQUFJLFVBQThCLENBQUE7QUFFbEM7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLGNBQWMsQ0FDNUIsT0FBZSxFQUNmLGVBQXlCLENBQUMsWUFBWSxFQUFFLFN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GwgPSB3aGljaC5zeW5jKFwicG93ZXJzaGVsbFwiLCB7IG5vdGhyb3c6IHRydWUgfSlcbiAgICBpZiAobWF5YmVQb3dlclNoZWxsICE9PSBudWxsKSB7XG4gICAgICBwb3dlcnNoZWxsID0gbWF5YmVQb3dlclNoZWxsXG4gICAgfVxuICB9XG4gIGlmIChwb3dlcnNoZWxsID09PSB1bmRlZmluZWQpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXCJDb3VsZCBub3QgZmluZCBwb3dlcnNoZWxsXCIpXG4gIH1cbiAgcmV0dXJuIHBvd2Vyc2hlbGxcbn1cbiJdfQ==","function e(e,t,r,o){Object.defineProperty(e,t,{get:r,set:o,enumerable:!0,configurable:!0})}function t(){return null!==m.sync(\"sudo\",{nothrow:!0})}function r(){return process.getuid?.()===0||!!process.env.CI}function o(){return r()&&t()}function n(e){return o()?`sudo ${e}`:e}function s(e,t=[],r=h){return o()?b(a(e,t),r):l(e,i(t),r)}function c(e,t=[],r=h){return o()?y(a(e,t),r):S(e,i(t),r)}function a(e,t){return`sudo ${i([e,...t]).join(\" \")}`}function i(e){return e.map(e=>`'${e}'`)}async function d(){try{return await S(\"fltmc\"),!0}catch{return!1}}async function u(){if(\"win32\"!==process.platform)return!1;try{return await S(\"fsutil\",[\"dirty\",\"query\",process.env.systemdrive??\"\"]),!0}catch(e){if(\"ENOENT\"===e.code)return d();return!1}}function f(){return\"win32\"===process.platform?R():r()}async function p(e){if((\"linux\"===process.platform||\"darwin\"===process.platform)&&o()&&void 0!==process.env.SUDO_USER){let t=w.statSync(e).isDirectory();await c(\"chown\",[...t?[\"-R\"]:[],process.env.SUDO_USER,e],h)}}var $,x={};import m from\"which\";import{execaCommandSync as b,execaSync as l,execaCommand as y,execa as S}from\"execa\";import w from\"fs\";e(x,\"hasSudo\",()=>t),e(x,\"isRoot\",()=>r),e(x,\"isSudo\",()=>o),e(x,\"prependSudo\",()=>n),e(x,\"defaultExecOptions\",()=>h),e(x,\"execRootSync\",()=>s),e(x,\"execRoot\",()=>c);let h={stdio:\"inherit\",shell:!0};e($={},\"isAdminWindows\",()=>R),e($,\"isAdminPosix\",()=>A),e($,\"isAdmin\",()=>f);let R=u,A=r;e({},\"grantUserWriteAccess\",()=>p);export{t as hasSudo,r as isRoot,o as isSudo,n as prependSudo,h as defaultExecOptions,s as execRootSync,c as execRoot,R as isAdminWindows,A as isAdminPosix,f as isAdmin,p as grantUserWriteAccess};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\n\nvar value = require(\"./valid-value\")\n , defineProperty = Object.defineProperty\n , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor\n , getOwnPropertyNames = Object.getOwnPropertyNames\n , getOwnPropertySymbols = Object.getOwnPropertySymbols;\n\nmodule.exports = function (target, source) {\n\tvar error, sourceObject = Object(value(source));\n\ttarget = Object(value(target));\n\tgetOwnPropertyNames(sourceObject).forEach(function (name) {\n\t\ttry {\n\t\t\tdefineProperty(target, name, getOwnPropertyDescriptor(source, name));\n\t\t} catch (e) { error = e; }\n\t});\n\tif (typeof getOwnPropertySymbols === \"function\") {\n\t\tgetOwnPropertySymbols(sourceObject).forEach(function (symbol) {\n\t\t\ttry {\n\t\t\t\tdefineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));\n\t\t\t} catch (e) { error = e; }\n\t\t});\n\t}\n\tif (error !== undefined) throw error;\n\treturn target;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? globalThis : require(\"./implementation\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tif (typeof globalThis !== \"object\") return false;\n\tif (!globalThis) return false;\n\treturn globalThis.Array === Array;\n};\n","var naiveFallback = function () {\n\tif (typeof self === \"object\" && self) return self;\n\tif (typeof window === \"object\" && window) return window;\n\tthrow new Error(\"Unable to resolve global `this`\");\n};\n\nmodule.exports = (function () {\n\tif (this) return this;\n\n\t// Unexpected strict mode (may happen if e.g. bundled into ESM module)\n\n\t// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis\n\t// In all ES5+ engines global object inherits from Object.prototype\n\t// (if you approached one that doesn't please report)\n\ttry {\n\t\tObject.defineProperty(Object.prototype, \"__global__\", {\n\t\t\tget: function () { return this; },\n\t\t\tconfigurable: true\n\t\t});\n\t} catch (error) {\n\t\t// Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)\n\t\treturn naiveFallback();\n\t}\n\ttry {\n\t\t// Safari case (window.__global__ is resolved with global context, but __global__ does not)\n\t\tif (!__global__) return naiveFallback();\n\t\treturn __global__;\n\t} finally {\n\t\tdelete Object.prototype.__global__;\n\t}\n})();\n","\"use strict\";\n\nvar isSymbol = require(\"./is-symbol\");\n\nmodule.exports = function (value) {\n\tif (!isSymbol(value)) throw new TypeError(value + \" is not a symbol\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tif (!value) return false;\n\tif (typeof value === \"symbol\") return true;\n\tif (!value.constructor) return false;\n\tif (value.constructor.name !== \"Symbol\") return false;\n\treturn value[value.constructor.toStringTag] === \"Symbol\";\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")()\n\t? require(\"ext/global-this\").Symbol\n\t: require(\"./polyfill\");\n","\"use strict\";\n\nvar global = require(\"ext/global-this\")\n , validTypes = { object: true, symbol: true };\n\nmodule.exports = function () {\n\tvar Symbol = global.Symbol;\n\tvar symbol;\n\tif (typeof Symbol !== \"function\") return false;\n\tsymbol = Symbol(\"test symbol\");\n\ttry { String(symbol); }\n\tcatch (e) { return false; }\n\n\t// Return 'true' also for polyfills\n\tif (!validTypes[typeof Symbol.iterator]) return false;\n\tif (!validTypes[typeof Symbol.toPrimitive]) return false;\n\tif (!validTypes[typeof Symbol.toStringTag]) return false;\n\n\treturn true;\n};\n","// ES2015 Symbol polyfill for environments that do not (or partially) support it\n\n\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"./validate-symbol\")\n , NativeSymbol = require(\"ext/global-this\").Symbol\n , generateName = require(\"./lib/private/generate-name\")\n , setupStandardSymbols = require(\"./lib/private/setup/standard-symbols\")\n , setupSymbolRegistry = require(\"./lib/private/setup/symbol-registry\");\n\nvar create = Object.create\n , defineProperties = Object.defineProperties\n , defineProperty = Object.defineProperty;\n\nvar SymbolPolyfill, HiddenSymbol, isNativeSafe;\n\nif (typeof NativeSymbol === \"function\") {\n\ttry {\n\t\tString(NativeSymbol());\n\t\tisNativeSafe = true;\n\t} catch (ignore) {}\n} else {\n\tNativeSymbol = null;\n}\n\n// Internal constructor (not one exposed) for creating Symbol instances.\n// This one is used to ensure that `someSymbol instanceof Symbol` always return false\nHiddenSymbol = function Symbol(description) {\n\tif (this instanceof HiddenSymbol) throw new TypeError(\"Symbol is not a constructor\");\n\treturn SymbolPolyfill(description);\n};\n\n// Exposed `Symbol` constructor\n// (returns instances of HiddenSymbol)\nmodule.exports = SymbolPolyfill = function Symbol(description) {\n\tvar symbol;\n\tif (this instanceof Symbol) throw new TypeError(\"Symbol is not a constructor\");\n\tif (isNativeSafe) return NativeSymbol(description);\n\tsymbol = create(HiddenSymbol.prototype);\n\tdescription = description === undefined ? \"\" : String(description);\n\treturn defineProperties(symbol, {\n\t\t__description__: d(\"\", description),\n\t\t__name__: d(\"\", generateName(description))\n\t});\n};\n\nsetupStandardSymbols(SymbolPolyfill);\nsetupSymbolRegistry(SymbolPolyfill);\n\n// Internal tweaks for real symbol producer\ndefineProperties(HiddenSymbol.prototype, {\n\tconstructor: d(SymbolPolyfill),\n\ttoString: d(\"\", function () { return this.__name__; })\n});\n\n// Proper implementation of methods exposed on Symbol.prototype\n// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype\ndefineProperties(SymbolPolyfill.prototype, {\n\ttoString: d(function () { return \"Symbol (\" + validateSymbol(this).__description__ + \")\"; }),\n\tvalueOf: d(function () { return validateSymbol(this); })\n});\ndefineProperty(\n\tSymbolPolyfill.prototype, SymbolPolyfill.toPrimitive,\n\td(\"\", function () {\n\t\tvar symbol = validateSymbol(this);\n\t\tif (typeof symbol === \"symbol\") return symbol;\n\t\treturn symbol.toString();\n\t})\n);\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d(\"c\", \"Symbol\"));\n\n// Proper implementaton of toPrimitive and toStringTag for returned symbol instances\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toStringTag,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])\n);\n\n// Note: It's important to define `toPrimitive` as last one, as some implementations\n// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)\n// And that may invoke error in definition flow:\n// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toPrimitive,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])\n);\n","\"use strict\";\n\nvar d = require(\"d\");\n\nvar create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;\n\nvar created = create(null);\nmodule.exports = function (desc) {\n\tvar postfix = 0, name, ie11BugWorkaround;\n\twhile (created[desc + (postfix || \"\")]) ++postfix;\n\tdesc += postfix || \"\";\n\tcreated[desc] = true;\n\tname = \"@@\" + desc;\n\tdefineProperty(\n\t\tobjPrototype, name,\n\t\td.gs(null, function (value) {\n\t\t\t// For IE11 issue see:\n\t\t\t// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/\n\t\t\t// ie11-broken-getters-on-dom-objects\n\t\t\t// https://github.com/medikoo/es6-symbol/issues/12\n\t\t\tif (ie11BugWorkaround) return;\n\t\t\tie11BugWorkaround = true;\n\t\t\tdefineProperty(this, name, d(value));\n\t\t\tie11BugWorkaround = false;\n\t\t})\n\t);\n\treturn name;\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , NativeSymbol = require(\"ext/global-this\").Symbol;\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\t// To ensure proper interoperability with other native functions (e.g. Array.from)\n\t\t// fallback to eventual native implementation of given symbol\n\t\thasInstance: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill(\"hasInstance\")\n\t\t),\n\t\tisConcatSpreadable: d(\n\t\t\t\"\",\n\t\t\t(NativeSymbol && NativeSymbol.isConcatSpreadable) ||\n\t\t\t\tSymbolPolyfill(\"isConcatSpreadable\")\n\t\t),\n\t\titerator: d(\"\", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill(\"iterator\")),\n\t\tmatch: d(\"\", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill(\"match\")),\n\t\treplace: d(\"\", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill(\"replace\")),\n\t\tsearch: d(\"\", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill(\"search\")),\n\t\tspecies: d(\"\", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill(\"species\")),\n\t\tsplit: d(\"\", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill(\"split\")),\n\t\ttoPrimitive: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill(\"toPrimitive\")\n\t\t),\n\t\ttoStringTag: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill(\"toStringTag\")\n\t\t),\n\t\tunscopables: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill(\"unscopables\")\n\t\t)\n\t});\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"../../../validate-symbol\");\n\nvar registry = Object.create(null);\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\tfor: d(function (key) {\n\t\t\tif (registry[key]) return registry[key];\n\t\t\treturn (registry[key] = SymbolPolyfill(String(key)));\n\t\t}),\n\t\tkeyFor: d(function (symbol) {\n\t\t\tvar key;\n\t\t\tvalidateSymbol(symbol);\n\t\t\tfor (key in registry) {\n\t\t\t\tif (registry[key] === symbol) return key;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t});\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Array.from : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar from = Array.from, arr, result;\n\tif (typeof from !== \"function\") return false;\n\tarr = [\"raz\", \"dwa\"];\n\tresult = from(arr);\n\treturn Boolean(result && result !== arr && result[1] === \"dwa\");\n};\n","\"use strict\";\n\nvar iteratorSymbol = require(\"es6-symbol\").iterator\n , isArguments = require(\"../../function/is-arguments\")\n , isFunction = require(\"../../function/is-function\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , callable = require(\"../../object/valid-callable\")\n , validValue = require(\"../../object/valid-value\")\n , isValue = require(\"../../object/is-value\")\n , isString = require(\"../../string/is-string\")\n , isArray = Array.isArray\n , call = Function.prototype.call\n , desc = { configurable: true, enumerable: true, writable: true, value: null }\n , defineProperty = Object.defineProperty;\n\n// eslint-disable-next-line complexity, max-lines-per-function\nmodule.exports = function (arrayLike /*, mapFn, thisArg*/) {\n\tvar mapFn = arguments[1]\n\t , thisArg = arguments[2]\n\t , Context\n\t , i\n\t , j\n\t , arr\n\t , length\n\t , code\n\t , iterator\n\t , result\n\t , getIterator\n\t , value;\n\n\tarrayLike = Object(validValue(arrayLike));\n\n\tif (isValue(mapFn)) callable(mapFn);\n\tif (!this || this === Array || !isFunction(this)) {\n\t\t// Result: Plain array\n\t\tif (!mapFn) {\n\t\t\tif (isArguments(arrayLike)) {\n\t\t\t\t// Source: Arguments\n\t\t\t\tlength = arrayLike.length;\n\t\t\t\tif (length !== 1) return Array.apply(null, arrayLike);\n\t\t\t\tarr = new Array(1);\n\t\t\t\tarr[0] = arrayLike[0];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t\tif (isArray(arrayLike)) {\n\t\t\t\t// Source: Array\n\t\t\t\tarr = new Array((length = arrayLike.length));\n\t\t\t\tfor (i = 0; i < length; ++i) arr[i] = arrayLike[i];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t}\n\t\tarr = [];\n\t} else {\n\t\t// Result: Non plain array\n\t\tContext = this;\n\t}\n\n\tif (!isArray(arrayLike)) {\n\t\tif ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {\n\t\t\t// Source: Iterator\n\t\t\titerator = callable(getIterator).call(arrayLike);\n\t\t\tif (Context) arr = new Context();\n\t\t\tresult = iterator.next();\n\t\t\ti = 0;\n\t\t\twhile (!result.done) {\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[i] = value;\n\t\t\t\t}\n\t\t\t\tresult = iterator.next();\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tlength = i;\n\t\t} else if (isString(arrayLike)) {\n\t\t\t// Source: String\n\t\t\tlength = arrayLike.length;\n\t\t\tif (Context) arr = new Context();\n\t\t\tfor (i = 0, j = 0; i < length; ++i) {\n\t\t\t\tvalue = arrayLike[i];\n\t\t\t\tif (i + 1 < length) {\n\t\t\t\t\tcode = value.charCodeAt(0);\n\t\t\t\t\t// eslint-disable-next-line max-depth\n\t\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];\n\t\t\t\t}\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, value, j) : value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, j, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[j] = value;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\tlength = j;\n\t\t}\n\t}\n\tif (length === undefined) {\n\t\t// Source: array or array-like\n\t\tlength = toPosInt(arrayLike.length);\n\t\tif (Context) arr = new Context(length);\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];\n\t\t\tif (Context) {\n\t\t\t\tdesc.value = value;\n\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t} else {\n\t\t\t\tarr[i] = value;\n\t\t\t}\n\t\t}\n\t}\n\tif (Context) {\n\t\tdesc.value = null;\n\t\tarr.length = length;\n\t}\n\treturn arr;\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , id = objToString.call((function () { return arguments; })());\n\nmodule.exports = function (value) { return objToString.call(value) === id; };\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);\n\nmodule.exports = function (value) {\n\treturn typeof value === \"function\" && isFunctionStringTag(objToString.call(value));\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString, id = objToString.call(\"\");\n\nmodule.exports = function (value) {\n\treturn (\n\t\ttypeof value === \"string\" ||\n\t\t(value &&\n\t\t\ttypeof value === \"object\" &&\n\t\t\t(value instanceof String || objToString.call(value) === id)) ||\n\t\tfalse\n\t);\n};\n","\"use strict\";\n\nvar numberIsNaN = require(\"../../number/is-nan\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , value = require(\"../../object/valid-value\")\n , indexOf = Array.prototype.indexOf\n , objHasOwnProperty = Object.prototype.hasOwnProperty\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (searchElement /*, fromIndex*/) {\n\tvar i, length, fromIndex, val;\n\tif (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);\n\n\tlength = toPosInt(value(this).length);\n\tfromIndex = arguments[1];\n\tif (isNaN(fromIndex)) fromIndex = 0;\n\telse if (fromIndex >= 0) fromIndex = floor(fromIndex);\n\telse fromIndex = toPosInt(this.length) - floor(abs(fromIndex));\n\n\tfor (i = fromIndex; i < length; ++i) {\n\t\tif (objHasOwnProperty.call(this, i)) {\n\t\t\tval = this[i];\n\t\t\tif (numberIsNaN(val)) return i; // Jslint: ignore\n\t\t}\n\t}\n\treturn -1;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Number.isNaN : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar numberIsNaN = Number.isNaN;\n\tif (typeof numberIsNaN !== \"function\") return false;\n\treturn !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\t// eslint-disable-next-line no-self-compare\n\treturn value !== value;\n};\n","\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , forEach = require(\"./for-each\")\n , call = Function.prototype.call;\n\nmodule.exports = function (obj, cb /*, thisArg*/) {\n\tvar result = {}, thisArg = arguments[2];\n\tcallable(cb);\n\tforEach(obj, function (value, key, targetObj, index) {\n\t\tresult[key] = call.call(cb, thisArg, value, key, targetObj, index);\n\t});\n\treturn result;\n};\n","'use strict';\n\nvar ensureCallable = function (fn) {\n\tif (typeof fn !== 'function') throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\nvar byObserver = function (Observer) {\n\tvar node = document.createTextNode(''), queue, currentQueue, i = 0;\n\tnew Observer(function () {\n\t\tvar callback;\n\t\tif (!queue) {\n\t\t\tif (!currentQueue) return;\n\t\t\tqueue = currentQueue;\n\t\t} else if (currentQueue) {\n\t\t\tqueue = currentQueue.concat(queue);\n\t\t}\n\t\tcurrentQueue = queue;\n\t\tqueue = null;\n\t\tif (typeof currentQueue === 'function') {\n\t\t\tcallback = currentQueue;\n\t\t\tcurrentQueue = null;\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\t\tnode.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash\n\t\twhile (currentQueue) {\n\t\t\tcallback = currentQueue.shift();\n\t\t\tif (!currentQueue.length) currentQueue = null;\n\t\t\tcallback();\n\t\t}\n\t}).observe(node, { characterData: true });\n\treturn function (fn) {\n\t\tensureCallable(fn);\n\t\tif (queue) {\n\t\t\tif (typeof queue === 'function') queue = [queue, fn];\n\t\t\telse queue.push(fn);\n\t\t\treturn;\n\t\t}\n\t\tqueue = fn;\n\t\tnode.data = (i = ++i % 2);\n\t};\n};\n\nmodule.exports = (function () {\n\t// Node.js\n\tif ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) {\n\t\treturn process.nextTick;\n\t}\n\n\t// queueMicrotask\n\tif (typeof queueMicrotask === \"function\") {\n\t\treturn function (cb) { queueMicrotask(ensureCallable(cb)); };\n\t}\n\n\t// MutationObserver\n\tif ((typeof document === 'object') && document) {\n\t\tif (typeof MutationObserver === 'function') return byObserver(MutationObserver);\n\t\tif (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver);\n\t}\n\n\t// W3C Draft\n\t// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html\n\tif (typeof setImmediate === 'function') {\n\t\treturn function (cb) { setImmediate(ensureCallable(cb)); };\n\t}\n\n\t// Wide available standard\n\tif ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) {\n\t\treturn function (cb) { setTimeout(ensureCallable(cb), 0); };\n\t}\n\n\treturn null;\n}());\n","// Deprecated\n\n\"use strict\";\n\nmodule.exports = function (obj) { return typeof obj === \"function\"; };\n","module.exports = isPromise;\nmodule.exports.default = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","/* eslint max-statements: 0 */\n\n// Support for functions returning promise\n\n\"use strict\";\n\nvar objectMap = require(\"es5-ext/object/map\")\n , primitiveSet = require(\"es5-ext/object/primitive-set\")\n , ensureString = require(\"es5-ext/object/validate-stringifiable-value\")\n , toShortString = require(\"es5-ext/to-short-string-representation\")\n , isPromise = require(\"is-promise\")\n , nextTick = require(\"next-tick\");\n\nvar create = Object.create\n , supportedModes = primitiveSet(\"then\", \"then:finally\", \"done\", \"done:finally\");\n\nrequire(\"../lib/registered-extensions\").promise = function (mode, conf) {\n\tvar waiting = create(null), cache = create(null), promises = create(null);\n\n\tif (mode === true) {\n\t\tmode = null;\n\t} else {\n\t\tmode = ensureString(mode);\n\t\tif (!supportedModes[mode]) {\n\t\t\tthrow new TypeError(\"'\" + toShortString(mode) + \"' is not valid promise mode\");\n\t\t}\n\t}\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id, ignore, promise) {\n\t\tvar isFailed = false;\n\n\t\tif (!isPromise(promise)) {\n\t\t\t// Non promise result\n\t\t\tcache[id] = promise;\n\t\t\tconf.emit(\"setasync\", id, 1);\n\t\t\treturn;\n\t\t}\n\t\twaiting[id] = 1;\n\t\tpromises[id] = promise;\n\t\tvar onSuccess = function (result) {\n\t\t\tvar count = waiting[id];\n\t\t\tif (isFailed) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Detected unordered then|done & finally resolution, which \" +\n\t\t\t\t\t\t\"in turn makes proper detection of success/failure impossible (when in \" +\n\t\t\t\t\t\t\"'done:finally' mode)\\n\" +\n\t\t\t\t\t\t\"Consider to rely on 'then' or 'done' mode instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!count) return; // Deleted from cache before resolved\n\t\t\tdelete waiting[id];\n\t\t\tcache[id] = result;\n\t\t\tconf.emit(\"setasync\", id, count);\n\t\t};\n\t\tvar onFailure = function () {\n\t\t\tisFailed = true;\n\t\t\tif (!waiting[id]) return; // Deleted from cache (or succeed in case of finally)\n\t\t\tdelete waiting[id];\n\t\t\tdelete promises[id];\n\t\t\tconf.delete(id);\n\t\t};\n\n\t\tvar resolvedMode = mode;\n\t\tif (!resolvedMode) resolvedMode = \"then\";\n\n\t\tif (resolvedMode === \"then\") {\n\t\t\tvar nextTickFailure = function () { nextTick(onFailure); };\n\t\t\t// Eventual finally needs to be attached to non rejected promise\n\t\t\t// (so we not force propagation of unhandled rejection)\n\t\t\tpromise = promise.then(function (result) {\n\t\t\t\tnextTick(onSuccess.bind(this, result));\n\t\t\t}, nextTickFailure);\n\t\t\t// If `finally` is a function we attach to it to remove cancelled promises.\n\t\t\tif (typeof promise.finally === \"function\") {\n\t\t\t\tpromise.finally(nextTickFailure);\n\t\t\t}\n\t\t} else if (resolvedMode === \"done\") {\n\t\t\t// Not recommended, as it may mute any eventual \"Unhandled error\" events\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess, onFailure);\n\t\t} else if (resolvedMode === \"done:finally\") {\n\t\t\t// The only mode with no side effects assuming library does not throw unconditionally\n\t\t\t// for rejected promises.\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof promise.finally !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'finally' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess);\n\t\t\tpromise.finally(onFailure);\n\t\t}\n\t});\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id, args, context) {\n\t\tvar promise;\n\t\tif (waiting[id]) {\n\t\t\t++waiting[id]; // Still waiting\n\t\t\treturn;\n\t\t}\n\t\tpromise = promises[id];\n\t\tvar emit = function () { conf.emit(\"getasync\", id, args, context); };\n\t\tif (isPromise(promise)) {\n\t\t\tif (typeof promise.done === \"function\") promise.done(emit);\n\t\t\telse {\n\t\t\t\tpromise.then(function () { nextTick(emit); });\n\t\t\t}\n\t\t} else {\n\t\t\temit();\n\t\t}\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tdelete promises[id];\n\t\tif (waiting[id]) {\n\t\t\tdelete waiting[id];\n\t\t\treturn; // Not yet resolved\n\t\t}\n\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\tvar result = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, [result]);\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\twaiting = create(null);\n\t\tpromises = create(null);\n\t\tconf.emit(\"clearasync\", objectMap(oldCache, function (data) { return [data]; }));\n\t});\n};\n","\"use strict\";\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (arg /*, …args*/) {\n\tvar set = create(null);\n\tforEach.call(arguments, function (name) { set[name] = true; });\n\treturn set;\n};\n","\"use strict\";\n\nvar ensureValue = require(\"./valid-value\")\n , stringifiable = require(\"./validate-stringifiable\");\n\nmodule.exports = function (value) { return stringifiable(ensureValue(value)); };\n","\"use strict\";\n\nvar isCallable = require(\"./is-callable\");\n\nmodule.exports = function (stringifiable) {\n\ttry {\n\t\tif (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString();\n\t\treturn String(stringifiable);\n\t} catch (e) {\n\t\tthrow new TypeError(\"Passed argument cannot be stringifed\");\n\t}\n};\n","\"use strict\";\n\nvar safeToString = require(\"./safe-to-string\");\n\nvar reNewLine = /[\\n\\r\\u2028\\u2029]/g;\n\nmodule.exports = function (value) {\n\tvar string = safeToString(value);\n\t// Trim if too long\n\tif (string.length > 100) string = string.slice(0, 99) + \"…\";\n\t// Replace eventual new lines\n\tstring = string.replace(reNewLine, function (char) {\n\t\treturn JSON.stringify(char).slice(1, -1);\n\t});\n\treturn string;\n};\n","\"use strict\";\n\nvar isCallable = require(\"./object/is-callable\");\n\nmodule.exports = function (value) {\n\ttry {\n\t\tif (value && isCallable(value.toString)) return value.toString();\n\t\treturn String(value);\n\t} catch (e) {\n\t\treturn \"\";\n\t}\n};\n","import fs, {promises as fsPromises} from 'node:fs';\n\nexport async function pathExists(path) {\n\ttry {\n\t\tawait fsPromises.access(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport function pathExistsSync(path) {\n\ttry {\n\t\tfs.accessSync(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","import { homedir } from \"os\";\nimport { join } from \"path\";\nimport { isSudo } from \"admina\";\nexport function userHomeDir() {\n if (isSudo() && typeof process.env.SUDO_USER === \"string\" && process.env.SUDO_USER !== \"\") {\n // use the user profile even if root\n if (process.platform === \"darwin\") {\n return join(\"/Users/\", process.env.SUDO_USER);\n }\n else {\n return join(\"/home/\", process.env.SUDO_USER);\n }\n }\n else {\n const maybeHomeDir = homedir();\n if (maybeHomeDir === \"\") {\n return undefined;\n }\n return maybeHomeDir;\n }\n}\nconst tildeRegex = /^~(?=$|\\/|\\\\)/;\n/**\n * Replaces a tilde with the user's home directory\n *\n * @example UntildifyUser(\"~/foo\") // /home/user/foo\n *\n * @param path The path to untildify\n * @returns The untildified path\n */\nexport function untildifyUser(path) {\n const maybeHomeDir = userHomeDir();\n if (maybeHomeDir === undefined) {\n return path;\n }\n return path.replace(tildeRegex, maybeHomeDir);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM1QixPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFFL0IsTUFBTSxVQUFVLFdBQVc7SUFDekIsSUFBSSxNQUFNLEVBQUUsSUFBSSxPQUFPLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxLQUFLLFFBQVEsS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hvbWVEaXIoKVxuICBpZiAobWF5YmVIb21lRGlyID09PSB1bmRlZmluZWQpIHtcbiAgICByZXR1cm4gcGF0aFxuICB9XG5cbiAgcmV0dXJuIHBhdGgucmVwbGFjZSh0aWxkZVJlZ2V4LCBtYXliZUhvbWVEaXIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { grantUserWriteAccess } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport memoize from \"memoizee\";\nimport { pathExists } from \"path-exists\";\nimport { untildifyUser } from \"untildify-user\";\nconst { appendFile, readFile, writeFile } = promises;\nexport const defaultRcPath = untildifyUser(\"~/.bashrc\");\nasync function sourceRCInRc_(options) {\n const sourceRcString = options.guard === undefined\n ? `\\nsource \"${options.rcPath}\"\\n`\n : `\\n# ${options.guard}\\nif [[ \"$SOURCE_${options.guard.toUpperCase()}RC\" != 0 && -f \"${options.rcPath}\" ]]; then source \"${options.rcPath}\"; fi\\n`;\n try {\n await Promise.all([\n addRCHeader(options),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.bashrc\")),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.profile\")),\n ]);\n }\n catch (err) {\n warning(`Failed to add ${sourceRcString} to .profile or .bashrc. You should add it manually: ${err}`);\n }\n}\n/**\n * handles adding conditions to source rc file from .bashrc and .profile\n */\nexport const sourceRCInRc = memoize(sourceRCInRc_, { promise: true });\nasync function addRCHeader(options) {\n // a variable that prevents source rc from being called from .bashrc and .profile\n const rcHeader = options.guard === undefined\n ? \"\\n# Automatically Generated by envosman\\n\"\n : `\\n# Automatically Generated by envosman ${options.guard}\\nexport SOURCE_${options.guard.toUpperCase()}RC=0\\n`;\n if (await pathExists(options.rcPath)) {\n const rcContent = await readFile(options.rcPath, \"utf8\");\n if (!rcContent.includes(rcHeader)) {\n // already executed setupCppInProfile\n await appendFile(options.rcPath, `\\n${rcHeader}\\n`);\n info(`Added ${rcHeader} to ${options.rcPath}`);\n }\n }\n}\nasync function addSourceToTargetRc(sourceRcString, targetRcPath) {\n if (await pathExists(targetRcPath)) {\n const bashrcContent = await readFile(targetRcPath, \"utf-8\");\n if (!bashrcContent.includes(sourceRcString)) {\n await appendFile(targetRcPath, sourceRcString);\n info(`${sourceRcString} was added to ${targetRcPath}`);\n }\n }\n}\nexport async function finalizeRC(rcOptions) {\n if (await pathExists(rcOptions.rcPath)) {\n const entries = (await readFile(rcOptions.rcPath, \"utf-8\")).split(\"\\n\");\n const uniqueEntries = [...new Set(entries.reverse())].reverse(); // remove duplicates, keeping the latest entry\n await writeFile(rcOptions.rcPath, uniqueEntries.join(\"\\n\"));\n await grantUserWriteAccess(rcOptions.rcPath);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmMtZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9yYy1maWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQzdDLE9BQU8sRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ3RDLE9BQU8sT0FBTyxNQUFNLFVBQVUsQ0FBQTtBQUM5QixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sYUFBYSxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUM5QyxNQUFNLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFFcEQsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFHLGFBQWEsQ0FBQyxXQUFXLENBQUMsQ0FBQTtBQWF2RCxLQUFLLFVBQVUsYUFBYSxDQUFDLE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lcnNlKCkgLy8gcmVtb3ZlIGR1cGxpY2F0ZXMsIGtlZXBpbmcgdGhlIGxhdGVzdCBlbnRyeVxuXG4gICAgYXdhaXQgd3JpdGVGaWxlKHJjT3B0aW9ucy5yY1BhdGgsIHVuaXF1ZUVudHJpZXMuam9pbihcIlxcblwiKSlcblxuICAgIGF3YWl0IGdyYW50VXNlcldyaXRlQWNjZXNzKHJjT3B0aW9ucy5yY1BhdGgpXG4gIH1cbn1cbiJdfQ==","import { promises } from \"fs\";\nimport { exportVariable as ghExportVariable } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nimport { escapeString } from \"./utils.js\";\nconst { appendFile } = promises;\n/**\n * Add an environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addEnv(name, valGiven, givenOptions = {}) {\n const options = {\n escapeSpace: false,\n overwrite: true,\n rcPath: defaultRcPath,\n ...givenOptions,\n };\n const val = escapeString(valGiven ?? \"\", options.escapeSpace);\n try {\n if (GITHUB_ACTIONS) {\n try {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n ghExportVariable(name, val);\n }\n catch (err) {\n error(err);\n await addEnvSystem(name, val, options);\n }\n }\n else {\n await addEnvSystem(name, val, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to export environment variable ${name}=${val}. You should add it manually.`);\n }\n}\nasync function addEnvSystem(name, valGiven, options) {\n const val = valGiven ?? \"\";\n switch (process.platform) {\n case \"win32\": {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit\n await execPowershell(`[Environment]::SetEnvironmentVariable('${name}', '${val}', \"User\")`);\n info(`${name}='${val}' was set in the environment.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n if (!options.overwrite) {\n await appendFile(options.rcPath, `\\nif [ -z \"\\${${name}}\" ]; then export ${name}=\"${val}\"; fi\\n`);\n info(`if not defined ${name} then ${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n else {\n await appendFile(options.rcPath, `\\nexport ${name}=\"${val}\"\\n`);\n info(`${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n return;\n }\n default: {\n // fall through shell path modification\n }\n }\n process.env[name] = val;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hZGQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLGNBQWMsSUFBSSxnQkFBZ0IsRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUNsRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sU0FBUyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ3BDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTtBQUNoRCxPQUFPLEVBQUUsYUFBYSxFQUFFLFlBQVksRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUMxRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ3pDLE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFpQi9COzs7O0dBSUc7QUFFSCxNQUFNLENBQUMsS0FBSyxVQUFVLE1BQU0sQ0FDMUIsSUFBWSxFQUNaLFFBQTRCLEV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FsfVwiOyBmaVxcbmApXG4gICAgICAgIGluZm8oYGlmIG5vdCBkZWZpbmVkICR7bmFtZX0gdGhlbiAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgYXdhaXQgYXBwZW5kRmlsZShvcHRpb25zLnJjUGF0aCwgYFxcbmV4cG9ydCAke25hbWV9PVwiJHt2YWx9XCJcXG5gKVxuICAgICAgICBpbmZvKGAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfVxuICAgICAgcmV0dXJuXG4gICAgfVxuICAgIGRlZmF1bHQ6IHtcbiAgICAgIC8vIGZhbGwgdGhyb3VnaCBzaGVsbCBwYXRoIG1vZGlmaWNhdGlvblxuICAgIH1cbiAgfVxuICBwcm9jZXNzLmVudltuYW1lXSA9IHZhbFxufVxuIl19","import escapeSpace from \"escape-path-with-spaces\";\nimport escapeQuote from \"escape-quotes\";\n/**\n * Escape a string for use in a shell command\n * @param valGiven The string to escape\n * @param shouldEscapeSpace Whether to escape spaces in the string\n *\n * @private\n */\nexport function escapeString(valGiven, shouldEscapeSpace = false) {\n const spaceEscaped = shouldEscapeSpace ? escapeSpace(valGiven) : valGiven;\n return escapeQuote(spaceEscaped, \"\\\"\", \"\\\\\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxXQUFXLE1BQU0seUJBQXlCLENBQUE7QUFDakQsT0FBTyxXQUFXLE1BQU0sZUFBZSxDQUFBO0FBRXZDOzs7Ozs7R0FNRztBQUNILE1BQU0sVUFBVSxZQUFZLENBQUMsUUFBZ0IsRUFBRSxvQkFBNkIsS0FBSztJQUMvRSxNQUFNLFlBQVksR0FBRyxpQkFBaUIsQ0FBQyxDQUFDLENBQUMsV0FBVyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUE7SUFDekUsT0FBTyxXQUFXLENBQUMsWUFBWSxFQUFFLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQTtBQUM5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGVzY2FwZVNwYWNlIGZyb20gXCJlc2NhcGUtcGF0aC13aXRoLXNwYWNlc1wiXG5pbXBvcnQgZXNjYXBlUXVvdGUgZnJvbSBcImVzY2FwZS1xdW90ZXNcIlxuXG4vKipcbiAqIEVzY2FwZSBhIHN0cmluZyBmb3IgdXNlIGluIGEgc2hlbGwgY29tbWFuZFxuICogQHBhcmFtIHZhbEdpdmVuIFRoZSBzdHJpbmcgdG8gZXNjYXBlXG4gKiBAcGFyYW0gc2hvdWxkRXNjYXBlU3BhY2UgV2hldGhlciB0byBlc2NhcGUgc3BhY2VzIGluIHRoZSBzdHJpbmdcbiAqXG4gKiBAcHJpdmF0ZVxuICovXG5leHBvcnQgZnVuY3Rpb24gZXNjYXBlU3RyaW5nKHZhbEdpdmVuOiBzdHJpbmcsIHNob3VsZEVzY2FwZVNwYWNlOiBib29sZWFuID0gZmFsc2UpIHtcbiAgY29uc3Qgc3BhY2VFc2NhcGVkID0gc2hvdWxkRXNjYXBlU3BhY2UgPyBlc2NhcGVTcGFjZSh2YWxHaXZlbikgOiB2YWxHaXZlblxuICByZXR1cm4gZXNjYXBlUXVvdGUoc3BhY2VFc2NhcGVkLCBcIlxcXCJcIiwgXCJcXFxcXCIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { delimiter } from \"path\";\nimport { addPath as ghAddPath } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nconst { appendFile } = promises;\n/**\n * Add a path to the PATH environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addPath(path, givenOptions = {}) {\n const options = { rcPath: defaultRcPath, ...givenOptions };\n if (isIgnoredPath(path)) {\n return;\n }\n process.env.PATH = `${path}${delimiter}${process.env.PATH}`;\n try {\n if (GITHUB_ACTIONS) {\n try {\n ghAddPath(path);\n }\n catch (err) {\n error(err);\n await addPathSystem(path, options);\n }\n }\n else {\n await addPathSystem(path, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to add ${path} to the percistent PATH. You should add it manually.`);\n }\n}\nasync function addPathSystem(path, options) {\n switch (process.platform) {\n case \"win32\": {\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit and also because %PATH% is different for user and system\n await execPowershell(`$USER_PATH=([Environment]::GetEnvironmentVariable(\"PATH\", \"User\")); [Environment]::SetEnvironmentVariable(\"PATH\", \"${path};$USER_PATH\", \"User\")`);\n info(`\"${path}\" was added to the PATH.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n await appendFile(options.rcPath, `\\nexport PATH=\"${path}:$PATH\"\\n`);\n info(`\"${path}\" was added to \"${options.rcPath}\"`);\n return;\n }\n default: {\n return;\n }\n }\n}\nconst ignoredPaths = [/\\/usr\\/bin\\/?/, /\\/usr\\/local\\/bin\\/?/];\n/** Skip adding /usr/bin to PATH if it is already there */\nfunction isIgnoredPath(path) {\n if (ignoredPaths.some((checkedPath) => checkedPath.test(path))) {\n const paths = process.env.PATH?.split(delimiter) ?? [];\n return paths.includes(path);\n }\n return false;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLXBhdGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYWRkLXBhdGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI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aW51eFwiOlxuICAgIGNhc2UgXCJkYXJ3aW5cIjoge1xuICAgICAgYXdhaXQgc291cmNlUkNJblJjKG9wdGlvbnMpXG4gICAgICBhd2FpdCBhcHBlbmRGaWxlKG9wdGlvbnMucmNQYXRoLCBgXFxuZXhwb3J0IFBBVEg9XCIke3BhdGh9OiRQQVRIXCJcXG5gKVxuICAgICAgaW5mbyhgXCIke3BhdGh9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1cImApXG4gICAgICByZXR1cm5cbiAgICB9XG4gICAgZGVmYXVsdDoge1xuICAgICAgcmV0dXJuXG4gICAgfVxuICB9XG59XG5cbmNvbnN0IGlnbm9yZWRQYXRocyA9IFsvXFwvdXNyXFwvYmluXFwvPy8sIC9cXC91c3JcXC9sb2NhbFxcL2JpblxcLz8vXVxuXG4vKiogU2tpcCBhZGRpbmcgL3Vzci9iaW4gdG8gUEFUSCBpZiBpdCBpcyBhbHJlYWR5IHRoZXJlICovXG5mdW5jdGlvbiBpc0lnbm9yZWRQYXRoKHBhdGg6IHN0cmluZykge1xuICBpZiAoaWdub3JlZFBhdGhzLnNvbWUoKGNoZWNrZWRQYXRoKSA9PiBjaGVja2VkUGF0aC50ZXN0KHBhdGgpKSkge1xuICAgIGNvbnN0IHBhdGhzID0gcHJvY2Vzcy5lbnYuUEFUSD8uc3BsaXQoZGVsaW1pdGVyKSA/PyBbXVxuICAgIHJldHVybiBwYXRocy5pbmNsdWRlcyhwYXRoKVxuICB9XG4gIHJldHVybiBmYWxzZVxufVxuIl19","\n//==============//\n// DEPENDENCIES //\n//==============//\n\nconst numerous = require('numerous');\nconst isNode = require('is-node');\n\n\n//================//\n// MODULE GLOBALS //\n//================//\n\n/**\n * Pre-calculating millisecond values for each time unit.\n */\nconst timeUnits = [\n ['years', 12 * 4 * 7 * 24 * 60 * 60 * 1000],\n ['months', 4 * 7 * 24 * 60 * 60 * 1000],\n ['weeks', 7 * 24 * 60 * 60 * 1000],\n ['days', 24 * 60 * 60 * 1000],\n ['hours', 60 * 60 * 1000],\n ['minutes', 60 * 1000],\n ['seconds', 1000],\n];\n\nconst defaultConfig = {\n locale: 'en',\n span: 2,\n delimiter: ', ',\n unitType: 'long',\n unitTypeLookupOrder: ['long', 'short', 'narrow'],\n autoloadLocales: true,\n};\n\n/**\n * Contains data of loaded locales.\n * @type {Object}\n */\nconst locales = {};\n\n\n//=========//\n// EXPORTS //\n//=========//\n\nmodule.exports = {\n create: timeDeltaFactory,\n addLocale,\n defaultConfig,\n};\n\n\n//===========//\n// FUNCTIONS //\n//===========//\n\n/**\n * Adds pluralization data for the specified locale.\n * Should be called in browser.\n *\n * @param {Object|Object[]} localeData\n */\nfunction addLocale(localeData) {\n\n // Normalizing input\n if (!Array.isArray(localeData)) {\n localeData = [localeData];\n }\n\n for (const item of localeData) {\n const { id, data } = item;\n locales[id] = data;\n }\n\n}\n\n\n/**\n * Creates new instance.\n *\n * @param {object?} config\n *\n * @returns {object}\n */\nfunction timeDeltaFactory(config) {\n\n // Initializing config by extending the default one\n config = Object.assign({}, defaultConfig, config || {});\n\n return {\n\n /**\n * Public proxy for internal format function.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object?} options\n *\n * @returns {string}\n */\n format: function (firstDate, secondDate, options) {\n\n // Allowing to override config with each individual call\n options = Object.assign({}, config, options || {});\n\n return format(firstDate, secondDate, options);\n\n }\n\n };\n\n}\n\n\n/**\n * Returns difference between two dates as a text string.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object} config\n *\n * @returns {string}\n */\nfunction format(firstDate, secondDate, config) {\n\n ensureLocaleLoadedOrThrow(config.locale, {\n autoload: config.autoloadLocales,\n });\n\n // Handling input arguments\n // -----\n\n if (!firstDate) {\n throw new Error('Missing first date argument');\n }\n\n if (!secondDate) {\n throw new Error('Missing second date argument');\n }\n\n // Calculating\n // -----\n\n const difference = getDifference(firstDate, secondDate);\n const parts = [];\n\n for (const unit of difference) {\n const [name, value] = unit;\n if (value > 0) {\n parts.push(pluralize(name, value, config));\n }\n if (parts.length >= config.span) {\n break;\n }\n }\n\n // Returning the string value\n return parts.join(config.delimiter);\n\n}\n\n\n/**\n * Checks if locale is loaded. If not, tries to load it in Node.js,\n * or throws and error in Browser.\n *\n * @param {string} locale\n * @param {Object?} options\n */\nfunction ensureLocaleLoadedOrThrow(locale, options) {\n\n const { autoload } = options;\n\n if (hasLocale(locale)) {\n return;\n }\n\n if (isNode && autoload) {\n requireLocale(locale);\n\n } else {\n throw new Error(\n `Missing locale: ${locale}, you must load it manually before using it`\n );\n }\n\n}\n\n\n/**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} localeId\n *\n * @returns {boolean}\n */\nfunction hasLocale(localeId) {\n return Boolean(locales[localeId]);\n}\n\n/**\n * Tries to load the specified locale.\n *\n * @param {string} localeId\n */\nfunction requireLocale(localeId) {\n try {\n addLocale(\n require(`../locales/${localeId}.js`)\n );\n\n } catch (error) {\n throw Error(\n `Failed to load locale: ${localeId} from ../locales/${localeId}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${error}`\n );\n\n }\n}\n\n\n/**\n * Returns difference as separate time units.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n *\n * @returns {Array}\n */\nfunction getDifference(firstDate, secondDate) {\n let difference = (secondDate - firstDate);\n const results = [];\n timeUnits.some(function (unit) {\n const name = unit[0];\n const divider = unit[1];\n const value = Math.floor(difference / divider);\n difference -= value * divider;\n results.push([name, value]);\n if (difference <= 0) {\n // Breaking the loop.\n return true;\n }\n });\n return results;\n}\n\n/**\n * Returns localized and pluralized time unit.\n *\n * @param {string} unit\n * @param {int} value\n * @param {object} config\n *\n * @returns {string}\n */\nfunction pluralize(unit, value, config) {\n const unitTypeData = getLocaleDataForUnitType(config);\n const unitString = numerous.pluralize(\n config.locale,\n value,\n unitTypeData[unit]\n );\n return unitString.replace('{0}', value);\n}\n\n\n/**\n * Returns locale data for preferred unit type.\n *\n * @param {object} config\n *\n * @returns {Array}\n */\nfunction getLocaleDataForUnitType(config) {\n\n const localeData = locales[config.locale];\n\n // Making a copy of array from config.\n let lookupOrder = config.unitTypeLookupOrder.slice();\n\n // Adding interested type to the top.\n lookupOrder.unshift(config.unitType);\n\n // Making sure only unique items are present.\n lookupOrder = arrayUnique(lookupOrder);\n\n let unitTypeData = null;\n lookupOrder.some(function (unitType) {\n if ('undefined' !== typeof localeData[unitType]) {\n unitTypeData = localeData[unitType];\n // Breaking the loop.\n return true;\n }\n });\n\n if (null === unitTypeData) {\n throw new Error('Can not find any unit type data for locale: ' + config.locale);\n }\n\n return unitTypeData;\n}\n\n/**\n * Returns array with only unique items.\n *\n * @param {Array} array\n *\n * @returns {Array}\n */\nfunction arrayUnique(array) {\n return Array.from(\n new Set(array)\n );\n}\n","const SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict';\n\nvar process$1 = require('process');\nvar semver = require('semver');\nvar os = require('os');\nvar path = require('path');\nvar fs = require('fs');\nvar https = require('https');\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar packageJson = process$1.env.npm_package_json;\nvar userAgent = process$1.env.npm_config_user_agent;\nvar isNpm6 = Boolean(userAgent && userAgent.startsWith('npm'));\nvar isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json'));\nvar isNpm = isNpm6 || isNpm7;\nvar isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));\nvar isNpmOrYarn = isNpm || isYarn;\n\nvar homeDirectory = os.homedir();\nvar configDir = process.env.XDG_CONFIG_HOME ||\n path.join(homeDirectory, '.config', 'simple-update-notifier');\nvar getConfigFile = function (packageName) {\n return path.join(configDir, \"\".concat(packageName.replace('@', '').replace('/', '__'), \".json\"));\n};\nvar createConfigDir = function () {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n};\nvar getLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n try {\n if (!fs.existsSync(configFile)) {\n return undefined;\n }\n var file = JSON.parse(fs.readFileSync(configFile, 'utf8'));\n return file.lastUpdateCheck;\n }\n catch (_a) {\n return undefined;\n }\n};\nvar saveLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n fs.writeFileSync(configFile, JSON.stringify({ lastUpdateCheck: new Date().getTime() }));\n};\n\nvar getDistVersion = function (packageName, distTag) { return __awaiter(void 0, void 0, void 0, function () {\n var url;\n return __generator(this, function (_a) {\n url = \"https://registry.npmjs.org/-/package/\".concat(packageName, \"/dist-tags\");\n return [2 /*return*/, new Promise(function (resolve, reject) {\n https\n .get(url, function (res) {\n var body = '';\n res.on('data', function (chunk) { return (body += chunk); });\n res.on('end', function () {\n try {\n var json = JSON.parse(body);\n var version = json[distTag];\n if (!version) {\n reject(new Error('Error getting version'));\n }\n resolve(version);\n }\n catch (_a) {\n reject(new Error('Could not parse version response'));\n }\n });\n })\n .on('error', function (err) { return reject(err); });\n })];\n });\n}); };\n\nvar hasNewVersion = function (_a) {\n var pkg = _a.pkg, _b = _a.updateCheckInterval, updateCheckInterval = _b === void 0 ? 1000 * 60 * 60 * 24 : _b, _c = _a.distTag, distTag = _c === void 0 ? 'latest' : _c, alwaysRun = _a.alwaysRun, debug = _a.debug;\n return __awaiter(void 0, void 0, void 0, function () {\n var lastUpdateCheck, latestVersion;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n createConfigDir();\n lastUpdateCheck = getLastUpdate(pkg.name);\n if (!(alwaysRun ||\n !lastUpdateCheck ||\n lastUpdateCheck < new Date().getTime() - updateCheckInterval)) return [3 /*break*/, 2];\n return [4 /*yield*/, getDistVersion(pkg.name, distTag)];\n case 1:\n latestVersion = _d.sent();\n saveLastUpdate(pkg.name);\n if (semver.gt(latestVersion, pkg.version)) {\n return [2 /*return*/, latestVersion];\n }\n else if (debug) {\n console.error(\"Latest version (\".concat(latestVersion, \") not newer than current version (\").concat(pkg.version, \")\"));\n }\n return [3 /*break*/, 3];\n case 2:\n if (debug) {\n console.error(\"Too recent to check for a new update. simpleUpdateNotifier() interval set to \".concat(updateCheckInterval, \"ms but only \").concat(new Date().getTime() - lastUpdateCheck, \"ms since last check.\"));\n }\n _d.label = 3;\n case 3: return [2 /*return*/, false];\n }\n });\n });\n};\n\nvar borderedText = function (text) {\n var lines = text.split('\\n');\n var width = Math.max.apply(Math, lines.map(function (l) { return l.length; }));\n var res = [\"\\u250C\".concat('─'.repeat(width + 2), \"\\u2510\")];\n for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {\n var line = lines_1[_i];\n res.push(\"\\u2502 \".concat(line.padEnd(width), \" \\u2502\"));\n }\n res.push(\"\\u2514\".concat('─'.repeat(width + 2), \"\\u2518\"));\n return res.join('\\n');\n};\n\nvar simpleUpdateNotifier = function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var latestVersion, err_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!args.alwaysRun &&\n (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript))) {\n if (args.debug) {\n console.error('Opting out of running simpleUpdateNotifier()');\n }\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, hasNewVersion(args)];\n case 2:\n latestVersion = _a.sent();\n if (latestVersion) {\n console.error(borderedText(\"New version of \".concat(args.pkg.name, \" available!\\nCurrent Version: \").concat(args.pkg.version, \"\\nLatest Version: \").concat(latestVersion)));\n }\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n // Catch any network errors or cache writing errors so module doesn't cause a crash\n if (args.debug && err_1 instanceof Error) {\n console.error('Unexpected error in simpleUpdateNotifier():', err_1);\n }\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n}); };\n\nmodule.exports = simpleUpdateNotifier;\n","function toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\n\nfunction toVal(out, key, val, opts) {\n\tvar x, old=out[key], nxt=(\n\t\t!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))\n\t\t: typeof val === 'boolean' ? val\n\t\t: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))\n\t\t: (x = +val,x * 0 === 0) ? x : val\n\t);\n\tout[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);\n}\n\nexport default function (args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\n\tvar k, arr, arg, name, val, out={ _:[] };\n\tvar i=0, j=0, idx=0, len=args.length;\n\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\n\tif (alibi) {\n\t\tfor (k in opts.alias) {\n\t\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i=opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\n\tfor (i=opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tname = typeof opts.default[k];\n\t\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\t\tif (opts[name] !== void 0) {\n\t\t\t\topts[name].push(k);\n\t\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t\topts[name].push(arr[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\n\tfor (i=0; i < len; i++) {\n\t\targ = args[i];\n\n\t\tif (arg === '--') {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\n\t\tfor (j=0; j < arg.length; j++) {\n\t\t\tif (arg.charCodeAt(j) !== 45) break; // \"-\"\n\t\t}\n\n\t\tif (j === 0) {\n\t\t\tout._.push(arg);\n\t\t} else if (arg.substring(j, j + 3) === 'no-') {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) {\n\t\t\t\treturn opts.unknown(arg);\n\t\t\t}\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx=j+1; idx < arg.length; idx++) {\n\t\t\t\tif (arg.charCodeAt(idx) === 61) break; // \"=\"\n\t\t\t}\n\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);\n\t\t\tarr = (j === 2 ? [name] : name);\n\n\t\t\tfor (idx=0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);\n\t\t\t\ttoVal(out, name, (idx + 1 < arr.length) || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tif (out[k] === void 0) {\n\t\t\t\tout[k] = opts.default[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (alibi) {\n\t\tfor (k in out) {\n\t\t\tarr = opts.alias[k] || [];\n\t\t\twhile (arr.length > 0) {\n\t\t\t\tout[arr.shift()] = out[k];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n","import { promises } from \"fs\";\nimport { execRoot } from \"admina\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { sourceRC } from \"envosman\";\nconst { appendFile } = promises;\n/**\n * Update the alternatives for a package\n * @param name The name of the package\n * @param path The path to the binary\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function updateAptAlternatives(name, path, priority = 40) {\n await execRoot(\"update-alternatives\", [\"--install\", `/usr/bin/${name}`, name, path, priority.toString()]);\n}\n/**\n * Add the update-alternatives command to the rc file\n * @param name The name of the package\n * @param path The path to the binary\n * @param rcOptions The options for the rc file to add the update-alternatives command to\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function addUpdateAlternativesToRc(name, path, rcOptions, priority = 40) {\n if (GITHUB_ACTIONS) {\n await updateAptAlternatives(name, path, priority);\n }\n else {\n await sourceRC(rcOptions);\n await appendFile(rcOptions.rcPath, `\\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${name} ${name} ${path} ${priority}; fi\\n`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWx0ZXJuYXRpdmVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FsdGVybmF0aXZlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sSUFBSSxDQUFBO0FBQzdCLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDakMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBRW5DLE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFFL0I7Ozs7O0dBS0c7QUFDSCxNQUFNLENBQUMsS0FBSyxVQUFVLHFCQUFxQixDQUFDLElBQVksRUFBRSxJQUFZLEVBQUUsV0FBbUIsRUFBRTtJQUMzRixNQUFNLFFBQVEsQ0FBQyxxQkFBcUIsRUFBRSxDQUFDLFdBQVcsRUFBRSxZQUFZLElBQUksRUFBRSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsUUFBUSxDQUFDLFFBQVEsRUFBRSxDQUFDLENBQUMsQ0FBQTtBQUMzRyxDQUFDO0FBRUQ7Ozs7OztHQU1HO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUFBVSx5QkFBeUIsQ0FDN0MsSUFBWSxFQUNaLElBQVksRUFDWixTQUFvQixFQUNwQixXQUFtQixFQUFFO0lBRXJCLElBQUksY0FBYyxFQUF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FsdGVybmF0aXZlcyAtLWluc3RhbGwgL3Vzci9iaW4vJHtuYW1lfSAke25hbWV9ICR7cGF0aH0gJHtwcmlvcml0eX07IGZpXFxuYCxcbiAgICApXG4gIH1cbn1cbiJdfQ==","/**\n * Get the environment variables to use for the apt command\n * @param apt The apt command to use\n * @private Used internally\n */\nexport function getAptEnv(apt) {\n const env = { ...process.env, DEBIAN_FRONTEND: \"noninteractive\" };\n if (apt === \"nala\") {\n // if LANG/LC_ALL is not set, enable utf8 otherwise nala fails because of ASCII encoding\n if (env.LANG === undefined) {\n env.LANG = \"C.UTF-8\";\n }\n if (env.LC_ALL === undefined) {\n env.LC_ALL = \"C.UTF-8\";\n }\n }\n return env;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFFSCxNQUFNLFVBQVUsU0FBUyxDQUFDLEdBQVc7SUFDbkMsTUFBTSxHQUFHLEdBQXNCLEVBQUUsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLGVBQWUsRUFBRSxnQkFBZ0IsRUFBRSxDQUFBO0lBRXBGLElBQUksR0FBRyxLQUFLLE1BQU0sRUFBRSxDQUFDO1FBQ25CLHdGQUF3RjtRQUN4RixJQUFJLEdBQUcsQ0FBQyxJQUFJLEtBQUssU0FBUyxFQUFFLENBQUM7WUFDM0IsR0FBRyxDQUFDLElBQUksR0FBRyxTQUFTLENBQUE7UUFDdEIsQ0FBQztRQUNELElBQUksR0FBRyxDQUFDLE1BQU0sS0FBSyxTQUFTLEVBQUUsQ0FBQztZQUM3QixHQUFHLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQTtRQUN4QixDQUFDO0lBQ0gsQ0FBQztJQUVELE9BQU8sR0FBRyxDQUFBO0FBQ1osQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2V0IHRoZSBlbnZpcm9ubWVudCB2YXJpYWJsZXMgdG8gdXNlIGZvciB0aGUgYXB0IGNvbW1hbmRcbiAqIEBwYXJhbSBhcHQgVGhlIGFwdCBjb21tYW5kIHRvIHVzZVxuICogQHByaXZhdGUgVXNlZCBpbnRlcm5hbGx5XG4gKi9cblxuZXhwb3J0IGZ1bmN0aW9uIGdldEFwdEVudihhcHQ6IHN0cmluZykge1xuICBjb25zdCBlbnY6IE5vZGVKUy5Qcm9jZXNzRW52ID0geyAuLi5wcm9jZXNzLmVudiwgREVCSUFOX0ZST05URU5EOiBcIm5vbmludGVyYWN0aXZlXCIgfVxuXG4gIGlmIChhcHQgPT09IFwibmFsYVwiKSB7XG4gICAgLy8gaWYgTEFORy9MQ19BTEwgaXMgbm90IHNldCwgZW5hYmxlIHV0Zjggb3RoZXJ3aXNlIG5hbGEgZmFpbHMgYmVjYXVzZSBvZiBBU0NJSSBlbmNvZGluZ1xuICAgIGlmIChlbnYuTEFORyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICBlbnYuTEFORyA9IFwiQy5VVEYtOFwiXG4gICAgfVxuICAgIGlmIChlbnYuTENfQUxMID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGVudi5MQ19BTEwgPSBcIkMuVVRGLThcIlxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBlbnZcbn1cbiJdfQ==","import which from \"which\";\n/**\n * Check if nala is installed\n */\nexport function hasNala() {\n return which.sync(\"nala\", { nothrow: true }) !== null;\n}\n/**\n * Get the apt command to use\n * If nala is installed, use that, otherwise use apt-get\n */\nexport function getApt() {\n let apt;\n if (hasNala()) {\n apt = \"nala\";\n }\n else {\n apt = \"apt-get\";\n }\n return apt;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWFwdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJz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xuICAgIGFwdCA9IFwiYXB0LWdldFwiXG4gIH1cbiAgcmV0dXJuIGFwdFxufVxuIl19","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","import { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\n/**\n * Check if a package is installed\n * @param pack The package to check\n * @returns `true` if the package is installed, `false` otherwise\n */\nexport async function isAptPackInstalled(pack) {\n try {\n // check if a package is installed\n const { stdout } = await execa(\"dpkg\", [\"-s\", pack], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains a line that starts with \"Status: install ok installed\"\n return lines.some((line) => line.startsWith(\"Status: install ok installed\"));\n }\n catch {\n return false;\n }\n}\n/**\n * Check if a package matching a regexp is installed\n * @param regexp The regexp to check\n * @returns `true` if a package is installed, `false` otherwise\n */\nexport async function isAptPackRegexInstalled(regexp) {\n try {\n // check if a package matching the regexp is installed\n const { stdout } = await execa(\"dpkg\", [\"-l\", regexp], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains any lines that start with \"ii\"\n return lines.some((line) => line.startsWith(\"ii\"));\n }\n catch {\n return false;\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtaW5zdGFsbGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2lzLWluc3RhbGxlZC50cyJdLCJuYW1lcyI6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bzogXCJwaXBlXCIgfSlcbiAgICBpZiAodHlwZW9mIHN0ZG91dCAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgcmV0dXJuIGZhbHNlXG4gICAgfVxuICAgIGNvbnN0IGxpbmVzID0gc3Rkb3V0LnNwbGl0KFwiXFxuXCIpXG4gICAgLy8gY2hlY2sgaWYgdGhlIG91dHB1dCBjb250YWlucyBhbnkgbGluZXMgdGhhdCBzdGFydCB3aXRoIFwiaWlcIlxuICAgIHJldHVybiBsaW5lcy5zb21lKChsaW5lKSA9PiBsaW5lLnN0YXJ0c1dpdGgoXCJpaVwiKSlcbiAgfSBjYXRjaCB7XG4gICAgcmV0dXJuIGZhbHNlXG4gIH1cbn1cbiJdfQ==","import { warning } from \"ci-log\";\nimport escapeRegex from \"escape-string-regexp\";\nimport { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized, updatedRepos } from \"./update.js\";\n/**\n * The type of apt package to install\n */\nexport var AptPackageType;\n(function (AptPackageType) {\n AptPackageType[AptPackageType[\"NameDashVersion\"] = 0] = \"NameDashVersion\";\n AptPackageType[AptPackageType[\"NameEqualsVersion\"] = 1] = \"NameEqualsVersion\";\n AptPackageType[AptPackageType[\"Name\"] = 2] = \"Name\";\n AptPackageType[AptPackageType[\"None\"] = 3] = \"None\";\n})(AptPackageType || (AptPackageType = {}));\n/**\n * Filter out the packages that are already installed and qualify the packages into a full package name/version\n */\nexport async function filterAndQualifyAptPackages(packages, apt = getApt()) {\n return (await Promise.all(packages.map((pack) => qualifiedNeededAptPackage(pack, apt))))\n .filter((pack) => pack !== undefined);\n}\n/**\n * Qualify the package into full package name/version.\n * If the package is not installed, return the full package name/version.\n * If the package is already installed, return undefined\n */\nexport async function qualifiedNeededAptPackage(pack, apt = getApt()) {\n // Qualify the package into full package name/version\n const qualified = await getAptArg(apt, pack.name, pack.version);\n // filter out the package that are already installed\n return (await isAptPackInstalled(qualified)) ? undefined : qualified;\n}\nasync function aptPackageType(apt, name, version) {\n if (version !== undefined && version !== \"\") {\n const { stdout } = await execa(\"apt-cache\", [\n \"search\",\n \"--names-only\",\n `^${escapeRegex(name)}-${escapeRegex(version)}$`,\n ], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (stdout.trim() !== \"\") {\n return AptPackageType.NameDashVersion;\n }\n try {\n // check if apt-get show can find the version\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"apt-cache\", [\"show\", `${name}=${version}`], { env: getAptEnv(apt) });\n if (stdout.trim() === \"\") {\n return AptPackageType.NameEqualsVersion;\n }\n }\n catch {\n // ignore\n }\n }\n try {\n const { stdout: showStdout } = await execa(\"apt-cache\", [\"show\", name], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (showStdout.trim() !== \"\") {\n return AptPackageType.Name;\n }\n }\n catch {\n // ignore\n }\n // If apt-cache fails, update the repos and try again\n if (!updatedRepos) {\n updateAptReposMemoized(apt);\n return aptPackageType(apt, name, version);\n }\n return AptPackageType.None;\n}\nasync function getAptArg(apt, name, version) {\n const package_type = await aptPackageType(apt, name, version);\n switch (package_type) {\n case AptPackageType.NameDashVersion:\n return `${name}-${version}`;\n case AptPackageType.NameEqualsVersion:\n return `${name}=${version}`;\n case AptPackageType.Name:\n if (version !== undefined && version !== \"\") {\n warning(`Could not find package ${name} with version ${version}. Installing the latest version.`);\n }\n return name;\n default:\n throw new Error(`Could not find package ${name} ${version ?? \"\"}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVhbGlmeS1pbnN0YWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3F1YWxpZnktaW5zdGFsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQU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YW1lLCB2ZXJzaW9uKVxuICB9XG5cbiAgcmV0dXJuIEFwdFBhY2thZ2VUeXBlLk5vbmVcbn1cblxuYXN5bmMgZnVuY3Rpb24gZ2V0QXB0QXJnKGFwdDogc3RyaW5nLCBuYW1lOiBzdHJpbmcsIHZlcnNpb246IHN0cmluZyB8IHVuZGVmaW5lZCkge1xuICBjb25zdCBwYWNrYWdlX3R5cGUgPSBhd2FpdCBhcHRQYWNrYWdlVHlwZShhcHQsIG5hbWUsIHZlcnNpb24pXG4gIHN3aXRjaCAocGFja2FnZV90eXBlKSB7XG4gICAgY2FzZSBBcHRQYWNrYWdlVHlwZS5OYW1lRGFzaFZlcnNpb246XG4gICAgICByZXR1cm4gYCR7bmFtZX0tJHt2ZXJzaW9ufWBcbiAgICBjYXNlIEFwdFBhY2thZ2VUeXBlLk5hbWVFcXVhbHNWZXJzaW9uOlxuICAgICAgcmV0dXJuIGAke25hbWV9PSR7dmVyc2lvbn1gXG4gICAgY2FzZSBBcHRQYWNrYWdlVHlwZS5OYW1lOlxuICAgICAgaWYgKHZlcnNpb24gIT09IHVuZGVmaW5lZCAmJiB2ZXJzaW9uICE9PSBcIlwiKSB7XG4gICAgICAgIHdhcm5pbmcoYENvdWxkIG5vdCBmaW5kIHBhY2thZ2UgJHtuYW1lfSB3aXRoIHZlcnNpb24gJHt2ZXJzaW9ufS4gSW5zdGFsbGluZyB0aGUgbGF0ZXN0IHZlcnNpb24uYClcbiAgICAgIH1cbiAgICAgIHJldHVybiBuYW1lXG4gICAgZGVmYXVsdDpcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ291bGQgbm90IGZpbmQgcGFja2FnZSAke25hbWV9ICR7dmVyc2lvbiA/PyBcIlwifWApXG4gIH1cbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { addAptKey } from \"./apt-key.js\";\nimport { addAptRepository } from \"./apt-repository.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { filterAndQualifyAptPackages } from \"./qualify-install.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nconst retryErrors = [\n \"E: Could not get lock\",\n \"dpkg: error processing archive\",\n \"dpkg: error: dpkg status database is locked by another process\",\n];\n/**\n * Install a package using apt\n *\n * @param packages The packages to install (name, and optional info like version and repositories)\n * @param update Whether to update the package list before installing (Defaults to `false`)\n *\n * @returns The installation information\n *\n * @example\n * ```ts\n * await installAptPack([{ name: \"ca-certificates\" }, { name: \"gnupg\" }])\n * ```\n *\n * @example\n * ```ts\n await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n * ```\n */\nexport async function installAptPack(packages, update = false) {\n try {\n const apt = getApt();\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via ${apt}`);\n }\n // Update the repos if needed\n if (update) {\n updateAptReposMemoized(apt);\n }\n // Add the repos if needed\n await addRepositories(apt, packages);\n const needToInstall = await filterAndQualifyAptPackages(packages, apt);\n if (needToInstall.length === 0) {\n info(\"All packages are already installed\");\n return { binDir: \"/usr/bin/\" };\n }\n // Initialize apt if needed\n await initAptMemoized(apt);\n try {\n // Add the keys if needed\n await addAptKeys(packages);\n // Install\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", ...needToInstall], {\n ...defaultExecOptions,\n env: getAptEnv(apt),\n });\n }\n catch (err) {\n if (isExecaError(err)) {\n if (retryErrors.some((error) => typeof err.stderr === \"string\" && err.stderr.includes(error))) {\n warning(`Failed to install packages ${needToInstall}. Retrying...`);\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", \"-o\", aptTimeout, ...needToInstall], { ...defaultExecOptions, env: getAptEnv(apt) });\n }\n }\n else {\n throw err;\n }\n }\n return { binDir: \"/usr/bin/\" };\n }\n catch (err) {\n const msg = err instanceof Error ? `${err.message}\\n${err.stack}` : String(err);\n throw new Error(`Failed to install apt packages: ${msg}`);\n }\n}\nasync function addRepositories(apt, packages) {\n const allRepositories = [...new Set(packages.flatMap((pack) => pack.repository ?? []))];\n await Promise.all(allRepositories.map((repo) => addAptRepository(repo, apt)));\n}\nasync function addAptKeys(packages) {\n await Promise.all(packages.map(async (pack) => {\n if (pack.key !== undefined) {\n await addAptKey(pack.key);\n }\n }));\n}\nfunction isExecaError(err) {\n return typeof err.stderr === \"string\";\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnN0YWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDekQsT0FBTyxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFFdEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUN4QyxPQUFPLEVBQXlCLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUMvRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQTtBQUN0RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDN0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUNyQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQy9DLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLHNCQUFzQixDQUFBO0FBQ2xFLE9BQU8sRUFBRSx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IHBhY2thZ2VzOiBBcHRQYWNrYWdlW10pIHtcbiAgY29uc3QgYWxsUmVwb3NpdG9yaWVzID0gWy4uLm5ldyBTZXQocGFja2FnZXMuZmxhdE1hcCgocGFjaykgPT4gcGFjay5yZXBvc2l0b3J5ID8/IFtdKSldXG4gIGF3YWl0IFByb21pc2UuYWxsKGFsbFJlcG9zaXRvcmllcy5tYXAoKHJlcG8pID0+IGFkZEFwdFJlcG9zaXRvcnkocmVwbywgYXB0KSkpXG59XG5cbmFzeW5jIGZ1bmN0aW9uIGFkZEFwdEtleXMocGFja2FnZXM6IEFwdFBhY2thZ2VbXSkge1xuICBhd2FpdCBQcm9taXNlLmFsbChwYWNrYWdlcy5tYXAoYXN5bmMgKHBhY2spID0+IHtcbiAgICBpZiAocGFjay5rZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgYXdhaXQgYWRkQXB0S2V5KHBhY2sua2V5KVxuICAgIH1cbiAgfSkpXG59XG5cbmZ1bmN0aW9uIGlzRXhlY2FFcnJvcihlcnI6IHVua25vd24pOiBlcnIgaXMgRXhlY2FFcnJvciB7XG4gIHJldHVybiB0eXBlb2YgKGVyciBhcyBFeGVjYUVycm9yKS5zdGRlcnIgPT09IFwic3RyaW5nXCJcbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nexport async function addAptRepository(repo, apt = getApt()) {\n await initAptMemoized(apt);\n await installAddAptRepo(apt);\n execRootSync(\"add-apt-repository\", [\"-y\", \"--no-update\", repo], { ...defaultExecOptions, env: getAptEnv(apt) });\n // Update the repos\n updateAptReposMemoized.clear(); // ensure update is called\n updateAptReposMemoized(apt);\n}\nexport async function installAddAptRepo(apt) {\n if (await isAptPackInstalled(\"software-properties-common\")) {\n return;\n }\n execRootSync(apt, [\"install\", \"-y\", \"--fix-broken\", \"-o\", aptTimeout, \"software-properties-common\"], { ...defaultExecOptions, env: getAptEnv(apt) });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LXJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXB0LXJlcG9zaXRvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUM3QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3JDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxlQUFlLENBQUE7QUFDL0MsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFDdEQsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sYUFBYSxDQUFBO0FBRXBELE1BQU0sQ0FBQyxLQUFLLFVBQVUsZ0JBQWdCLENBQUMsSUFBWSxFQUFFLEdBQUcsR0FBRyxNQUFNLEVBQUU7SUFDakUsTUFBTSxlQUFlLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDMUIsTUFBTSxpQkFBaUIsQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUM1QixZQUFZLENBQUMsb0JBQW9CLEVBQUUsQ0FBQyxJQUFJLEVBQUUsYUFBYSxFQUFFLElBQUksQ0FBQyxFQUFFLEVBQUUsR0FBRyxrQkFBa0IsRUFBRSxHQUFHLEVBQUUsU0FBUyxDQUFDLEdBQUcsQ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iXG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBhZGRBcHRSZXBvc2l0b3J5KHJlcG86IHN0cmluZywgYXB0ID0gZ2V0QXB0KCkpIHtcbiAgYXdhaXQgaW5pdEFwdE1lbW9pemVkKGFwdClcbiAgYXdhaXQgaW5zdGFsbEFkZEFwdFJlcG8oYXB0KVxuICBleGVjUm9vdFN5bmMoXCJhZGQtYXB0LXJlcG9zaXRvcnlcIiwgW1wiLXlcIiwgXCItLW5vLXVwZGF0ZVwiLCByZXBvXSwgeyAuLi5kZWZhdWx0RXhlY09wdGlvbnMsIGVudjogZ2V0QXB0RW52KGFwdCkgfSlcblxuICAvLyBVcGRhdGUgdGhlIHJlcG9zXG4gIHVwZGF0ZUFwdFJlcG9zTWVtb2l6ZWQuY2xlYXIoKSAvLyBlbnN1cmUgdXBkYXRlIGlzIGNhbGxlZFxuICB1cGRhdGVBcHRSZXBvc01lbW9pemVkKGFwdClcbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGluc3RhbGxBZGRBcHRSZXBvKGFwdDogc3RyaW5nKSB7XG4gIGlmIChhd2FpdCBpc0FwdFBhY2tJbnN0YWxsZWQoXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiKSkge1xuICAgIHJldHVyblxuICB9XG4gIGV4ZWNSb290U3luYyhcbiAgICBhcHQsXG4gICAgW1wiaW5zdGFsbFwiLCBcIi15XCIsIFwiLS1maXgtYnJva2VuXCIsIFwiLW9cIiwgYXB0VGltZW91dCwgXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiXSxcbiAgICB7IC4uLmRlZmF1bHRFeGVjT3B0aW9ucywgZW52OiBnZXRBcHRFbnYoYXB0KSB9LFxuICApXG59XG4iXX0=","import { tmpdir } from \"os\";\nimport { join } from \"path\";\nimport { execRoot, execRootSync } from \"admina\";\nimport { warning } from \"ci-log\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { pathExists } from \"path-exists\";\nimport { installAptPack } from \"./install.js\";\n/**\n * Add an apt key\n * @param options The options for adding the key\n * @returns The file name of the key that was added or `undefined` if it failed\n *\n * @example\n * ```ts\n * await addAptKey({ key: \"3B4FE6ACC0B21F32\" fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n *\n * @example\n * ```ts\n * await addAptKey({ keyUrl: \"https://bazel.build/bazel-release.pub.gpg\", fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n */\nexport function addAptKey(options) {\n if (\"keyUrl\" in options) {\n return addAptKeyViaURL(options);\n }\n else {\n return addAptKeyViaServer(options);\n }\n}\nexport const defaultKeyStorePath = \"/etc/apt/trusted.gpg.d\";\nexport const defaultKeyServer = \"keyserver.ubuntu.com\";\n/**\n * Add an apt key via a keyserver\n * @returns The file name of the key that was added or `undefined` if it failed\n */\nexport async function addAptKeyViaServer({ key, keyServer = defaultKeyServer, fileName, keyStorePath = defaultKeyServer }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await execRoot(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--keyserver\",\n keyServer,\n \"--recv-keys\",\n key,\n ]);\n await execRoot(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via server ${keyServer}: ${err}`);\n return undefined;\n }\n}\n/**\n * Add an apt key via a download\n * @param options The options for adding the key\n * @returns The file name of the key that was added\n */\nexport async function addAptKeyViaURL({ keyUrl, fileName, keyStorePath = defaultKeyStorePath }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dlPath = join(tmpdir(), fileName);\n const dl = new DownloaderHelper(keyUrl, tmpdir(), { fileName });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download ${keyUrl}: ${err}`);\n });\n await dl.start();\n execRootSync(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--import\",\n dlPath,\n ]);\n execRootSync(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via download ${keyUrl}: ${err}`);\n return undefined;\n }\n}\nfunction initGpg() {\n execRootSync(\"gpg\", [\"-k\"]);\n}\nfunction assertGpgFileName(fileName) {\n if (!fileName.endsWith(\".gpg\")) {\n throw new Error(`Key file name must end with .gpg: ${fileName}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWtleS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQta2V5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDM0IsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUMzQixPQUFPLEVBQUUsUUFBUSxFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUMvQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ3pELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxhQUFhLENBQUE7QUFDeEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUk3Qzs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUNILE1BQU0sVUFBVSxTQUFTLENBQUMsT0FBeUI7SUFDakQsSUFBSSxRQUFRLElBQUksT0FBTyxFQUFFLENBQUM7UUFDeEIsT0FBTyxlQUFlLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDakMsQ0FBQztT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pbGVQYXRoXSlcbiAgICB9XG4gICAgcmV0dXJuIGZpbGVQYXRoXG4gIH0gY2F0Y2ggKGVycikge1xuICAgIHdhcm5pbmcoYEZhaWxlZCB0byBhZGQgYXB0IGtleSB2aWEgZG93bmxvYWQgJHtrZXlVcmx9OiAke2Vycn1gKVxuICAgIHJldHVybiB1bmRlZmluZWRcbiAgfVxufVxuXG5mdW5jdGlvbiBpbml0R3BnKCkge1xuICBleGVjUm9vdFN5bmMoXCJncGdcIiwgW1wiLWtcIl0pXG59XG5cbmZ1bmN0aW9uIGFzc2VydEdwZ0ZpbGVOYW1lKGZpbGVOYW1lOiBzdHJpbmcpIHtcbiAgaWYgKCFmaWxlTmFtZS5lbmRzV2l0aChcIi5ncGdcIikpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYEtleSBmaWxlIG5hbWUgbXVzdCBlbmQgd2l0aCAuZ3BnOiAke2ZpbGVOYW1lfWApXG4gIH1cbn1cbiJdfQ==","import { tmpdir } from \"os\";\nimport { dirname, join } from \"path\";\nimport { addPath } from \"envosman\";\nimport { execaSync } from \"execa\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { installAptPack } from \"setup-apt\";\nimport which from \"which\";\n/* eslint-disable require-atomic-updates */\nlet binDir;\nexport async function setupBrew(options = {}) {\n // brew is only available on darwin and linux\n if (![\"darwin\", \"linux\"].includes(process.platform)) {\n return undefined;\n }\n // check if the function has already been called\n if (typeof binDir === \"string\") {\n return { binDir };\n }\n // check if brew is already installed\n const maybeBinDir = await which(\"brew\", { nothrow: true });\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir);\n return { binDir };\n }\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dl = new DownloaderHelper(\"https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh\", tmpdir(), {\n fileName: \"install-brew.sh\",\n });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the brew installer script: ${err}`);\n });\n await dl.start();\n // brew installation is not thread-safe\n execaSync(\"/bin/bash\", [dl.getDownloadPath()], {\n stdio: \"inherit\",\n env: {\n NONINTERACTIVE: \"1\",\n },\n });\n // add the bin directory to the PATH\n binDir = getBrewBinDir();\n await addPath(binDir, options.rcOptions);\n return { binDir };\n}\n/**\n * Get the path to the bin directory of brew\n * @returns {string} The path where brew binary is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewBinDir() {\n return join(getBrewDir(), \"bin\");\n}\n/**\n * Get the path where brew is installed\n * @returns {string} The path where brew is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewDir() {\n if (process.platform === \"darwin\") {\n if (process.arch === \"arm64\") {\n return \"/opt/homebrew\";\n }\n else {\n return \"/usr/local\";\n }\n }\n if (process.platform === \"linux\") {\n return \"/home/linuxbrew/.linuxbrew\";\n }\n throw new Error(\"Unsupported platform for brew\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnN0YWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDM0IsT0FBTyxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxNQUFNLENBQUE7QUFDcEMsT0FBTyxFQUF1QixPQUFPLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFDdkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUNqQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sV0FBVyxDQUFBO0FBQzFDLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUd6QiwyQ0FBMkM7QUFDM0MsS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HBhdGggd2hlcmUgYnJldyBpcyBpbnN0YWxsZWRcbiAqIEByZXR1cm5zIHtzdHJpbmd9IFRoZSBwYXRoIHdoZXJlIGJyZXcgaXMgaW5zdGFsbGVkXG4gKlxuICogQmFzZWQgb24gdGhlIGluc3RhbGxhdGlvbiBzY3JpcHQgZnJvbSBodHRwczovL2JyZXcuc2hcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEJyZXdEaXIoKSB7XG4gIGlmIChwcm9jZXNzLnBsYXRmb3JtID09PSBcImRhcndpblwiKSB7XG4gICAgaWYgKHByb2Nlc3MuYXJjaCA9PT0gXCJhcm02NFwiKSB7XG4gICAgICByZXR1cm4gXCIvb3B0L2hvbWVicmV3XCJcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIFwiL3Vzci9sb2NhbFwiXG4gICAgfVxuICB9XG5cbiAgaWYgKHByb2Nlc3MucGxhdGZvcm0gPT09IFwibGludXhcIikge1xuICAgIHJldHVybiBcIi9ob21lL2xpbnV4YnJldy8ubGludXhicmV3XCJcbiAgfVxuXG4gIHRocm93IG5ldyBFcnJvcihcIlVuc3VwcG9ydGVkIHBsYXRmb3JtIGZvciBicmV3XCIpXG59XG4iXX0=","import { join } from \"path\";\nimport { info } from \"ci-log\";\nimport { execaSync } from \"execa\";\nimport which from \"which\";\nimport { getBrewBinDir, setupBrew } from \"./install.js\";\n/* eslint-disable require-atomic-updates */\nlet hasBrew = false;\n/** A function that installs a package using brew\n *\n * @param name The name of the package\n * @param version The version of the package (optional)\n * @param options The options for installing the package\n *\n * @returns The installation information\n */\nexport async function installBrewPack(name, version, givenOptions = {}) {\n const options = {\n overwrite: true,\n cask: false,\n args: [],\n ...givenOptions,\n };\n info(`Installing ${name} ${version ?? \"\"} via brew`);\n if (!hasBrew || which.sync(\"brew\", { nothrow: true }) === null) {\n await setupBrew();\n hasBrew = true;\n }\n const binDir = getBrewBinDir();\n const brewPath = join(binDir, \"brew\");\n // Args\n const args = [\n \"install\",\n (version !== undefined && version !== \"\") ? `${name}@${version}` : name,\n ];\n if (options.overwrite) {\n args.push(\"--overwrite\");\n }\n if (options.cask) {\n args.push(\"--cask\");\n }\n // brew is not thread-safe\n execaSync(brewPath, args, { stdio: \"inherit\" });\n return { binDir };\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC1wYWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2luc3RhbGwtcGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUNqQyxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekIsT0FBTyxFQUFFLGFBQWEsRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFdkQsMkNBQTJDO0FBQzNDLElBQUksT0FBTyxHQUFHLEtBQUssQ0FBQTtBQVduQjs7Ozs7OztHQU9HO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUFBVSxlQUFlLENBQ25DLElBQVksRUFDWixPQUFnQixFQUNoQixlQUFnQyxFQUFFO0lBRWxDLE1BQU0sT0FBTyxHQUFHO1FBQ2QsU0FBUyxFQUFFLElBQUk7UUFDZixJQUFJLEVBQUUsS0FBSztRQUNYLElBQUksRUFBRSxFQUFFO1FBQ1IsR0FBRyxZQUFZO0tBQ2hCLENBQUE7SUFFRCxJQUFJLENBQUMsY0FBYyxJQUFJLElBQUksT0FBTyxJQUFJLEVBQUUsV0FBVyxDQUFDLENBQUE7SUFFcEQsSUFBSSxDQUFDLE9BQU8sSUFBSSxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFB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= undefined\n\nexport function hasDnf(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (hasDnfCache === undefined) {\n hasDnfCache = which.sync(\"dnf\", { nothrow: true }) !== null\n }\n\n return hasDnfCache\n}\n","import which from \"which\"\n\nlet isArchCache: undefined | boolean = undefined\n\nexport function isArch(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isArchCache === undefined) {\n // detect arch by checking if pacman exists\n isArchCache = which.sync(\"pacman\", { nothrow: true }) !== null\n }\n\n return isArchCache\n}\n","import which from \"which\"\n\nlet isUbuntuCache: undefined | boolean = undefined\n\nexport function isUbuntu(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isUbuntuCache === undefined) {\n const apt = \"apt-get\"\n isUbuntuCache = which.sync(apt, { nothrow: true }) !== null\n }\n\n return isUbuntuCache\n}\n","import { dirname } from \"path\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet binDir: string | undefined\n\nexport async function setupChocolatey(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _version: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setupDir: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _arch: string,\n): Promise {\n if (process.platform !== \"win32\") {\n return undefined\n }\n\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"choco\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n let powershell = \"powershell.exe\"\n const maybePowerShell = which.sync(`${process.env.SystemRoot}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, {\n nothrow: true,\n })\n if (maybePowerShell !== null) {\n powershell = maybePowerShell\n }\n\n // https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe\n execaSync(\n powershell,\n [\n \"-NoProfile\",\n \"-InputFormat\",\n \"None\",\n \"-ExecutionPolicy\",\n \"Bypass\",\n \"-Command\",\n \"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\",\n ],\n { stdio: \"inherit\" },\n )\n\n const chocoPath = `${process.env.ALLUSERSPROFILE}\\\\chocolatey\\\\bin`\n await addPath(chocoPath, rcOptions)\n\n const maybeChoco = which.sync(\"choco\", { nothrow: true })\n if (maybeChoco !== null) {\n binDir = dirname(maybeChoco)\n } else {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n\n if (await pathExists(binDir)) {\n return { binDir }\n }\n return undefined\n}\n","/* eslint-disable require-atomic-updates */\nimport { info } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport which from \"which\"\nimport { setupChocolatey } from \"../../chocolatey/chocolatey.js\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\nlet hasChoco = false\n\n/** A function that installs a package using choco */\nexport async function setupChocoPack(name: string, version?: string, args: string[] = []): Promise {\n info(`Installing ${name} ${version ?? \"\"} via chocolatey`)\n\n if (!hasChoco || which.sync(\"choco\", { nothrow: true }) === null) {\n await setupChocolatey(\"\", \"\", process.arch)\n hasChoco = true\n }\n\n // https://github.com/jberezanski/ChocolateyPackages/issues/97#issuecomment-986825694\n const PATH = process.env.PATH\n const env = { ...process.env }\n env.TMP = undefined\n env.TEMP = undefined\n env.Path = undefined\n env.PATH = PATH\n\n if (version !== undefined && version !== \"\") {\n execaSync(\"choco\", [\"install\", \"-y\", name, `--version=${version}`, ...args], {\n env,\n extendEnv: false,\n stdio: \"inherit\",\n })\n } else {\n try {\n execaSync(\"choco\", [\"install\", \"-y\", name, ...args], { env, extendEnv: false, stdio: \"inherit\" })\n } catch (err) {\n // if the package requires a reboot, downgrade the error to a notice\n if ((err as Error).message.includes(\"exit code 3010\")) {\n info(`${name} might require a reboot for the completion of the installation.`)\n } else {\n throw err\n }\n }\n }\n\n const binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n","import { execRootSync } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\ntype DnfPackage = {\n name: string\n version?: string\n}\n\n/** A function that installs a package using dnf */\nexport async function setupDnfPack(packages: DnfPackage[]): Promise {\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via dnf`)\n }\n\n const dnfArgs = await Promise.all(packages.map((pack) => getDnfArg(pack.name, pack.version)))\n execRootSync(\"dnf\", [\"-y\", \"install\", ...dnfArgs])\n\n return { binDir: \"/usr/bin/\" }\n}\n\nasync function getDnfArg(name: string, version: string | undefined) {\n if (version !== undefined && version !== \"\") {\n // check if name-version is available\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}-${version}`])\n\n if (stdout.trim() !== \"\") {\n return `${name}-${version}`\n } else {\n // try with ${name}${version}\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}${version}`])\n if (stdout.trim() !== \"\") {\n return `${name}${version}`\n }\n\n warning(`Failed to install ${name} ${version} via dnf, trying without version`)\n }\n }\n return name\n}\n","import { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRootSync, isRoot } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa, execaSync } from \"execa\"\nimport which from \"which\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet didUpdate: boolean = false\nlet didInit: boolean = false\n\n/** A function that installs a package using pacman */\nexport async function setupPacmanPack(name: string, version?: string, aur?: string): Promise {\n info(`Installing ${name} ${version ?? \"\"} via pacman`)\n\n const pacman = \"pacman\"\n\n if (aur === \"yay\") {\n setupYay()\n }\n\n // yay can't run as root, so skip update\n if (!didUpdate && aur !== \"yay\") {\n execRootSync(pacman, [\"-Sy\", \"--noconfirm\"])\n didUpdate = true\n }\n\n // install base-devel\n if (!didInit && aur !== \"yay\") {\n execRootSync(pacman, [\"-S\", \"--noconfirm\", \"base-devel\"])\n didInit = true\n }\n\n const runInstall = (arg: string) => {\n if (aur === \"yay\") {\n // run yay as non-root to fix ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.\n if (isRoot() && createdBuilderUser) {\n // Run yay as builder user\n return execRootSync(\"su\", [\"-\", \"builder\", \"-c\", `yay -S --noconfirm ${arg}`])\n } else {\n return execaSync(aur, [\"-S\", \"--noconfirm\", arg])\n }\n }\n return execRootSync(aur ?? pacman, [\"-S\", \"--noconfirm\", arg])\n }\n\n if (version !== undefined && version !== \"\") {\n // check if version is available\n const availableVersions = await availablePacmanVersions(pacman, name)\n if (availableVersions.includes(version)) {\n // try different version formats\n try {\n runInstall(`${name}=${version}`)\n } catch {\n runInstall(`${name}${version}`)\n }\n } else {\n // try without version\n info(`Failed to install ${name} ${version} via pacman, trying without version`)\n runInstall(name)\n }\n } else {\n // version not specified, install latest\n runInstall(name)\n }\n\n return { binDir: \"/usr/bin/\" }\n}\n\nconst pacmanSiVersionRegex = /Version\\s*:\\s*(.*)/g\n\n/** Query pacman for available versions */\nasync function availablePacmanVersions(pacman: string, name: string) {\n const availableVersions = []\n try {\n const { stdout } = await execa(pacman, [\"-Si\", name])\n\n for (const match of stdout.matchAll(pacmanSiVersionRegex)) {\n availableVersions.push(match[1])\n }\n } catch (err) {\n warning(`Failed to get available versions for ${name}: ${err}`)\n }\n return availableVersions\n}\n\nlet createdBuilderUser = false\n\nfunction setupYay() {\n if (which.sync(\"yay\", { nothrow: true }) === null) {\n try {\n // Install prerequisites\n execRootSync(\"pacman\", [\"-S\", \"--noconfirm\", \"base-devel\", \"git\"])\n\n const yayBuildDir = join(tmpdir(), \"yay\")\n\n execRootSync(\"mkdir\", [\"-p\", yayBuildDir])\n\n if (isRoot()) {\n // Create a non-root user to build yay\n warning(\"Creating a non-root user to build yay\")\n execRootSync(\"useradd\", [\"-m\", \"-G\", \"wheel\", \"builder\"])\n execRootSync(\"passwd\", [\"-d\", \"builder\"])\n execRootSync(\"chown\", [\"-R\", \"builder:builder\", yayBuildDir])\n execRootSync(\"bash\", [\"-c\", `echo \"builder ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers`])\n createdBuilderUser = true\n\n // Clone the yay repository into a temporary directory\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `git clone https://aur.archlinux.org/yay.git ${yayBuildDir}`], {\n stdio: \"inherit\",\n })\n\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `cd ${yayBuildDir} && makepkg -si --noconfirm`], {\n stdio: \"inherit\",\n })\n } else {\n // Clone the yay repository into a temporary directory\n execaSync(\"git\", [\"clone\", \"https://aur.archlinux.org/yay.git\", yayBuildDir], {\n stdio: \"inherit\",\n cwd: tmpdir(),\n })\n\n // Build and install yay\n execaSync(\"makepkg\", [\"-si\", \"--noconfirm\"], {\n stdio: \"inherit\",\n cwd: yayBuildDir,\n })\n }\n\n // clean-up\n execaSync(\"rm\", [\"-rf\", yayBuildDir], { stdio: \"inherit\" })\n } catch (error) {\n throw new Error(`Failed to install yay: ${error}. Install yay manually and re-run the script.`)\n }\n }\n}\n","function e(e,a){return Object.keys(a).forEach((r=>{\"default\"===r||\"__esModule\"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get(){return a[r]}})})),e}function a(e,a,r,s){Object.defineProperty(e,a,{get:r,set:s,enumerable:!0,configurable:!0})}function r(e,a=!0){return a?u(e):u(e,x(e))}function s(e){return E(e).replace(RegExp(y(N)+\"$\"),\"\")}function t(e,a=\".exe\",r=\"\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function n(e,a){const r=x(e),s=`${a}${u(e,r)}${r}`;return h(l(e),s)}function i(e,a){const r=x(e),s=`${u(e,r)}${a}${r}`;return h(l(e),s)}function o(e,a=\".cmd\",r=\".sh\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function m(e){return\"win32\"===process.platform?e:\"./\"+e}function c(e){const a=x(e).length;return e.slice(0,-a)}function d(e,a){return z(e,a)}function f(e,a){const r=g(a,e);return!(!r||\"..\"===r||r.startsWith(\"..\"+N)||r===w(e))}import{basename as u,delimiter as p,dirname as l,extname as x,format as v,isAbsolute as $,join as h,normalize as E,parse as P,posix as b,relative as g,resolve as w,sep as N,toNamespacedPath as S,win32 as j}from\"path\";import y from\"escape-string-regexp\";import z from\"replace-ext\";var O={},R={};a(R,\"name\",(()=>r));var A={};a(A,\"normalizeTrim\",(()=>s));var I={};a(I,\"addExeExt\",(()=>t));var T={};a(T,\"addNamePrefix\",(()=>n));var _={};a(_,\"addNameSuffix\",(()=>i));var k={};a(k,\"addShExt\",(()=>o));var M={};a(M,\"addShRelativePrefix\",(()=>m));var W={};a(W,\"removeExt\",(()=>c));var q={};a(q,\"replaceExt\",(()=>d));var B={};a(B,\"isPathInside\",(()=>f)),e(O,R),e(O,A),e(O,I),e(O,T),e(O,_),e(O,k),e(O,M),e(O,W),e(O,q),e(O,B);export{u as basename,p as delimiter,l as dirname,x as extname,v as format,$ as isAbsolute,h as join,E as normalize,P as parse,b as posix,g as relative,w as resolve,N as sep,S as toNamespacedPath,j as win32,r as name,s as normalizeTrim,t as addExeExt,n as addNamePrefix,i as addNameSuffix,o as addShExt,m as addShRelativePrefix,c as removeExt,d as replaceExt,f as isPathInside};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;\nconst assert_1 = require(\"assert\");\nconst path = __importStar(require(\"path\"));\nconst ioUtil = __importStar(require(\"./io-util\"));\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive, copySourceDirectory } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory() && copySourceDirectory\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Check for invalid characters\n // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n if (/[*\"<>|]/.test(inputPath)) {\n throw new Error('File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows');\n }\n }\n try {\n // note if path does not exist, error is silent\n yield ioUtil.rm(inputPath, {\n force: true,\n maxRetries: 3,\n recursive: true,\n retryDelay: 300\n });\n }\n catch (err) {\n throw new Error(`File was unable to be removed ${err}`);\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n yield ioUtil.mkdir(fsPath, { recursive: true });\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n const copySourceDirectory = options.copySourceDirectory == null\n ? true\n : Boolean(options.copySourceDirectory);\n return { force, recursive, copySourceDirectory };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst fs = __importStar(require(\"fs\"));\nconst mm = __importStar(require(\"./manifest\"));\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst httpm = __importStar(require(\"@actions/http-client\"));\nconst semver = __importStar(require(\"semver\"));\nconst stream = __importStar(require(\"stream\"));\nconst util = __importStar(require(\"util\"));\nconst assert_1 = require(\"assert\");\nconst v4_1 = __importDefault(require(\"uuid/v4\"));\nconst exec_1 = require(\"@actions/exec/lib/exec\");\nconst retry_helper_1 = require(\"./retry-helper\");\nclass HTTPError extends Error {\n constructor(httpStatusCode) {\n super(`Unexpected HTTP response: ${httpStatusCode}`);\n this.httpStatusCode = httpStatusCode;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nexports.HTTPError = HTTPError;\nconst IS_WINDOWS = process.platform === 'win32';\nconst IS_MAC = process.platform === 'darwin';\nconst userAgent = 'actions/tool-cache';\n/**\n * Download a tool from an url and stream it into a file\n *\n * @param url url of tool to download\n * @param dest path to download tool\n * @param auth authorization header\n * @param headers other headers\n * @returns path to downloaded tool\n */\nfunction downloadTool(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n dest = dest || path.join(_getTempDirectory(), v4_1.default());\n yield io.mkdirP(path.dirname(dest));\n core.debug(`Downloading ${url}`);\n core.debug(`Destination ${dest}`);\n const maxAttempts = 3;\n const minSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS', 10);\n const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);\n const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);\n return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {\n return yield downloadToolAttempt(url, dest || '', auth, headers);\n }), (err) => {\n if (err instanceof HTTPError && err.httpStatusCode) {\n // Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests\n if (err.httpStatusCode < 500 &&\n err.httpStatusCode !== 408 &&\n err.httpStatusCode !== 429) {\n return false;\n }\n }\n // Otherwise retry\n return true;\n });\n });\n}\nexports.downloadTool = downloadTool;\nfunction downloadToolAttempt(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (fs.existsSync(dest)) {\n throw new Error(`Destination file path ${dest} already exists`);\n }\n // Get the response headers\n const http = new httpm.HttpClient(userAgent, [], {\n allowRetries: false\n });\n if (auth) {\n core.debug('set auth');\n if (headers === undefined) {\n headers = {};\n }\n headers.authorization = auth;\n }\n const response = yield http.get(url, headers);\n if (response.message.statusCode !== 200) {\n const err = new HTTPError(response.message.statusCode);\n core.debug(`Failed to download from \"${url}\". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);\n throw err;\n }\n // Download the response body\n const pipeline = util.promisify(stream.pipeline);\n const responseMessageFactory = _getGlobal('TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY', () => response.message);\n const readStream = responseMessageFactory();\n let succeeded = false;\n try {\n yield pipeline(readStream, fs.createWriteStream(dest));\n core.debug('download complete');\n succeeded = true;\n return dest;\n }\n finally {\n // Error, delete dest before retry\n if (!succeeded) {\n core.debug('download failed');\n try {\n yield io.rmRF(dest);\n }\n catch (err) {\n core.debug(`Failed to delete '${dest}'. ${err.message}`);\n }\n }\n }\n });\n}\n/**\n * Extract a .7z file\n *\n * @param file path to the .7z file\n * @param dest destination directory. Optional.\n * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this\n * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will\n * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is\n * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line\n * interface, it is smaller than the full command line interface, and it does support long paths. At the\n * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website.\n * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path\n * to 7zr.exe can be pass to this function.\n * @returns path to the destination directory\n */\nfunction extract7z(file, dest, _7zPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n const originalCwd = process.cwd();\n process.chdir(dest);\n if (_7zPath) {\n try {\n const logLevel = core.isDebug() ? '-bb1' : '-bb0';\n const args = [\n 'x',\n logLevel,\n '-bd',\n '-sccUTF-8',\n file\n ];\n const options = {\n silent: true\n };\n yield exec_1.exec(`\"${_7zPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n else {\n const escapedScript = path\n .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1')\n .replace(/'/g, \"''\")\n .replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const escapedTarget = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`;\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n command\n ];\n const options = {\n silent: true\n };\n try {\n const powershellPath = yield io.which('powershell', true);\n yield exec_1.exec(`\"${powershellPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n return dest;\n });\n}\nexports.extract7z = extract7z;\n/**\n * Extract a compressed tar archive\n *\n * @param file path to the tar\n * @param dest destination directory. Optional.\n * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional.\n * @returns path to the destination directory\n */\nfunction extractTar(file, dest, flags = 'xz') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n // Create dest\n dest = yield _createExtractFolder(dest);\n // Determine whether GNU tar\n core.debug('Checking tar --version');\n let versionOutput = '';\n yield exec_1.exec('tar --version', [], {\n ignoreReturnCode: true,\n silent: true,\n listeners: {\n stdout: (data) => (versionOutput += data.toString()),\n stderr: (data) => (versionOutput += data.toString())\n }\n });\n core.debug(versionOutput.trim());\n const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');\n // Initialize args\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n if (core.isDebug() && !flags.includes('v')) {\n args.push('-v');\n }\n let destArg = dest;\n let fileArg = file;\n if (IS_WINDOWS && isGnuTar) {\n args.push('--force-local');\n destArg = dest.replace(/\\\\/g, '/');\n // Technically only the dest needs to have `/` but for aesthetic consistency\n // convert slashes in the file arg too.\n fileArg = file.replace(/\\\\/g, '/');\n }\n if (isGnuTar) {\n // Suppress warnings when using GNU tar to extract archives created by BSD tar\n args.push('--warning=no-unknown-keyword');\n args.push('--overwrite');\n }\n args.push('-C', destArg, '-f', fileArg);\n yield exec_1.exec(`tar`, args);\n return dest;\n });\n}\nexports.extractTar = extractTar;\n/**\n * Extract a xar compatible archive\n *\n * @param file path to the archive\n * @param dest destination directory. Optional.\n * @param flags flags for the xar. Optional.\n * @returns path to the destination directory\n */\nfunction extractXar(file, dest, flags = []) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n args.push('-x', '-C', dest, '-f', file);\n if (core.isDebug()) {\n args.push('-v');\n }\n const xarPath = yield io.which('xar', true);\n yield exec_1.exec(`\"${xarPath}\"`, _unique(args));\n return dest;\n });\n}\nexports.extractXar = extractXar;\n/**\n * Extract a zip\n *\n * @param file path to the zip\n * @param dest destination directory. Optional.\n * @returns path to the destination directory\n */\nfunction extractZip(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n dest = yield _createExtractFolder(dest);\n if (IS_WINDOWS) {\n yield extractZipWin(file, dest);\n }\n else {\n yield extractZipNix(file, dest);\n }\n return dest;\n });\n}\nexports.extractZip = extractZip;\nfunction extractZipWin(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n // build the powershell command\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedDest = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const pwshPath = yield io.which('pwsh', false);\n //To match the file overwrite behavior on nix systems, we use the overwrite = true flag for ExtractToDirectory\n //and the -Force flag for Expand-Archive as a fallback\n if (pwshPath) {\n //attempt to use pwsh with ExtractToDirectory, if this fails attempt Expand-Archive\n const pwshCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,\n `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`,\n `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n pwshCommand\n ];\n core.debug(`Using pwsh at path: ${pwshPath}`);\n yield exec_1.exec(`\"${pwshPath}\"`, args);\n }\n else {\n const powershellCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,\n `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`,\n `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n powershellCommand\n ];\n const powershellPath = yield io.which('powershell', true);\n core.debug(`Using powershell at path: ${powershellPath}`);\n yield exec_1.exec(`\"${powershellPath}\"`, args);\n }\n });\n}\nfunction extractZipNix(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n const unzipPath = yield io.which('unzip', true);\n const args = [file];\n if (!core.isDebug()) {\n args.unshift('-q');\n }\n args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run\n yield exec_1.exec(`\"${unzipPath}\"`, args, { cwd: dest });\n });\n}\n/**\n * Caches a directory and installs it into the tool cacheDir\n *\n * @param sourceDir the directory to cache into tools\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheDir(sourceDir, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source dir: ${sourceDir}`);\n if (!fs.statSync(sourceDir).isDirectory()) {\n throw new Error('sourceDir is not a directory');\n }\n // Create the tool dir\n const destPath = yield _createToolPath(tool, version, arch);\n // copy each child item. do not move. move can fail on Windows\n // due to anti-virus software having an open handle on a file.\n for (const itemName of fs.readdirSync(sourceDir)) {\n const s = path.join(sourceDir, itemName);\n yield io.cp(s, destPath, { recursive: true });\n }\n // write .complete\n _completeToolPath(tool, version, arch);\n return destPath;\n });\n}\nexports.cacheDir = cacheDir;\n/**\n * Caches a downloaded file (GUID) and installs it\n * into the tool cache with a given targetName\n *\n * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid.\n * @param targetFile the name of the file name in the tools directory\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheFile(sourceFile, targetFile, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source file: ${sourceFile}`);\n if (!fs.statSync(sourceFile).isFile()) {\n throw new Error('sourceFile is not a file');\n }\n // create the tool dir\n const destFolder = yield _createToolPath(tool, version, arch);\n // copy instead of move. move can fail on Windows due to\n // anti-virus software having an open handle on a file.\n const destPath = path.join(destFolder, targetFile);\n core.debug(`destination file ${destPath}`);\n yield io.cp(sourceFile, destPath);\n // write .complete\n _completeToolPath(tool, version, arch);\n return destFolder;\n });\n}\nexports.cacheFile = cacheFile;\n/**\n * Finds the path to a tool version in the local installed tool cache\n *\n * @param toolName name of the tool\n * @param versionSpec version of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction find(toolName, versionSpec, arch) {\n if (!toolName) {\n throw new Error('toolName parameter is required');\n }\n if (!versionSpec) {\n throw new Error('versionSpec parameter is required');\n }\n arch = arch || os.arch();\n // attempt to resolve an explicit version\n if (!isExplicitVersion(versionSpec)) {\n const localVersions = findAllVersions(toolName, arch);\n const match = evaluateVersions(localVersions, versionSpec);\n versionSpec = match;\n }\n // check for the explicit version in the cache\n let toolPath = '';\n if (versionSpec) {\n versionSpec = semver.clean(versionSpec) || '';\n const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch);\n core.debug(`checking cache: ${cachePath}`);\n if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) {\n core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`);\n toolPath = cachePath;\n }\n else {\n core.debug('not found');\n }\n }\n return toolPath;\n}\nexports.find = find;\n/**\n * Finds the paths to all versions of a tool that are installed in the local tool cache\n *\n * @param toolName name of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction findAllVersions(toolName, arch) {\n const versions = [];\n arch = arch || os.arch();\n const toolPath = path.join(_getCacheDirectory(), toolName);\n if (fs.existsSync(toolPath)) {\n const children = fs.readdirSync(toolPath);\n for (const child of children) {\n if (isExplicitVersion(child)) {\n const fullPath = path.join(toolPath, child, arch || '');\n if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) {\n versions.push(child);\n }\n }\n }\n }\n return versions;\n}\nexports.findAllVersions = findAllVersions;\nfunction getManifestFromRepo(owner, repo, auth, branch = 'master') {\n return __awaiter(this, void 0, void 0, function* () {\n let releases = [];\n const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;\n const http = new httpm.HttpClient('tool-cache');\n const headers = {};\n if (auth) {\n core.debug('set auth');\n headers.authorization = auth;\n }\n const response = yield http.getJson(treeUrl, headers);\n if (!response.result) {\n return releases;\n }\n let manifestUrl = '';\n for (const item of response.result.tree) {\n if (item.path === 'versions-manifest.json') {\n manifestUrl = item.url;\n break;\n }\n }\n headers['accept'] = 'application/vnd.github.VERSION.raw';\n let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();\n if (versionsRaw) {\n // shouldn't be needed but protects against invalid json saved with BOM\n versionsRaw = versionsRaw.replace(/^\\uFEFF/, '');\n try {\n releases = JSON.parse(versionsRaw);\n }\n catch (_a) {\n core.debug('Invalid json');\n }\n }\n return releases;\n });\n}\nexports.getManifestFromRepo = getManifestFromRepo;\nfunction findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) {\n return __awaiter(this, void 0, void 0, function* () {\n // wrap the internal impl\n const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter);\n return match;\n });\n}\nexports.findFromManifest = findFromManifest;\nfunction _createExtractFolder(dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!dest) {\n // create a temp dir\n dest = path.join(_getTempDirectory(), v4_1.default());\n }\n yield io.mkdirP(dest);\n return dest;\n });\n}\nfunction _createToolPath(tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n core.debug(`destination ${folderPath}`);\n const markerPath = `${folderPath}.complete`;\n yield io.rmRF(folderPath);\n yield io.rmRF(markerPath);\n yield io.mkdirP(folderPath);\n return folderPath;\n });\n}\nfunction _completeToolPath(tool, version, arch) {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n const markerPath = `${folderPath}.complete`;\n fs.writeFileSync(markerPath, '');\n core.debug('finished caching tool');\n}\n/**\n * Check if version string is explicit\n *\n * @param versionSpec version string to check\n */\nfunction isExplicitVersion(versionSpec) {\n const c = semver.clean(versionSpec) || '';\n core.debug(`isExplicit: ${c}`);\n const valid = semver.valid(c) != null;\n core.debug(`explicit? ${valid}`);\n return valid;\n}\nexports.isExplicitVersion = isExplicitVersion;\n/**\n * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec`\n *\n * @param versions array of versions to evaluate\n * @param versionSpec semantic version spec to satisfy\n */\nfunction evaluateVersions(versions, versionSpec) {\n let version = '';\n core.debug(`evaluating ${versions.length} versions`);\n versions = versions.sort((a, b) => {\n if (semver.gt(a, b)) {\n return 1;\n }\n return -1;\n });\n for (let i = versions.length - 1; i >= 0; i--) {\n const potential = versions[i];\n const satisfied = semver.satisfies(potential, versionSpec);\n if (satisfied) {\n version = potential;\n break;\n }\n }\n if (version) {\n core.debug(`matched: ${version}`);\n }\n else {\n core.debug('match not found');\n }\n return version;\n}\nexports.evaluateVersions = evaluateVersions;\n/**\n * Gets RUNNER_TOOL_CACHE\n */\nfunction _getCacheDirectory() {\n const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || '';\n assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');\n return cacheDirectory;\n}\n/**\n * Gets RUNNER_TEMP\n */\nfunction _getTempDirectory() {\n const tempDirectory = process.env['RUNNER_TEMP'] || '';\n assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');\n return tempDirectory;\n}\n/**\n * Gets a global variable\n */\nfunction _getGlobal(key, defaultValue) {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const value = global[key];\n /* eslint-enable @typescript-eslint/no-explicit-any */\n return value !== undefined ? value : defaultValue;\n}\n/**\n * Returns an array of unique values.\n * @param values Values to make unique.\n */\nfunction _unique(values) {\n return Array.from(new Set(values));\n}\n//# sourceMappingURL=tool-cache.js.map","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryAsPromised = exports.TimeoutError = void 0;\nclass TimeoutError extends Error {\n constructor(message, previousError) {\n super(message);\n this.name = \"TimeoutError\";\n this.previous = previousError;\n }\n}\nexports.TimeoutError = TimeoutError;\nfunction matches(match, err) {\n if (typeof match === 'function') {\n try {\n if (err instanceof match)\n return true;\n }\n catch (_) {\n return !!match(err);\n }\n }\n if (match === err.toString())\n return true;\n if (match === err.message)\n return true;\n return match instanceof RegExp\n && (match.test(err.message) || match.test(err.toString()));\n}\nfunction retryAsPromised(callback, optionsInput) {\n if (!callback || !optionsInput) {\n throw new Error('retry-as-promised must be passed a callback and a options set');\n }\n optionsInput = (typeof optionsInput === \"number\" ? { max: optionsInput } : optionsInput);\n const options = {\n $current: \"$current\" in optionsInput ? optionsInput.$current : 1,\n max: optionsInput.max,\n timeout: optionsInput.timeout || undefined,\n match: optionsInput.match ? Array.isArray(optionsInput.match) ? optionsInput.match : [optionsInput.match] : [],\n backoffBase: optionsInput.backoffBase === undefined ? 100 : optionsInput.backoffBase,\n backoffExponent: optionsInput.backoffExponent || 1.1,\n report: optionsInput.report,\n name: optionsInput.name || callback.name || 'unknown'\n };\n if (options.match && !Array.isArray(options.match))\n options.match = [options.match];\n if (options.report)\n options.report('Trying ' + options.name + ' #' + options.$current + ' at ' + new Date().toLocaleTimeString(), options);\n return new Promise(function (resolve, reject) {\n let timeout;\n let backoffTimeout;\n let lastError;\n if (options.timeout) {\n timeout = setTimeout(function () {\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n reject(new TimeoutError(options.name + ' timed out', lastError));\n }, options.timeout);\n }\n Promise.resolve(callback({ current: options.$current }))\n .then(resolve)\n .then(function () {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n })\n .catch(function (err) {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n lastError = err;\n if (options.report)\n options.report((err && err.toString()) || err, options, err);\n // Should not retry if max has been reached\n var shouldRetry = options.$current < options.max;\n if (!shouldRetry)\n return reject(err);\n shouldRetry = options.match.length === 0 || options.match.some(function (match) {\n return matches(match, err);\n });\n if (!shouldRetry)\n return reject(err);\n var retryDelay = options.backoffBase * Math.pow(options.backoffExponent, options.$current - 1);\n // Do some accounting\n options.$current++;\n if (options.report)\n options.report(`Retrying ${options.name} (${options.$current})`, options);\n if (retryDelay) {\n // Use backoff function to ease retry rate\n if (options.report)\n options.report(`Delaying retry of ${options.name} by ${retryDelay}`, options);\n backoffTimeout = setTimeout(function () {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }, retryDelay);\n }\n else {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }\n });\n });\n}\nexports.retryAsPromised = retryAsPromised;\n;\nexports.default = retryAsPromised;\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSevenZip(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"7zip\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"p7zip\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"p7zip\", version)\n } else if (hasDnf()) {\n return setupDnfPack([\n { name: \"p7zip\", version },\n { name: \"p7zip-plugins\", version },\n ])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"p7zip-full\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { mkdirP } from \"@actions/io\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { setupSevenZip } from \"../../sevenzip/sevenzip.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\nexport { extractTar, extractXar } from \"@actions/tool-cache\"\n\nexport enum ArchiveType {\n Tar = 0,\n TarGz = 1,\n TarXz = 2,\n Zip = 3,\n SevenZip = 4,\n}\n\nexport function getArchiveType(file: string): ArchiveType {\n const ext = file.split(\".\").pop()\n\n if (ext === \"tar\") {\n return ArchiveType.Tar\n }\n\n if (ext === \"gz\" || ext === \"tgz\") {\n return ArchiveType.TarGz\n }\n\n if (ext === \"xz\" || ext === \"txz\") {\n return ArchiveType.TarXz\n }\n\n if (ext === \"zip\") {\n return ArchiveType.Zip\n }\n\n if (ext === \"7z\" || ext === \"exe\") {\n return ArchiveType.SevenZip\n }\n\n // default to 7z\n warning(`Unknown archive type: ${ext}. Defaulting to 7z`)\n return ArchiveType.SevenZip\n}\n\nexport function getExtractFunction(archiveType: ArchiveType) {\n switch (archiveType) {\n case ArchiveType.Tar:\n case ArchiveType.TarGz:\n return extractTarByExe\n case ArchiveType.TarXz:\n return extractTarByExe\n case ArchiveType.Zip:\n return extractZip\n default:\n return extract7Zip\n }\n}\n\nlet sevenZip: string | undefined\n\n/// Extract 7z using 7z\nexport async function extract7Zip(file: string, dest: string) {\n await execa(await getSevenZip(), [\"x\", file, `-o${dest}`, \"-y\"], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n}\n\n/// install 7z if needed\nasync function getSevenZip() {\n if (sevenZip === undefined) {\n if (which.sync(\"7z\", { nothrow: true }) === null) {\n await setupSevenZip(\"\", \"\", process.arch)\n }\n // eslint-disable-next-line require-atomic-updates\n sevenZip = \"7z\"\n }\n return sevenZip\n}\n\n/// Extract Exe using 7z\nexport function extractExe(file: string, dest: string) {\n return extract7Zip(file, dest)\n}\n\n/// Extract Zip using unzip or 7z\nexport async function extractZip(file: string, dest: string) {\n // prefer 7z if available (faster especially on Windows)\n if (which.sync(\"7z\", { nothrow: true }) !== null) {\n return extract7Zip(file, dest)\n }\n\n // if unzip is available use it (usually available on posix systems)\n if (which.sync(\"unzip\", { nothrow: true }) !== null) {\n await execa(\"unzip\", [\"-q\", file, \"-d\", dest], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n }\n\n // fallback to 7z (will install 7z if needed)\n return extract7Zip(file, dest)\n}\n\nexport async function extractTarByExe(file: string, dest: string, stripComponents: number = 0, flags: string[] = []) {\n await installTarDependencies(getArchiveType(file))\n\n try {\n await mkdirP(dest)\n } catch {\n // ignore\n }\n\n // TODO windows fails to create symlinks\n // https://github.com/heroku/heroku-slugs/issues/3\n\n try {\n await execa(\"tar\", [\"xf\", file, \"-C\", dest, `--strip-components=${stripComponents}`, ...flags], {\n stdio: \"inherit\",\n })\n } catch (e) {\n if (process.platform === \"win32\" && (e as Error).message.includes(\"Can't create '\\\\\\\\?\\\\C:\")) {\n warning(`Failed to extract symlink ${file} to ${dest}. Ignoring this symlink.`)\n }\n }\n\n await grantUserWriteAccess(dest)\n return dest\n}\n\nasync function installTarDependencies(archiveType: ArchiveType) {\n info(\"Installing tar extraction dependencies\")\n\n switch (archiveType) {\n case ArchiveType.TarGz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"gzip\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"gzip\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"gzip\" }, { name: \"tar\" }])\n }\n }\n break\n }\n case ArchiveType.TarXz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"xz\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"xz\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"xz-utils\" }, { name: \"tar\" }])\n }\n }\n break\n }\n default:\n throw new Error(`Unsupported archive type: ${archiveType} for tar extraction`)\n }\n}\n","import { tmpdir } from \"os\"\nimport { basename, join } from \"path\"\nimport { cacheDir, downloadTool, find } from \"@actions/tool-cache\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { chmod } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { maybeGetInput, rcOptions } from \"../../cli-options.js\"\nimport { getArchiveType, getExtractFunction } from \"./extract.js\"\n\n/** A type that describes a package */\nexport type PackageInfo = {\n /** Url to download the package */\n url: string\n /** The top folder name once it is extracted. It can be `\"\"` if there is no top folder */\n extractedFolderName: string\n /** The relative directory in which the binary is located. It can be `\"\"` if the exe is in the top folder */\n binRelativeDir: string\n /** The main binary file. */\n binFileName: string\n /** The function to extract the downloaded archive. It can be `undefined`, if the binary itself is downloaded directly. */\n extractFunction?: (file: string, dest: string) => Promise\n}\n\nexport type InstallationInfo = {\n /** The top install dir */\n installDir?: string\n binDir: string\n bin?: string\n}\n\n/**\n * A function that:\n *\n * - Downloads and extracts a package\n * - Adds the bin path of the package to PATH\n * - Caches the downloaded directory into tool cache for usage from other sessions\n *\n * @returns The installation directory\n */\nexport async function setupBin(\n name: string,\n version: string,\n getPackageInfo: (version: string, platform: NodeJS.Platform, arch: string) => PackageInfo | Promise,\n setupDir: string,\n arch: string,\n): Promise {\n info(`Installing ${name} ${version} ${arch} via direct downloading`)\n\n process.env.RUNNER_TEMP = process.env.RUNNER_TEMP ?? tmpdir()\n process.env.RUNNER_TOOL_CACHE = process.env.RUNNER_TOOL_CACHE ?? join(tmpdir(), \"setup-cpp\", \"hostedtoolcache\")\n\n const { url, binRelativeDir, binFileName, extractedFolderName, extractFunction } = await getPackageInfo(\n version,\n process.platform,\n arch,\n )\n\n // Restore from cache (if found).\n if (GITHUB_ACTIONS) {\n try {\n const dir = find(name, version)\n if (dir) {\n const installDir = join(dir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n if (await pathExists(join(binDir, binFileName))) {\n info(`${name} ${version} was found in the cache at ${binDir}.`)\n await addPath(binDir, rcOptions)\n\n return { installDir, binDir }\n }\n }\n } catch {\n // fails on a local machine?\n }\n }\n\n const installDir = join(setupDir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n const binFile = join(binDir, binFileName)\n\n await downloadExtractInstall(binDir, binFile, name, version, url, setupDir, extractFunction, arch)\n\n await cacheInstallation(setupDir, name, version)\n\n return { installDir, binDir }\n}\n\nasync function downloadExtractInstall(\n binDir: string,\n binFile: string,\n name: string,\n version: string,\n url: string,\n setupDir: string,\n givenExtractFunction: PackageInfo[\"extractFunction\"],\n arch: string,\n) {\n // download ane extract the package into the installation directory.\n if ((await Promise.all([pathExists(binDir), pathExists(binFile)])).includes(false)) {\n try {\n const downloaded = await tryDownload(name, version, url)\n\n info(`Extracting ${downloaded} to ${setupDir}`)\n\n const extractFunction = givenExtractFunction ?? getExtractFunction(getArchiveType(url))\n await extractFunction(downloaded, setupDir)\n } catch (err) {\n throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)\n }\n }\n\n // Adding the bin dir to the path\n /** The directory which the tool is installed to */\n info(`Add ${binDir} to PATH`)\n await addPath(binDir, rcOptions)\n\n // Check if the binary exists after extraction\n if (!(await pathExists(binFile))) {\n throw new Error(`Failed to find the binary ${binFile} after extracting ${name} ${version} ${arch}`)\n }\n\n // make the binary executable on non-windows platforms\n if (process.platform !== \"win32\") {\n try {\n await chmod(binFile, \"755\")\n } catch (err) {\n warning(`Failed to make ${binFile} executable: ${err}`)\n }\n }\n}\n\nasync function tryDownload(name: string, version: string, url: string) {\n info(`Download ${name} ${version}`)\n // try to download the package 4 times with 2 seconds delay\n const downloaded = await retry(\n () => {\n const downloadedFilePath = join(process.env.RUNNER_TEMP ?? tmpdir(), `${Date.now()}-${basename(url)}`)\n\n return downloadTool(url, downloadedFilePath)\n },\n { name: url, max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n return downloaded\n}\n\nasync function cacheInstallation(setupDir: string, name: string, version: string) {\n // check if inside Github Actions. If so, cache the installation\n if (GITHUB_ACTIONS && typeof process.env.RUNNER_TOOL_CACHE === \"string\") {\n if (maybeGetInput(\"cache-tools\") === \"true\" || process.env.CACHE_TOOLS === \"true\") {\n await cacheDir(setupDir, name, version)\n }\n }\n}\n","import { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverLte from \"semver/functions/lte\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform data for cmake */\nfunction getCmakePackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const semVersion = semverCoerce(version) ?? version\n switch (platform) {\n case \"win32\": {\n const isOld = semverLte(semVersion, \"v3.19.6\")\n let osArchStr: string\n if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"win64-x64\" : \"windows-x86_64\"\n } else if (x86.includes(arch)) {\n osArchStr = isOld ? \"win32-x86\" : \"windows-i386\"\n } else if (arm64.includes(arch)) {\n osArchStr = \"windows-arm64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Windows`)\n osArchStr = `windows-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.zip`,\n }\n }\n case \"darwin\": {\n const isOld = semverLte(semVersion, \"v3.19.1\")\n const osArchStr = isOld ? \"Darwin-x86_64\" : \"macos-universal\"\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"CMake.app/Contents/bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n case \"linux\": {\n const isOld = semverLte(semVersion, \"v3.19.8\")\n let osArchStr: string\n if (arm64.includes(arch)) {\n osArchStr = isOld ? \"Linux-aarch64\" : \"linux-aarch64\"\n } else if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"Linux-x86_64\" : \"linux-x86_64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Linux`)\n osArchStr = `linux-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Setup cmake */\nexport function setupCmake(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"cmake\", version, getCmakePackageInfo, setupDir, arch)\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { info } from \"ci-log\"\nimport { isUrlOnline } from \"is-url-online\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverCompare from \"semver/functions/compare\"\nimport semverValid from \"semver/functions/valid\"\n\n/**\n * Gets the specific versions supported by this action compatible with the supplied (specific or minimum) version in\n * descending order of release (e.g., `5.0.2`, `5.0.1`, and `5.0.0` for `5`).\n */\nexport function getSpecificVersions(versions: Set, semversion: string): string[] {\n return Array.from(versions)\n .filter((v) => /^\\d+\\.\\d+\\.\\d+$/.test(v) && v.startsWith(semversion))\n .sort((a, b) => {\n try {\n return semverCompare(a, b)\n } catch (err) {\n return a.localeCompare(b)\n }\n })\n .reverse()\n}\n\n/**\n * Gets the specific and minimum versions that can be used to refer to the supplied specific versions (e.g., `3`, `3.5`,\n * `3.5.2` for `3.5.2`).\n */\nexport function getVersions(specific: string[]): Set {\n const versions = new Set(specific)\n\n for (const version of specific) {\n versions.add(/^\\d+/.exec(version)![0])\n versions.add(/^\\d+\\.\\d+/.exec(version)![0])\n }\n\n return versions\n}\n\n/** Gets the most recent specific version for which there is a valid download URL. */\nexport async function getSpecificVersionAndUrl(\n versions: Set,\n platform: string,\n version: string,\n getUrl: (platform: string, version: string) => string | null | Promise,\n): Promise<[string, string]> {\n // specific ubuntu version\n if (platform === \"linux\" && version.includes(\"ubuntu\")) {\n const url = await getUrl(platform, version)\n // eslint-disable-next-line no-await-in-loop\n if (url !== null && (await isUrlOnline(url))) {\n return [version, url]\n }\n }\n\n // if the given set doesn't include the version, throw an error\n if (!versions.has(version)) {\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n }\n\n const offlineUrls: string[] = []\n\n // TODO use Promise.any\n for (const specificVersion of getSpecificVersions(versions, version)) {\n // eslint-disable-next-line no-await-in-loop\n const url = await getUrl(platform, specificVersion)\n if (url !== null) {\n // eslint-disable-next-line no-await-in-loop\n if (await isUrlOnline(url)) {\n return [specificVersion, url]\n } else {\n offlineUrls.push(url)\n }\n }\n }\n\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n}\n\nexport const defaultVersionRegex = /v?(\\d\\S*)/\n\n/** Get the version of a binary */\nexport async function getBinVersion(file: string, versionRegex: RegExp = defaultVersionRegex) {\n try {\n const execout = await getExecOutput(file, [\"--version\"])\n const version_output = execout.stdout || execout.stderr || \"\"\n const version = version_output.trim().match(versionRegex)?.[1]\n return semverCoerce(version) ?? undefined\n } catch (e) {\n console.error(e)\n return undefined\n }\n}\n\n/** Check if the given bin is up to date against the target version */\nexport async function isBinUptoDate(\n givenFile: string,\n targetVersion: string,\n versionRegex: RegExp = defaultVersionRegex,\n) {\n const givenVersion = await getBinVersion(givenFile, versionRegex)\n if (givenVersion !== undefined && targetVersion !== \"\") {\n return semverCompare(givenVersion, targetVersion) !== -1\n } else {\n // assume given version is old\n return false\n }\n}\n\n/** Coerce the given version if it is invalid */\nexport function semverCoerceIfInvalid(version: string) {\n if (semverValid(version) === null) {\n // version coercion\n try {\n // find the semver version of an integer\n const coercedVersion = semverCoerce(version)\n if (coercedVersion !== null) {\n info(`Coerced version '${version}' to '${coercedVersion}'`)\n return coercedVersion.version\n }\n } catch (err) {\n // handled below\n }\n }\n return version\n}\n\nexport function removeVPrefix(version: string) {\n return Number.parseInt(version.replace(/^v/, \"\"), 10)\n}\n\nexport function addVPrefix(version: string) {\n if (!version.match(/^v/)) {\n return `v${version}`\n }\n return version\n}\n\nexport function compareVersion(tag1: string, tag2: string) {\n const v1 = semverCoerce(tag1)\n const v2 = semverCoerce(tag2)\n if (v1 !== null && v2 !== null) {\n // put the latest version first\n return v2.compare(v1)\n }\n\n // if the tags are not semver, compare them as strings, putting the latest tag first\n return tag2.localeCompare(tag1)\n}\n","export function unique(dirs: string[]) {\n return [...new Set(dirs)]\n}\n\nexport function quoteIfHasSpace(str: string, quoteChar = \"\\\"\") {\n return str.includes(\" \") ? `${quoteChar}${str}${quoteChar}` : str\n}\n","import assert from \"assert\"\nimport { homedir } from \"os\"\nimport { dirname, join, parse as pathParse } from \"path\"\nimport { getExecOutput } from \"@actions/exec\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { hasPipx, setupPipPackSystem, setupPipPackWithPython } from \"../utils/setup/setupPipPack.js\"\nimport { isBinUptoDate } from \"../utils/setup/version.js\"\nimport { unique } from \"../utils/std/index.js\"\nimport { MinVersions } from \"../versions/default_versions.js\"\n\nexport async function setupPython(\n version: string,\n setupDir: string,\n arch: string,\n): Promise {\n const installInfo = await findOrSetupPython(version, setupDir, arch)\n assert(installInfo.bin !== undefined)\n const foundPython = installInfo.bin\n\n // setup pip\n const foundPip = await findOrSetupPip(foundPython)\n if (foundPip === undefined) {\n throw new Error(\"pip was not installed correctly\")\n }\n\n await setupPipx(foundPython)\n\n await setupWheel(foundPython)\n\n return installInfo as InstallationInfo & { bin: string }\n}\n\nasync function setupPipx(foundPython: string) {\n try {\n if (!(await hasPipx(foundPython))) {\n try {\n await setupPipPackWithPython(foundPython, \"pipx\", undefined, { upgrade: true, usePipx: false })\n } catch (err) {\n if (setupPipPackSystem(\"pipx\", false) === null) {\n throw new Error(`pipx was not installed correctly ${err}`)\n }\n }\n }\n await execa(foundPython, [\"-m\", \"pipx\", \"ensurepath\"], { stdio: \"inherit\" })\n await setupVenv(foundPython)\n } catch (err) {\n warning(`Failed to install pipx: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\nasync function setupVenv(foundPython: string) {\n try {\n await setupPipPackWithPython(foundPython, \"venv\", undefined, { upgrade: false, usePipx: false })\n } catch (err) {\n warning(`Failed to install venv: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\n/** Setup wheel and setuptools */\nasync function setupWheel(foundPython: string) {\n try {\n await setupPipPackWithPython(foundPython, \"setuptools\", undefined, {\n upgrade: true,\n isLibrary: true,\n usePipx: false,\n })\n await setupPipPackWithPython(foundPython, \"wheel\", undefined, { upgrade: false, isLibrary: true, usePipx: false })\n } catch (err) {\n warning(`Failed to install setuptools/wheel: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\nasync function findOrSetupPython(version: string, setupDir: string, arch: string): Promise {\n let installInfo: InstallationInfo | undefined\n let foundPython = await findPython(setupDir)\n\n if (foundPython !== undefined) {\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } else {\n // if python is not found, try to install it\n if (GITHUB_ACTIONS) {\n // install python in GitHub Actions\n try {\n info(\"Installing python in GitHub Actions\")\n const { setupActionsPython } = await import(\"./actions_python.js\")\n await setupActionsPython(version, setupDir, arch)\n\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } catch (err) {\n warning((err as Error).toString())\n }\n }\n if (installInfo === undefined) {\n // install python via system package manager\n installInfo = await setupPythonSystem(setupDir, version)\n }\n }\n\n if (foundPython === undefined || installInfo.bin === undefined) {\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n installInfo = { bin: foundPython, installDir: dirname(foundPython), binDir: dirname(foundPython) }\n }\n\n return installInfo\n}\n\nasync function setupPythonSystem(setupDir: string, version: string) {\n let installInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (setupDir) {\n await setupChocoPack(\"python3\", version, [`--params=/InstallDir:${setupDir}`])\n } else {\n await setupChocoPack(\"python3\", version)\n }\n // Adding the bin dir to the path\n const bin = await findPython(setupDir)\n if (bin === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(bin)\n /** The directory which the tool is installed to */\n await addPath(binDir, rcOptions)\n installInfo = { installDir: binDir, binDir, bin }\n break\n }\n case \"darwin\": {\n installInfo = await installBrewPack(\"python3\", version)\n // add the python and pip binaries to the path\n const brewPythonPrefix: {\n stdout: string\n stderr: string\n } = await execa(\"brew\", [\"--prefix\", \"python\"], { stdio: \"pipe\" })\n const brewPythonBin = join(brewPythonPrefix.stdout, \"libexec\", \"bin\")\n await addPath(brewPythonBin, rcOptions)\n\n break\n }\n case \"linux\": {\n if (isArch()) {\n installInfo = await setupPacmanPack(\"python\", version)\n } else if (hasDnf()) {\n installInfo = await setupDnfPack([{ name: \"python3\", version }])\n } else if (isUbuntu()) {\n installInfo = await installAptPack([{ name: \"python3\", version }, { name: \"python-is-python3\" }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n break\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n return installInfo\n}\n\nasync function findPython(binDir?: string) {\n for (const pythonBin of [\"python\", \"python3\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, binDir)\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n\n // On Windows, search in C:\\PythonXX\n if (process.platform === \"win32\") {\n const rootDir = pathParse(homedir()).root\n // find all directories in rootDir using readdir\n const pythonDirs = (await readdir(rootDir)).filter((dir) => dir.startsWith(\"Python\"))\n\n for (const pythonDir of pythonDirs) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, join(rootDir, pythonDir))\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n }\n }\n\n return undefined\n}\n\nasync function isPythonUpToDate(candidate: string, binDir?: string) {\n try {\n if (binDir !== undefined) {\n const pythonBinPath = join(binDir, addExeExt(candidate))\n if (await pathExists(pythonBinPath) && await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pythonBinPaths = (await which(candidate, { nothrow: true, all: true })) ?? []\n for (const pythonBinPath of pythonBinPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function findOrSetupPip(foundPython: string) {\n const maybePip = await findPip()\n\n if (maybePip === undefined) {\n // install pip if not installed\n info(\"pip was not found. Installing pip\")\n await setupPip(foundPython)\n return findPip() // recurse to check if pip is on PATH and up-to-date\n }\n\n return maybePip\n}\n\nasync function findPip() {\n for (const pipCandidate of [\"pip3\", \"pip\"]) {\n // eslint-disable-next-line no-await-in-loop\n const maybePip = await isPipUptoDate(pipCandidate)\n if (maybePip !== undefined) {\n return maybePip\n }\n }\n return undefined\n}\n\nasync function isPipUptoDate(pip: string) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pipPaths = (await which(pip, { nothrow: true, all: true })) ?? []\n for (const pipPath of pipPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pipPath, MinVersions.pip!)) {\n return pipPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function setupPip(foundPython: string) {\n const upgraded = await ensurePipUpgrade(foundPython)\n if (!upgraded) {\n // ensure that pip is installed on Linux (happens when python is found but pip not installed)\n await setupPipPackSystem(\"pip\")\n\n // upgrade pip\n await ensurePipUpgrade(foundPython)\n }\n}\n\nasync function ensurePipUpgrade(foundPython: string) {\n try {\n await execa(foundPython, [\"-m\", \"ensurepip\", \"-U\", \"--upgrade\"], { stdio: \"inherit\" })\n return true\n } catch (err1) {\n info((err1 as Error).toString())\n try {\n // ensure pip is disabled on Ubuntu\n await execa(foundPython, [\"-m\", \"pip\", \"install\", \"--upgrade\", \"pip\"], { stdio: \"inherit\" })\n return true\n } catch (err2) {\n info((err2 as Error).toString())\n // pip module not found\n }\n }\n // all methods failed\n return false\n}\n\nasync function addPythonBaseExecPrefix_(python: string) {\n const dirs: string[] = []\n\n // detection based on the platform\n if (process.platform === \"linux\") {\n dirs.push(\"/home/runner/.local/bin/\")\n } else if (process.platform === \"darwin\") {\n dirs.push(\"/usr/local/bin/\")\n }\n\n // detection using python.sys\n const base_exec_prefix = (await getExecOutput(`${python} -c \"import sys;print(sys.base_exec_prefix);\"`)).stdout.trim()\n // any of these are possible depending on the operating system!\n dirs.push(join(base_exec_prefix, \"Scripts\"), join(base_exec_prefix, \"Scripts\", \"bin\"), join(base_exec_prefix, \"bin\"))\n\n // remove duplicates\n return unique(dirs)\n}\n\n/**\n * Add the base exec prefix to the PATH. This is required for Conan, Meson, etc. to work properly.\n *\n * The answer is cached for subsequent calls\n */\nexport const addPythonBaseExecPrefix = memoize(addPythonBaseExecPrefix_, { promise: true })\n","import type { Opts } from \"../cli-options.js\"\nimport type { CompilerInfo } from \"../compilers.js\"\nimport type { Inputs } from \"../tool.js\"\nimport { DefaultUbuntuVersion, DefaultVersions } from \"./default_versions.js\"\n\n/** Get the default version if passed true or undefined, otherwise return the version itself */\nexport function getVersion(name: string, version: string | undefined, osVersion: number[] | null = null) {\n if (isVersionDefault(version) && process.platform === \"linux\" && osVersion !== null && name in DefaultUbuntuVersion) {\n return getDefaultLinuxVersion(osVersion, DefaultUbuntuVersion[name]!)\n } else if (isVersionDefault(version) && name in DefaultVersions) {\n return DefaultVersions[name] ?? \"\"\n } else if (version === \"true\") {\n return \"\"\n }\n return version ?? \"\"\n}\n\nfunction isVersionDefault(version: string | undefined) {\n return version === \"true\" || version === undefined\n}\n\n/// choose the default linux version based on ubuntu version\nfunction getDefaultLinuxVersion(osVersion: number[], toolLinuxVersions: Record) {\n const osVersionMaj = osVersion[0]\n\n // find which version block the os version is in\n const satisfyingVersion = Object.keys(toolLinuxVersions)\n .map((v) => Number.parseInt(v, 10))\n .sort((a, b) => b - a) // sort in descending order\n .find((v) => osVersionMaj >= v)\n\n return satisfyingVersion === undefined ? \"\" : toolLinuxVersions[satisfyingVersion]\n}\n\n/**\n * Sync the versions for the given inputs\n *\n * It modifies the opts object to have the same version for all the tools\n * If the return is false, it means that versions don't match the target version\n * @param opts - The options object (modified in place)\n * @param tools - The tools to sync the versions for (it can include `compiler`)\n * @param compilerInfo - The compiler info to sync the versions for (if any)\n */\nexport function syncVersions(\n opts: Opts,\n toolsGiven: Inputs[],\n compilerInfo: CompilerInfo | undefined = undefined,\n): boolean {\n // check if compiler version should be synced\n const syncCompiler = compilerInfo === undefined ? false : toolsGiven.includes(compilerInfo.compiler as Inputs)\n\n // remove the compiler from the tools if it should not be synced\n const tools = syncCompiler ? toolsGiven : toolsGiven.filter((tool) => tool !== \"compiler\")\n\n // filter out the tools that are in use in the options\n const toolsInUse = tools.filter((tool) => opts[tool] !== undefined)\n\n // filter out the tools that are not default\n const toolsNonDefaultVersion = toolsInUse.filter((tool) => {\n const version = (syncCompiler && tool === \"compiler\" && compilerInfo !== undefined)\n ? compilerInfo.version\n : opts[tool]\n return !isVersionDefault(version)\n })\n\n // find the target version to sync to\n const targetVersion: string = (toolsNonDefaultVersion.length !== 0)\n ? (syncCompiler && toolsNonDefaultVersion[0] === \"compiler\" && compilerInfo !== undefined)\n ? compilerInfo.version ?? \"true\"\n : opts[toolsNonDefaultVersion[0]] ?? \"true\"\n : \"true\"\n\n // error if any explicit versions don't match the target version\n if (\n toolsNonDefaultVersion.some((tool) => {\n if (syncCompiler && tool === \"compiler\" && compilerInfo !== undefined) {\n return opts.compiler !== `${compilerInfo.compiler}-${targetVersion}`\n }\n\n return opts[tool] !== targetVersion\n })\n ) {\n return false\n }\n\n // update the version of all the tools to the target version\n for (const tool of toolsInUse) {\n opts[tool] = (syncCompiler && tool === \"compiler\" && compilerInfo !== undefined)\n ? `${compilerInfo.compiler}-${targetVersion}`\n : targetVersion\n }\n\n return true\n}\n","import os from \"os\"\nimport { warning } from \"ci-log\"\nimport memoize from \"memoizee\"\nimport { installAptPack } from \"setup-apt\"\nimport { getUbuntuVersion } from \"ubuntu-version\"\nimport which from \"which\"\nimport { isUbuntu } from \"./isUbuntu.js\"\n\nasync function ubuntuVersion_(): Promise {\n try {\n if (isUbuntu()) {\n try {\n if (which.sync(\"lsb_release\", { nothrow: true }) === null) {\n await installAptPack([{ name: \"lsb-release\" }])\n }\n } catch {\n return detectUsingOsVersion()\n }\n\n const versionSplitted = await getUbuntuVersion()\n\n if (versionSplitted.length === 0) {\n return detectUsingOsVersion()\n }\n\n return versionSplitted\n } else {\n return null\n }\n } catch (err) {\n warning((err as Error).toString())\n return null\n }\n}\n\n/** Detect Ubuntu version */\nexport const ubuntuVersion = memoize(ubuntuVersion_, { promise: true })\n\n/** Detect Ubuntu version using os.version() for Ubuntu based distros */\nfunction detectUsingOsVersion() {\n if (!(\"version\" in os && typeof os.version === \"function\")) {\n return null\n }\n\n // #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2\n const osVersion: string = os.version()\n // parse the version\n const versionMatch = osVersion.match(/(\\d+)\\.(\\d+)\\.(\\d+)/)\n if (versionMatch === null) {\n return null\n }\n\n const majorVersion = Number.parseInt(versionMatch[1], 10)\n const minorVersion = Number.parseInt(versionMatch[2], 10)\n const patchVersion = Number.parseInt(versionMatch[3], 10)\n\n return [majorVersion, minorVersion, patchVersion]\n}\n","import { dirname, join } from \"path\"\nimport { info } from \"@actions/core\"\nimport { addPath } from \"envosman\"\nimport { execa, execaSync } from \"execa\"\nimport memoize from \"memoizee\"\nimport { mkdirp } from \"mkdirp\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport { addPythonBaseExecPrefix, setupPython } from \"../../python/python.js\"\nimport { getVersion } from \"../../versions/versions.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../env/ubuntu_version.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\n\nexport type SetupPipPackOptions = {\n /** Whether to use pipx instead of pip */\n usePipx?: boolean\n /** Whether to install the package as a user */\n user?: boolean\n /** Whether to upgrade the package */\n upgrade?: boolean\n /** Whether the package is a library */\n isLibrary?: boolean\n}\n\n/** A function that installs a package using pip */\nexport async function setupPipPack(\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n return setupPipPackWithPython(await getPython(), name, version, options)\n}\n\nexport async function setupPipPackWithPython(\n givenPython: string,\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n const { usePipx = true, user = true, upgrade = false, isLibrary = false } = options\n\n const isPipx = usePipx && !isLibrary && (await hasPipx(givenPython))\n\n const pip = isPipx ? \"pipx\" : \"pip\"\n\n // remove `[]` extensions\n const nameOnly = getPackageName(name)\n\n // if upgrade is not requested, check if the package is already installed, and return if it is\n if (!upgrade) {\n const installed = isPipx\n ? await pipxPackageInstalled(givenPython, nameOnly)\n : await pipPackageIsInstalled(givenPython, nameOnly)\n if (installed) {\n const binDir = isPipx\n ? await finishPipxPackageInstall()\n : await finishPipPackageInstall(givenPython, nameOnly)\n return { binDir }\n }\n }\n\n const hasPackage = await pipHasPackage(givenPython, nameOnly)\n if (hasPackage) {\n try {\n info(`Installing ${name} ${version ?? \"\"} via ${pip}`)\n\n const nameAndVersion = version !== undefined && version !== \"\" ? `${name}==${version}` : name\n const upgradeFlag = upgrade ? (isPipx ? [\"upgrade\"] : [\"install\", \"--upgrade\"]) : [\"install\"]\n const userFlag = !isPipx && user ? [\"--user\"] : []\n\n const env = process.env\n\n if (isPipx && user) {\n // install to user home\n env.PIPX_HOME = await getPipxHome()\n env.PIPX_BIN_DIR = await getPipxBinDir()\n }\n\n execaSync(givenPython, [\"-m\", pip, ...upgradeFlag, ...userFlag, nameAndVersion], {\n stdio: \"inherit\",\n env,\n })\n } catch (err) {\n const msg = err instanceof Error ? `${err.message}\\n${err.stack}` : String(err)\n info(`Failed to install ${name} via ${pip}: ${msg}`)\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} via ${pip}: ${err}.`)\n }\n }\n } else if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} as it was not found via ${pip} or the system package manager`)\n }\n\n const binDir = isPipx\n ? await finishPipxPackageInstall()\n : await finishPipPackageInstall(givenPython, nameOnly)\n return { binDir }\n}\n\nfunction finishPipxPackageInstall() {\n return getPipxBinDir()\n}\n\nasync function finishPipPackageInstall(givenPython: string, name: string) {\n const pythonBaseExecPrefix = await addPythonBaseExecPrefix(givenPython)\n const binDir = await findBinDir(pythonBaseExecPrefix, name)\n await addPath(binDir, rcOptions)\n return binDir\n}\n\nexport async function hasPipx(givenPython: string) {\n const res = await execa(givenPython, [\"-m\", \"pipx\", \"--help\"], { stdio: \"ignore\", reject: false })\n return res.exitCode === 0\n}\n\nasync function getPipxHome_() {\n let pipxHome = process.env.PIPX_HOME\n if (pipxHome !== undefined) {\n return pipxHome\n }\n\n // Based on https://pipx.pypa.io/stable/installation/\n const compatHome = untildifyUser(\"~/.local/pipx\")\n if (await pathExists(compatHome)) {\n return compatHome\n }\n\n switch (process.platform) {\n case \"win32\": {\n pipxHome = untildifyUser(\"~/AppData/Local/pipx\")\n break\n }\n case \"darwin\": {\n pipxHome = untildifyUser(\"~/Library/Application Support/pipx\")\n break\n }\n default: {\n pipxHome = untildifyUser(\"~/.local/share/pipx\")\n break\n }\n }\n\n await mkdirp(pipxHome)\n await mkdirp(join(pipxHome, \"trash\"))\n await mkdirp(join(pipxHome, \"shared\"))\n await mkdirp(join(pipxHome, \"venv\"))\n return pipxHome\n}\nconst getPipxHome = memoize(getPipxHome_, { promise: true })\n\nasync function getPipxBinDir_() {\n if (process.env.PIPX_BIN_DIR !== undefined) {\n return process.env.PIPX_BIN_DIR\n }\n\n const pipxBinDir = untildifyUser(\"~/.local/bin\")\n await addPath(pipxBinDir, rcOptions)\n await mkdirp(pipxBinDir)\n return pipxBinDir\n}\nconst getPipxBinDir = memoize(getPipxBinDir_, { promise: true })\n\n/* eslint-disable require-atomic-updates */\nlet pythonBin: string | undefined\n\nasync function getPython(): Promise {\n if (pythonBin !== undefined) {\n return pythonBin\n }\n\n pythonBin = (await setupPython(getVersion(\"python\", undefined, await ubuntuVersion()), \"\", process.arch)).bin\n return pythonBin\n}\n\n/**\n * Get the actual name of a pip package from the given string\n * @param pkg the given name that might contain extensions in `[]`.\n * @returns stirped down name of the package\n */\nfunction getPackageName(pkg: string) {\n return pkg.replace(/\\[.*]/g, \"\").trim()\n}\n\nasync function pipPackageIsInstalled(python: string, name: string) {\n try {\n const result = await execa(python, [\"-m\", \"pip\", \"-qq\", \"show\", name], {\n stdio: \"ignore\",\n reject: false,\n })\n return result.exitCode === 0\n } catch {\n return false\n }\n}\n\ntype PipxShowType = {\n venvs: Record\n}\n\nasync function pipxPackageInstalled(python: string, name: string) {\n try {\n const result = await execa(python, [\"-m\", \"pipx\", \"list\", \"--json\"], {\n stdio: \"ignore\",\n reject: false,\n })\n if (result.exitCode !== 0 || typeof result.stdout !== \"string\") {\n return false\n }\n\n const pipxOut = JSON.parse(result.stdout) as PipxShowType\n // search among the venvs\n if (name in pipxOut.venvs) {\n return true\n }\n // search among the urls\n for (const venv of Object.values(pipxOut.venvs)) {\n if (venv.metadata.main_package.package_or_url === name || venv.metadata.main_package.package === name) {\n return true\n }\n }\n } catch {\n // ignore\n }\n return false\n}\n\nasync function pipHasPackage(python: string, name: string) {\n const result = await execa(python, [\"-m\", \"pip\", \"-qq\", \"index\", \"versions\", name], {\n stdio: \"ignore\",\n reject: false,\n })\n return result.exitCode === 0\n}\n\nasync function findBinDir(dirs: string[], name: string) {\n const exists = await Promise.all(dirs.map((dir) => pathExists(join(dir, addExeExt(name)))))\n const dirIndex = exists.findIndex((exist) => exist)\n if (dirIndex !== -1) {\n const foundDir = dirs[dirIndex]\n return foundDir\n }\n\n const whichDir = which.sync(addExeExt(name), { nothrow: true })\n if (whichDir !== null) {\n return dirname(whichDir)\n }\n\n return dirs[dirs.length - 1]\n}\n\nexport function setupPipPackSystem(name: string, addPythonPrefix = true) {\n if (process.platform === \"linux\") {\n info(`Installing ${name} via the system package manager`)\n if (isArch()) {\n return setupPacmanPack(addPythonPrefix ? `python-${name}` : name)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n }\n } else if (process.platform === \"darwin\") {\n return installBrewPack(name)\n }\n return null\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupCmakelang(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"cmakelang[YAML]\", version)\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupGraphviz(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"graphviz\", version)\n return activateGraphviz()\n }\n case \"darwin\": {\n return installBrewPack(\"graphviz\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"graphviz\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"graphviz\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"graphviz\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateGraphviz(): Promise {\n switch (process.platform) {\n case \"win32\": {\n const binDir = \"C:/Program Files/Graphviz/bin\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { join } from \"path\"\n\nexport async function setupDmg(path: string, destDir: string) {\n const { ArchiveHdi } = await import(\"@shockpkg/archive-files/esm/archive/hdi.mjs\")\n\n const dmg = new ArchiveHdi(path)\n await dmg.read(async (entry) => {\n await entry.extract(join(destDir, entry.path))\n })\n}\n","import { join } from \"path\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { setupGraphviz } from \"../graphviz/graphviz.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { macosVersion } from \"../utils/env/macos_version.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { setupDmg } from \"../utils/setup/setupDmg.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n/** Get the platform data for cmake */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch: string): PackageInfo {\n switch (platform) {\n case \"linux\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.linux.bin.tar.gz`,\n }\n }\n case \"win32\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.windows.x64.bin.zip`,\n }\n }\n case \"darwin\": {\n const folderName = `Doxygen-${version}`\n return {\n binRelativeDir: \"Doxygen/Doxygen.app/Contents/Resources/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n extractFunction: setupDmg,\n url: `https://doxygen.nl/files/${folderName}.dmg`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupDoxygen(version: string, setupDir: string, arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // try to download the package 4 times with 2 seconds delay\n await retry(\n () => {\n return setupChocoPack(\"doxygen.install\", version)\n },\n { name: \"doxygen.install\", max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n const binDir = await activateWinDoxygen()\n const installationInfo = { binDir }\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n return installationInfo\n }\n case \"darwin\": {\n // let installationInfo: InstallationInfo\n // try {\n // installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n // } catch {\n const installationInfo = await installBrewPack(\"doxygen\", undefined)\n // }\n\n // only install graphviz if the macOS version is greater than 11\n if (macosVersion()[0] > 11) {\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n }\n return installationInfo\n }\n case \"linux\": {\n let installationInfo: InstallationInfo\n if (version === \"\" || isArch() || hasDnf()) {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"doxygen\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"doxygen\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([{ name: \"doxygen\", version }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n } else if (isUbuntu()) {\n try {\n // doxygen on stable Ubuntu repositories is very old. So, we use get the binary from the website itself\n installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n try {\n await installAptPack([{ name: \"libclang-cpp9\" }])\n } catch (err) {\n info(`Failed to download libclang-cpp9 that might be needed for running doxygen. ${err}`)\n }\n } catch (err) {\n notice(`Failed to download doxygen binary. ${err}. Falling back to apt-get.`)\n installationInfo = await installAptPack([{ name: \"doxygen\" }])\n }\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n await setupGraphviz(getVersion(\"graphviz\", undefined, await ubuntuVersion()), \"\", arch)\n return installationInfo\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinDoxygen() {\n switch (process.platform) {\n case \"win32\": {\n for (\n const binDir of [\n \"C:/ProgramData/chocolatey/bin\",\n \"C:/Program Files/doxygen/bin\",\n \"C:/Program Files (x86)/doxygen\",\n ]\n ) {\n // eslint-disable-next-line no-await-in-loop\n if (await pathExists(join(binDir, \"doxygen.exe\"))) {\n // eslint-disable-next-line no-await-in-loop\n await addPath(binDir, rcOptions)\n return binDir\n }\n }\n throw new Error(\"Failed to find doxygen binary\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { error } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\n\nexport async function setupMacOSSDK() {\n if (process.platform === \"darwin\") {\n try {\n const xcrun = await getExecOutput(\"xcrun --sdk macosx --show-sdk-path\")\n const sdkroot = xcrun.stdout || xcrun.stderr\n if (sdkroot) {\n await addEnv(\"SDKROOT\", sdkroot.trim(), rcOptions)\n } else {\n error(\"SDKROOT not set\")\n }\n } catch (e) {\n error(e as Error | string)\n }\n }\n}\n","import { readFile } from \"fs/promises\"\n\n/**\n * The list of assets\n * @key tag The tag of the release\n * @value assets The names of the assets of the release\n */\nexport type Assets = Record\n\n/**\n * Load the list of assets from a json file\n */\nexport async function loadAssetList(path: string): Promise {\n const data = await readFile(path, \"utf-8\")\n return JSON.parse(data)\n}\n\ntype MatchAssetOpts = {\n version: string\n keywords?: string[]\n optionalKeywords?: string[]\n filterMapTag?: (tag: string) => string | undefined\n filterName?: (asset: string) => boolean\n}\n\n/**\n * Match the asset that matches the version and given keywords\n */\nexport function matchAsset(\n assets: Assets,\n opts: MatchAssetOpts,\n): { tag: string; name: string } | undefined {\n // get the list of versions\n const origTags = Object.keys(assets)\n\n // filter/map the tags\n const versionMap: Map = new Map()\n if (opts.filterMapTag === undefined) {\n for (const origTag of origTags) {\n versionMap.set(origTag, origTag)\n }\n } else {\n for (const origTag of origTags) {\n const mappedTag = opts.filterMapTag(origTag)\n if (mappedTag !== undefined) {\n versionMap.set(mappedTag, origTag)\n }\n }\n }\n\n if (versionMap.size === 0) {\n return undefined\n }\n\n // find the first tag that starts with the version\n // loop over the versions starting with the latest\n const candidateTags: string[] = []\n for (const [version, origTag] of versionMap.entries()) {\n if (version.startsWith(opts.version)) {\n candidateTags.push(origTag)\n }\n }\n\n if (candidateTags.length === 0) {\n return undefined\n }\n\n // Loop over the candidate tags and return the first one that has assets\n for (const candidateTag of candidateTags) {\n // get the list of assets\n let assetNames = assets[candidateTag]\n if (assetNames === undefined) {\n continue\n }\n\n // filter the assets\n if (opts.filterName !== undefined) {\n assetNames = assetNames.filter(opts.filterName)\n }\n\n if (assetNames.length === 0) {\n continue\n }\n\n // check if this version contains the keywords and optional keywords in the asset name\n const match = matchAssetName(candidateTag, assetNames, opts)\n if (match !== undefined) {\n return match\n }\n }\n\n return undefined\n}\n\nfunction matchAssetName(tag: string, assetNames: string[], opts: MatchAssetOpts) {\n // if no keywords are given, return the first asset\n if (\n (opts.keywords === undefined\n || opts.keywords.length === 0)\n && (opts.optionalKeywords === undefined\n || opts.optionalKeywords.length === 0)\n ) {\n return { tag, name: assetNames[0] }\n }\n\n // check if the asset contains all the keywords\n let candidates: string[] = []\n if (\n opts.keywords !== undefined\n && opts.keywords.length !== 0\n ) {\n for (const name of assetNames) {\n if (opts.keywords!.every((keyword) => name.includes(keyword))) {\n candidates.push(name)\n }\n }\n } else {\n candidates = assetNames\n }\n\n if (candidates.length === 0) {\n return undefined\n }\n\n // prefer the candidates that contain more optional keywords\n if (\n opts.optionalKeywords !== undefined\n && opts.optionalKeywords.length !== 0\n ) {\n // rate the candidates based on the number of optional keywords they contain\n const candidateScores = candidates.map((name) => {\n let score = 0\n for (const keyword of opts.optionalKeywords!) {\n if (name.includes(keyword)) {\n score++\n }\n }\n return score\n })\n\n // find the candidate with the highest score\n const maxScore = Math.max(...candidateScores)\n const maxIndex = candidateScores.indexOf(maxScore)\n return { tag, name: candidates[maxIndex] }\n }\n\n // return the first candidate if no optional keywords are given\n return { tag, name: candidates[0] }\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { addEnv, addPath } from \"envosman\"\nimport { execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverMajor from \"semver/functions/major\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { extract7Zip } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { compareVersion } from \"../utils/setup/version.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nasync function getGccPackageInfo(version: string, platform: NodeJS.Platform, arch: string): Promise {\n switch (platform) {\n case \"win32\": {\n const mingwAssets = await loadAssetList(\n join(dirname, \"github_brechtsanders_winlibs_mingw.json\"),\n )\n\n const mingwArchMap = {\n x64: \"x86_64\",\n ia32: \"i386\",\n } as Record\n\n const asset = matchAsset(\n mingwAssets,\n {\n version,\n keywords: [\n mingwArchMap[arch] ?? arch,\n ],\n },\n )\n\n if (asset === undefined) {\n throw new Error(`No asset found for version ${version} and arch ${arch}`)\n }\n\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"g++\"),\n extractedFolderName: \"mingw64\",\n extractFunction: extract7Zip,\n url: `https://github.com/brechtsanders/winlibs_mingw/releases/download/${asset.tag}/${asset.name}`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupGcc(version: string, setupDir: string, arch: string, priority: number = 40) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (arch === \"arm\" || arch === \"arm64\") {\n await setupChocoPack(\"gcc-arm-embedded\", version)\n }\n try {\n installationInfo = await setupBin(\"g++\", version, getGccPackageInfo, setupDir, arch)\n } catch (err) {\n info(`Failed to download g++ binary. ${err}. Falling back to chocolatey.`)\n installationInfo = await setupChocoMingw(version, arch)\n }\n break\n }\n case \"darwin\": {\n installationInfo = await installBrewPack(\"gcc\", version)\n break\n }\n case \"linux\": {\n if (arch === \"x64\") {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([\n { name: \"gcc\", version },\n { name: \"gcc-c++\", version },\n { name: \"libstdc++-devel\" },\n ])\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc\" }, { name: \"g++\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n {\n name: \"g++\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n }\n } else {\n info(`Install g++-multilib because gcc for ${arch} was requested`)\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc-multilib\", version)\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc-multilib\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([{\n name: \"gcc-multilib\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n }])\n }\n }\n }\n break\n }\n // TODO support bare-metal (need to support passing it as the input)\n // TODO support abi\n // case \"none\": {\n // if (arch === \"arm\" || arch === \"arm64\") {\n // return installAptPack(\"gcc-arm-none-eabi\", version, [\n // \"ppa:ubuntu-toolchain-r/test\",\n // ])\n // } else {\n // throw new Error(`Unsupported platform for ${arch}`)\n // }\n // }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n await activateGcc(version, installationInfo.binDir, priority)\n return installationInfo\n }\n return undefined\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMingw(version: string, setupDir: string, arch: string) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\":\n case \"darwin\": {\n return setupGcc(version, setupDir, arch)\n }\n case \"linux\": {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"mingw-w64-gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([{ name: \"mingw64-gcc\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([\n {\n name: \"mingw-w64\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n break\n }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n // TODO: setup alternatives and update CC/CXX env. ?\n // Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode\n // Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode\n // await activateGcc(version, installationInfo.binDir)\n return installationInfo\n }\n return undefined\n}\n\nasync function setupChocoMingw(version: string, arch: string): Promise {\n await setupChocoPack(\"mingw\", version)\n let binDir: string | undefined\n if (arch === \"x64\" && (await pathExists(\"C:/tools/mingw64/bin\"))) {\n binDir = \"C:/tools/mingw64/bin\"\n await addPath(binDir, rcOptions)\n } else if (arch === \"ia32\" && (await pathExists(\"C:/tools/mingw32/bin\"))) {\n binDir = \"C:/tools/mingw32/bin\"\n await addPath(binDir, rcOptions)\n } else if (await pathExists(`${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin/g++.exe`)) {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n if (binDir !== undefined) {\n return { binDir }\n }\n return undefined\n}\n\n/** Setup gcc as the compiler */\nasync function activateGcc(givenVersion: string, binDir: string, priority: number = 40) {\n const promises: Promise[] = []\n\n if (process.platform === \"win32\") {\n promises.push(\n addEnv(\"CC\", addExeExt(`${binDir}/gcc`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${binDir}/g++`), rcOptions),\n )\n } else {\n // if version is empty, get the version from the gcc command\n let version = givenVersion\n if (givenVersion === \"\") {\n version = await getGccCmdVersion(binDir, version)\n info(`Using gcc version ${version}`)\n }\n\n const majorVersion = semverMajor(semverCoerce(version) ?? version)\n if (majorVersion >= 5) {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${majorVersion}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${majorVersion}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n )\n }\n } else {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${version}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${version}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${version}`, rcOptions, priority),\n )\n }\n }\n }\n\n promises.push(setupMacOSSDK())\n\n // TODO\n // const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n // const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n // promises.push(\n // addEnv(\"LD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${ld}`, rcOptions),\n // addEnv(\"DYLD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${dyld}`, rcOptions),\n // addEnv(\"CPATH\", `${installDir}/lib/gcc/${majorVersion}/include`, rcOptions),\n // addEnv(\"LDFLAGS\", `-L${installDir}/lib`, rcOptions),\n // addEnv(\"CPPFLAGS\", `-I${installDir}/include`, rcOptions),\n // )\n\n if (GITHUB_ACTIONS) {\n await addGccLoggingMatcher()\n }\n\n await Promise.all(promises)\n}\n\nasync function getGccCmdVersion(binDir: string, givenVersion: string) {\n // TODO get the version from the package manager\n try {\n let gccExe = \"gcc\"\n if (await pathExists(`${binDir}/gcc`)) {\n gccExe = `${binDir}/gcc`\n } else {\n // try to find the gcc exe in the bin dir\n const files = (await readdir(binDir)).sort(\n (exe1, exe2) => {\n const version1 = exe1.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n const version2 = exe2.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n return compareVersion(version1, version2)\n },\n )\n for (const file of files) {\n if (file.startsWith(\"gcc\")) {\n gccExe = `${binDir}/${file}`\n break\n }\n }\n }\n\n const { stdout: versionStdout } = await execa(gccExe, [\"--version\"], { stdio: \"pipe\" })\n\n // gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\n // gcc-12 (Homebrew GCC 12.4.0) 12.4.0\n // gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0\n\n const versionMatch = (versionStdout as string).match(/gcc.* \\(.*\\) ([\\d.]+)/)\n\n if (versionMatch !== null) {\n return versionMatch[1]\n }\n\n warning(`Failed to parse gcc version from: ${versionStdout}`)\n return givenVersion\n } catch (err) {\n error(`Failed to get gcc version: ${err}`)\n return givenVersion\n }\n}\n\nasync function addGccLoggingMatcher() {\n const matcherPath = join(dirname, \"gcc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the gcc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { addEnv } from \"envosman\"\nimport semverMajor from \"semver/functions/major\"\nimport semverValid from \"semver/functions/valid\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupGcovr(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"gcovr\", version)\n}\n\nexport function activateGcovLLVM() {\n return addEnv(\"GCOV\", \"llvm-cov gcov\", rcOptions)\n}\n\nexport function activateGcovGCC(gccVersion: string) {\n const gccSemver = semverValid(gccVersion)\n const gccMajor = gccSemver !== null ? semverMajor(gccSemver) : gccVersion\n const gcov = gccMajor !== \"\" ? `gcov-${gccMajor}` : \"gcov\"\n\n return addEnv(\"GCOV\", gcov, rcOptions)\n}\n","import path, { basename, join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { arm64, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\n/** Get the platform data for infer */\nasync function getInferPackageInfo(version: string, platform: NodeJS.Platform, arch: string): Promise {\n const { keywords, optionalKeywords } = getAssetKeywords(platform, arch)\n\n // first check the github releases\n const inferGitHubAssets = await loadAssetList(\n join(dirname, \"github_facebook_infer.json\"),\n )\n const ghAsset = matchAsset(\n inferGitHubAssets,\n {\n version,\n keywords,\n optionalKeywords,\n filterMapTag(tag) {\n return tag.replace(/^v/, \"\")\n },\n },\n )\n\n if (ghAsset !== undefined) {\n return {\n url: `https://github.com/facebook/infer/releases/download/${ghAsset.tag}/${ghAsset.name}`,\n extractedFolderName: `${basename(ghAsset.name, \".tar.xz\")}`,\n binRelativeDir: \"bin\",\n binFileName: addExeExt(\"infer\"),\n }\n }\n\n throw new Error(`No asset found for version ${version} matching ${keywords} and ${optionalKeywords}`)\n}\n\n/** Setup infer */\nexport function setupInfer(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"infer\", version, getInferPackageInfo, setupDir, arch)\n}\n\nfunction getAssetKeywords(platform: string, arch: string) {\n const keywords: string[] = []\n const optionalKeywords: string[] = []\n\n switch (platform) {\n case \"linux\": {\n keywords.push(\"linux\")\n\n if (x86_64.includes(arch)) {\n optionalKeywords.push(\"64\")\n optionalKeywords.push(\"x86_64\")\n } else {\n info(`Using arch ${arch} for infer`)\n keywords.push(arch)\n }\n break\n }\n case \"darwin\": {\n keywords.push(\"osx\")\n\n if (x86_64.includes(arch)) {\n optionalKeywords.push(\"x86_64\")\n } else if (arm64.includes(arch)) {\n // allow falling back to x86_64 if arm64 is not available\n optionalKeywords.push(\"arm64\")\n } else {\n info(`Using arch ${arch} for infer`)\n keywords.push(arch)\n }\n break\n }\n default:\n info(`Using ${platform} ${arch} for infer`)\n keywords.push(platform, arch)\n break\n }\n return { keywords, optionalKeywords }\n}\n","import { addExeExt } from \"patha\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name Ninja uses in their download links */\nfunction getNinjaPlatformArch(platform: NodeJS.Platform, arch: string) {\n switch (platform) {\n case \"win32\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"win\"\n : arm64.includes(arch)\n ? \"winarm64\"\n : \"win\"\n case \"darwin\":\n return \"mac\"\n case \"linux\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"linux\"\n : arm64.includes(arch)\n ? \"linux-aarch64\"\n : \"linux\"\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Get the platform data for ninja */\nfunction getNinjaPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const ninjaPlatform = getNinjaPlatformArch(platform, arch)\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"ninja\"),\n extractedFolderName: \"\",\n url: `https://github.com/ninja-build/ninja/releases/download/v${version}/ninja-${ninjaPlatform}.zip`,\n }\n}\n\nexport function setupNinja(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"ninja\", version, getNinjaPackageInfo, setupDir, arch)\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { setupCmake } from \"../cmake/cmake.js\"\nimport { setupNinja } from \"../ninja/ninja.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractTarByExe } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { addVPrefix, removeVPrefix } from \"../utils/setup/version.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nfunction getDownloadKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/releases/download/${version}/kcov-amd64.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"usr/local/bin\",\n binFileName: addExeExt(\"kcov\"),\n }\n}\n\nfunction getBuildKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/archive/refs/tags/${version}.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"build/src\",\n binFileName: addExeExt(\"kcov\"),\n extractFunction: buildKcov,\n }\n}\n\nasync function buildKcov(file: string, dest: string) {\n const out = await extractTarByExe(file, dest, 1)\n\n // build after extraction using CMake\n const cmake = await getCmake()\n\n if (process.platform === \"linux\") {\n if (isArch()) {\n await Promise.all([setupPacmanPack(\"libdwarf\"), setupPacmanPack(\"libcurl-openssl\")])\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"libdwarf-devel\" }, { name: \"libcurl-devel\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libdw-dev\" }, { name: \"libcurl4-openssl-dev\" }])\n }\n }\n\n // apply gcc13.patch\n try {\n if (which.sync(\"patch\", { nothrow: true }) !== null) {\n const patch = join(dirname, \"gcc13.patch\")\n await execa(\"patch\", [\"-N\", \"-p1\", \"-i\", patch], { cwd: out, stdio: \"inherit\" })\n } else {\n info(\"`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13\")\n }\n } catch {\n // ignore\n }\n\n const buildDir = join(out, \"build\")\n await execa(cmake, [\"-S\", out, \"-B\", buildDir, \"-DCMAKE_BUILD_TYPE=Release\", \"-G\", \"Ninja\"], {\n cwd: out,\n stdio: \"inherit\",\n })\n await execa(cmake, [\"--build\", buildDir, \"--config\", \"Release\"], { cwd: out, stdio: \"inherit\" })\n // execRootSync(cmake, [\"--install\", buildDir], out)\n // return \"user/local/bin\" // the cmake install prefix\n return out\n}\n\nasync function getCmake() {\n let cmake = which.sync(\"cmake\", { nothrow: true })\n if (cmake === null) {\n const { binDir } = await setupCmake(\n getVersion(\"cmake\", undefined, await ubuntuVersion()),\n join(untildifyUser(\"~\"), \"cmake\"),\n \"\",\n )\n cmake = join(binDir, \"cmake\")\n }\n const ninja = which.sync(\"ninja\", { nothrow: true })\n if (ninja === null) {\n await setupNinja(getVersion(\"ninja\", undefined, await ubuntuVersion()), join(untildifyUser(\"~\"), \"ninja\"), \"\")\n }\n return cmake\n}\n\nexport async function setupKcov(versionGiven: string, setupDir: string, arch: string) {\n if (process.platform !== \"linux\") {\n info(\"Kcov is not supported on non-linux\")\n return\n }\n\n // parse version\n const versionSplit = versionGiven.split(\"-\")\n let version = addVPrefix(versionSplit[0])\n const installMethod = versionSplit[1] as \"binary\" | undefined\n const version_number = removeVPrefix(version)\n // fix inconsistency in tagging\n if (version_number === 38) {\n version = \"v38\"\n }\n\n let installationInfo: InstallationInfo\n if (installMethod === \"binary\" && version_number >= 39) {\n installationInfo = await setupBin(\"kcov\", version, getDownloadKcovPackageInfo, setupDir, arch)\n if (isArch()) {\n await setupPacmanPack(\"binutils\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"binutils\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libbinutils\" }])\n }\n return installationInfo\n } else {\n installationInfo = await setupBin(\"kcov\", version, getBuildKcovPackageInfo, setupDir, arch)\n }\n return installationInfo\n}\n","import { error } from \"console\"\nimport { notice } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\n\nexport async function setupAppleClang() {\n if (process.platform !== \"darwin\") {\n return\n }\n\n if (await which(\"clang\", { nothrow: true }) !== null && await which(\"clang++\", { nothrow: true }) !== null) {\n notice(\"Assuming clang is an Apple Clang compiler\")\n await Promise.all([addEnv(\"CC\", \"clang\", rcOptions), addEnv(\"CXX\", \"clang++\", rcOptions)])\n }\n\n // TODO install Apple Clang automatically\n error(\"Apple Clang automatic installation is not supported yet\")\n}\n","const core = require('@actions/core')\nconst child_process = require('child_process')\nconst fs = require('fs')\nconst path = require('path')\nconst process = require('process')\n\nconst PROGRAM_FILES_X86 = process.env['ProgramFiles(x86)']\nconst PROGRAM_FILES = [process.env['ProgramFiles(x86)'], process.env['ProgramFiles']]\n\n\nconst EDITIONS = ['Enterprise', 'Professional', 'Community', 'BuildTools']\nconst YEARS = ['2022', '2019', '2017']\n\nconst VsYearVersion = {\n '2022': '17.0',\n '2019': '16.0',\n '2017': '15.0',\n '2015': '14.0',\n '2013': '12.0',\n}\n\n/**\n * Convert the vs version (e.g. 2022) or year (e.g. 17.0) to the version number (e.g. 17.0)\n * @param {string | undefined} vsversion the year (e.g. 2022) or version number (e.g. 17.0)\n * @returns {string | undefined} the version number (e.g. 17.0)\n */\nfunction vsversion_to_versionnumber(vsversion) {\n if (Object.values(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n if (vsversion in VsYearVersion) {\n return VsYearVersion[vsversion]\n }\n }\n return vsversion\n}\nexports.vsversion_to_versionnumber = vsversion_to_versionnumber\n\n/**\n * Convert the vs version (e.g. 17.0) or year (e.g. 2022) to the year (e.g. 2022)\n * @param {string} vsversion the version number (e.g. 17.0) or year (e.g. 2022)\n * @returns {string} the year (e.g. 2022)\n */\nfunction vsversion_to_year(vsversion) {\n if (Object.keys(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n for (const [year, ver] of Object.entries(VsYearVersion)) {\n if (ver === vsversion) {\n return year\n }\n }\n }\n return vsversion\n}\nexports.vsversion_to_year = vsversion_to_year\n\nconst VSWHERE_PATH = `${PROGRAM_FILES_X86}\\\\Microsoft Visual Studio\\\\Installer`\n\n/**\n * Find MSVC tools with vswhere\n * @param {string} pattern the pattern to search for\n * @param {string} version_pattern the version pattern to search for\n * @returns {string | null} the path to the found MSVC tools\n */\nfunction findWithVswhere(pattern, version_pattern) {\n try {\n let installationPath = child_process.execSync(`vswhere -products * ${version_pattern} -prerelease -property installationPath`).toString().trim()\n return installationPath + '\\\\' + pattern\n } catch (e) {\n core.warning(`vswhere failed: ${e}`)\n }\n return null\n}\nexports.findWithVswhere = findWithVswhere\n\n/**\n * Find the vcvarsall.bat file for the given Visual Studio version\n * @param {string | undefined} vsversion the version of Visual Studio to find (year or version number)\n * @returns {string} the path to the vcvarsall.bat file\n */\nfunction findVcvarsall(vsversion) {\n const vsversion_number = vsversion_to_versionnumber(vsversion)\n let version_pattern\n if (vsversion_number) {\n const upper_bound = vsversion_number.split('.')[0] + '.9'\n version_pattern = `-version \"${vsversion_number},${upper_bound}\"`\n } else {\n version_pattern = \"-latest\"\n }\n\n // If vswhere is available, ask it about the location of the latest Visual Studio.\n let path = findWithVswhere('VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat', version_pattern)\n if (path && fs.existsSync(path)) {\n core.info(`Found with vswhere: ${path}`)\n return path\n }\n core.info(\"Not found with vswhere\")\n\n // If that does not work, try the standard installation locations,\n // starting with the latest and moving to the oldest.\n const years = vsversion ? [vsversion_to_year(vsversion)] : YEARS\n for (const prog_files of PROGRAM_FILES) {\n for (const ver of years) {\n for (const ed of EDITIONS) {\n path = `${prog_files}\\\\Microsoft Visual Studio\\\\${ver}\\\\${ed}\\\\VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat`\n core.info(`Trying standard location: ${path}`)\n if (fs.existsSync(path)) {\n core.info(`Found standard location: ${path}`)\n return path\n }\n }\n }\n }\n core.info(\"Not found in standard locations\")\n\n // Special case for Visual Studio 2015 (and maybe earlier), try it out too.\n path = `${PROGRAM_FILES_X86}\\\\Microsoft Visual C++ Build Tools\\\\vcbuildtools.bat`\n if (fs.existsSync(path)) {\n core.info(`Found VS 2015: ${path}`)\n return path\n }\n core.info(`Not found in VS 2015 location: ${path}`)\n\n throw new Error('Microsoft Visual Studio not found')\n}\nexports.findVcvarsall = findVcvarsall\n\nfunction isPathVariable(name) {\n const pathLikeVariables = ['PATH', 'INCLUDE', 'LIB', 'LIBPATH']\n return pathLikeVariables.indexOf(name.toUpperCase()) != -1\n}\n\nfunction filterPathValue(path) {\n let paths = path.split(';')\n // Remove duplicates by keeping the first occurance and preserving order.\n // This keeps path shadowing working as intended.\n function unique(value, index, self) {\n return self.indexOf(value) === index\n }\n return paths.filter(unique).join(';')\n}\n\n/**\n * Setup MSVC Developer Command Prompt\n * @param {string} arch - Target architecture\n * @param {string | undefined} sdk - Windows SDK number to build for\n * @param {string | undefined} toolset - VC++ compiler toolset version\n * @param {boolean | 'true' | 'false' | undefined} uwp - Build for Universal Windows Platform\n * @param {boolean | 'true' | 'false' | undefined} spectre - Enable Spectre mitigations\n * @param {string | undefined} vsversion - The Visual Studio version to use. This can be the version number (e.g. 16.0 for 2019) or the year (e.g. \"2019\").\n */\nfunction setupMSVCDevCmd(arch, sdk, toolset, uwp, spectre, vsversion) {\n if (process.platform != 'win32') {\n core.info('This is not a Windows virtual environment, bye!')\n return\n }\n\n // Add standard location of \"vswhere\" to PATH, in case it's not there.\n process.env.PATH += path.delimiter + VSWHERE_PATH\n\n // There are all sorts of way the architectures are called. In addition to\n // values supported by Microsoft Visual C++, recognize some common aliases.\n let arch_aliases = {\n \"win32\": \"x86\",\n \"win64\": \"x64\",\n \"x86_64\": \"x64\",\n \"x86-64\": \"x64\",\n }\n // Ignore case when matching as that's what humans expect.\n if (arch.toLowerCase() in arch_aliases) {\n arch = arch_aliases[arch.toLowerCase()]\n }\n\n // Due to the way Microsoft Visual C++ is configured, we have to resort to the following hack:\n // Call the configuration batch file and then output *all* the environment variables.\n\n var args = [arch]\n\n if (uwp && JSON.parse(uwp) === true) {\n args.push('uwp')\n }\n if (sdk) {\n args.push(sdk)\n }\n if (toolset) {\n args.push(`-vcvars_ver=${toolset}`)\n }\n if (spectre && JSON.parse(spectre) === true) {\n args.push('-vcvars_spectre_libs=spectre')\n }\n\n const vcvars = `\"${findVcvarsall(vsversion)}\" ${args.join(' ')}`\n core.debug(`vcvars command-line: ${vcvars}`)\n\n const cmd_output_string = child_process.execSync(`set && cls && ${vcvars} && cls && set`, {shell: \"cmd\"}).toString()\n const cmd_output_parts = cmd_output_string.split('\\f')\n\n const old_environment = cmd_output_parts[0].split('\\r\\n')\n const vcvars_output = cmd_output_parts[1].split('\\r\\n')\n const new_environment = cmd_output_parts[2].split('\\r\\n')\n\n // If vsvars.bat is given an incorrect command line, it will print out\n // an error and *still* exit successfully. Parse out errors from output\n // which don't look like environment variables, and fail if appropriate.\n const error_messages = vcvars_output.filter((line) => {\n if (line.match(/^\\[ERROR.*\\]/)) {\n // Don't print this particular line which will be confusing in output.\n if (!line.match(/Error in script usage. The correct usage is:$/)) {\n return true\n }\n }\n return false\n })\n if (error_messages.length > 0) {\n throw new Error('invalid parameters' + '\\r\\n' + error_messages.join('\\r\\n'))\n }\n\n // Convert old environment lines into a dictionary for easier lookup.\n let old_env_vars = {}\n for (let string of old_environment) {\n const [name, value] = string.split('=')\n old_env_vars[name] = value\n }\n\n // Now look at the new environment and export everything that changed.\n // These are the variables set by vsvars.bat. Also export everything\n // that was not there during the first sweep: those are new variables.\n core.startGroup('Environment variables')\n for (let string of new_environment) {\n // vsvars.bat likes to print some fluff at the beginning.\n // Skip lines that don't look like environment variables.\n if (!string.includes('=')) {\n continue;\n }\n let [name, new_value] = string.split('=')\n let old_value = old_env_vars[name]\n // For new variables \"old_value === undefined\".\n if (new_value !== old_value) {\n core.info(`Setting ${name}`)\n // Special case for a bunch of PATH-like variables: vcvarsall.bat\n // just prepends its stuff without checking if its already there.\n // This makes repeated invocations of this action fail after some\n // point, when the environment variable overflows. Avoid that.\n if (isPathVariable(name)) {\n new_value = filterPathValue(new_value)\n }\n core.exportVariable(name, new_value)\n }\n }\n core.endGroup()\n\n core.info(`Configured Developer Command Prompt`)\n}\nexports.setupMSVCDevCmd = setupMSVCDevCmd\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { info } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { setupMSVCDevCmd } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { rcOptions } from \"../cli-options.js\"\n\nfunction getArch(arch: string): string {\n switch (arch) {\n case \"x32\":\n case \"32\":\n case \"ia32\": {\n return \"x86\"\n }\n case \"64\": {\n return \"x64\"\n }\n default: {\n return arch\n }\n }\n}\n\nexport async function setupVCVarsall(\n vsversion: string,\n VCTargetsPath: string | undefined,\n arch: string,\n toolset: string | undefined,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (VCTargetsPath !== undefined && (await pathExists(VCTargetsPath))) {\n info(`Adding ${VCTargetsPath} to PATH`)\n await addEnv(\"VCTargetsPath\", VCTargetsPath, rcOptions)\n }\n\n await setupMSVCDevCmd(getArch(arch), sdk, toolset, uwp, spectre, vsversion)\n}\n","import { join } from \"path\"\nimport { endGroup, startGroup } from \"@actions/core\"\nimport { error } from \"ci-log\"\nimport pTimeout from \"p-timeout\"\nimport { setupBrew } from \"setup-brew\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { type ToolName, llvmTools, setups } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\nexport const DEFAULT_TIMEOUT = 20 * 60 * 1000 // 20 minutes\n\nexport async function installTool(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n errorMessages: string[],\n timeout: number = DEFAULT_TIMEOUT,\n) {\n startGroup(`Installing ${tool} ${version}`)\n try {\n await pTimeout(installToolImpl(tool, version, osVersion, arch, setupCppDir, successMessages), {\n milliseconds: timeout,\n message: `Timeout while installing ${tool} ${version}. You can increase the timeout from options`,\n })\n } catch (e) {\n // push error message to the logger\n error(e as string | Error)\n if (e instanceof Error && e.stack !== undefined) {\n error(e.stack)\n }\n errorMessages.push(`${tool} failed to install`)\n }\n endGroup()\n}\n\nasync function installToolImpl(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n) {\n const hasLLVM = llvmTools.includes(tool)\n\n let installationInfo: InstallationInfo | undefined | void\n if (tool === \"vcvarsall\") {\n // eslint-disable-next-line no-await-in-loop\n await setupVCVarsall(getVersion(tool, version, osVersion), undefined, arch, undefined, undefined, false, false)\n } else if (tool === \"brew\") {\n // eslint-disable no-await-in-loop\n installationInfo = await setupBrew({ rcOptions })\n } else {\n // the tool installation directory (for the functions that ue it)\n const setupDir = join(setupCppDir, hasLLVM ? \"llvm\" : tool)\n\n const setupVersion = getVersion(tool, version, osVersion)\n\n // get the setup function\n const setupFunction = setups[tool]\n\n // eslint-disable no-await-in-loop\n installationInfo = await setupFunction(setupVersion, setupDir, arch)\n }\n // preparing a report string\n successMessages.push(getSuccessMessage(tool, installationInfo))\n}\n","export class TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new AbortError(errorMessage)\n\t: new DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined\n\t\t? getDOMException('This operation was aborted.')\n\t\t: signal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nexport default function pTimeout(promise, options) {\n\tconst {\n\t\tmilliseconds,\n\t\tfallback,\n\t\tmessage,\n\t\tcustomTimers = {setTimeout, clearTimeout},\n\t} = options;\n\n\tlet timer;\n\n\tconst wrappedPromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (options.signal) {\n\t\t\tconst {signal} = options;\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\tpromise.then(resolve, reject);\n\t\t\treturn;\n\t\t}\n\n\t\t// We create the error outside of `setTimeout` to preserve the stack trace.\n\t\tconst timeoutError = new TimeoutError();\n\n\t\ttimer = customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (fallback) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\tif (message === false) {\n\t\t\t\tresolve();\n\t\t\t} else if (message instanceof Error) {\n\t\t\t\treject(message);\n\t\t\t} else {\n\t\t\t\ttimeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\t\treject(timeoutError);\n\t\t\t}\n\t\t}, milliseconds);\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await promise);\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t})();\n\t});\n\n\tconst cancelablePromise = wrappedPromise.finally(() => {\n\t\tcancelablePromise.clear();\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\tcustomTimers.clearTimeout.call(undefined, timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { arm64, armv7, powerpc64le, sparc64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractExe, extractTarByExe } from \"../utils/setup/extract.js\"\nimport type { PackageInfo } from \"../utils/setup/setupBin.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function getLLVMPackageInfo(\n version: string,\n platform: NodeJS.Platform,\n arch: string,\n): Promise {\n const url = await getLLVMAssetURL(platform, arch, version)\n info(`Downloading LLVM from ${url}`)\n\n return {\n url,\n extractedFolderName: \"\",\n binRelativeDir: \"bin\",\n binFileName: addExeExt(\"clang\"),\n extractFunction: platform === \"win32\"\n ? extractExe\n : (file: string, dest: string) => {\n return extractTarByExe(file, dest, 1)\n },\n }\n}\n\nexport async function getLLVMAssetURL(platform: string, arch: string, version: string) {\n const { keywords, optionalKeywords } = await getAssetKeywords(platform, arch)\n\n // first check the github releases\n const llvmGitHubAssets = await loadAssetList(\n join(dirname, \"github_llvm_llvm-project.json\"),\n )\n const ghAsset = matchAsset(\n llvmGitHubAssets,\n {\n version,\n keywords,\n optionalKeywords,\n filterMapTag(tag) {\n return tag.replace(/^llvmorg-/, \"\")\n },\n },\n )\n\n if (ghAsset !== undefined) {\n return `https://github.com/llvm/llvm-project/releases/download/${ghAsset.tag}/${ghAsset.name}`\n }\n\n // check the llvm website\n const llvmWebsiteAssets = await loadAssetList(\n join(dirname, \"llvm_org_releases.json\"),\n )\n\n const websiteAsset = matchAsset(\n llvmWebsiteAssets,\n {\n version,\n keywords,\n optionalKeywords,\n },\n )\n\n if (websiteAsset !== undefined) {\n return `https://releases.llvm.org/${websiteAsset.tag}/${websiteAsset.name}`\n }\n\n throw new Error(`No asset found for version ${version} matching ${keywords} and ${optionalKeywords}`)\n}\n\nasync function getAssetKeywords(platform: string, arch: string) {\n const keywords: string[] = []\n const optionalKeywords: string[] = []\n\n switch (platform) {\n case \"win32\": {\n if (x86_64.includes(arch)) {\n keywords.push(\"win64\")\n // TODO fallback to win32 if win64 is not available (e.g. for LLVM 3.6.2 and older)\n } else if (x86.includes(arch)) {\n keywords.push(\"win32\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"woa64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"linux\": {\n keywords.push(\"linux\")\n\n if (isUbuntu()) {\n optionalKeywords.push(\"ubuntu\")\n\n const ubuntuVer = await ubuntuVersion()\n if (ubuntuVer !== null) {\n optionalKeywords.push(`${ubuntuVer[0]}`)\n const ubuntuMin = ubuntuVer[1] < 10 ? `0${ubuntuVer[1]}` : `${ubuntuVer[1]}`\n\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}`)\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}.${ubuntuVer[2]}`)\n }\n } else if (hasDnf()) {\n optionalKeywords.push(\"rhel\")\n }\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"x86\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"aarch64\")\n } else if (armv7.includes(arch)) {\n keywords.push(\"armv7a\")\n } else if (powerpc64le.includes(arch)) {\n keywords.push(\"powerpc64le\")\n } else if (sparc64.includes(arch)) {\n keywords.push(\"sparc64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n case \"darwin\": {\n keywords.push(\"apple\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (arm64.includes(arch)) {\n // allow falling back to x86_64 if arm64 is not available\n optionalKeywords.push(\"arm64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"freebsd\": {\n keywords.push(\"freebsd\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"amd64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"i386\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n default:\n info(`Using ${platform} ${arch} for LLVM`)\n keywords.push(platform, arch)\n break\n }\n return { keywords, optionalKeywords }\n}\n","import { tmpdir } from \"os\"\nimport path, { delimiter, join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { execRootSync } from \"admina\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport memoize from \"memoizee\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupGcc } from \"../gcc/gcc.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { arm64, x86_64 } from \"../utils/env/arch.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type InstallationInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { semverCoerceIfInvalid } from \"../utils/setup/version.js\"\nimport { quoteIfHasSpace } from \"../utils/std/index.js\"\nimport { getVersion } from \"../versions/versions.js\"\nimport { LLVMPackages, setupLLVMApt } from \"./llvm_installer.js\"\nimport { getLLVMPackageInfo } from \"./llvm_url.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function setupLLVM(version: string, setupDir: string, arch: string): Promise {\n const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)\n await activateLLVM(installationInfo.installDir ?? setupDir, version)\n return installationInfo\n}\n\nasync function setupLLVMWithoutActivation_(version: string, setupDir: string, arch: string) {\n // install LLVM\n const [installationInfo, _1] = await Promise.all([\n setupLLVMOnly(version, setupDir, arch),\n addLLVMLoggingMatcher(),\n ])\n\n // install LLVM dependencies\n await setupLLVMDeps(arch)\n\n return installationInfo\n}\nconst setupLLVMWithoutActivation = memoize(setupLLVMWithoutActivation_, { promise: true })\n\n/**\n * Setup clang-format\n *\n * This uses the LLVM installer on Ubuntu, and the LLVM binaries on other platforms\n */\nexport function setupClangFormat(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch, LLVMPackages.ClangFormat)\n}\n\n/** Setup llvm tools (clang tidy, etc.) without activating llvm and using it as the compiler */\nexport function setupClangTools(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch)\n}\n\nasync function setupLLVMOnly(\n version: string,\n setupDir: string,\n arch: string,\n packages: LLVMPackages = LLVMPackages.All,\n) {\n const majorVersion = majorLLVMVersion(version)\n try {\n if (isUbuntu()) {\n return await setupLLVMApt(majorVersion, packages)\n }\n } catch (err) {\n info(`Failed to install llvm via system package manager ${err}`)\n }\n\n const installationInfo = await setupBin(\"llvm\", version, getLLVMPackageInfo, setupDir, arch)\n await llvmBinaryDeps(majorVersion)\n return installationInfo\n}\n\nfunction majorLLVMVersion(version: string) {\n const coeredVersion = semverCoerceIfInvalid(version)\n return Number.parseInt(coeredVersion.split(\".\")[0], 10)\n}\n\nasync function llvmBinaryDeps_(majorVersion: number) {\n if (isUbuntu()) {\n if (majorVersion <= 10) {\n try {\n await installAptPack([{ name: \"libtinfo5\" }])\n } catch (err) {\n // Manually install libtinfo5 if the package is not available\n info(`Failed to install libtinfo5 ${err}\\nManually installing the package`)\n const arch = x86_64.includes(process.arch)\n ? \"amd64\"\n : arm64.includes(process.arch)\n ? \"arm64\"\n : process.arch\n\n const fileName = `libtinfo5_6.3-2ubuntu0.1_${arch}.deb`\n const url = `http://launchpadlibrarian.net/666971015/${fileName}`\n const dl = new DownloaderHelper(url, tmpdir(), { fileName })\n dl.on(\"error\", (dlErr) => {\n throw new Error(`Failed to download ${url}: ${dlErr}`)\n })\n await dl.start()\n // Install the downloaded package via dpkg\n execRootSync(\"dpkg\", [\"-i\", join(tmpdir(), fileName)])\n }\n } else {\n await installAptPack([{ name: \"libtinfo-dev\" }])\n }\n } else if (isArch()) {\n // https://aur.archlinux.org/packages/ncurses5-compat-libs\n await setupPacmanPack(\"ncurses5-compat-libs\", undefined, \"yay\")\n } else if (hasDnf()) {\n // https://packages.fedoraproject.org/pkgs/ncurses/ncurses-compat-libs/index.html\n await setupDnfPack([\n { name: \"ncurses-compat-libs\" },\n ])\n }\n}\nconst llvmBinaryDeps = memoize(llvmBinaryDeps_, { promise: true })\n\nasync function setupLLVMDeps_(arch: string) {\n if (process.platform === \"linux\") {\n // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first,\n // but with a lower priority than the one used by activateLLVM()\n await setupGcc(getVersion(\"gcc\", undefined, await ubuntuVersion()), \"\", arch, 40)\n }\n}\nconst setupLLVMDeps = memoize(setupLLVMDeps_, { promise: true })\n\nexport async function activateLLVM(directory: string, version: string) {\n const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n\n const llvmMajor = majorLLVMVersion(version)\n\n const actPromises: Promise[] = [\n // compiler paths\n addEnv(\"CC\", addExeExt(`${directory}/bin/clang`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${directory}/bin/clang++`), rcOptions),\n\n // the output of this action\n addEnv(\"LLVM_PATH\", directory, rcOptions),\n\n // Setup LLVM as the compiler\n addEnv(\"LD_LIBRARY_PATH\", `${ld}${delimiter}${directory}/lib`, rcOptions),\n addEnv(\"DYLD_LIBRARY_PATH\", `${dyld}${delimiter}${directory}/lib`, rcOptions),\n\n // compiler flags\n addEnv(\"LLVM_LDFLAGS\", `-L${quoteIfHasSpace(`${directory}/lib`)}`, rcOptions),\n addEnv(\"LLVM_CPPFLAGS\", `-I${quoteIfHasSpace(`${directory}/include`)}`, rcOptions),\n\n // CPATH\n await pathExists(`${directory}/lib/clang/${version}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${version}/include`, rcOptions)\n : await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${llvmMajor}/include`, rcOptions)\n : Promise.resolve(),\n\n addEnv(\"LIBRARY_PATH\", `${directory}/lib`, rcOptions),\n\n // os sdks\n setupMacOSSDK(),\n ]\n\n if (isUbuntu()) {\n const priority = 60\n actPromises.push(\n addUpdateAlternativesToRc(\"cc\", `${directory}/bin/clang`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${directory}/bin/clang++`, rcOptions, priority),\n addUpdateAlternativesToRc(\"clang\", `${directory}/bin/clang`, rcOptions),\n addUpdateAlternativesToRc(\"clang++\", `${directory}/bin/clang++`, rcOptions),\n addUpdateAlternativesToRc(\"lld\", `${directory}/bin/lld`, rcOptions),\n addUpdateAlternativesToRc(\"ld.lld\", `${directory}/bin/ld.lld`, rcOptions),\n addUpdateAlternativesToRc(\"llvm-ar\", `${directory}/bin/llvm-ar`, rcOptions),\n )\n }\n\n await Promise.all(actPromises)\n}\n\nasync function addLLVMLoggingMatcher() {\n if (GITHUB_ACTIONS) {\n const matcherPath = join(dirname, \"llvm_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the llvm_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n }\n}\n","import { info } from \"console\"\nimport { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRoot } from \"admina\"\nimport { addPath } from \"envosman\"\nimport { chmod, readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { aptTimeout, hasNala, installAptPack, isAptPackRegexInstalled } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { DEFAULT_TIMEOUT } from \"../installTool.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\nexport enum LLVMPackages {\n All = 0,\n ClangFormat = 1,\n Core = 2,\n}\n\nexport async function setupLLVMApt(\n majorVersion: number,\n packages: LLVMPackages = LLVMPackages.All,\n): Promise {\n // TODO for older versions, this also includes the minor version\n const installationFolder = `/usr/lib/llvm-${majorVersion}`\n\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }])\n const dl = new DownloaderHelper(\"https://apt.llvm.org/llvm.sh\", tmpdir(), { fileName: \"llvm.sh\" })\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the LLVM installer script: ${err}`)\n })\n await dl.start()\n const installerScript = await readFile(dl.getDownloadPath(), \"utf-8\")\n\n const installerPath = join(tmpdir(), \"llvm-setup-cpp.sh\")\n const neededPackages = await patchAptLLVMScript(\n installerScript,\n installerPath,\n majorVersion,\n packages,\n )\n await installAptPack(neededPackages)\n await chmod(installerPath, \"755\")\n await execRoot(\n \"bash\",\n [installerPath, `${majorVersion}`, ...(packages === LLVMPackages.All ? [\"all\"] : [])],\n {\n stdio: \"inherit\",\n shell: true,\n timeout: DEFAULT_TIMEOUT,\n },\n )\n\n await addPath(`${installationFolder}/bin`, rcOptions)\n\n return {\n installDir: `${installationFolder}`,\n binDir: `${installationFolder}/bin`,\n bin: `${installationFolder}/bin/clang++`,\n }\n}\n\nasync function patchAptLLVMScript(\n givenScript: string,\n target_path: string,\n majorVersion: number,\n packages: LLVMPackages,\n) {\n let script = debugScript(givenScript)\n script = nonInteractiveScript(script)\n script = choosePackages(packages, script, majorVersion)\n script = await removeConflictingPackages(script)\n script = useNalaScript(script)\n\n await writeFile(target_path, script)\n\n // the packages needed by the script\n return [{ name: \"lsb-release\" }, { name: \"wget\" }, { name: \"software-properties-common\" }, { name: \"gnupg\" }]\n}\n\nfunction debugScript(script: string) {\n if (process.env.NODE_DEBUG !== \"1\" && process.env.NODE_DEBUG !== \"true\") {\n return script.replace(/set -eux/g, \"set -eu\")\n }\n return script\n}\n\nfunction nonInteractiveScript(script: string) {\n // make the scirpt non-interactive and fix broken packages\n return script.replace(\n /add-apt-repository \"\\${REPO_NAME}\"/g,\n `add-apt-repository -y -n \"\\${REPO_NAME}\"\napt-get update -o ${aptTimeout} -y`,\n )\n}\n\nasync function removeConflictingPackages(givenScript: string) {\n // fix conflicts between libclang-rt and libclang\n let script = givenScript.replace(\n /apt-get install -y/g,\n `apt-get install -o Dpkg::Options::=\"--force-overwrite\" -o ${aptTimeout} -y --fix-broken`,\n )\n\n // check if these are installed and if so, remove them from the script as they conflict\n const conflictingPackages = [\"libc++-$LLVM_VERSION-dev\", \"libc++abi-$LLVM_VERSION-dev\", \"libunwind-$LLVM_VERSION-dev\"]\n await Promise.all(\n conflictingPackages.map(async (pack) => {\n const installingPack = pack.replace(\"$LLVM_VERSION\", \"*\")\n if (await isAptPackRegexInstalled(installingPack)) {\n info(`Removing conflicting package ${installingPack}`)\n script = script.replace(pack, \"\")\n }\n }),\n )\n return script\n}\n\nfunction useNalaScript(script: string) {\n // use nala if it is available\n if (hasNala()) {\n return script.replace(/apt-get/g, \"nala\")\n }\n return script\n}\n\nfunction choosePackages(packages: LLVMPackages, script: string, majorVersion: number) {\n if (packages === LLVMPackages.ClangFormat) {\n return script.replace(/ -y \\$PKG/g, ` -y clang-format-${majorVersion}`)\n }\n return script\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { findVcvarsall, vsversion_to_versionnumber } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupVCVarsall } from \"../vcvarsall/vcvarsall.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\ntype MSVCVersion = \"2022\" | \"17.0\" | \"2019\" | \"16.0\" | \"2017\" | \"15.0\" | \"2015\" | \"14.0\" | \"2013\" | \"12.0\" | string\n\nexport async function setupMSVC(\n versionGiven: MSVCVersion,\n _setupDir: string,\n arch: string,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (process.platform !== \"win32\") {\n return\n }\n const version = vsversion_to_versionnumber(versionGiven) as string\n\n // check if the given version is already installed\n info(`Checking if MSVC ${version} is already installed`)\n let installed = false\n try {\n const vcvarsall_path = findVcvarsall(version) as string\n installed = true\n info(`Found the pre-installed version of MSVC at ${vcvarsall_path}`)\n } catch {\n // not installed, try installing\n }\n\n let toolset: string | undefined\n let VCTargetsPath: string | undefined\n // https://github.com/aminya/setup-cpp/issues/1\n if (!installed) {\n try {\n if (version === \"14.0\") {\n toolset = \"14.0\"\n await setupChocoPack(\"visualcpp-build-tools\", \"14.0.25420.1\", [\"--ignore-dependencies\"])\n VCTargetsPath = \"C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140\"\n } else if (version === \"15.0\") {\n toolset = \"14.16\"\n await setupChocoPack(\"visualstudio2017buildtools\", \"15.9.41.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16\" // TODO verify path\n } else if (version === \"16.0\") {\n toolset = \"14.29\"\n await setupChocoPack(\"visualstudio2019buildtools\", \"16.11.7.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133\"\n } else if (version === \"17.0\") {\n toolset = undefined\n await setupChocoPack(\"visualstudio2022buildtools\", \"117.0.5.0\", [])\n VCTargetsPath = undefined\n } else {\n error(`The given MSVC versions ${versionGiven} is not supported yet.`)\n }\n } catch (e) {\n error(e as string | Error)\n }\n }\n // run vcvarsall.bat environment variables\n await setupVCVarsall(version, VCTargetsPath, arch, toolset, sdk, uwp, spectre)\n\n if (GITHUB_ACTIONS) {\n await addMSVCLoggingMatcher()\n }\n}\n\nasync function addMSVCLoggingMatcher() {\n const matcherPath = join(dirname, \"msvc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the msvc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { addPath } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupOpencppcoverage(version: string | undefined, _setupDir: string, _arch: string) {\n if (process.platform !== \"win32\") {\n return\n }\n await setupChocoPack(\"opencppcoverage\", version)\n const binDir = await activateOpencppcoverage()\n return { binDir }\n}\n\nasync function activateOpencppcoverage() {\n const binDir = \"C:/Program Files/OpenCppCoverage\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { execRootSync } from \"admina\"\nimport { error } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n/** Get the platform data for cmake */\nfunction getPowerShellPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n return {\n url: getPowershellUrl(platform, arch, version),\n binRelativeDir: \"\",\n binFileName: addExeExt(\"pwsh\"),\n extractedFolderName: \"\",\n }\n}\n\nfunction getPowershellUrl(\n platform: string,\n arch: string,\n version: string,\n) {\n switch (platform) {\n case \"win32\": {\n const osArchStr = ([\"ia32\", \"x86\", \"i386\", \"x32\"].includes(arch))\n ? \"win-x86\"\n : \"win-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/PowerShell-${version}-${osArchStr}.zip`\n }\n case \"darwin\": {\n const osArchStr = [\"arm\", \"arm64\"].includes(arch) ? \"osx-arm64\" : \"osx-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n case \"linux\": {\n const archMap = {\n arm64: \"linux-arm64\",\n arm: \"linux-arm64\",\n arm32: \"linux-arm32\",\n aarch64: \"linux-arm64\",\n x64: \"linux-x64\",\n } as Record\n const osArchStr = archMap[arch] ?? \"linux-x64\"\n // TODO support musl\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershell(version: string, setupDir: string, arch: string) {\n try {\n return await setupBin(\"pwsh\", version, getPowerShellPackageInfo, setupDir, arch)\n } catch (err) {\n error(`Failed to setup pwsh via download: ${err}. Trying package managers...`)\n return setupPowershellSystem(version, setupDir, arch)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershellSystem(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"powershell-core\", version)\n const binDir = \"C:/Program Files/PowerShell/7\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"powershell\", version, { cask: true, overwrite: false })\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"powershell-bin\", version, \"yay\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"curl\" }])\n execRootSync(\"/bin/bash\", [\n \"-c\",\n \"curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo\",\n ])\n return setupDnfPack([{ name: \"powershell\", version }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"curl\" }])\n const ubuntuVerSplitted = (await ubuntuVersion())!\n const ubuntuVersionString = `${ubuntuVerSplitted[0]}.0${ubuntuVerSplitted[1]}`\n\n execRootSync(\"curl\", [\n \"-LJO\",\n `https://packages.microsoft.com/config/ubuntu/${ubuntuVersionString}/packages-microsoft-prod.deb`,\n ])\n execRootSync(\"dpkg\", [\"-i\", \"packages-microsoft-prod.deb\"])\n\n // TODO Debian\n // const keyFileName = await addAptKeyViaURL(\n // \"microsoft.asc\",\n // \"https://packages.microsoft.com/keys/microsoft.asc\"\n // )\n // execRootSync(\"/bin/bash\", [\n // \"-c\",\n // `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main\" > /etc/apt/sources.list.d/microsoft.list`,\n // ])\n\n return installAptPack([{ name: \"powershell\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addExeExt } from \"patha\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name task uses in their download links */\nfunction getTaskPlatform(platform: NodeJS.Platform) {\n switch (platform) {\n case \"win32\":\n return \"windows\"\n default:\n return platform\n }\n}\n\n/** Get the arch name task uses in their download links */\nfunction getTaskArch(arch: string) {\n switch (arch) {\n case \"x64\":\n return \"amd64\"\n case \"ia32\":\n case \"x86\":\n case \"i386\":\n case \"x32\":\n return \"386\"\n default:\n return arch\n }\n}\n\n/** Get the platform data for task */\nfunction getTaskPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const taskPlatform = getTaskPlatform(platform)\n const taskArch = getTaskArch(arch)\n const extension = platform === \"win32\" ? \"zip\" : \"tar.gz\"\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"task\"),\n extractedFolderName: \"\",\n url: `https://github.com/go-task/task/releases/download/v${version}/task_${taskPlatform}_${taskArch}.${extension}`,\n }\n}\n\nexport function setupTask(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"task\", version, getTaskPackageInfo, setupDir, arch)\n}\n","import { getInput } from \"@actions/core\"\nimport { info } from \"ci-log\"\nimport mri from \"mri\"\nimport { untildifyUser } from \"untildify-user\"\nimport { type Inputs, inputs } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\n\nexport function parseArgs(args: string[]): Opts {\n return mri & { help: boolean }>(args, {\n string: [...inputs, \"timeout\"],\n default: Object.fromEntries(inputs.map((inp) => [inp, maybeGetInput(inp)])),\n alias: { h: \"help\" },\n boolean: \"help\",\n })\n}\n\nexport function printHelp() {\n info(`\nsetup-cpp [options]\nsetup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true\n\nInstall all the tools required for building and testing C++/C projects.\n\n--architecture\\t the cpu architecture to install the tools for. By default it uses the current CPU architecture.\n--timeout\\t the timeout for the installation of each tool in minutes. By default it is 10 minutes.\n--compiler\\t the to install.\n \\t You can specify the version instead of specifying just the name e.g: --compiler 'llvm-13.0.0'\n--$tool_name\\t pass \"true\" or pass the you would like to install for this tool. e.g. --conan true or --conan \"1.42.1\"\n\nAll the available tools:\n`)\n\n console.table(\n {\n \"compiler and analyzer\": {\n tools: \"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall\",\n },\n \"build system\": {\n tools: \"--cmake, --ninja, --meson, --make, --task, --bazel\",\n },\n \"package manager\": { tools: \"--vcpkg, --conan, --choco, --brew, --nala\" },\n \"analyzer/linter\": {\n tools:\n \"--clang-tidy, --clang-format, --cppcheck, --cpplint, --flawfinder, --lizard, --infer, , --cmakelang, --cmake-lint, --cmake-format\",\n },\n cache: { tools: \"--ccache, --sccache\" },\n documentation: { tools: \"--doxygen, --graphviz\" },\n coverage: { tools: \"--gcovr, --opencppcoverage, --kcov\" },\n other: { tools: \"--python, --powershell, --sevenzip\" },\n },\n [\"tools\"],\n )\n}\n/** Get an object from github actions */\n\nexport function maybeGetInput(key: string) {\n const value = getInput(key.toLowerCase())\n if (value !== \"false\" && value !== \"\") {\n return value\n }\n return undefined // skip installation\n}\nexport type Opts = mri.Argv<\n Record & {\n help: boolean\n timeout?: string\n }\n>\n\nexport function getSuccessMessage(tool: string, installationInfo: InstallationInfo | undefined | void) {\n let msg = `✅ ${tool} was installed successfully:`\n if (installationInfo === undefined) {\n return msg\n }\n if (\"installDir\" in installationInfo) {\n msg += `\\n- The installation directory is ${installationInfo.installDir}`\n }\n if (installationInfo.binDir !== \"\") {\n msg += `\\n- The binary directory is ${installationInfo.binDir}`\n }\n return msg\n}\n\nexport const rcOptions = {\n rcPath: untildifyUser(\"~/.cpprc\"),\n guard: \"cpp\",\n}\n","'use strict'\n\nconst vendors = require('./vendors.json')\n\nconst env = process.env\n\n// Used for testing only\nObject.defineProperty(exports, '_vendors', {\n value: vendors.map(function (v) {\n return v.constant\n })\n})\n\nexports.name = null\nexports.isPR = null\n\nvendors.forEach(function (vendor) {\n const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]\n const isCI = envs.every(function (obj) {\n return checkEnv(obj)\n })\n\n exports[vendor.constant] = isCI\n\n if (!isCI) {\n return\n }\n\n exports.name = vendor.name\n\n switch (typeof vendor.pr) {\n case 'string':\n // \"pr\": \"CIRRUS_PR\"\n exports.isPR = !!env[vendor.pr]\n break\n case 'object':\n if ('env' in vendor.pr) {\n // \"pr\": { \"env\": \"BUILDKITE_PULL_REQUEST\", \"ne\": \"false\" }\n exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne\n } else if ('any' in vendor.pr) {\n // \"pr\": { \"any\": [\"ghprbPullId\", \"CHANGE_ID\"] }\n exports.isPR = vendor.pr.any.some(function (key) {\n return !!env[key]\n })\n } else {\n // \"pr\": { \"DRONE_BUILD_EVENT\": \"pull_request\" }\n exports.isPR = checkEnv(vendor.pr)\n }\n break\n default:\n // PR detection not supported for this vendor\n exports.isPR = null\n }\n})\n\nexports.isCI = !!(\n env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false'\n (env.BUILD_ID || // Jenkins, Cloudbees\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari\n env.CI_APP_ID || // Appflow\n env.CI_BUILD_ID || // Appflow\n env.CI_BUILD_NUMBER || // Appflow\n env.CI_NAME || // Codeship and others\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.RUN_ID || // TaskCluster, dsari\n exports.name ||\n false)\n)\n\nfunction checkEnv (obj) {\n // \"env\": \"CIRRUS\"\n if (typeof obj === 'string') return !!env[obj]\n\n // \"env\": { \"env\": \"NODE\", \"includes\": \"/app/.heroku/node/bin/node\" }\n if ('env' in obj) {\n // Currently there are no other types, uncomment when there are\n // if ('includes' in obj) {\n return env[obj.env] && env[obj.env].includes(obj.includes)\n // }\n }\n if ('any' in obj) {\n return obj.any.some(function (k) {\n return !!env[k]\n })\n }\n return Object.keys(obj).every(function (k) {\n return env[k] === obj[k]\n })\n}\n","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;","import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;","import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;","export default '00000000-0000-0000-0000-000000000000';","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","module.exports = require('./lib/tunnel');\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as pm from './proxy';\nimport * as tunnel from 'tunnel';\nexport var HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (HttpCodes = {}));\nexport var Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (Headers = {}));\nexport var MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nexport function getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nexport class HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n statusCode;\n result;\n}\nexport class HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n message;\n async readBody() {\n return new Promise(async (resolve) => {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n });\n }\n async readBodyBuffer() {\n return new Promise(async (resolve) => {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n });\n }\n}\nexport function isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexport class HttpClient {\n userAgent;\n handlers;\n requestOptions;\n _ignoreSslError = false;\n _socketTimeout;\n _allowRedirects = true;\n _allowRedirectDowngrade = false;\n _maxRedirects = 50;\n _allowRetries = false;\n _maxRetries = 1;\n _agent;\n _proxyAgent;\n _proxyAgentDispatcher;\n _keepAlive = false;\n _disposed = false;\n constructor(userAgent, handlers, requestOptions) {\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n async options(requestUrl, additionalHeaders) {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n }\n async get(requestUrl, additionalHeaders) {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n }\n async del(requestUrl, additionalHeaders) {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n }\n async post(requestUrl, data, additionalHeaders) {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n }\n async patch(requestUrl, data, additionalHeaders) {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n }\n async put(requestUrl, data, additionalHeaders) {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n }\n async head(requestUrl, additionalHeaders) {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n }\n async sendStream(verb, requestUrl, stream, additionalHeaders) {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n async getJson(requestUrl, additionalHeaders = {}) {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = await this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async postJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async putJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async patchJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n async request(verb, requestUrl, data, headers) {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = await this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n await response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = await this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n await response.readBody();\n await this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n async requestRaw(info, data) {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n async getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return undefined;\n }\n return await this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (!useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: {\n ...((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n }),\n host: proxyUrl.hostname,\n port: proxyUrl.port\n }\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if tunneling agent isn't assigned create a new agent\n if (!agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n async _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n // Lazy load ProxyAgent to avoid bundling all the undici\n const ProxyAgent = (await import('undici/lib/proxy-agent'));\n proxyAgent = new ProxyAgent({\n uri: proxyUrl.href,\n pipelining: !this._keepAlive ? 0 : 1,\n ...((proxyUrl.username || proxyUrl.password) && {\n token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`\n })\n });\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n async _performExponentialBackoff(retryNumber) {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n }\n async _processResponse(res, options) {\n return new Promise(async (resolve, reject) => {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = await res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n }\n}\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","import {fileURLToPath} from 'node:url';\n\n// Allow some arguments/options to be either a file path string or a file URL\nexport const safeNormalizeFileUrl = (file, name) => {\n\tconst fileString = normalizeFileUrl(file);\n\n\tif (typeof fileString !== 'string') {\n\t\tthrow new TypeError(`${name} must be a string or a file URL: ${fileString}.`);\n\t}\n\n\treturn fileString;\n};\n\n// Same but also allows other values, e.g. `boolean` for the `shell` option\nexport const normalizeFileUrl = file => file instanceof URL ? fileURLToPath(file) : file;\n","import isPlainObject from 'is-plain-obj';\nimport {safeNormalizeFileUrl} from '../arguments/file-url.js';\n\n// The command `arguments` and `options` are both optional.\n// This also does basic validation on them and on the command file.\nexport const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {\n\tconst filePath = safeNormalizeFileUrl(rawFile, 'First argument');\n\tconst [commandArguments, options] = isPlainObject(rawArguments)\n\t\t? [[], rawArguments]\n\t\t: [rawArguments, rawOptions];\n\n\tif (!Array.isArray(commandArguments)) {\n\t\tthrow new TypeError(`Second argument must be either an array of arguments or an options object: ${commandArguments}`);\n\t}\n\n\tif (commandArguments.some(commandArgument => typeof commandArgument === 'object' && commandArgument !== null)) {\n\t\tthrow new TypeError(`Second argument must be an array of strings: ${commandArguments}`);\n\t}\n\n\tconst normalizedArguments = commandArguments.map(String);\n\tconst nullByteArgument = normalizedArguments.find(normalizedArgument => normalizedArgument.includes('\\0'));\n\tif (nullByteArgument !== undefined) {\n\t\tthrow new TypeError(`Arguments cannot contain null bytes (\"\\\\0\"): ${nullByteArgument}`);\n\t}\n\n\tif (!isPlainObject(options)) {\n\t\tthrow new TypeError(`Last argument must be an options object: ${options}`);\n\t}\n\n\treturn [filePath, normalizedArguments, options];\n};\n","import {StringDecoder} from 'node:string_decoder';\n\nconst {toString: objectToString} = Object.prototype;\n\nexport const isArrayBuffer = value => objectToString.call(value) === '[object ArrayBuffer]';\n\n// Is either Uint8Array or Buffer\nexport const isUint8Array = value => objectToString.call(value) === '[object Uint8Array]';\n\nexport const bufferToUint8Array = buffer => new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n\nconst textEncoder = new TextEncoder();\nconst stringToUint8Array = string => textEncoder.encode(string);\n\nconst textDecoder = new TextDecoder();\nexport const uint8ArrayToString = uint8Array => textDecoder.decode(uint8Array);\n\nexport const joinToString = (uint8ArraysOrStrings, encoding) => {\n\tconst strings = uint8ArraysToStrings(uint8ArraysOrStrings, encoding);\n\treturn strings.join('');\n};\n\nconst uint8ArraysToStrings = (uint8ArraysOrStrings, encoding) => {\n\tif (encoding === 'utf8' && uint8ArraysOrStrings.every(uint8ArrayOrString => typeof uint8ArrayOrString === 'string')) {\n\t\treturn uint8ArraysOrStrings;\n\t}\n\n\tconst decoder = new StringDecoder(encoding);\n\tconst strings = uint8ArraysOrStrings\n\t\t.map(uint8ArrayOrString => typeof uint8ArrayOrString === 'string'\n\t\t\t? stringToUint8Array(uint8ArrayOrString)\n\t\t\t: uint8ArrayOrString)\n\t\t.map(uint8Array => decoder.write(uint8Array));\n\tconst finalString = decoder.end();\n\treturn finalString === '' ? strings : [...strings, finalString];\n};\n\nexport const joinToUint8Array = uint8ArraysOrStrings => {\n\tif (uint8ArraysOrStrings.length === 1 && isUint8Array(uint8ArraysOrStrings[0])) {\n\t\treturn uint8ArraysOrStrings[0];\n\t}\n\n\treturn concatUint8Arrays(stringsToUint8Arrays(uint8ArraysOrStrings));\n};\n\nconst stringsToUint8Arrays = uint8ArraysOrStrings => uint8ArraysOrStrings.map(uint8ArrayOrString => typeof uint8ArrayOrString === 'string'\n\t? stringToUint8Array(uint8ArrayOrString)\n\t: uint8ArrayOrString);\n\nexport const concatUint8Arrays = uint8Arrays => {\n\tconst result = new Uint8Array(getJoinLength(uint8Arrays));\n\n\tlet index = 0;\n\tfor (const uint8Array of uint8Arrays) {\n\t\tresult.set(uint8Array, index);\n\t\tindex += uint8Array.length;\n\t}\n\n\treturn result;\n};\n\nconst getJoinLength = uint8Arrays => {\n\tlet joinLength = 0;\n\tfor (const uint8Array of uint8Arrays) {\n\t\tjoinLength += uint8Array.length;\n\t}\n\n\treturn joinLength;\n};\n","import {ChildProcess} from 'node:child_process';\nimport isPlainObject from 'is-plain-obj';\nimport {isUint8Array, uint8ArrayToString} from '../utils/uint-array.js';\n\n// Check whether the template string syntax is being used\nexport const isTemplateString = templates => Array.isArray(templates) && Array.isArray(templates.raw);\n\n// Convert execa`file ...commandArguments` to execa(file, commandArguments)\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({\n\t\t\ttemplates,\n\t\t\texpressions,\n\t\t\ttokens,\n\t\t\tindex,\n\t\t\ttemplate,\n\t\t});\n\t}\n\n\tif (tokens.length === 0) {\n\t\tthrow new TypeError('Template script must not be empty');\n\t}\n\n\tconst [file, ...commandArguments] = tokens;\n\treturn [file, commandArguments, {}];\n};\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tif (template === undefined) {\n\t\tthrow new TypeError(`Invalid backslash sequence: ${templates.raw[index]}`);\n\t}\n\n\tconst {nextTokens, leadingWhitespaces, trailingWhitespaces} = splitByWhitespaces(template, templates.raw[index]);\n\tconst newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);\n\n\tif (index === expressions.length) {\n\t\treturn newTokens;\n\t}\n\n\tconst expression = expressions[index];\n\tconst expressionTokens = Array.isArray(expression)\n\t\t? expression.map(expression => parseExpression(expression))\n\t\t: [parseExpression(expression)];\n\treturn concatTokens(newTokens, expressionTokens, trailingWhitespaces);\n};\n\n// Like `string.split(/[ \\t\\r\\n]+/)` except newlines and tabs are:\n// - ignored when input as a backslash sequence like: `echo foo\\n bar`\n// - not ignored when input directly\n// The only way to distinguish those in JavaScript is to use a tagged template and compare:\n// - the first array argument, which does not escape backslash sequences\n// - its `raw` property, which escapes them\nconst splitByWhitespaces = (template, rawTemplate) => {\n\tif (rawTemplate.length === 0) {\n\t\treturn {nextTokens: [], leadingWhitespaces: false, trailingWhitespaces: false};\n\t}\n\n\tconst nextTokens = [];\n\tlet templateStart = 0;\n\tconst leadingWhitespaces = DELIMITERS.has(rawTemplate[0]);\n\n\tfor (\n\t\tlet templateIndex = 0, rawIndex = 0;\n\t\ttemplateIndex < template.length;\n\t\ttemplateIndex += 1, rawIndex += 1\n\t) {\n\t\tconst rawCharacter = rawTemplate[rawIndex];\n\t\tif (DELIMITERS.has(rawCharacter)) {\n\t\t\tif (templateStart !== templateIndex) {\n\t\t\t\tnextTokens.push(template.slice(templateStart, templateIndex));\n\t\t\t}\n\n\t\t\ttemplateStart = templateIndex + 1;\n\t\t} else if (rawCharacter === '\\\\') {\n\t\t\tconst nextRawCharacter = rawTemplate[rawIndex + 1];\n\t\t\tif (nextRawCharacter === 'u' && rawTemplate[rawIndex + 2] === '{') {\n\t\t\t\trawIndex = rawTemplate.indexOf('}', rawIndex + 3);\n\t\t\t} else {\n\t\t\t\trawIndex += ESCAPE_LENGTH[nextRawCharacter] ?? 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst trailingWhitespaces = templateStart === template.length;\n\tif (!trailingWhitespaces) {\n\t\tnextTokens.push(template.slice(templateStart));\n\t}\n\n\treturn {nextTokens, leadingWhitespaces, trailingWhitespaces};\n};\n\nconst DELIMITERS = new Set([' ', '\\t', '\\r', '\\n']);\n\n// Number of characters in backslash escape sequences: \\0 \\xXX or \\uXXXX\n// \\cX is allowed in RegExps but not in strings\n// Octal sequences are not allowed in strict mode\nconst ESCAPE_LENGTH = {x: 3, u: 5};\n\nconst concatTokens = (tokens, nextTokens, isSeparated) => isSeparated\n\t|| tokens.length === 0\n\t|| nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens.at(-1)}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\n// Handle `${expression}` inside the template string syntax\nconst parseExpression = expression => {\n\tconst typeOfExpression = typeof expression;\n\n\tif (typeOfExpression === 'string') {\n\t\treturn expression;\n\t}\n\n\tif (typeOfExpression === 'number') {\n\t\treturn String(expression);\n\t}\n\n\tif (isPlainObject(expression) && ('stdout' in expression || 'isMaxBuffer' in expression)) {\n\t\treturn getSubprocessResult(expression);\n\t}\n\n\tif (expression instanceof ChildProcess || Object.prototype.toString.call(expression) === '[object Promise]') {\n\t\t// eslint-disable-next-line no-template-curly-in-string\n\t\tthrow new TypeError('Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.');\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst getSubprocessResult = ({stdout}) => {\n\tif (typeof stdout === 'string') {\n\t\treturn stdout;\n\t}\n\n\tif (isUint8Array(stdout)) {\n\t\treturn uint8ArrayToString(stdout);\n\t}\n\n\tif (stdout === undefined) {\n\t\tthrow new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\\' \"stdout\" option.');\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeof stdout}\" stdout in template expression`);\n};\n","import process from 'node:process';\n\nexport const isStandardStream = stream => STANDARD_STREAMS.includes(stream);\nexport const STANDARD_STREAMS = [process.stdin, process.stdout, process.stderr];\nexport const STANDARD_STREAMS_ALIASES = ['stdin', 'stdout', 'stderr'];\nexport const getStreamName = fdNumber => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;\n","import {debuglog} from 'node:util';\nimport isPlainObject from 'is-plain-obj';\nimport {STANDARD_STREAMS_ALIASES} from '../utils/standard-stream.js';\n\n// Some options can have different values for `stdout`/`stderr`/`fd3`.\n// This normalizes those to array of values.\n// For example, `{verbose: {stdout: 'none', stderr: 'full'}}` becomes `{verbose: ['none', 'none', 'full']}`\nexport const normalizeFdSpecificOptions = options => {\n\tconst optionsCopy = {...options};\n\n\tfor (const optionName of FD_SPECIFIC_OPTIONS) {\n\t\toptionsCopy[optionName] = normalizeFdSpecificOption(options, optionName);\n\t}\n\n\treturn optionsCopy;\n};\n\nexport const normalizeFdSpecificOption = (options, optionName) => {\n\tconst optionBaseArray = Array.from({length: getStdioLength(options) + 1});\n\tconst optionArray = normalizeFdSpecificValue(options[optionName], optionBaseArray, optionName);\n\treturn addDefaultValue(optionArray, optionName);\n};\n\nconst getStdioLength = ({stdio}) => Array.isArray(stdio)\n\t? Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length)\n\t: STANDARD_STREAMS_ALIASES.length;\n\nconst normalizeFdSpecificValue = (optionValue, optionArray, optionName) => isPlainObject(optionValue)\n\t? normalizeOptionObject(optionValue, optionArray, optionName)\n\t: optionArray.fill(optionValue);\n\nconst normalizeOptionObject = (optionValue, optionArray, optionName) => {\n\tfor (const fdName of Object.keys(optionValue).sort(compareFdName)) {\n\t\tfor (const fdNumber of parseFdName(fdName, optionName, optionArray)) {\n\t\t\toptionArray[fdNumber] = optionValue[fdName];\n\t\t}\n\t}\n\n\treturn optionArray;\n};\n\n// Ensure priority order when setting both `stdout`/`stderr`, `fd1`/`fd2`, and `all`\nconst compareFdName = (fdNameA, fdNameB) => getFdNameOrder(fdNameA) < getFdNameOrder(fdNameB) ? 1 : -1;\n\nconst getFdNameOrder = fdName => {\n\tif (fdName === 'stdout' || fdName === 'stderr') {\n\t\treturn 0;\n\t}\n\n\treturn fdName === 'all' ? 2 : 1;\n};\n\nconst parseFdName = (fdName, optionName, optionArray) => {\n\tif (fdName === 'ipc') {\n\t\treturn [optionArray.length - 1];\n\t}\n\n\tconst fdNumber = parseFd(fdName);\n\tif (fdNumber === undefined || fdNumber === 0) {\n\t\tthrow new TypeError(`\"${optionName}.${fdName}\" is invalid.\nIt must be \"${optionName}.stdout\", \"${optionName}.stderr\", \"${optionName}.all\", \"${optionName}.ipc\", or \"${optionName}.fd3\", \"${optionName}.fd4\" (and so on).`);\n\t}\n\n\tif (fdNumber >= optionArray.length) {\n\t\tthrow new TypeError(`\"${optionName}.${fdName}\" is invalid: that file descriptor does not exist.\nPlease set the \"stdio\" option to ensure that file descriptor exists.`);\n\t}\n\n\treturn fdNumber === 'all' ? [1, 2] : [fdNumber];\n};\n\n// Use the same syntax for fd-specific options and the `from`/`to` options\nexport const parseFd = fdName => {\n\tif (fdName === 'all') {\n\t\treturn fdName;\n\t}\n\n\tif (STANDARD_STREAMS_ALIASES.includes(fdName)) {\n\t\treturn STANDARD_STREAMS_ALIASES.indexOf(fdName);\n\t}\n\n\tconst regexpResult = FD_REGEXP.exec(fdName);\n\tif (regexpResult !== null) {\n\t\treturn Number(regexpResult[1]);\n\t}\n};\n\nconst FD_REGEXP = /^fd(\\d+)$/;\n\nconst addDefaultValue = (optionArray, optionName) => optionArray.map(optionValue => optionValue === undefined\n\t? DEFAULT_OPTIONS[optionName]\n\t: optionValue);\n\n// Default value for the `verbose` option\nconst verboseDefault = debuglog('execa').enabled ? 'full' : 'none';\n\nconst DEFAULT_OPTIONS = {\n\tlines: false,\n\tbuffer: true,\n\tmaxBuffer: 1000 * 1000 * 100,\n\tverbose: verboseDefault,\n\tstripFinalNewline: true,\n};\n\n// List of options which can have different values for `stdout`/`stderr`\nexport const FD_SPECIFIC_OPTIONS = ['lines', 'buffer', 'maxBuffer', 'verbose', 'stripFinalNewline'];\n\n// Retrieve fd-specific option\nexport const getFdSpecificValue = (optionArray, fdNumber) => fdNumber === 'ipc'\n\t? optionArray.at(-1)\n\t: optionArray[fdNumber];\n","import {getFdSpecificValue} from '../arguments/specific.js';\n\n// The `verbose` option can have different values for `stdout`/`stderr`\nexport const isVerbose = ({verbose}, fdNumber) => getFdVerbose(verbose, fdNumber) !== 'none';\n\n// Whether IPC and output and logged\nexport const isFullVerbose = ({verbose}, fdNumber) => !['none', 'short'].includes(getFdVerbose(verbose, fdNumber));\n\n// The `verbose` option can be a function to customize logging\nexport const getVerboseFunction = ({verbose}, fdNumber) => {\n\tconst fdVerbose = getFdVerbose(verbose, fdNumber);\n\treturn isVerboseFunction(fdVerbose) ? fdVerbose : undefined;\n};\n\n// When using `verbose: {stdout, stderr, fd3, ipc}`:\n// - `verbose.stdout|stderr|fd3` is used for 'output'\n// - `verbose.ipc` is only used for 'ipc'\n// - highest `verbose.*` value is used for 'command', 'error' and 'duration'\nconst getFdVerbose = (verbose, fdNumber) => fdNumber === undefined\n\t? getFdGenericVerbose(verbose)\n\t: getFdSpecificValue(verbose, fdNumber);\n\n// When using `verbose: {stdout, stderr, fd3, ipc}` and logging is not specific to a file descriptor.\n// We then use the highest `verbose.*` value, using the following order:\n// - function > 'full' > 'short' > 'none'\n// - if several functions are defined: stdout > stderr > fd3 > ipc\nconst getFdGenericVerbose = verbose => verbose.find(fdVerbose => isVerboseFunction(fdVerbose))\n\t?? VERBOSE_VALUES.findLast(fdVerbose => verbose.includes(fdVerbose));\n\n// Whether the `verbose` option is customized using a function\nexport const isVerboseFunction = fdVerbose => typeof fdVerbose === 'function';\n\nexport const VERBOSE_VALUES = ['none', 'short', 'full'];\n","import {platform} from 'node:process';\nimport {stripVTControlCharacters} from 'node:util';\n\n// Compute `result.command` and `result.escapedCommand`\nexport const joinCommand = (filePath, rawArguments) => {\n\tconst fileAndArguments = [filePath, ...rawArguments];\n\tconst command = fileAndArguments.join(' ');\n\tconst escapedCommand = fileAndArguments\n\t\t.map(fileAndArgument => quoteString(escapeControlCharacters(fileAndArgument)))\n\t\t.join(' ');\n\treturn {command, escapedCommand};\n};\n\n// Remove ANSI sequences and escape control characters and newlines\nexport const escapeLines = lines => stripVTControlCharacters(lines)\n\t.split('\\n')\n\t.map(line => escapeControlCharacters(line))\n\t.join('\\n');\n\nconst escapeControlCharacters = line => line.replaceAll(SPECIAL_CHAR_REGEXP, character => escapeControlCharacter(character));\n\nconst escapeControlCharacter = character => {\n\tconst commonEscape = COMMON_ESCAPES[character];\n\tif (commonEscape !== undefined) {\n\t\treturn commonEscape;\n\t}\n\n\tconst codepoint = character.codePointAt(0);\n\tconst codepointHex = codepoint.toString(16);\n\treturn codepoint <= ASTRAL_START\n\t\t? `\\\\u${codepointHex.padStart(4, '0')}`\n\t\t: `\\\\U${codepointHex}`;\n};\n\n// Characters that would create issues when printed are escaped using the \\u or \\U notation.\n// Those include control characters and newlines.\n// The \\u and \\U notation is Bash specific, but there is no way to do this in a shell-agnostic way.\n// Some shells do not even have a way to print those characters in an escaped fashion.\n// Therefore, we prioritize printing those safely, instead of allowing those to be copy-pasted.\n// List of Unicode character categories: https://www.fileformat.info/info/unicode/category/index.htm\nconst getSpecialCharRegExp = () => {\n\ttry {\n\t\t// This throws when using Node.js without ICU support.\n\t\t// When using a RegExp literal, this would throw at parsing-time, instead of runtime.\n\t\t// eslint-disable-next-line prefer-regex-literals\n\t\treturn new RegExp('\\\\p{Separator}|\\\\p{Other}', 'gu');\n\t} catch {\n\t\t// Similar to the above RegExp, but works even when Node.js has been built without ICU support.\n\t\t// Unlike the above RegExp, it only covers whitespaces and C0/C1 control characters.\n\t\t// It does not cover some edge cases, such as Unicode reserved characters.\n\t\t// See https://github.com/sindresorhus/execa/issues/1143\n\t\t// eslint-disable-next-line no-control-regex\n\t\treturn /[\\s\\u0000-\\u001F\\u007F-\\u009F\\u00AD]/g;\n\t}\n};\n\nconst SPECIAL_CHAR_REGEXP = getSpecialCharRegExp();\n\n// Accepted by $'...' in Bash.\n// Exclude \\a \\e \\v which are accepted in Bash but not in JavaScript (except \\v) and JSON.\nconst COMMON_ESCAPES = {\n\t' ': ' ',\n\t'\\b': '\\\\b',\n\t'\\f': '\\\\f',\n\t'\\n': '\\\\n',\n\t'\\r': '\\\\r',\n\t'\\t': '\\\\t',\n};\n\n// Up until that codepoint, \\u notation can be used instead of \\U\nconst ASTRAL_START = 65_535;\n\n// Some characters are shell-specific, i.e. need to be escaped when the command is copy-pasted then run.\n// Escaping is shell-specific. We cannot know which shell is used: `process.platform` detection is not enough.\n// For example, Windows users could be using `cmd.exe`, Powershell or Bash for Windows which all use different escaping.\n// We use '...' on Unix, which is POSIX shell compliant and escape all characters but ' so this is fairly safe.\n// On Windows, we assume cmd.exe is used and escape with \"...\", which also works with Powershell.\nconst quoteString = escapedArgument => {\n\tif (NO_ESCAPE_REGEXP.test(escapedArgument)) {\n\t\treturn escapedArgument;\n\t}\n\n\treturn platform === 'win32'\n\t\t? `\"${escapedArgument.replaceAll('\"', '\"\"')}\"`\n\t\t: `'${escapedArgument.replaceAll('\\'', '\\'\\\\\\'\\'')}'`;\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w./-]+$/;\n","import isUnicodeSupported from 'is-unicode-supported';\n\nconst common = {\n\tcircleQuestionMark: '(?)',\n\tquestionMarkPrefix: '(?)',\n\tsquare: '█',\n\tsquareDarkShade: '▓',\n\tsquareMediumShade: '▒',\n\tsquareLightShade: '░',\n\tsquareTop: '▀',\n\tsquareBottom: '▄',\n\tsquareLeft: '▌',\n\tsquareRight: '▐',\n\tsquareCenter: '■',\n\tbullet: '●',\n\tdot: '․',\n\tellipsis: '…',\n\tpointerSmall: '›',\n\ttriangleUp: '▲',\n\ttriangleUpSmall: '▴',\n\ttriangleDown: '▼',\n\ttriangleDownSmall: '▾',\n\ttriangleLeftSmall: '◂',\n\ttriangleRightSmall: '▸',\n\thome: '⌂',\n\theart: '♥',\n\tmusicNote: '♪',\n\tmusicNoteBeamed: '♫',\n\tarrowUp: '↑',\n\tarrowDown: '↓',\n\tarrowLeft: '←',\n\tarrowRight: '→',\n\tarrowLeftRight: '↔',\n\tarrowUpDown: '↕',\n\talmostEqual: '≈',\n\tnotEqual: '≠',\n\tlessOrEqual: '≤',\n\tgreaterOrEqual: '≥',\n\tidentical: '≡',\n\tinfinity: '∞',\n\tsubscriptZero: '₀',\n\tsubscriptOne: '₁',\n\tsubscriptTwo: '₂',\n\tsubscriptThree: '₃',\n\tsubscriptFour: '₄',\n\tsubscriptFive: '₅',\n\tsubscriptSix: '₆',\n\tsubscriptSeven: '₇',\n\tsubscriptEight: '₈',\n\tsubscriptNine: '₉',\n\toneHalf: '½',\n\toneThird: '⅓',\n\toneQuarter: '¼',\n\toneFifth: '⅕',\n\toneSixth: '⅙',\n\toneEighth: '⅛',\n\ttwoThirds: '⅔',\n\ttwoFifths: '⅖',\n\tthreeQuarters: '¾',\n\tthreeFifths: '⅗',\n\tthreeEighths: '⅜',\n\tfourFifths: '⅘',\n\tfiveSixths: '⅚',\n\tfiveEighths: '⅝',\n\tsevenEighths: '⅞',\n\tline: '─',\n\tlineBold: '━',\n\tlineDouble: '═',\n\tlineDashed0: '┄',\n\tlineDashed1: '┅',\n\tlineDashed2: '┈',\n\tlineDashed3: '┉',\n\tlineDashed4: '╌',\n\tlineDashed5: '╍',\n\tlineDashed6: '╴',\n\tlineDashed7: '╶',\n\tlineDashed8: '╸',\n\tlineDashed9: '╺',\n\tlineDashed10: '╼',\n\tlineDashed11: '╾',\n\tlineDashed12: '−',\n\tlineDashed13: '–',\n\tlineDashed14: '‐',\n\tlineDashed15: '⁃',\n\tlineVertical: '│',\n\tlineVerticalBold: '┃',\n\tlineVerticalDouble: '║',\n\tlineVerticalDashed0: '┆',\n\tlineVerticalDashed1: '┇',\n\tlineVerticalDashed2: '┊',\n\tlineVerticalDashed3: '┋',\n\tlineVerticalDashed4: '╎',\n\tlineVerticalDashed5: '╏',\n\tlineVerticalDashed6: '╵',\n\tlineVerticalDashed7: '╷',\n\tlineVerticalDashed8: '╹',\n\tlineVerticalDashed9: '╻',\n\tlineVerticalDashed10: '╽',\n\tlineVerticalDashed11: '╿',\n\tlineDownLeft: '┐',\n\tlineDownLeftArc: '╮',\n\tlineDownBoldLeftBold: '┓',\n\tlineDownBoldLeft: '┒',\n\tlineDownLeftBold: '┑',\n\tlineDownDoubleLeftDouble: '╗',\n\tlineDownDoubleLeft: '╖',\n\tlineDownLeftDouble: '╕',\n\tlineDownRight: '┌',\n\tlineDownRightArc: '╭',\n\tlineDownBoldRightBold: '┏',\n\tlineDownBoldRight: '┎',\n\tlineDownRightBold: '┍',\n\tlineDownDoubleRightDouble: '╔',\n\tlineDownDoubleRight: '╓',\n\tlineDownRightDouble: '╒',\n\tlineUpLeft: '┘',\n\tlineUpLeftArc: '╯',\n\tlineUpBoldLeftBold: '┛',\n\tlineUpBoldLeft: '┚',\n\tlineUpLeftBold: '┙',\n\tlineUpDoubleLeftDouble: '╝',\n\tlineUpDoubleLeft: '╜',\n\tlineUpLeftDouble: '╛',\n\tlineUpRight: '└',\n\tlineUpRightArc: '╰',\n\tlineUpBoldRightBold: '┗',\n\tlineUpBoldRight: '┖',\n\tlineUpRightBold: '┕',\n\tlineUpDoubleRightDouble: '╚',\n\tlineUpDoubleRight: '╙',\n\tlineUpRightDouble: '╘',\n\tlineUpDownLeft: '┤',\n\tlineUpBoldDownBoldLeftBold: '┫',\n\tlineUpBoldDownBoldLeft: '┨',\n\tlineUpDownLeftBold: '┥',\n\tlineUpBoldDownLeftBold: '┩',\n\tlineUpDownBoldLeftBold: '┪',\n\tlineUpDownBoldLeft: '┧',\n\tlineUpBoldDownLeft: '┦',\n\tlineUpDoubleDownDoubleLeftDouble: '╣',\n\tlineUpDoubleDownDoubleLeft: '╢',\n\tlineUpDownLeftDouble: '╡',\n\tlineUpDownRight: '├',\n\tlineUpBoldDownBoldRightBold: '┣',\n\tlineUpBoldDownBoldRight: '┠',\n\tlineUpDownRightBold: '┝',\n\tlineUpBoldDownRightBold: '┡',\n\tlineUpDownBoldRightBold: '┢',\n\tlineUpDownBoldRight: '┟',\n\tlineUpBoldDownRight: '┞',\n\tlineUpDoubleDownDoubleRightDouble: '╠',\n\tlineUpDoubleDownDoubleRight: '╟',\n\tlineUpDownRightDouble: '╞',\n\tlineDownLeftRight: '┬',\n\tlineDownBoldLeftBoldRightBold: '┳',\n\tlineDownLeftBoldRightBold: '┯',\n\tlineDownBoldLeftRight: '┰',\n\tlineDownBoldLeftBoldRight: '┱',\n\tlineDownBoldLeftRightBold: '┲',\n\tlineDownLeftRightBold: '┮',\n\tlineDownLeftBoldRight: '┭',\n\tlineDownDoubleLeftDoubleRightDouble: '╦',\n\tlineDownDoubleLeftRight: '╥',\n\tlineDownLeftDoubleRightDouble: '╤',\n\tlineUpLeftRight: '┴',\n\tlineUpBoldLeftBoldRightBold: '┻',\n\tlineUpLeftBoldRightBold: '┷',\n\tlineUpBoldLeftRight: '┸',\n\tlineUpBoldLeftBoldRight: '┹',\n\tlineUpBoldLeftRightBold: '┺',\n\tlineUpLeftRightBold: '┶',\n\tlineUpLeftBoldRight: '┵',\n\tlineUpDoubleLeftDoubleRightDouble: '╩',\n\tlineUpDoubleLeftRight: '╨',\n\tlineUpLeftDoubleRightDouble: '╧',\n\tlineUpDownLeftRight: '┼',\n\tlineUpBoldDownBoldLeftBoldRightBold: '╋',\n\tlineUpDownBoldLeftBoldRightBold: '╈',\n\tlineUpBoldDownLeftBoldRightBold: '╇',\n\tlineUpBoldDownBoldLeftRightBold: '╊',\n\tlineUpBoldDownBoldLeftBoldRight: '╉',\n\tlineUpBoldDownLeftRight: '╀',\n\tlineUpDownBoldLeftRight: '╁',\n\tlineUpDownLeftBoldRight: '┽',\n\tlineUpDownLeftRightBold: '┾',\n\tlineUpBoldDownBoldLeftRight: '╂',\n\tlineUpDownLeftBoldRightBold: '┿',\n\tlineUpBoldDownLeftBoldRight: '╃',\n\tlineUpBoldDownLeftRightBold: '╄',\n\tlineUpDownBoldLeftBoldRight: '╅',\n\tlineUpDownBoldLeftRightBold: '╆',\n\tlineUpDoubleDownDoubleLeftDoubleRightDouble: '╬',\n\tlineUpDoubleDownDoubleLeftRight: '╫',\n\tlineUpDownLeftDoubleRightDouble: '╪',\n\tlineCross: '╳',\n\tlineBackslash: '╲',\n\tlineSlash: '╱',\n};\n\nconst specialMainSymbols = {\n\ttick: '✔',\n\tinfo: 'ℹ',\n\twarning: '⚠',\n\tcross: '✘',\n\tsquareSmall: '◻',\n\tsquareSmallFilled: '◼',\n\tcircle: '◯',\n\tcircleFilled: '◉',\n\tcircleDotted: '◌',\n\tcircleDouble: '◎',\n\tcircleCircle: 'ⓞ',\n\tcircleCross: 'ⓧ',\n\tcirclePipe: 'Ⓘ',\n\tradioOn: '◉',\n\tradioOff: '◯',\n\tcheckboxOn: '☒',\n\tcheckboxOff: '☐',\n\tcheckboxCircleOn: 'ⓧ',\n\tcheckboxCircleOff: 'Ⓘ',\n\tpointer: '❯',\n\ttriangleUpOutline: '△',\n\ttriangleLeft: '◀',\n\ttriangleRight: '▶',\n\tlozenge: '◆',\n\tlozengeOutline: '◇',\n\thamburger: '☰',\n\tsmiley: '㋡',\n\tmustache: '෴',\n\tstar: '★',\n\tplay: '▶',\n\tnodejs: '⬢',\n\toneSeventh: '⅐',\n\toneNinth: '⅑',\n\toneTenth: '⅒',\n};\n\nconst specialFallbackSymbols = {\n\ttick: '√',\n\tinfo: 'i',\n\twarning: '‼',\n\tcross: '×',\n\tsquareSmall: '□',\n\tsquareSmallFilled: '■',\n\tcircle: '( )',\n\tcircleFilled: '(*)',\n\tcircleDotted: '( )',\n\tcircleDouble: '( )',\n\tcircleCircle: '(○)',\n\tcircleCross: '(×)',\n\tcirclePipe: '(│)',\n\tradioOn: '(*)',\n\tradioOff: '( )',\n\tcheckboxOn: '[×]',\n\tcheckboxOff: '[ ]',\n\tcheckboxCircleOn: '(×)',\n\tcheckboxCircleOff: '( )',\n\tpointer: '>',\n\ttriangleUpOutline: '∆',\n\ttriangleLeft: '◄',\n\ttriangleRight: '►',\n\tlozenge: '♦',\n\tlozengeOutline: '◊',\n\thamburger: '≡',\n\tsmiley: '☺',\n\tmustache: '┌─┐',\n\tstar: '✶',\n\tplay: '►',\n\tnodejs: '♦',\n\toneSeventh: '1/7',\n\toneNinth: '1/9',\n\toneTenth: '1/10',\n};\n\nexport const mainSymbols = {...common, ...specialMainSymbols};\nexport const fallbackSymbols = {...common, ...specialFallbackSymbols};\n\nconst shouldUseMain = isUnicodeSupported();\nconst figures = shouldUseMain ? mainSymbols : fallbackSymbols;\nexport default figures;\n\nconst replacements = Object.entries(specialMainSymbols);\n\n// On terminals which do not support Unicode symbols, substitute them to other symbols\nexport const replaceSymbols = (string, {useFallback = !shouldUseMain} = {}) => {\n\tif (useFallback) {\n\t\tfor (const [key, mainSymbol] of replacements) {\n\t\t\tstring = string.replaceAll(mainSymbol, fallbackSymbols[key]);\n\t\t}\n\t}\n\n\treturn string;\n};\n","import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tconst {env} = process;\n\tconst {TERM, TERM_PROGRAM} = env;\n\n\tif (process.platform !== 'win32') {\n\t\treturn TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| TERM_PROGRAM === 'vscode'\n\t\t|| TERM === 'xterm-256color'\n\t\t|| TERM === 'alacritty'\n\t\t|| TERM === 'rxvt-unicode'\n\t\t|| TERM === 'rxvt-unicode-256color'\n\t\t|| env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n","import tty from 'node:tty';\n\n// eslint-disable-next-line no-warning-comments\n// TODO: Use a better method when it's added to Node.js (https://github.com/nodejs/node/pull/40240)\n// Lots of optionals here to support Deno.\nconst hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;\n\nconst format = (open, close) => {\n\tif (!hasColors) {\n\t\treturn input => input;\n\t}\n\n\tconst openCode = `\\u001B[${open}m`;\n\tconst closeCode = `\\u001B[${close}m`;\n\n\treturn input => {\n\t\tconst string = input + ''; // eslint-disable-line no-implicit-coercion -- This is faster.\n\t\tlet index = string.indexOf(closeCode);\n\n\t\tif (index === -1) {\n\t\t\t// Note: Intentionally not using string interpolation for performance reasons.\n\t\t\treturn openCode + string + closeCode;\n\t\t}\n\n\t\t// Handle nested colors.\n\n\t\t// We could have done this, but it's too slow (as of Node.js 22).\n\t\t// return openCode + string.replaceAll(closeCode, openCode) + closeCode;\n\n\t\tlet result = openCode;\n\t\tlet lastIndex = 0;\n\n\t\twhile (index !== -1) {\n\t\t\tresult += string.slice(lastIndex, index) + openCode;\n\t\t\tlastIndex = index + closeCode.length;\n\t\t\tindex = string.indexOf(closeCode, lastIndex);\n\t\t}\n\n\t\tresult += string.slice(lastIndex) + closeCode;\n\n\t\treturn result;\n\t};\n};\n\nexport const reset = format(0, 0);\nexport const bold = format(1, 22);\nexport const dim = format(2, 22);\nexport const italic = format(3, 23);\nexport const underline = format(4, 24);\nexport const overline = format(53, 55);\nexport const inverse = format(7, 27);\nexport const hidden = format(8, 28);\nexport const strikethrough = format(9, 29);\n\nexport const black = format(30, 39);\nexport const red = format(31, 39);\nexport const green = format(32, 39);\nexport const yellow = format(33, 39);\nexport const blue = format(34, 39);\nexport const magenta = format(35, 39);\nexport const cyan = format(36, 39);\nexport const white = format(37, 39);\nexport const gray = format(90, 39);\n\nexport const bgBlack = format(40, 49);\nexport const bgRed = format(41, 49);\nexport const bgGreen = format(42, 49);\nexport const bgYellow = format(43, 49);\nexport const bgBlue = format(44, 49);\nexport const bgMagenta = format(45, 49);\nexport const bgCyan = format(46, 49);\nexport const bgWhite = format(47, 49);\nexport const bgGray = format(100, 49);\n\nexport const redBright = format(91, 39);\nexport const greenBright = format(92, 39);\nexport const yellowBright = format(93, 39);\nexport const blueBright = format(94, 39);\nexport const magentaBright = format(95, 39);\nexport const cyanBright = format(96, 39);\nexport const whiteBright = format(97, 39);\n\nexport const bgRedBright = format(101, 49);\nexport const bgGreenBright = format(102, 49);\nexport const bgYellowBright = format(103, 49);\nexport const bgBlueBright = format(104, 49);\nexport const bgMagentaBright = format(105, 49);\nexport const bgCyanBright = format(106, 49);\nexport const bgWhiteBright = format(107, 49);\n","import figures from 'figures';\nimport {\n\tgray,\n\tbold,\n\tredBright,\n\tyellowBright,\n} from 'yoctocolors';\n\n// Default when `verbose` is not a function\nexport const defaultVerboseFunction = ({\n\ttype,\n\tmessage,\n\ttimestamp,\n\tpiped,\n\tcommandId,\n\tresult: {failed = false} = {},\n\toptions: {reject = true},\n}) => {\n\tconst timestampString = serializeTimestamp(timestamp);\n\tconst icon = ICONS[type]({failed, reject, piped});\n\tconst color = COLORS[type]({reject});\n\treturn `${gray(`[${timestampString}]`)} ${gray(`[${commandId}]`)} ${color(icon)} ${color(message)}`;\n};\n\n// Prepending the timestamp allows debugging the slow paths of a subprocess\nconst serializeTimestamp = timestamp => `${padField(timestamp.getHours(), 2)}:${padField(timestamp.getMinutes(), 2)}:${padField(timestamp.getSeconds(), 2)}.${padField(timestamp.getMilliseconds(), 3)}`;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getFinalIcon = ({failed, reject}) => {\n\tif (!failed) {\n\t\treturn figures.tick;\n\t}\n\n\treturn reject ? figures.cross : figures.warning;\n};\n\nconst ICONS = {\n\tcommand: ({piped}) => piped ? '|' : '$',\n\toutput: () => ' ',\n\tipc: () => '*',\n\terror: getFinalIcon,\n\tduration: getFinalIcon,\n};\n\nconst identity = string => string;\n\nconst COLORS = {\n\tcommand: () => bold,\n\toutput: () => identity,\n\tipc: () => identity,\n\terror: ({reject}) => reject ? redBright : yellowBright,\n\tduration: () => gray,\n};\n","import {getVerboseFunction} from './values.js';\n\n// Apply the `verbose` function on each line\nexport const applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {\n\tconst verboseFunction = getVerboseFunction(verboseInfo, fdNumber);\n\treturn printedLines\n\t\t.map(({verboseLine, verboseObject}) => applyVerboseFunction(verboseLine, verboseObject, verboseFunction))\n\t\t.filter(printedLine => printedLine !== undefined)\n\t\t.map(printedLine => appendNewline(printedLine))\n\t\t.join('');\n};\n\nconst applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {\n\tif (verboseFunction === undefined) {\n\t\treturn verboseLine;\n\t}\n\n\tconst printedLine = verboseFunction(verboseLine, verboseObject);\n\tif (typeof printedLine === 'string') {\n\t\treturn printedLine;\n\t}\n};\n\nconst appendNewline = printedLine => printedLine.endsWith('\\n')\n\t? printedLine\n\t: `${printedLine}\\n`;\n","import {writeFileSync} from 'node:fs';\nimport {inspect} from 'node:util';\nimport {escapeLines} from '../arguments/escape.js';\nimport {defaultVerboseFunction} from './default.js';\nimport {applyVerboseOnLines} from './custom.js';\n\n// Write synchronously to ensure lines are properly ordered and not interleaved with `stdout`\nexport const verboseLog = ({type, verboseMessage, fdNumber, verboseInfo, result}) => {\n\tconst verboseObject = getVerboseObject({type, result, verboseInfo});\n\tconst printedLines = getPrintedLines(verboseMessage, verboseObject);\n\tconst finalLines = applyVerboseOnLines(printedLines, verboseInfo, fdNumber);\n\twriteFileSync(STDERR_FD, finalLines);\n};\n\nconst getVerboseObject = ({\n\ttype,\n\tresult,\n\tverboseInfo: {escapedCommand, commandId, rawOptions: {piped = false, ...options}},\n}) => ({\n\ttype,\n\tescapedCommand,\n\tcommandId: `${commandId}`,\n\ttimestamp: new Date(),\n\tpiped,\n\tresult,\n\toptions,\n});\n\nconst getPrintedLines = (verboseMessage, verboseObject) => verboseMessage\n\t.split('\\n')\n\t.map(message => getPrintedLine({...verboseObject, message}));\n\nconst getPrintedLine = verboseObject => {\n\tconst verboseLine = defaultVerboseFunction(verboseObject);\n\treturn {verboseLine, verboseObject};\n};\n\n// Unless a `verbose` function is used, print all logs on `stderr`\nconst STDERR_FD = 2;\n\n// Serialize any type to a line string, for logging\nexport const serializeVerboseMessage = message => {\n\tconst messageString = typeof message === 'string' ? message : inspect(message);\n\tconst escapedMessage = escapeLines(messageString);\n\treturn escapedMessage.replaceAll('\\t', ' '.repeat(TAB_SIZE));\n};\n\n// Same as `util.inspect()`\nconst TAB_SIZE = 2;\n","import {isVerbose, VERBOSE_VALUES, isVerboseFunction} from './values.js';\n\n// Information computed before spawning, used by the `verbose` option\nexport const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {\n\tvalidateVerbose(verbose);\n\tconst commandId = getCommandId(verbose);\n\treturn {\n\t\tverbose,\n\t\tescapedCommand,\n\t\tcommandId,\n\t\trawOptions,\n\t};\n};\n\nconst getCommandId = verbose => isVerbose({verbose}) ? COMMAND_ID++ : undefined;\n\n// Prepending the `pid` is useful when multiple commands print their output at the same time.\n// However, we cannot use the real PID since this is not available with `child_process.spawnSync()`.\n// Also, we cannot use the real PID if we want to print it before `child_process.spawn()` is run.\n// As a pro, it is shorter than a normal PID and never re-uses the same id.\n// As a con, it cannot be used to send signals.\nlet COMMAND_ID = 0n;\n\nconst validateVerbose = verbose => {\n\tfor (const fdVerbose of verbose) {\n\t\tif (fdVerbose === false) {\n\t\t\tthrow new TypeError('The \"verbose: false\" option was renamed to \"verbose: \\'none\\'\".');\n\t\t}\n\n\t\tif (fdVerbose === true) {\n\t\t\tthrow new TypeError('The \"verbose: true\" option was renamed to \"verbose: \\'short\\'\".');\n\t\t}\n\n\t\tif (!VERBOSE_VALUES.includes(fdVerbose) && !isVerboseFunction(fdVerbose)) {\n\t\t\tconst allowedValues = VERBOSE_VALUES.map(allowedValue => `'${allowedValue}'`).join(', ');\n\t\t\tthrow new TypeError(`The \"verbose\" option must not be ${fdVerbose}. Allowed values are: ${allowedValues} or a function.`);\n\t\t}\n\t}\n};\n","import {hrtime} from 'node:process';\n\n// Start counting time before spawning the subprocess\nexport const getStartTime = () => hrtime.bigint();\n\n// Compute duration after the subprocess ended.\n// Printed by the `verbose` option.\nexport const getDurationMs = startTime => Number(hrtime.bigint() - startTime) / 1e6;\n","import {logCommand} from '../verbose/start.js';\nimport {getVerboseInfo} from '../verbose/info.js';\nimport {getStartTime} from '../return/duration.js';\nimport {joinCommand} from './escape.js';\nimport {normalizeFdSpecificOption} from './specific.js';\n\n// Compute `result.command`, `result.escapedCommand` and `verbose`-related information\nexport const handleCommand = (filePath, rawArguments, rawOptions) => {\n\tconst startTime = getStartTime();\n\tconst {command, escapedCommand} = joinCommand(filePath, rawArguments);\n\tconst verbose = normalizeFdSpecificOption(rawOptions, 'verbose');\n\tconst verboseInfo = getVerboseInfo(verbose, escapedCommand, {...rawOptions});\n\tlogCommand(escapedCommand, verboseInfo);\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\tstartTime,\n\t\tverboseInfo,\n\t};\n};\n","import {isVerbose} from './values.js';\nimport {verboseLog} from './log.js';\n\n// When `verbose` is `short|full|custom`, print each command\nexport const logCommand = (escapedCommand, verboseInfo) => {\n\tif (!isVerbose(verboseInfo)) {\n\t\treturn;\n\t}\n\n\tverboseLog({\n\t\ttype: 'command',\n\t\tverboseMessage: escapedCommand,\n\t\tverboseInfo,\n\t});\n};\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","import process from 'node:process';\nimport path from 'node:path';\nimport pathKey from 'path-key';\nimport {toPath, traversePathUp} from 'unicorn-magic';\n\nexport const npmRunPath = ({\n\tcwd = process.cwd(),\n\tpath: pathOption = process.env[pathKey()],\n\tpreferLocal = true,\n\texecPath = process.execPath,\n\taddExecPath = true,\n} = {}) => {\n\tconst cwdPath = path.resolve(toPath(cwd));\n\tconst result = [];\n\tconst pathParts = pathOption.split(path.delimiter);\n\n\tif (preferLocal) {\n\t\tapplyPreferLocal(result, pathParts, cwdPath);\n\t}\n\n\tif (addExecPath) {\n\t\tapplyExecPath(result, pathParts, execPath, cwdPath);\n\t}\n\n\treturn pathOption === '' || pathOption === path.delimiter\n\t\t? `${result.join(path.delimiter)}${pathOption}`\n\t\t: [...result, pathOption].join(path.delimiter);\n};\n\nconst applyPreferLocal = (result, pathParts, cwdPath) => {\n\tfor (const directory of traversePathUp(cwdPath)) {\n\t\tconst pathPart = path.join(directory, 'node_modules/.bin');\n\t\tif (!pathParts.includes(pathPart)) {\n\t\t\tresult.push(pathPart);\n\t\t}\n\t}\n};\n\n// Ensure the running `node` binary is used\nconst applyExecPath = (result, pathParts, execPath, cwdPath) => {\n\tconst pathPart = path.resolve(cwdPath, toPath(execPath), '..');\n\tif (!pathParts.includes(pathPart)) {\n\t\tresult.push(pathPart);\n\t}\n};\n\nexport const npmRunPathEnv = ({env = process.env, ...options} = {}) => {\n\tenv = {...env};\n\n\tconst pathName = pathKey({env});\n\toptions.path = env[pathName];\n\tenv[pathName] = npmRunPath(options);\n\n\treturn env;\n};\n","// When the subprocess fails, this is the error instance being returned.\n// If another error instance is being thrown, it is kept as `error.cause`.\nexport const getFinalError = (originalError, message, isSync) => {\n\tconst ErrorClass = isSync ? ExecaSyncError : ExecaError;\n\tconst options = originalError instanceof DiscardedError ? {} : {cause: originalError};\n\treturn new ErrorClass(message, options);\n};\n\n// Indicates that the error is used only to interrupt control flow, but not in the return value\nexport class DiscardedError extends Error {}\n\n// Proper way to set `error.name`: it should be inherited and non-enumerable\nconst setErrorName = (ErrorClass, value) => {\n\tObject.defineProperty(ErrorClass.prototype, 'name', {\n\t\tvalue,\n\t\twritable: true,\n\t\tenumerable: false,\n\t\tconfigurable: true,\n\t});\n\tObject.defineProperty(ErrorClass.prototype, execaErrorSymbol, {\n\t\tvalue: true,\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tconfigurable: false,\n\t});\n};\n\n// Unlike `instanceof`, this works across realms\nexport const isExecaError = error => isErrorInstance(error) && execaErrorSymbol in error;\n\nconst execaErrorSymbol = Symbol('isExecaError');\n\nexport const isErrorInstance = value => Object.prototype.toString.call(value) === '[object Error]';\n\n// We use two different Error classes for async/sync methods since they have slightly different shape and types\nexport class ExecaError extends Error {}\nsetErrorName(ExecaError, ExecaError.name);\n\nexport class ExecaSyncError extends Error {}\nsetErrorName(ExecaSyncError, ExecaSyncError.name);\n","\nexport const getRealtimeSignals=()=>{\nconst length=SIGRTMAX-SIGRTMIN+1;\nreturn Array.from({length},getRealtimeSignal)\n};\n\nconst getRealtimeSignal=(value,index)=>({\nname:`SIGRT${index+1}`,\nnumber:SIGRTMIN+index,\naction:\"terminate\",\ndescription:\"Application-specific signal (realtime)\",\nstandard:\"posix\"\n});\n\nconst SIGRTMIN=34;\nexport const SIGRTMAX=64;","\n\nexport const SIGNALS=[\n{\nname:\"SIGHUP\",\nnumber:1,\naction:\"terminate\",\ndescription:\"Terminal closed\",\nstandard:\"posix\"\n},\n{\nname:\"SIGINT\",\nnumber:2,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-C\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGQUIT\",\nnumber:3,\naction:\"core\",\ndescription:\"User interruption with CTRL-\\\\\",\nstandard:\"posix\"\n},\n{\nname:\"SIGILL\",\nnumber:4,\naction:\"core\",\ndescription:\"Invalid machine instruction\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGTRAP\",\nnumber:5,\naction:\"core\",\ndescription:\"Debugger breakpoint\",\nstandard:\"posix\"\n},\n{\nname:\"SIGABRT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGIOT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGBUS\",\nnumber:7,\naction:\"core\",\ndescription:\n\"Bus error due to misaligned, non-existing address or paging error\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGEMT\",\nnumber:7,\naction:\"terminate\",\ndescription:\"Command should be emulated but is not implemented\",\nstandard:\"other\"\n},\n{\nname:\"SIGFPE\",\nnumber:8,\naction:\"core\",\ndescription:\"Floating point arithmetic error\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGKILL\",\nnumber:9,\naction:\"terminate\",\ndescription:\"Forced termination\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGUSR1\",\nnumber:10,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGSEGV\",\nnumber:11,\naction:\"core\",\ndescription:\"Segmentation fault\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGUSR2\",\nnumber:12,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGPIPE\",\nnumber:13,\naction:\"terminate\",\ndescription:\"Broken pipe or socket\",\nstandard:\"posix\"\n},\n{\nname:\"SIGALRM\",\nnumber:14,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTERM\",\nnumber:15,\naction:\"terminate\",\ndescription:\"Termination\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGSTKFLT\",\nnumber:16,\naction:\"terminate\",\ndescription:\"Stack is empty or overflowed\",\nstandard:\"other\"\n},\n{\nname:\"SIGCHLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"posix\"\n},\n{\nname:\"SIGCLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"other\"\n},\n{\nname:\"SIGCONT\",\nnumber:18,\naction:\"unpause\",\ndescription:\"Unpaused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGSTOP\",\nnumber:19,\naction:\"pause\",\ndescription:\"Paused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGTSTP\",\nnumber:20,\naction:\"pause\",\ndescription:\"Paused using CTRL-Z or \\\"suspend\\\"\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTTIN\",\nnumber:21,\naction:\"pause\",\ndescription:\"Background process cannot read terminal input\",\nstandard:\"posix\"\n},\n{\nname:\"SIGBREAK\",\nnumber:21,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-BREAK\",\nstandard:\"other\"\n},\n{\nname:\"SIGTTOU\",\nnumber:22,\naction:\"pause\",\ndescription:\"Background process cannot write to terminal output\",\nstandard:\"posix\"\n},\n{\nname:\"SIGURG\",\nnumber:23,\naction:\"ignore\",\ndescription:\"Socket received out-of-band data\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXCPU\",\nnumber:24,\naction:\"core\",\ndescription:\"Process timed out\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXFSZ\",\nnumber:25,\naction:\"core\",\ndescription:\"File too big\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGVTALRM\",\nnumber:26,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGPROF\",\nnumber:27,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGWINCH\",\nnumber:28,\naction:\"ignore\",\ndescription:\"Terminal window size changed\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGIO\",\nnumber:29,\naction:\"terminate\",\ndescription:\"I/O is available\",\nstandard:\"other\"\n},\n{\nname:\"SIGPOLL\",\nnumber:29,\naction:\"terminate\",\ndescription:\"Watched event\",\nstandard:\"other\"\n},\n{\nname:\"SIGINFO\",\nnumber:29,\naction:\"ignore\",\ndescription:\"Request for process information\",\nstandard:\"other\"\n},\n{\nname:\"SIGPWR\",\nnumber:30,\naction:\"terminate\",\ndescription:\"Device running out of power\",\nstandard:\"systemv\"\n},\n{\nname:\"SIGSYS\",\nnumber:31,\naction:\"core\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n},\n{\nname:\"SIGUNUSED\",\nnumber:31,\naction:\"terminate\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n}];","import{constants}from\"node:os\";\n\nimport{SIGNALS}from\"./core.js\";\nimport{getRealtimeSignals}from\"./realtime.js\";\n\n\n\nexport const getSignals=()=>{\nconst realtimeSignals=getRealtimeSignals();\nconst signals=[...SIGNALS,...realtimeSignals].map(normalizeSignal);\nreturn signals\n};\n\n\n\n\n\n\n\nconst normalizeSignal=({\nname,\nnumber:defaultNumber,\ndescription,\naction,\nforced=false,\nstandard\n})=>{\nconst{\nsignals:{[name]:constantSignal}\n}=constants;\nconst supported=constantSignal!==undefined;\nconst number=supported?constantSignal:defaultNumber;\nreturn{name,number,description,supported,action,forced,standard}\n};","import{constants}from\"node:os\";\n\nimport{SIGRTMAX}from\"./realtime.js\";\nimport{getSignals}from\"./signals.js\";\n\n\n\nconst getSignalsByName=()=>{\nconst signals=getSignals();\nreturn Object.fromEntries(signals.map(getSignalByName))\n};\n\nconst getSignalByName=({\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n})=>[name,{name,number,description,supported,action,forced,standard}];\n\nexport const signalsByName=getSignalsByName();\n\n\n\n\nconst getSignalsByNumber=()=>{\nconst signals=getSignals();\nconst length=SIGRTMAX+1;\nconst signalsA=Array.from({length},(value,number)=>\ngetSignalByNumber(number,signals)\n);\nreturn Object.assign({},...signalsA)\n};\n\nconst getSignalByNumber=(number,signals)=>{\nconst signal=findSignalByNumber(number,signals);\n\nif(signal===undefined){\nreturn{}\n}\n\nconst{name,description,supported,action,forced,standard}=signal;\nreturn{\n[number]:{\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n}\n}\n};\n\n\n\nconst findSignalByNumber=(number,signals)=>{\nconst signal=signals.find(({name})=>constants.signals[name]===number);\n\nif(signal!==undefined){\nreturn signal\n}\n\nreturn signals.find((signalA)=>signalA.number===number)\n};\n\nexport const signalsByNumber=getSignalsByNumber();","import {constants} from 'node:os';\nimport {signalsByName} from 'human-signals';\n\n// Normalize signals for comparison purpose.\n// Also validate the signal exists.\nexport const normalizeKillSignal = killSignal => {\n\tconst optionName = 'option `killSignal`';\n\tif (killSignal === 0) {\n\t\tthrow new TypeError(`Invalid ${optionName}: 0 cannot be used.`);\n\t}\n\n\treturn normalizeSignal(killSignal, optionName);\n};\n\nexport const normalizeSignalArgument = signal => signal === 0\n\t? signal\n\t: normalizeSignal(signal, '`subprocess.kill()`\\'s argument');\n\nconst normalizeSignal = (signalNameOrInteger, optionName) => {\n\tif (Number.isInteger(signalNameOrInteger)) {\n\t\treturn normalizeSignalInteger(signalNameOrInteger, optionName);\n\t}\n\n\tif (typeof signalNameOrInteger === 'string') {\n\t\treturn normalizeSignalName(signalNameOrInteger, optionName);\n\t}\n\n\tthrow new TypeError(`Invalid ${optionName} ${String(signalNameOrInteger)}: it must be a string or an integer.\\n${getAvailableSignals()}`);\n};\n\nconst normalizeSignalInteger = (signalInteger, optionName) => {\n\tif (signalsIntegerToName.has(signalInteger)) {\n\t\treturn signalsIntegerToName.get(signalInteger);\n\t}\n\n\tthrow new TypeError(`Invalid ${optionName} ${signalInteger}: this signal integer does not exist.\\n${getAvailableSignals()}`);\n};\n\nconst getSignalsIntegerToName = () => new Map(Object.entries(constants.signals)\n\t.reverse()\n\t.map(([signalName, signalInteger]) => [signalInteger, signalName]));\n\nconst signalsIntegerToName = getSignalsIntegerToName();\n\nconst normalizeSignalName = (signalName, optionName) => {\n\tif (signalName in constants.signals) {\n\t\treturn signalName;\n\t}\n\n\tif (signalName.toUpperCase() in constants.signals) {\n\t\tthrow new TypeError(`Invalid ${optionName} '${signalName}': please rename it to '${signalName.toUpperCase()}'.`);\n\t}\n\n\tthrow new TypeError(`Invalid ${optionName} '${signalName}': this signal name does not exist.\\n${getAvailableSignals()}`);\n};\n\nconst getAvailableSignals = () => `Available signal names: ${getAvailableSignalNames()}.\nAvailable signal numbers: ${getAvailableSignalIntegers()}.`;\n\nconst getAvailableSignalNames = () => Object.keys(constants.signals)\n\t.sort()\n\t.map(signalName => `'${signalName}'`)\n\t.join(', ');\n\nconst getAvailableSignalIntegers = () => [...new Set(Object.values(constants.signals)\n\t.sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))]\n\t.join(', ');\n\n// Human-friendly description of a signal\nexport const getSignalDescription = signal => signalsByName[signal].description;\n","import {setTimeout} from 'node:timers/promises';\nimport {isErrorInstance} from '../return/final-error.js';\nimport {normalizeSignalArgument} from './signal.js';\n\n// Normalize the `forceKillAfterDelay` option\nexport const normalizeForceKillAfterDelay = forceKillAfterDelay => {\n\tif (forceKillAfterDelay === false) {\n\t\treturn forceKillAfterDelay;\n\t}\n\n\tif (forceKillAfterDelay === true) {\n\t\treturn DEFAULT_FORCE_KILL_TIMEOUT;\n\t}\n\n\tif (!Number.isFinite(forceKillAfterDelay) || forceKillAfterDelay < 0) {\n\t\tthrow new TypeError(`Expected the \\`forceKillAfterDelay\\` option to be a non-negative integer, got \\`${forceKillAfterDelay}\\` (${typeof forceKillAfterDelay})`);\n\t}\n\n\treturn forceKillAfterDelay;\n};\n\nconst DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;\n\n// Monkey-patches `subprocess.kill()` to add `forceKillAfterDelay` behavior and `.kill(error)`\nexport const subprocessKill = (\n\t{kill, options: {forceKillAfterDelay, killSignal}, onInternalError, context, controller},\n\tsignalOrError,\n\terrorArgument,\n) => {\n\tconst {signal, error} = parseKillArguments(signalOrError, errorArgument, killSignal);\n\temitKillError(error, onInternalError);\n\tconst killResult = kill(signal);\n\tsetKillTimeout({\n\t\tkill,\n\t\tsignal,\n\t\tforceKillAfterDelay,\n\t\tkillSignal,\n\t\tkillResult,\n\t\tcontext,\n\t\tcontroller,\n\t});\n\treturn killResult;\n};\n\nconst parseKillArguments = (signalOrError, errorArgument, killSignal) => {\n\tconst [signal = killSignal, error] = isErrorInstance(signalOrError)\n\t\t? [undefined, signalOrError]\n\t\t: [signalOrError, errorArgument];\n\n\tif (typeof signal !== 'string' && !Number.isInteger(signal)) {\n\t\tthrow new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(signal)}`);\n\t}\n\n\tif (error !== undefined && !isErrorInstance(error)) {\n\t\tthrow new TypeError(`The second argument is optional. If specified, it must be an error instance: ${error}`);\n\t}\n\n\treturn {signal: normalizeSignalArgument(signal), error};\n};\n\n// Fails right away when calling `subprocess.kill(error)`.\n// Does not wait for actual signal termination.\n// Uses a deferred promise instead of the `error` event on the subprocess, as this is less intrusive.\nconst emitKillError = (error, onInternalError) => {\n\tif (error !== undefined) {\n\t\tonInternalError.reject(error);\n\t}\n};\n\nconst setKillTimeout = async ({kill, signal, forceKillAfterDelay, killSignal, killResult, context, controller}) => {\n\tif (signal === killSignal && killResult) {\n\t\tkillOnTimeout({\n\t\t\tkill,\n\t\t\tforceKillAfterDelay,\n\t\t\tcontext,\n\t\t\tcontrollerSignal: controller.signal,\n\t\t});\n\t}\n};\n\n// Forcefully terminate a subprocess after a timeout\nexport const killOnTimeout = async ({kill, forceKillAfterDelay, context, controllerSignal}) => {\n\tif (forceKillAfterDelay === false) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tawait setTimeout(forceKillAfterDelay, undefined, {signal: controllerSignal});\n\t\tif (kill('SIGKILL')) {\n\t\t\tcontext.isForcefullyTerminated ??= true;\n\t\t}\n\t} catch {}\n};\n","import {once} from 'node:events';\n\n// Combines `util.aborted()` and `events.addAbortListener()`: promise-based and cleaned up with a stop signal\nexport const onAbortedSignal = async (mainSignal, stopSignal) => {\n\tif (!mainSignal.aborted) {\n\t\tawait once(mainSignal, 'abort', {signal: stopSignal});\n\t}\n};\n","import {onAbortedSignal} from '../utils/abort-signal.js';\n\n// Validate the `cancelSignal` option\nexport const validateCancelSignal = ({cancelSignal}) => {\n\tif (cancelSignal !== undefined && Object.prototype.toString.call(cancelSignal) !== '[object AbortSignal]') {\n\t\tthrow new Error(`The \\`cancelSignal\\` option must be an AbortSignal: ${String(cancelSignal)}`);\n\t}\n};\n\n// Terminate the subprocess when aborting the `cancelSignal` option and `gracefulSignal` is `false`\nexport const throwOnCancel = ({subprocess, cancelSignal, gracefulCancel, context, controller}) => cancelSignal === undefined || gracefulCancel\n\t? []\n\t: [terminateOnCancel(subprocess, cancelSignal, context, controller)];\n\nconst terminateOnCancel = async (subprocess, cancelSignal, context, {signal}) => {\n\tawait onAbortedSignal(cancelSignal, signal);\n\tcontext.terminationReason ??= 'cancel';\n\tsubprocess.kill();\n\tthrow cancelSignal.reason;\n};\n","// Validate the IPC channel is connected before receiving/sending messages\nexport const validateIpcMethod = ({methodName, isSubprocess, ipc, isConnected}) => {\n\tvalidateIpcOption(methodName, isSubprocess, ipc);\n\tvalidateConnection(methodName, isSubprocess, isConnected);\n};\n\n// Better error message when forgetting to set `ipc: true` and using the IPC methods\nconst validateIpcOption = (methodName, isSubprocess, ipc) => {\n\tif (!ipc) {\n\t\tthrow new Error(`${getMethodName(methodName, isSubprocess)} can only be used if the \\`ipc\\` option is \\`true\\`.`);\n\t}\n};\n\n// Better error message when one process does not send/receive messages once the other process has disconnected.\n// This also makes it clear that any buffered messages are lost once either process has disconnected.\n// Also when aborting `cancelSignal` after disconnecting the IPC.\nexport const validateConnection = (methodName, isSubprocess, isConnected) => {\n\tif (!isConnected) {\n\t\tthrow new Error(`${getMethodName(methodName, isSubprocess)} cannot be used: the ${getOtherProcessName(isSubprocess)} has already exited or disconnected.`);\n\t}\n};\n\n// When `getOneMessage()` could not complete due to an early disconnection\nexport const throwOnEarlyDisconnect = isSubprocess => {\n\tthrow new Error(`${getMethodName('getOneMessage', isSubprocess)} could not complete: the ${getOtherProcessName(isSubprocess)} exited or disconnected.`);\n};\n\n// When both processes use `sendMessage()` with `strict` at the same time\nexport const throwOnStrictDeadlockError = isSubprocess => {\n\tthrow new Error(`${getMethodName('sendMessage', isSubprocess)} failed: the ${getOtherProcessName(isSubprocess)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${getMethodName('getOneMessage', isSubprocess)},\n\t${getMethodName('sendMessage', isSubprocess, 'message, {strict: true}')},\n]);`);\n};\n\n// When the other process used `strict` but the current process had I/O error calling `sendMessage()` for the response\nexport const getStrictResponseError = (error, isSubprocess) => new Error(`${getMethodName('sendMessage', isSubprocess)} failed when sending an acknowledgment response to the ${getOtherProcessName(isSubprocess)}.`, {cause: error});\n\n// When using `strict` but the other process was not listening for messages\nexport const throwOnMissingStrict = isSubprocess => {\n\tthrow new Error(`${getMethodName('sendMessage', isSubprocess)} failed: the ${getOtherProcessName(isSubprocess)} is not listening to incoming messages.`);\n};\n\n// When using `strict` but the other process disconnected before receiving the message\nexport const throwOnStrictDisconnect = isSubprocess => {\n\tthrow new Error(`${getMethodName('sendMessage', isSubprocess)} failed: the ${getOtherProcessName(isSubprocess)} exited without listening to incoming messages.`);\n};\n\n// When the current process disconnects while the subprocess is listening to `cancelSignal`\nexport const getAbortDisconnectError = () => new Error(`\\`cancelSignal\\` aborted: the ${getOtherProcessName(true)} disconnected.`);\n\n// When the subprocess uses `cancelSignal` but not the current process\nexport const throwOnMissingParent = () => {\n\tthrow new Error('`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.');\n};\n\n// EPIPE can happen when sending a message to a subprocess that is closing but has not disconnected yet\nexport const handleEpipeError = ({error, methodName, isSubprocess}) => {\n\tif (error.code === 'EPIPE') {\n\t\tthrow new Error(`${getMethodName(methodName, isSubprocess)} cannot be used: the ${getOtherProcessName(isSubprocess)} is disconnecting.`, {cause: error});\n\t}\n};\n\n// Better error message when sending messages which cannot be serialized.\n// Works with both `serialization: 'advanced'` and `serialization: 'json'`.\nexport const handleSerializationError = ({error, methodName, isSubprocess, message}) => {\n\tif (isSerializationError(error)) {\n\t\tthrow new Error(`${getMethodName(methodName, isSubprocess)}'s argument type is invalid: the message cannot be serialized: ${String(message)}.`, {cause: error});\n\t}\n};\n\nconst isSerializationError = ({code, message}) => SERIALIZATION_ERROR_CODES.has(code)\n\t|| SERIALIZATION_ERROR_MESSAGES.some(serializationErrorMessage => message.includes(serializationErrorMessage));\n\n// `error.code` set by Node.js when it failed to serialize the message\nconst SERIALIZATION_ERROR_CODES = new Set([\n\t// Message is `undefined`\n\t'ERR_MISSING_ARGS',\n\t// Message is a function, a bigint, a symbol\n\t'ERR_INVALID_ARG_TYPE',\n]);\n\n// `error.message` set by Node.js when it failed to serialize the message\nconst SERIALIZATION_ERROR_MESSAGES = [\n\t// Message is a promise or a proxy, with `serialization: 'advanced'`\n\t'could not be cloned',\n\t// Message has cycles, with `serialization: 'json'`\n\t'circular structure',\n\t// Message has cycles inside toJSON(), with `serialization: 'json'`\n\t'call stack size exceeded',\n];\n\nconst getMethodName = (methodName, isSubprocess, parameters = '') => methodName === 'cancelSignal'\n\t? '`cancelSignal`\\'s `controller.abort()`'\n\t: `${getNamespaceName(isSubprocess)}${methodName}(${parameters})`;\n\nconst getNamespaceName = isSubprocess => isSubprocess ? '' : 'subprocess.';\n\nconst getOtherProcessName = isSubprocess => isSubprocess ? 'parent process' : 'subprocess';\n\n// When any error arises, we disconnect the IPC.\n// Otherwise, it is likely that one of the processes will stop sending/receiving messages.\n// This would leave the other process hanging.\nexport const disconnect = anyProcess => {\n\tif (anyProcess.connected) {\n\t\tanyProcess.disconnect();\n\t}\n};\n","export const createDeferred = () => {\n\tconst methods = {};\n\tconst promise = new Promise((resolve, reject) => {\n\t\tObject.assign(methods, {resolve, reject});\n\t});\n\treturn Object.assign(promise, methods);\n};\n","import {parseFd} from './specific.js';\n\n// Retrieve stream targeted by the `to` option\nexport const getToStream = (destination, to = 'stdin') => {\n\tconst isWritable = true;\n\tconst {options, fileDescriptors} = SUBPROCESS_OPTIONS.get(destination);\n\tconst fdNumber = getFdNumber(fileDescriptors, to, isWritable);\n\tconst destinationStream = destination.stdio[fdNumber];\n\n\tif (destinationStream === null) {\n\t\tthrow new TypeError(getInvalidStdioOptionMessage(fdNumber, to, options, isWritable));\n\t}\n\n\treturn destinationStream;\n};\n\n// Retrieve stream targeted by the `from` option\nexport const getFromStream = (source, from = 'stdout') => {\n\tconst isWritable = false;\n\tconst {options, fileDescriptors} = SUBPROCESS_OPTIONS.get(source);\n\tconst fdNumber = getFdNumber(fileDescriptors, from, isWritable);\n\tconst sourceStream = fdNumber === 'all' ? source.all : source.stdio[fdNumber];\n\n\tif (sourceStream === null || sourceStream === undefined) {\n\t\tthrow new TypeError(getInvalidStdioOptionMessage(fdNumber, from, options, isWritable));\n\t}\n\n\treturn sourceStream;\n};\n\n// Keeps track of the options passed to each Execa call\nexport const SUBPROCESS_OPTIONS = new WeakMap();\n\nconst getFdNumber = (fileDescriptors, fdName, isWritable) => {\n\tconst fdNumber = parseFdNumber(fdName, isWritable);\n\tvalidateFdNumber(fdNumber, fdName, isWritable, fileDescriptors);\n\treturn fdNumber;\n};\n\nconst parseFdNumber = (fdName, isWritable) => {\n\tconst fdNumber = parseFd(fdName);\n\tif (fdNumber !== undefined) {\n\t\treturn fdNumber;\n\t}\n\n\tconst {validOptions, defaultValue} = isWritable\n\t\t? {validOptions: '\"stdin\"', defaultValue: 'stdin'}\n\t\t: {validOptions: '\"stdout\", \"stderr\", \"all\"', defaultValue: 'stdout'};\n\tthrow new TypeError(`\"${getOptionName(isWritable)}\" must not be \"${fdName}\".\nIt must be ${validOptions} or \"fd3\", \"fd4\" (and so on).\nIt is optional and defaults to \"${defaultValue}\".`);\n};\n\nconst validateFdNumber = (fdNumber, fdName, isWritable, fileDescriptors) => {\n\tconst fileDescriptor = fileDescriptors[getUsedDescriptor(fdNumber)];\n\tif (fileDescriptor === undefined) {\n\t\tthrow new TypeError(`\"${getOptionName(isWritable)}\" must not be ${fdName}. That file descriptor does not exist.\nPlease set the \"stdio\" option to ensure that file descriptor exists.`);\n\t}\n\n\tif (fileDescriptor.direction === 'input' && !isWritable) {\n\t\tthrow new TypeError(`\"${getOptionName(isWritable)}\" must not be ${fdName}. It must be a readable stream, not writable.`);\n\t}\n\n\tif (fileDescriptor.direction !== 'input' && isWritable) {\n\t\tthrow new TypeError(`\"${getOptionName(isWritable)}\" must not be ${fdName}. It must be a writable stream, not readable.`);\n\t}\n};\n\nconst getInvalidStdioOptionMessage = (fdNumber, fdName, options, isWritable) => {\n\tif (fdNumber === 'all' && !options.all) {\n\t\treturn 'The \"all\" option must be true to use \"from: \\'all\\'\".';\n\t}\n\n\tconst {optionName, optionValue} = getInvalidStdioOption(fdNumber, options);\n\treturn `The \"${optionName}: ${serializeOptionValue(optionValue)}\" option is incompatible with using \"${getOptionName(isWritable)}: ${serializeOptionValue(fdName)}\".\nPlease set this option with \"pipe\" instead.`;\n};\n\nconst getInvalidStdioOption = (fdNumber, {stdin, stdout, stderr, stdio}) => {\n\tconst usedDescriptor = getUsedDescriptor(fdNumber);\n\n\tif (usedDescriptor === 0 && stdin !== undefined) {\n\t\treturn {optionName: 'stdin', optionValue: stdin};\n\t}\n\n\tif (usedDescriptor === 1 && stdout !== undefined) {\n\t\treturn {optionName: 'stdout', optionValue: stdout};\n\t}\n\n\tif (usedDescriptor === 2 && stderr !== undefined) {\n\t\treturn {optionName: 'stderr', optionValue: stderr};\n\t}\n\n\treturn {optionName: `stdio[${usedDescriptor}]`, optionValue: stdio[usedDescriptor]};\n};\n\nconst getUsedDescriptor = fdNumber => fdNumber === 'all' ? 1 : fdNumber;\n\nconst getOptionName = isWritable => isWritable ? 'to' : 'from';\n\nexport const serializeOptionValue = value => {\n\tif (typeof value === 'string') {\n\t\treturn `'${value}'`;\n\t}\n\n\treturn typeof value === 'number' ? `${value}` : 'Stream';\n};\n","import {addAbortListener} from 'node:events';\n\n// Temporarily increase the maximum number of listeners on an eventEmitter\nexport const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {\n\tconst maxListeners = eventEmitter.getMaxListeners();\n\tif (maxListeners === 0 || maxListeners === Number.POSITIVE_INFINITY) {\n\t\treturn;\n\t}\n\n\teventEmitter.setMaxListeners(maxListeners + maxListenersIncrement);\n\taddAbortListener(signal, () => {\n\t\teventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);\n\t});\n};\n","// By default, Node.js keeps the subprocess alive while it has a `message` or `disconnect` listener.\n// We replicate the same logic for the events that we proxy.\n// This ensures the subprocess is kept alive while `getOneMessage()` and `getEachMessage()` are ongoing.\n// This is not a problem with `sendMessage()` since Node.js handles that method automatically.\n// We do not use `anyProcess.channel.ref()` since this would prevent the automatic `.channel.refCounted()` Node.js is doing.\n// We keep a reference to `anyProcess.channel` since it might be `null` while `getOneMessage()` or `getEachMessage()` is still processing debounced messages.\n// See https://github.com/nodejs/node/blob/2aaeaa863c35befa2ebaa98fb7737ec84df4d8e9/lib/internal/child_process.js#L547\nexport const addReference = (channel, reference) => {\n\tif (reference) {\n\t\taddReferenceCount(channel);\n\t}\n};\n\nconst addReferenceCount = channel => {\n\tchannel.refCounted();\n};\n\nexport const removeReference = (channel, reference) => {\n\tif (reference) {\n\t\tremoveReferenceCount(channel);\n\t}\n};\n\nconst removeReferenceCount = channel => {\n\tchannel.unrefCounted();\n};\n\n// To proxy events, we setup some global listeners on the `message` and `disconnect` events.\n// Those should not keep the subprocess alive, so we remove the automatic counting that Node.js is doing.\n// See https://github.com/nodejs/node/blob/1b965270a9c273d4cf70e8808e9d28b9ada7844f/lib/child_process.js#L180\nexport const undoAddedReferences = (channel, isSubprocess) => {\n\tif (isSubprocess) {\n\t\tremoveReferenceCount(channel);\n\t\tremoveReferenceCount(channel);\n\t}\n};\n\n// Reverse it during `disconnect`\nexport const redoAddedReferences = (channel, isSubprocess) => {\n\tif (isSubprocess) {\n\t\taddReferenceCount(channel);\n\t\taddReferenceCount(channel);\n\t}\n};\n","import {once} from 'node:events';\nimport {scheduler} from 'node:timers/promises';\nimport {waitForOutgoingMessages} from './outgoing.js';\nimport {redoAddedReferences} from './reference.js';\nimport {handleStrictRequest, handleStrictResponse} from './strict.js';\nimport {handleAbort, abortOnDisconnect} from './graceful.js';\n\n// By default, Node.js buffers `message` events.\n// - Buffering happens when there is a `message` event is emitted but there is no handler.\n// - As soon as a `message` event handler is set, all buffered `message` events are emitted, emptying the buffer.\n// - This happens both in the current process and the subprocess.\n// - See https://github.com/nodejs/node/blob/501546e8f37059cd577041e23941b640d0d4d406/lib/internal/child_process.js#L719\n// This is helpful. Notably, this allows sending messages to a subprocess that's still initializing.\n// However, it has several problems.\n// - This works with `events.on()` but not `events.once()` since all buffered messages are emitted at once.\n// For example, users cannot call `await getOneMessage()`/`getEachMessage()` multiple times in a row.\n// - When a user intentionally starts listening to `message` at a specific point in time, past `message` events are replayed, which might be unexpected.\n// - Buffering is unlimited, which might lead to an out-of-memory crash.\n// - This does not work well with multiple consumers.\n// For example, Execa consumes events with both `result.ipcOutput` and manual IPC calls like `getOneMessage()`.\n// Since `result.ipcOutput` reads all incoming messages, no buffering happens for manual IPC calls.\n// - Forgetting to setup a `message` listener, or setting it up too late, is a programming mistake.\n// The default behavior does not allow users to realize they made that mistake.\n// To solve those problems, instead of buffering messages, we debounce them.\n// The `message` event so it is emitted at most once per macrotask.\nexport const onMessage = async ({anyProcess, channel, isSubprocess, ipcEmitter}, wrappedMessage) => {\n\tif (handleStrictResponse(wrappedMessage) || handleAbort(wrappedMessage)) {\n\t\treturn;\n\t}\n\n\tif (!INCOMING_MESSAGES.has(anyProcess)) {\n\t\tINCOMING_MESSAGES.set(anyProcess, []);\n\t}\n\n\tconst incomingMessages = INCOMING_MESSAGES.get(anyProcess);\n\tincomingMessages.push(wrappedMessage);\n\n\tif (incomingMessages.length > 1) {\n\t\treturn;\n\t}\n\n\twhile (incomingMessages.length > 0) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tawait waitForOutgoingMessages(anyProcess, ipcEmitter, wrappedMessage);\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tawait scheduler.yield();\n\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst message = await handleStrictRequest({\n\t\t\twrappedMessage: incomingMessages[0],\n\t\t\tanyProcess,\n\t\t\tchannel,\n\t\t\tisSubprocess,\n\t\t\tipcEmitter,\n\t\t});\n\n\t\tincomingMessages.shift();\n\t\tipcEmitter.emit('message', message);\n\t\tipcEmitter.emit('message:done');\n\t}\n};\n\n// If the `message` event is currently debounced, the `disconnect` event must wait for it\nexport const onDisconnect = async ({anyProcess, channel, isSubprocess, ipcEmitter, boundOnMessage}) => {\n\tabortOnDisconnect();\n\n\tconst incomingMessages = INCOMING_MESSAGES.get(anyProcess);\n\twhile (incomingMessages?.length > 0) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tawait once(ipcEmitter, 'message:done');\n\t}\n\n\tanyProcess.removeListener('message', boundOnMessage);\n\tredoAddedReferences(channel, isSubprocess);\n\tipcEmitter.connected = false;\n\tipcEmitter.emit('disconnect');\n};\n\nconst INCOMING_MESSAGES = new WeakMap();\n","import {EventEmitter} from 'node:events';\nimport {onMessage, onDisconnect} from './incoming.js';\nimport {undoAddedReferences} from './reference.js';\n\n// Forward the `message` and `disconnect` events from the process and subprocess to a proxy emitter.\n// This prevents the `error` event from stopping IPC.\n// This also allows debouncing the `message` event.\nexport const getIpcEmitter = (anyProcess, channel, isSubprocess) => {\n\tif (IPC_EMITTERS.has(anyProcess)) {\n\t\treturn IPC_EMITTERS.get(anyProcess);\n\t}\n\n\t// Use an `EventEmitter`, like the `process` that is being proxied\n\t// eslint-disable-next-line unicorn/prefer-event-target\n\tconst ipcEmitter = new EventEmitter();\n\tipcEmitter.connected = true;\n\tIPC_EMITTERS.set(anyProcess, ipcEmitter);\n\tforwardEvents({\n\t\tipcEmitter,\n\t\tanyProcess,\n\t\tchannel,\n\t\tisSubprocess,\n\t});\n\treturn ipcEmitter;\n};\n\nconst IPC_EMITTERS = new WeakMap();\n\n// The `message` and `disconnect` events are buffered in the subprocess until the first listener is setup.\n// However, unbuffering happens after one tick, so this give enough time for the caller to setup the listener on the proxy emitter first.\n// See https://github.com/nodejs/node/blob/2aaeaa863c35befa2ebaa98fb7737ec84df4d8e9/lib/internal/child_process.js#L721\nconst forwardEvents = ({ipcEmitter, anyProcess, channel, isSubprocess}) => {\n\tconst boundOnMessage = onMessage.bind(undefined, {\n\t\tanyProcess,\n\t\tchannel,\n\t\tisSubprocess,\n\t\tipcEmitter,\n\t});\n\tanyProcess.on('message', boundOnMessage);\n\tanyProcess.once('disconnect', onDisconnect.bind(undefined, {\n\t\tanyProcess,\n\t\tchannel,\n\t\tisSubprocess,\n\t\tipcEmitter,\n\t\tboundOnMessage,\n\t}));\n\tundoAddedReferences(channel, isSubprocess);\n};\n\n// Check whether there might still be some `message` events to receive\nexport const isConnected = anyProcess => {\n\tconst ipcEmitter = IPC_EMITTERS.get(anyProcess);\n\treturn ipcEmitter === undefined\n\t\t? anyProcess.channel !== null\n\t\t: ipcEmitter.connected;\n};\n","import {once} from 'node:events';\nimport {createDeferred} from '../utils/deferred.js';\nimport {incrementMaxListeners} from '../utils/max-listeners.js';\nimport {sendMessage} from './send.js';\nimport {throwOnMissingStrict, throwOnStrictDisconnect, throwOnStrictDeadlockError} from './validation.js';\nimport {getIpcEmitter} from './forward.js';\nimport {hasMessageListeners} from './outgoing.js';\n\n// When using the `strict` option, wrap the message with metadata during `sendMessage()`\nexport const handleSendStrict = ({anyProcess, channel, isSubprocess, message, strict}) => {\n\tif (!strict) {\n\t\treturn message;\n\t}\n\n\tconst ipcEmitter = getIpcEmitter(anyProcess, channel, isSubprocess);\n\tconst hasListeners = hasMessageListeners(anyProcess, ipcEmitter);\n\treturn {\n\t\tid: count++,\n\t\ttype: REQUEST_TYPE,\n\t\tmessage,\n\t\thasListeners,\n\t};\n};\n\nlet count = 0n;\n\n// Handles when both processes are calling `sendMessage()` with `strict` at the same time.\n// If neither process is listening, this would create a deadlock. We detect it and throw.\nexport const validateStrictDeadlock = (outgoingMessages, wrappedMessage) => {\n\tif (wrappedMessage?.type !== REQUEST_TYPE || wrappedMessage.hasListeners) {\n\t\treturn;\n\t}\n\n\tfor (const {id} of outgoingMessages) {\n\t\tif (id !== undefined) {\n\t\t\tSTRICT_RESPONSES[id].resolve({isDeadlock: true, hasListeners: false});\n\t\t}\n\t}\n};\n\n// The other process then sends the acknowledgment back as a response\nexport const handleStrictRequest = async ({wrappedMessage, anyProcess, channel, isSubprocess, ipcEmitter}) => {\n\tif (wrappedMessage?.type !== REQUEST_TYPE || !anyProcess.connected) {\n\t\treturn wrappedMessage;\n\t}\n\n\tconst {id, message} = wrappedMessage;\n\tconst response = {id, type: RESPONSE_TYPE, message: hasMessageListeners(anyProcess, ipcEmitter)};\n\n\ttry {\n\t\tawait sendMessage({\n\t\t\tanyProcess,\n\t\t\tchannel,\n\t\t\tisSubprocess,\n\t\t\tipc: true,\n\t\t}, response);\n\t} catch (error) {\n\t\tipcEmitter.emit('strict:error', error);\n\t}\n\n\treturn message;\n};\n\n// Reception of the acknowledgment response\nexport const handleStrictResponse = wrappedMessage => {\n\tif (wrappedMessage?.type !== RESPONSE_TYPE) {\n\t\treturn false;\n\t}\n\n\tconst {id, message: hasListeners} = wrappedMessage;\n\tSTRICT_RESPONSES[id]?.resolve({isDeadlock: false, hasListeners});\n\treturn true;\n};\n\n// Wait for the other process to receive the message from `sendMessage()`\nexport const waitForStrictResponse = async (wrappedMessage, anyProcess, isSubprocess) => {\n\tif (wrappedMessage?.type !== REQUEST_TYPE) {\n\t\treturn;\n\t}\n\n\tconst deferred = createDeferred();\n\tSTRICT_RESPONSES[wrappedMessage.id] = deferred;\n\tconst controller = new AbortController();\n\n\ttry {\n\t\tconst {isDeadlock, hasListeners} = await Promise.race([\n\t\t\tdeferred,\n\t\t\tthrowOnDisconnect(anyProcess, isSubprocess, controller),\n\t\t]);\n\n\t\tif (isDeadlock) {\n\t\t\tthrowOnStrictDeadlockError(isSubprocess);\n\t\t}\n\n\t\tif (!hasListeners) {\n\t\t\tthrowOnMissingStrict(isSubprocess);\n\t\t}\n\t} finally {\n\t\tcontroller.abort();\n\t\tdelete STRICT_RESPONSES[wrappedMessage.id];\n\t}\n};\n\nconst STRICT_RESPONSES = {};\n\nconst throwOnDisconnect = async (anyProcess, isSubprocess, {signal}) => {\n\tincrementMaxListeners(anyProcess, 1, signal);\n\tawait once(anyProcess, 'disconnect', {signal});\n\tthrowOnStrictDisconnect(isSubprocess);\n};\n\nconst REQUEST_TYPE = 'execa:ipc:request';\nconst RESPONSE_TYPE = 'execa:ipc:response';\n","import {createDeferred} from '../utils/deferred.js';\nimport {getFdSpecificValue} from '../arguments/specific.js';\nimport {SUBPROCESS_OPTIONS} from '../arguments/fd-options.js';\nimport {validateStrictDeadlock} from './strict.js';\n\n// When `sendMessage()` is ongoing, any `message` being received waits before being emitted.\n// This allows calling one or multiple `await sendMessage()` followed by `await getOneMessage()`/`await getEachMessage()`.\n// Without running into a race condition when the other process sends a response too fast, before the current process set up a listener.\nexport const startSendMessage = (anyProcess, wrappedMessage, strict) => {\n\tif (!OUTGOING_MESSAGES.has(anyProcess)) {\n\t\tOUTGOING_MESSAGES.set(anyProcess, new Set());\n\t}\n\n\tconst outgoingMessages = OUTGOING_MESSAGES.get(anyProcess);\n\tconst onMessageSent = createDeferred();\n\tconst id = strict ? wrappedMessage.id : undefined;\n\tconst outgoingMessage = {onMessageSent, id};\n\toutgoingMessages.add(outgoingMessage);\n\treturn {outgoingMessages, outgoingMessage};\n};\n\nexport const endSendMessage = ({outgoingMessages, outgoingMessage}) => {\n\toutgoingMessages.delete(outgoingMessage);\n\toutgoingMessage.onMessageSent.resolve();\n};\n\n// Await while `sendMessage()` is ongoing, unless there is already a `message` listener\nexport const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) => {\n\twhile (!hasMessageListeners(anyProcess, ipcEmitter) && OUTGOING_MESSAGES.get(anyProcess)?.size > 0) {\n\t\tconst outgoingMessages = [...OUTGOING_MESSAGES.get(anyProcess)];\n\t\tvalidateStrictDeadlock(outgoingMessages, wrappedMessage);\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tawait Promise.all(outgoingMessages.map(({onMessageSent}) => onMessageSent));\n\t}\n};\n\nconst OUTGOING_MESSAGES = new WeakMap();\n\n// Whether any `message` listener is setup\nexport const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount('message') > getMinListenerCount(anyProcess);\n\n// When `buffer` is `false`, we set up a `message` listener that should be ignored.\n// That listener is only meant to intercept `strict` acknowledgement responses.\nconst getMinListenerCount = anyProcess => SUBPROCESS_OPTIONS.has(anyProcess)\n\t&& !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, 'ipc')\n\t? 1\n\t: 0;\n","import {promisify} from 'node:util';\nimport {\n\tvalidateIpcMethod,\n\thandleEpipeError,\n\thandleSerializationError,\n\tdisconnect,\n} from './validation.js';\nimport {startSendMessage, endSendMessage} from './outgoing.js';\nimport {handleSendStrict, waitForStrictResponse} from './strict.js';\n\n// Like `[sub]process.send()` but promise-based.\n// We do not `await subprocess` during `.sendMessage()` nor `.getOneMessage()` since those methods are transient.\n// Users would still need to `await subprocess` after the method is done.\n// Also, this would prevent `unhandledRejection` event from being emitted, making it silent.\nexport const sendMessage = ({anyProcess, channel, isSubprocess, ipc}, message, {strict = false} = {}) => {\n\tconst methodName = 'sendMessage';\n\tvalidateIpcMethod({\n\t\tmethodName,\n\t\tisSubprocess,\n\t\tipc,\n\t\tisConnected: anyProcess.connected,\n\t});\n\n\treturn sendMessageAsync({\n\t\tanyProcess,\n\t\tchannel,\n\t\tmethodName,\n\t\tisSubprocess,\n\t\tmessage,\n\t\tstrict,\n\t});\n};\n\nconst sendMessageAsync = async ({anyProcess, channel, methodName, isSubprocess, message, strict}) => {\n\tconst wrappedMessage = handleSendStrict({\n\t\tanyProcess,\n\t\tchannel,\n\t\tisSubprocess,\n\t\tmessage,\n\t\tstrict,\n\t});\n\tconst outgoingMessagesState = startSendMessage(anyProcess, wrappedMessage, strict);\n\ttry {\n\t\tawait sendOneMessage({\n\t\t\tanyProcess,\n\t\t\tmethodName,\n\t\t\tisSubprocess,\n\t\t\twrappedMessage,\n\t\t\tmessage,\n\t\t});\n\t} catch (error) {\n\t\tdisconnect(anyProcess);\n\t\tthrow error;\n\t} finally {\n\t\tendSendMessage(outgoingMessagesState);\n\t}\n};\n\n// Used internally by `cancelSignal`\nexport const sendOneMessage = async ({anyProcess, methodName, isSubprocess, wrappedMessage, message}) => {\n\tconst sendMethod = getSendMethod(anyProcess);\n\n\ttry {\n\t\tawait Promise.all([\n\t\t\twaitForStrictResponse(wrappedMessage, anyProcess, isSubprocess),\n\t\t\tsendMethod(wrappedMessage),\n\t\t]);\n\t} catch (error) {\n\t\thandleEpipeError({error, methodName, isSubprocess});\n\t\thandleSerializationError({\n\t\t\terror,\n\t\t\tmethodName,\n\t\t\tisSubprocess,\n\t\t\tmessage,\n\t\t});\n\t\tthrow error;\n\t}\n};\n\n// [sub]process.send() promisified, memoized\nconst getSendMethod = anyProcess => {\n\tif (PROCESS_SEND_METHODS.has(anyProcess)) {\n\t\treturn PROCESS_SEND_METHODS.get(anyProcess);\n\t}\n\n\tconst sendMethod = promisify(anyProcess.send.bind(anyProcess));\n\tPROCESS_SEND_METHODS.set(anyProcess, sendMethod);\n\treturn sendMethod;\n};\n\nconst PROCESS_SEND_METHODS = new WeakMap();\n","import {scheduler} from 'node:timers/promises';\nimport {sendOneMessage} from './send.js';\nimport {getIpcEmitter} from './forward.js';\nimport {validateConnection, getAbortDisconnectError, throwOnMissingParent} from './validation.js';\n\n// Send an IPC message so the subprocess performs a graceful termination\nexport const sendAbort = (subprocess, message) => {\n\tconst methodName = 'cancelSignal';\n\tvalidateConnection(methodName, false, subprocess.connected);\n\treturn sendOneMessage({\n\t\tanyProcess: subprocess,\n\t\tmethodName,\n\t\tisSubprocess: false,\n\t\twrappedMessage: {type: GRACEFUL_CANCEL_TYPE, message},\n\t\tmessage,\n\t});\n};\n\n// When the signal is being used, start listening for incoming messages.\n// Unbuffering messages takes one microtask to complete, so this must be async.\nexport const getCancelSignal = async ({anyProcess, channel, isSubprocess, ipc}) => {\n\tawait startIpc({\n\t\tanyProcess,\n\t\tchannel,\n\t\tisSubprocess,\n\t\tipc,\n\t});\n\treturn cancelController.signal;\n};\n\nconst startIpc = async ({anyProcess, channel, isSubprocess, ipc}) => {\n\tif (cancelListening) {\n\t\treturn;\n\t}\n\n\tcancelListening = true;\n\n\tif (!ipc) {\n\t\tthrowOnMissingParent();\n\t\treturn;\n\t}\n\n\tif (channel === null) {\n\t\tabortOnDisconnect();\n\t\treturn;\n\t}\n\n\tgetIpcEmitter(anyProcess, channel, isSubprocess);\n\tawait scheduler.yield();\n};\n\nlet cancelListening = false;\n\n// Reception of IPC message to perform a graceful termination\nexport const handleAbort = wrappedMessage => {\n\tif (wrappedMessage?.type !== GRACEFUL_CANCEL_TYPE) {\n\t\treturn false;\n\t}\n\n\tcancelController.abort(wrappedMessage.message);\n\treturn true;\n};\n\nconst GRACEFUL_CANCEL_TYPE = 'execa:ipc:cancel';\n\n// When the current process disconnects early, the subprocess `cancelSignal` is aborted.\n// Otherwise, the signal would never be able to be aborted later on.\nexport const abortOnDisconnect = () => {\n\tcancelController.abort(getAbortDisconnectError());\n};\n\nconst cancelController = new AbortController();\n","import {onAbortedSignal} from '../utils/abort-signal.js';\nimport {sendAbort} from '../ipc/graceful.js';\nimport {killOnTimeout} from './kill.js';\n\n// Validate the `gracefulCancel` option\nexport const validateGracefulCancel = ({gracefulCancel, cancelSignal, ipc, serialization}) => {\n\tif (!gracefulCancel) {\n\t\treturn;\n\t}\n\n\tif (cancelSignal === undefined) {\n\t\tthrow new Error('The `cancelSignal` option must be defined when setting the `gracefulCancel` option.');\n\t}\n\n\tif (!ipc) {\n\t\tthrow new Error('The `ipc` option cannot be false when setting the `gracefulCancel` option.');\n\t}\n\n\tif (serialization === 'json') {\n\t\tthrow new Error('The `serialization` option cannot be \\'json\\' when setting the `gracefulCancel` option.');\n\t}\n};\n\n// Send abort reason to the subprocess when aborting the `cancelSignal` option and `gracefulCancel` is `true`\nexport const throwOnGracefulCancel = ({\n\tsubprocess,\n\tcancelSignal,\n\tgracefulCancel,\n\tforceKillAfterDelay,\n\tcontext,\n\tcontroller,\n}) => gracefulCancel\n\t? [sendOnAbort({\n\t\tsubprocess,\n\t\tcancelSignal,\n\t\tforceKillAfterDelay,\n\t\tcontext,\n\t\tcontroller,\n\t})]\n\t: [];\n\nconst sendOnAbort = async ({subprocess, cancelSignal, forceKillAfterDelay, context, controller: {signal}}) => {\n\tawait onAbortedSignal(cancelSignal, signal);\n\tconst reason = getReason(cancelSignal);\n\tawait sendAbort(subprocess, reason);\n\tkillOnTimeout({\n\t\tkill: subprocess.kill,\n\t\tforceKillAfterDelay,\n\t\tcontext,\n\t\tcontrollerSignal: signal,\n\t});\n\tcontext.terminationReason ??= 'gracefulCancel';\n\tthrow cancelSignal.reason;\n};\n\n// The default `reason` is a DOMException, which is not serializable with V8\n// See https://github.com/nodejs/node/issues/53225\nconst getReason = ({reason}) => {\n\tif (!(reason instanceof DOMException)) {\n\t\treturn reason;\n\t}\n\n\tconst error = new Error(reason.message);\n\tObject.defineProperty(error, 'stack', {\n\t\tvalue: reason.stack,\n\t\tenumerable: false,\n\t\tconfigurable: true,\n\t\twritable: true,\n\t});\n\treturn error;\n};\n","import {setTimeout} from 'node:timers/promises';\nimport {DiscardedError} from '../return/final-error.js';\n\n// Validate `timeout` option\nexport const validateTimeout = ({timeout}) => {\n\tif (timeout !== undefined && (!Number.isFinite(timeout) || timeout < 0)) {\n\t\tthrow new TypeError(`Expected the \\`timeout\\` option to be a non-negative integer, got \\`${timeout}\\` (${typeof timeout})`);\n\t}\n};\n\n// Fails when the `timeout` option is exceeded\nexport const throwOnTimeout = (subprocess, timeout, context, controller) => timeout === 0 || timeout === undefined\n\t? []\n\t: [killAfterTimeout(subprocess, timeout, context, controller)];\n\nconst killAfterTimeout = async (subprocess, timeout, context, {signal}) => {\n\tawait setTimeout(timeout, undefined, {signal});\n\tcontext.terminationReason ??= 'timeout';\n\tsubprocess.kill();\n\tthrow new DiscardedError();\n};\n","import {serialize} from 'node:v8';\n\n// Validate the `ipcInput` option\nexport const validateIpcInputOption = ({ipcInput, ipc, serialization}) => {\n\tif (ipcInput === undefined) {\n\t\treturn;\n\t}\n\n\tif (!ipc) {\n\t\tthrow new Error('The `ipcInput` option cannot be set unless the `ipc` option is `true`.');\n\t}\n\n\tvalidateIpcInput[serialization](ipcInput);\n};\n\nconst validateAdvancedInput = ipcInput => {\n\ttry {\n\t\tserialize(ipcInput);\n\t} catch (error) {\n\t\tthrow new Error('The `ipcInput` option is not serializable with a structured clone.', {cause: error});\n\t}\n};\n\nconst validateJsonInput = ipcInput => {\n\ttry {\n\t\tJSON.stringify(ipcInput);\n\t} catch (error) {\n\t\tthrow new Error('The `ipcInput` option is not serializable with JSON.', {cause: error});\n\t}\n};\n\nconst validateIpcInput = {\n\tadvanced: validateAdvancedInput,\n\tjson: validateJsonInput,\n};\n\n// When the `ipcInput` option is set, it is sent as an initial IPC message to the subprocess\nexport const sendIpcInput = async (subprocess, ipcInput) => {\n\tif (ipcInput === undefined) {\n\t\treturn;\n\t}\n\n\tawait subprocess.sendMessage(ipcInput);\n};\n","// Validate `encoding` option\nexport const validateEncoding = ({encoding}) => {\n\tif (ENCODINGS.has(encoding)) {\n\t\treturn;\n\t}\n\n\tconst correctEncoding = getCorrectEncoding(encoding);\n\tif (correctEncoding !== undefined) {\n\t\tthrow new TypeError(`Invalid option \\`encoding: ${serializeEncoding(encoding)}\\`.\nPlease rename it to ${serializeEncoding(correctEncoding)}.`);\n\t}\n\n\tconst correctEncodings = [...ENCODINGS].map(correctEncoding => serializeEncoding(correctEncoding)).join(', ');\n\tthrow new TypeError(`Invalid option \\`encoding: ${serializeEncoding(encoding)}\\`.\nPlease rename it to one of: ${correctEncodings}.`);\n};\n\nconst TEXT_ENCODINGS = new Set(['utf8', 'utf16le']);\nexport const BINARY_ENCODINGS = new Set(['buffer', 'hex', 'base64', 'base64url', 'latin1', 'ascii']);\nconst ENCODINGS = new Set([...TEXT_ENCODINGS, ...BINARY_ENCODINGS]);\n\nconst getCorrectEncoding = encoding => {\n\tif (encoding === null) {\n\t\treturn 'buffer';\n\t}\n\n\tif (typeof encoding !== 'string') {\n\t\treturn;\n\t}\n\n\tconst lowerEncoding = encoding.toLowerCase();\n\tif (lowerEncoding in ENCODING_ALIASES) {\n\t\treturn ENCODING_ALIASES[lowerEncoding];\n\t}\n\n\tif (ENCODINGS.has(lowerEncoding)) {\n\t\treturn lowerEncoding;\n\t}\n};\n\nconst ENCODING_ALIASES = {\n\t// eslint-disable-next-line unicorn/text-encoding-identifier-case\n\t'utf-8': 'utf8',\n\t'utf-16le': 'utf16le',\n\t'ucs-2': 'utf16le',\n\tucs2: 'utf16le',\n\tbinary: 'latin1',\n};\n\nconst serializeEncoding = encoding => typeof encoding === 'string' ? `\"${encoding}\"` : String(encoding);\n","import {statSync} from 'node:fs';\nimport path from 'node:path';\nimport process from 'node:process';\nimport {safeNormalizeFileUrl} from './file-url.js';\n\n// Normalize `cwd` option\nexport const normalizeCwd = (cwd = getDefaultCwd()) => {\n\tconst cwdString = safeNormalizeFileUrl(cwd, 'The \"cwd\" option');\n\treturn path.resolve(cwdString);\n};\n\nconst getDefaultCwd = () => {\n\ttry {\n\t\treturn process.cwd();\n\t} catch (error) {\n\t\terror.message = `The current directory does not exist.\\n${error.message}`;\n\t\tthrow error;\n\t}\n};\n\n// When `cwd` option has an invalid value, provide with a better error message\nexport const fixCwdError = (originalMessage, cwd) => {\n\tif (cwd === getDefaultCwd()) {\n\t\treturn originalMessage;\n\t}\n\n\tlet cwdStat;\n\ttry {\n\t\tcwdStat = statSync(cwd);\n\t} catch (error) {\n\t\treturn `The \"cwd\" option is invalid: ${cwd}.\\n${error.message}\\n${originalMessage}`;\n\t}\n\n\tif (!cwdStat.isDirectory()) {\n\t\treturn `The \"cwd\" option is not a directory: ${cwd}.\\n${originalMessage}`;\n\t}\n\n\treturn originalMessage;\n};\n","import path from 'node:path';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport {normalizeForceKillAfterDelay} from '../terminate/kill.js';\nimport {normalizeKillSignal} from '../terminate/signal.js';\nimport {validateCancelSignal} from '../terminate/cancel.js';\nimport {validateGracefulCancel} from '../terminate/graceful.js';\nimport {validateTimeout} from '../terminate/timeout.js';\nimport {handleNodeOption} from '../methods/node.js';\nimport {validateIpcInputOption} from '../ipc/ipc-input.js';\nimport {validateEncoding, BINARY_ENCODINGS} from './encoding-option.js';\nimport {normalizeCwd} from './cwd.js';\nimport {normalizeFileUrl} from './file-url.js';\nimport {normalizeFdSpecificOptions} from './specific.js';\n\n// Normalize the options object, and sometimes also the file paths and arguments.\n// Applies default values, validate allowed options, normalize them.\nexport const normalizeOptions = (filePath, rawArguments, rawOptions) => {\n\trawOptions.cwd = normalizeCwd(rawOptions.cwd);\n\tconst [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);\n\n\tconst {command: file, args: commandArguments, options: initialOptions} = crossSpawn._parse(processedFile, processedArguments, processedOptions);\n\n\tconst fdOptions = normalizeFdSpecificOptions(initialOptions);\n\tconst options = addDefaultOptions(fdOptions);\n\tvalidateTimeout(options);\n\tvalidateEncoding(options);\n\tvalidateIpcInputOption(options);\n\tvalidateCancelSignal(options);\n\tvalidateGracefulCancel(options);\n\toptions.shell = normalizeFileUrl(options.shell);\n\toptions.env = getEnv(options);\n\toptions.killSignal = normalizeKillSignal(options.killSignal);\n\toptions.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);\n\toptions.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\tcommandArguments.unshift('/q');\n\t}\n\n\treturn {file, commandArguments, options};\n};\n\nconst addDefaultOptions = ({\n\textendEnv = true,\n\tpreferLocal = false,\n\tcwd,\n\tlocalDir: localDirectory = cwd,\n\tencoding = 'utf8',\n\treject = true,\n\tcleanup = true,\n\tall = false,\n\twindowsHide = true,\n\tkillSignal = 'SIGTERM',\n\tforceKillAfterDelay = true,\n\tgracefulCancel = false,\n\tipcInput,\n\tipc = ipcInput !== undefined || gracefulCancel,\n\tserialization = 'advanced',\n\t...options\n}) => ({\n\t...options,\n\textendEnv,\n\tpreferLocal,\n\tcwd,\n\tlocalDirectory,\n\tencoding,\n\treject,\n\tcleanup,\n\tall,\n\twindowsHide,\n\tkillSignal,\n\tforceKillAfterDelay,\n\tgracefulCancel,\n\tipcInput,\n\tipc,\n\tserialization,\n});\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal || node) {\n\t\treturn npmRunPathEnv({\n\t\t\tenv,\n\t\t\tcwd: localDirectory,\n\t\t\texecPath: nodePath,\n\t\t\tpreferLocal,\n\t\t\taddExecPath: node,\n\t\t});\n\t}\n\n\treturn env;\n};\n","import {execPath, execArgv} from 'node:process';\nimport path from 'node:path';\nimport {safeNormalizeFileUrl} from '../arguments/file-url.js';\n\n// `execaNode()` is a shortcut for `execa(..., {node: true})`\nexport const mapNode = ({options}) => {\n\tif (options.node === false) {\n\t\tthrow new TypeError('The \"node\" option cannot be false with `execaNode()`.');\n\t}\n\n\treturn {options: {...options, node: true}};\n};\n\n// Applies the `node: true` option, and the related `nodePath`/`nodeOptions` options.\n// Modifies the file commands/arguments to ensure the same Node binary and flags are re-used.\n// Also adds `ipc: true` and `shell: false`.\nexport const handleNodeOption = (file, commandArguments, {\n\tnode: shouldHandleNode = false,\n\tnodePath = execPath,\n\tnodeOptions = execArgv.filter(nodeOption => !nodeOption.startsWith('--inspect')),\n\tcwd,\n\texecPath: formerNodePath,\n\t...options\n}) => {\n\tif (formerNodePath !== undefined) {\n\t\tthrow new TypeError('The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.');\n\t}\n\n\tconst normalizedNodePath = safeNormalizeFileUrl(nodePath, 'The \"nodePath\" option');\n\tconst resolvedNodePath = path.resolve(cwd, normalizedNodePath);\n\tconst newOptions = {\n\t\t...options,\n\t\tnodePath: resolvedNodePath,\n\t\tnode: shouldHandleNode,\n\t\tcwd,\n\t};\n\n\tif (!shouldHandleNode) {\n\t\treturn [file, commandArguments, newOptions];\n\t}\n\n\tif (path.basename(file, '.exe') === 'node') {\n\t\tthrow new TypeError('When the \"node\" option is true, the first argument does not need to be \"node\".');\n\t}\n\n\treturn [\n\t\tresolvedNodePath,\n\t\t[...nodeOptions, file, ...commandArguments],\n\t\t{ipc: true, ...newOptions, shell: false},\n\t];\n};\n","import {isReadableStream} from 'is-stream';\nimport {asyncIterator} from '@sec-ant/readable-stream/ponyfill';\n\nexport const getAsyncIterable = stream => {\n\tif (isReadableStream(stream, {checkOpen: false}) && nodeImports.on !== undefined) {\n\t\treturn getStreamIterable(stream);\n\t}\n\n\tif (typeof stream?.[Symbol.asyncIterator] === 'function') {\n\t\treturn stream;\n\t}\n\n\t// `ReadableStream[Symbol.asyncIterator]` support is missing in multiple browsers, so we ponyfill it\n\tif (toString.call(stream) === '[object ReadableStream]') {\n\t\treturn asyncIterator.call(stream);\n\t}\n\n\tthrow new TypeError('The first argument must be a Readable, a ReadableStream, or an async iterable.');\n};\n\nconst {toString} = Object.prototype;\n\n// The default iterable for Node.js streams does not allow for multiple readers at once, so we re-implement it\nconst getStreamIterable = async function * (stream) {\n\tconst controller = new AbortController();\n\tconst state = {};\n\thandleStreamEnd(stream, controller, state);\n\n\ttry {\n\t\tfor await (const [chunk] of nodeImports.on(stream, 'data', {signal: controller.signal})) {\n\t\t\tyield chunk;\n\t\t}\n\t} catch (error) {\n\t\t// Stream failure, for example due to `stream.destroy(error)`\n\t\tif (state.error !== undefined) {\n\t\t\tthrow state.error;\n\t\t// `error` event directly emitted on stream\n\t\t} else if (!controller.signal.aborted) {\n\t\t\tthrow error;\n\t\t// Otherwise, stream completed successfully\n\t\t}\n\t\t// The `finally` block also runs when the caller throws, for example due to the `maxBuffer` option\n\t} finally {\n\t\tstream.destroy();\n\t}\n};\n\nconst handleStreamEnd = async (stream, controller, state) => {\n\ttry {\n\t\tawait nodeImports.finished(stream, {\n\t\t\tcleanup: true,\n\t\t\treadable: true,\n\t\t\twritable: false,\n\t\t\terror: false,\n\t\t});\n\t} catch (error) {\n\t\tstate.error = error;\n\t} finally {\n\t\tcontroller.abort();\n\t}\n};\n\n// Loaded by the Node entrypoint, but not by the browser one.\n// This prevents using dynamic imports.\nexport const nodeImports = {};\n","import {getAsyncIterable} from './stream.js';\n\nexport const getStreamContents = async (stream, {init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize}, {maxBuffer = Number.POSITIVE_INFINITY} = {}) => {\n\tconst asyncIterable = getAsyncIterable(stream);\n\n\tconst state = init();\n\tstate.length = 0;\n\n\ttry {\n\t\tfor await (const chunk of asyncIterable) {\n\t\t\tconst chunkType = getChunkType(chunk);\n\t\t\tconst convertedChunk = convertChunk[chunkType](chunk, state);\n\t\t\tappendChunk({\n\t\t\t\tconvertedChunk,\n\t\t\t\tstate,\n\t\t\t\tgetSize,\n\t\t\t\ttruncateChunk,\n\t\t\t\taddChunk,\n\t\t\t\tmaxBuffer,\n\t\t\t});\n\t\t}\n\n\t\tappendFinalChunk({\n\t\t\tstate,\n\t\t\tconvertChunk,\n\t\t\tgetSize,\n\t\t\ttruncateChunk,\n\t\t\taddChunk,\n\t\t\tgetFinalChunk,\n\t\t\tmaxBuffer,\n\t\t});\n\t\treturn finalize(state);\n\t} catch (error) {\n\t\tconst normalizedError = typeof error === 'object' && error !== null ? error : new Error(error);\n\t\tnormalizedError.bufferedData = finalize(state);\n\t\tthrow normalizedError;\n\t}\n};\n\nconst appendFinalChunk = ({state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer}) => {\n\tconst convertedChunk = getFinalChunk(state);\n\tif (convertedChunk !== undefined) {\n\t\tappendChunk({\n\t\t\tconvertedChunk,\n\t\t\tstate,\n\t\t\tgetSize,\n\t\t\ttruncateChunk,\n\t\t\taddChunk,\n\t\t\tmaxBuffer,\n\t\t});\n\t}\n};\n\nconst appendChunk = ({convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer}) => {\n\tconst chunkSize = getSize(convertedChunk);\n\tconst newLength = state.length + chunkSize;\n\n\tif (newLength <= maxBuffer) {\n\t\taddNewChunk(convertedChunk, state, addChunk, newLength);\n\t\treturn;\n\t}\n\n\tconst truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);\n\n\tif (truncatedChunk !== undefined) {\n\t\taddNewChunk(truncatedChunk, state, addChunk, maxBuffer);\n\t}\n\n\tthrow new MaxBufferError();\n};\n\nconst addNewChunk = (convertedChunk, state, addChunk, newLength) => {\n\tstate.contents = addChunk(convertedChunk, state, newLength);\n\tstate.length = newLength;\n};\n\nconst getChunkType = chunk => {\n\tconst typeOfChunk = typeof chunk;\n\n\tif (typeOfChunk === 'string') {\n\t\treturn 'string';\n\t}\n\n\tif (typeOfChunk !== 'object' || chunk === null) {\n\t\treturn 'others';\n\t}\n\n\tif (globalThis.Buffer?.isBuffer(chunk)) {\n\t\treturn 'buffer';\n\t}\n\n\tconst prototypeName = objectToString.call(chunk);\n\n\tif (prototypeName === '[object ArrayBuffer]') {\n\t\treturn 'arrayBuffer';\n\t}\n\n\tif (prototypeName === '[object DataView]') {\n\t\treturn 'dataView';\n\t}\n\n\tif (\n\t\tNumber.isInteger(chunk.byteLength)\n\t\t&& Number.isInteger(chunk.byteOffset)\n\t\t&& objectToString.call(chunk.buffer) === '[object ArrayBuffer]'\n\t) {\n\t\treturn 'typedArray';\n\t}\n\n\treturn 'others';\n};\n\nconst {toString: objectToString} = Object.prototype;\n\nexport class MaxBufferError extends Error {\n\tname = 'MaxBufferError';\n\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t}\n}\n","export const identity = value => value;\n\nexport const noop = () => undefined;\n\nexport const getContentsProperty = ({contents}) => contents;\n\nexport const throwObjectStream = chunk => {\n\tthrow new Error(`Streams in object mode are not supported: ${String(chunk)}`);\n};\n\nexport const getLengthProperty = convertedChunk => convertedChunk.length;\n","import {getStreamContents} from './contents.js';\nimport {identity, noop, getContentsProperty} from './utils.js';\n\nexport async function getStreamAsArray(stream, options) {\n\treturn getStreamContents(stream, arrayMethods, options);\n}\n\nconst initArray = () => ({contents: []});\n\nconst increment = () => 1;\n\nconst addArrayChunk = (convertedChunk, {contents}) => {\n\tcontents.push(convertedChunk);\n\treturn contents;\n};\n\nconst arrayMethods = {\n\tinit: initArray,\n\tconvertChunk: {\n\t\tstring: identity,\n\t\tbuffer: identity,\n\t\tarrayBuffer: identity,\n\t\tdataView: identity,\n\t\ttypedArray: identity,\n\t\tothers: identity,\n\t},\n\tgetSize: increment,\n\ttruncateChunk: noop,\n\taddChunk: addArrayChunk,\n\tgetFinalChunk: noop,\n\tfinalize: getContentsProperty,\n};\n","import {getStreamContents} from './contents.js';\nimport {noop, throwObjectStream, getLengthProperty} from './utils.js';\n\nexport async function getStreamAsArrayBuffer(stream, options) {\n\treturn getStreamContents(stream, arrayBufferMethods, options);\n}\n\nconst initArrayBuffer = () => ({contents: new ArrayBuffer(0)});\n\nconst useTextEncoder = chunk => textEncoder.encode(chunk);\nconst textEncoder = new TextEncoder();\n\nconst useUint8Array = chunk => new Uint8Array(chunk);\n\nconst useUint8ArrayWithOffset = chunk => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);\n\nconst truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);\n\n// `contents` is an increasingly growing `Uint8Array`.\nconst addArrayBufferChunk = (convertedChunk, {contents, length: previousLength}, length) => {\n\tconst newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);\n\tnew Uint8Array(newContents).set(convertedChunk, previousLength);\n\treturn newContents;\n};\n\n// Without `ArrayBuffer.resize()`, `contents` size is always a power of 2.\n// This means its last bytes are zeroes (not stream data), which need to be\n// trimmed at the end with `ArrayBuffer.slice()`.\nconst resizeArrayBufferSlow = (contents, length) => {\n\tif (length <= contents.byteLength) {\n\t\treturn contents;\n\t}\n\n\tconst arrayBuffer = new ArrayBuffer(getNewContentsLength(length));\n\tnew Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);\n\treturn arrayBuffer;\n};\n\n// With `ArrayBuffer.resize()`, `contents` size matches exactly the size of\n// the stream data. It does not include extraneous zeroes to trim at the end.\n// The underlying `ArrayBuffer` does allocate a number of bytes that is a power\n// of 2, but those bytes are only visible after calling `ArrayBuffer.resize()`.\nconst resizeArrayBuffer = (contents, length) => {\n\tif (length <= contents.maxByteLength) {\n\t\tcontents.resize(length);\n\t\treturn contents;\n\t}\n\n\tconst arrayBuffer = new ArrayBuffer(length, {maxByteLength: getNewContentsLength(length)});\n\tnew Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);\n\treturn arrayBuffer;\n};\n\n// Retrieve the closest `length` that is both >= and a power of 2\nconst getNewContentsLength = length => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));\n\nconst SCALE_FACTOR = 2;\n\nconst finalizeArrayBuffer = ({contents, length}) => hasArrayBufferResize() ? contents : contents.slice(0, length);\n\n// `ArrayBuffer.slice()` is slow. When `ArrayBuffer.resize()` is available\n// (Node >=20.0.0, Safari >=16.4 and Chrome), we can use it instead.\n// eslint-disable-next-line no-warning-comments\n// TODO: remove after dropping support for Node 20.\n// eslint-disable-next-line no-warning-comments\n// TODO: use `ArrayBuffer.transferToFixedLength()` instead once it is available\nconst hasArrayBufferResize = () => 'resize' in ArrayBuffer.prototype;\n\nconst arrayBufferMethods = {\n\tinit: initArrayBuffer,\n\tconvertChunk: {\n\t\tstring: useTextEncoder,\n\t\tbuffer: useUint8Array,\n\t\tarrayBuffer: useUint8Array,\n\t\tdataView: useUint8ArrayWithOffset,\n\t\ttypedArray: useUint8ArrayWithOffset,\n\t\tothers: throwObjectStream,\n\t},\n\tgetSize: getLengthProperty,\n\ttruncateChunk: truncateArrayBufferChunk,\n\taddChunk: addArrayBufferChunk,\n\tgetFinalChunk: noop,\n\tfinalize: finalizeArrayBuffer,\n};\n","import {getStreamContents} from './contents.js';\nimport {\n\tidentity,\n\tgetContentsProperty,\n\tthrowObjectStream,\n\tgetLengthProperty,\n} from './utils.js';\n\nexport async function getStreamAsString(stream, options) {\n\treturn getStreamContents(stream, stringMethods, options);\n}\n\nconst initString = () => ({contents: '', textDecoder: new TextDecoder()});\n\nconst useTextDecoder = (chunk, {textDecoder}) => textDecoder.decode(chunk, {stream: true});\n\nconst addStringChunk = (convertedChunk, {contents}) => contents + convertedChunk;\n\nconst truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);\n\nconst getFinalStringChunk = ({textDecoder}) => {\n\tconst finalChunk = textDecoder.decode();\n\treturn finalChunk === '' ? undefined : finalChunk;\n};\n\nconst stringMethods = {\n\tinit: initString,\n\tconvertChunk: {\n\t\tstring: identity,\n\t\tbuffer: useTextDecoder,\n\t\tarrayBuffer: useTextDecoder,\n\t\tdataView: useTextDecoder,\n\t\ttypedArray: useTextDecoder,\n\t\tothers: throwObjectStream,\n\t},\n\tgetSize: getLengthProperty,\n\ttruncateChunk: truncateStringChunk,\n\taddChunk: addStringChunk,\n\tgetFinalChunk: getFinalStringChunk,\n\tfinalize: getContentsProperty,\n};\n","import {MaxBufferError} from 'get-stream';\nimport {getStreamName} from '../utils/standard-stream.js';\nimport {getFdSpecificValue} from '../arguments/specific.js';\n\n// When the `maxBuffer` option is hit, a MaxBufferError is thrown.\n// The stream is aborted, then specific information is kept for the error message.\nexport const handleMaxBuffer = ({error, stream, readableObjectMode, lines, encoding, fdNumber}) => {\n\tif (!(error instanceof MaxBufferError)) {\n\t\tthrow error;\n\t}\n\n\tif (fdNumber === 'all') {\n\t\treturn error;\n\t}\n\n\tconst unit = getMaxBufferUnit(readableObjectMode, lines, encoding);\n\terror.maxBufferInfo = {fdNumber, unit};\n\tstream.destroy();\n\tthrow error;\n};\n\nconst getMaxBufferUnit = (readableObjectMode, lines, encoding) => {\n\tif (readableObjectMode) {\n\t\treturn 'objects';\n\t}\n\n\tif (lines) {\n\t\treturn 'lines';\n\t}\n\n\tif (encoding === 'buffer') {\n\t\treturn 'bytes';\n\t}\n\n\treturn 'characters';\n};\n\n// Check the `maxBuffer` option with `result.ipcOutput`\nexport const checkIpcMaxBuffer = (subprocess, ipcOutput, maxBuffer) => {\n\tif (ipcOutput.length !== maxBuffer) {\n\t\treturn;\n\t}\n\n\tconst error = new MaxBufferError();\n\terror.maxBufferInfo = {fdNumber: 'ipc'};\n\tthrow error;\n};\n\n// Error message when `maxBuffer` is hit\nexport const getMaxBufferMessage = (error, maxBuffer) => {\n\tconst {streamName, threshold, unit} = getMaxBufferInfo(error, maxBuffer);\n\treturn `Command's ${streamName} was larger than ${threshold} ${unit}`;\n};\n\nconst getMaxBufferInfo = (error, maxBuffer) => {\n\tif (error?.maxBufferInfo === undefined) {\n\t\treturn {streamName: 'output', threshold: maxBuffer[1], unit: 'bytes'};\n\t}\n\n\tconst {maxBufferInfo: {fdNumber, unit}} = error;\n\tdelete error.maxBufferInfo;\n\n\tconst threshold = getFdSpecificValue(maxBuffer, fdNumber);\n\tif (fdNumber === 'ipc') {\n\t\treturn {streamName: 'IPC output', threshold, unit: 'messages'};\n\t}\n\n\treturn {streamName: getStreamName(fdNumber), threshold, unit};\n};\n\n// The only way to apply `maxBuffer` with `spawnSync()` is to use the native `maxBuffer` option Node.js provides.\n// However, this has multiple limitations, and cannot behave the exact same way as the async behavior.\n// When the `maxBuffer` is hit, a `ENOBUFS` error is thrown.\nexport const isMaxBufferSync = (resultError, output, maxBuffer) => resultError?.code === 'ENOBUFS'\n\t&& output !== null\n\t&& output.some(result => result !== null && result.length > getMaxBufferSync(maxBuffer));\n\n// When `maxBuffer` is hit, ensure the result is truncated\nexport const truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {\n\tif (!isMaxBuffer) {\n\t\treturn result;\n\t}\n\n\tconst maxBufferValue = getMaxBufferSync(maxBuffer);\n\treturn result.length > maxBufferValue ? result.slice(0, maxBufferValue) : result;\n};\n\n// `spawnSync()` does not allow differentiating `maxBuffer` per file descriptor, so we always use `stdout`\nexport const getMaxBufferSync = ([, stdoutMaxBuffer]) => stdoutMaxBuffer;\n","import {inspect} from 'node:util';\nimport stripFinalNewline from 'strip-final-newline';\nimport {isUint8Array, uint8ArrayToString} from '../utils/uint-array.js';\nimport {fixCwdError} from '../arguments/cwd.js';\nimport {escapeLines} from '../arguments/escape.js';\nimport {getMaxBufferMessage} from '../io/max-buffer.js';\nimport {getSignalDescription} from '../terminate/signal.js';\nimport {DiscardedError, isExecaError} from './final-error.js';\n\n// Computes `error.message`, `error.shortMessage` and `error.originalMessage`\nexport const createMessages = ({\n\tstdio,\n\tall,\n\tipcOutput,\n\toriginalError,\n\tsignal,\n\tsignalDescription,\n\texitCode,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tisGracefullyCanceled,\n\tisMaxBuffer,\n\tisForcefullyTerminated,\n\tforceKillAfterDelay,\n\tkillSignal,\n\tmaxBuffer,\n\ttimeout,\n\tcwd,\n}) => {\n\tconst errorCode = originalError?.code;\n\tconst prefix = getErrorPrefix({\n\t\toriginalError,\n\t\ttimedOut,\n\t\ttimeout,\n\t\tisMaxBuffer,\n\t\tmaxBuffer,\n\t\terrorCode,\n\t\tsignal,\n\t\tsignalDescription,\n\t\texitCode,\n\t\tisCanceled,\n\t\tisGracefullyCanceled,\n\t\tisForcefullyTerminated,\n\t\tforceKillAfterDelay,\n\t\tkillSignal,\n\t});\n\tconst originalMessage = getOriginalMessage(originalError, cwd);\n\tconst suffix = originalMessage === undefined ? '' : `\\n${originalMessage}`;\n\tconst shortMessage = `${prefix}: ${escapedCommand}${suffix}`;\n\tconst messageStdio = all === undefined ? [stdio[2], stdio[1]] : [all];\n\tconst message = [\n\t\tshortMessage,\n\t\t...messageStdio,\n\t\t...stdio.slice(3),\n\t\tipcOutput.map(ipcMessage => serializeIpcMessage(ipcMessage)).join('\\n'),\n\t]\n\t\t.map(messagePart => escapeLines(stripFinalNewline(serializeMessagePart(messagePart))))\n\t\t.filter(Boolean)\n\t\t.join('\\n\\n');\n\treturn {originalMessage, shortMessage, message};\n};\n\nconst getErrorPrefix = ({\n\toriginalError,\n\ttimedOut,\n\ttimeout,\n\tisMaxBuffer,\n\tmaxBuffer,\n\terrorCode,\n\tsignal,\n\tsignalDescription,\n\texitCode,\n\tisCanceled,\n\tisGracefullyCanceled,\n\tisForcefullyTerminated,\n\tforceKillAfterDelay,\n\tkillSignal,\n}) => {\n\tconst forcefulSuffix = getForcefulSuffix(isForcefullyTerminated, forceKillAfterDelay);\n\n\tif (timedOut) {\n\t\treturn `Command timed out after ${timeout} milliseconds${forcefulSuffix}`;\n\t}\n\n\tif (isGracefullyCanceled) {\n\t\tif (signal === undefined) {\n\t\t\treturn `Command was gracefully canceled with exit code ${exitCode}`;\n\t\t}\n\n\t\treturn isForcefullyTerminated\n\t\t\t? `Command was gracefully canceled${forcefulSuffix}`\n\t\t\t: `Command was gracefully canceled with ${signal} (${signalDescription})`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn `Command was canceled${forcefulSuffix}`;\n\t}\n\n\tif (isMaxBuffer) {\n\t\treturn `${getMaxBufferMessage(originalError, maxBuffer)}${forcefulSuffix}`;\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `Command failed with ${errorCode}${forcefulSuffix}`;\n\t}\n\n\tif (isForcefullyTerminated) {\n\t\treturn `Command was killed with ${killSignal} (${getSignalDescription(killSignal)})${forcefulSuffix}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `Command was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `Command failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'Command failed';\n};\n\nconst getForcefulSuffix = (isForcefullyTerminated, forceKillAfterDelay) => isForcefullyTerminated\n\t? ` and was forcefully terminated after ${forceKillAfterDelay} milliseconds`\n\t: '';\n\nconst getOriginalMessage = (originalError, cwd) => {\n\tif (originalError instanceof DiscardedError) {\n\t\treturn;\n\t}\n\n\tconst originalMessage = isExecaError(originalError)\n\t\t? originalError.originalMessage\n\t\t: String(originalError?.message ?? originalError);\n\tconst escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));\n\treturn escapedOriginalMessage === '' ? undefined : escapedOriginalMessage;\n};\n\nconst serializeIpcMessage = ipcMessage => typeof ipcMessage === 'string'\n\t? ipcMessage\n\t: inspect(ipcMessage);\n\nconst serializeMessagePart = messagePart => Array.isArray(messagePart)\n\t? messagePart.map(messageItem => stripFinalNewline(serializeMessageItem(messageItem))).filter(Boolean).join('\\n')\n\t: serializeMessageItem(messagePart);\n\nconst serializeMessageItem = messageItem => {\n\tif (typeof messageItem === 'string') {\n\t\treturn messageItem;\n\t}\n\n\tif (isUint8Array(messageItem)) {\n\t\treturn uint8ArrayToString(messageItem);\n\t}\n\n\treturn '';\n};\n","import {getSignalDescription} from '../terminate/signal.js';\nimport {getDurationMs} from './duration.js';\nimport {getFinalError} from './final-error.js';\nimport {createMessages} from './message.js';\n\n// Object returned on subprocess success\nexport const makeSuccessResult = ({\n\tcommand,\n\tescapedCommand,\n\tstdio,\n\tall,\n\tipcOutput,\n\toptions: {cwd},\n\tstartTime,\n}) => omitUndefinedProperties({\n\tcommand,\n\tescapedCommand,\n\tcwd,\n\tdurationMs: getDurationMs(startTime),\n\tfailed: false,\n\ttimedOut: false,\n\tisCanceled: false,\n\tisGracefullyCanceled: false,\n\tisTerminated: false,\n\tisMaxBuffer: false,\n\tisForcefullyTerminated: false,\n\texitCode: 0,\n\tstdout: stdio[1],\n\tstderr: stdio[2],\n\tall,\n\tstdio,\n\tipcOutput,\n\tpipedFrom: [],\n});\n\n// Object returned on subprocess failure before spawning\nexport const makeEarlyError = ({\n\terror,\n\tcommand,\n\tescapedCommand,\n\tfileDescriptors,\n\toptions,\n\tstartTime,\n\tisSync,\n}) => makeError({\n\terror,\n\tcommand,\n\tescapedCommand,\n\tstartTime,\n\ttimedOut: false,\n\tisCanceled: false,\n\tisGracefullyCanceled: false,\n\tisMaxBuffer: false,\n\tisForcefullyTerminated: false,\n\tstdio: Array.from({length: fileDescriptors.length}),\n\tipcOutput: [],\n\toptions,\n\tisSync,\n});\n\n// Object returned on subprocess failure\nexport const makeError = ({\n\terror: originalError,\n\tcommand,\n\tescapedCommand,\n\tstartTime,\n\ttimedOut,\n\tisCanceled,\n\tisGracefullyCanceled,\n\tisMaxBuffer,\n\tisForcefullyTerminated,\n\texitCode: rawExitCode,\n\tsignal: rawSignal,\n\tstdio,\n\tall,\n\tipcOutput,\n\toptions: {\n\t\ttimeoutDuration,\n\t\ttimeout = timeoutDuration,\n\t\tforceKillAfterDelay,\n\t\tkillSignal,\n\t\tcwd,\n\t\tmaxBuffer,\n\t},\n\tisSync,\n}) => {\n\tconst {exitCode, signal, signalDescription} = normalizeExitPayload(rawExitCode, rawSignal);\n\tconst {originalMessage, shortMessage, message} = createMessages({\n\t\tstdio,\n\t\tall,\n\t\tipcOutput,\n\t\toriginalError,\n\t\tsignal,\n\t\tsignalDescription,\n\t\texitCode,\n\t\tescapedCommand,\n\t\ttimedOut,\n\t\tisCanceled,\n\t\tisGracefullyCanceled,\n\t\tisMaxBuffer,\n\t\tisForcefullyTerminated,\n\t\tforceKillAfterDelay,\n\t\tkillSignal,\n\t\tmaxBuffer,\n\t\ttimeout,\n\t\tcwd,\n\t});\n\tconst error = getFinalError(originalError, message, isSync);\n\tObject.assign(error, getErrorProperties({\n\t\terror,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tstartTime,\n\t\ttimedOut,\n\t\tisCanceled,\n\t\tisGracefullyCanceled,\n\t\tisMaxBuffer,\n\t\tisForcefullyTerminated,\n\t\texitCode,\n\t\tsignal,\n\t\tsignalDescription,\n\t\tstdio,\n\t\tall,\n\t\tipcOutput,\n\t\tcwd,\n\t\toriginalMessage,\n\t\tshortMessage,\n\t}));\n\treturn error;\n};\n\nconst getErrorProperties = ({\n\terror,\n\tcommand,\n\tescapedCommand,\n\tstartTime,\n\ttimedOut,\n\tisCanceled,\n\tisGracefullyCanceled,\n\tisMaxBuffer,\n\tisForcefullyTerminated,\n\texitCode,\n\tsignal,\n\tsignalDescription,\n\tstdio,\n\tall,\n\tipcOutput,\n\tcwd,\n\toriginalMessage,\n\tshortMessage,\n}) => omitUndefinedProperties({\n\tshortMessage,\n\toriginalMessage,\n\tcommand,\n\tescapedCommand,\n\tcwd,\n\tdurationMs: getDurationMs(startTime),\n\tfailed: true,\n\ttimedOut,\n\tisCanceled,\n\tisGracefullyCanceled,\n\tisTerminated: signal !== undefined,\n\tisMaxBuffer,\n\tisForcefullyTerminated,\n\texitCode,\n\tsignal,\n\tsignalDescription,\n\tcode: error.cause?.code,\n\tstdout: stdio[1],\n\tstderr: stdio[2],\n\tall,\n\tstdio,\n\tipcOutput,\n\tpipedFrom: [],\n});\n\nconst omitUndefinedProperties = result => Object.fromEntries(Object.entries(result).filter(([, value]) => value !== undefined));\n\n// `signal` and `exitCode` emitted on `subprocess.on('exit')` event can be `null`.\n// We normalize them to `undefined`\nconst normalizeExitPayload = (rawExitCode, rawSignal) => {\n\tconst exitCode = rawExitCode === null ? undefined : rawExitCode;\n\tconst signal = rawSignal === null ? undefined : rawSignal;\n\tconst signalDescription = signal === undefined ? undefined : getSignalDescription(rawSignal);\n\treturn {exitCode, signal, signalDescription};\n};\n","import prettyMs from 'pretty-ms';\nimport {isVerbose} from './values.js';\nimport {verboseLog} from './log.js';\nimport {logError} from './error.js';\n\n// When `verbose` is `short|full|custom`, print each command's completion, duration and error\nexport const logResult = (result, verboseInfo) => {\n\tif (!isVerbose(verboseInfo)) {\n\t\treturn;\n\t}\n\n\tlogError(result, verboseInfo);\n\tlogDuration(result, verboseInfo);\n};\n\nconst logDuration = (result, verboseInfo) => {\n\tconst verboseMessage = `(done in ${prettyMs(result.durationMs)})`;\n\tverboseLog({\n\t\ttype: 'duration',\n\t\tverboseMessage,\n\t\tverboseInfo,\n\t\tresult,\n\t});\n};\n","import {logResult} from '../verbose/complete.js';\n\n// Applies the `reject` option.\n// Also print the final log line with `verbose`.\nexport const handleResult = (result, verboseInfo, {reject}) => {\n\tlogResult(result, verboseInfo);\n\n\tif (result.failed && reject) {\n\t\tthrow result;\n\t}\n\n\treturn result;\n};\n","import {verboseLog} from './log.js';\n\n// When `verbose` is `short|full|custom`, print each command's error when it fails\nexport const logError = (result, verboseInfo) => {\n\tif (result.failed) {\n\t\tverboseLog({\n\t\t\ttype: 'error',\n\t\t\tverboseMessage: result.shortMessage,\n\t\t\tverboseInfo,\n\t\t\tresult,\n\t\t});\n\t}\n};\n","import {isStream as isNodeStream, isDuplexStream} from 'is-stream';\nimport isPlainObj from 'is-plain-obj';\nimport {isUint8Array} from '../utils/uint-array.js';\n\n// The `stdin`/`stdout`/`stderr` option can be of many types. This detects it.\nexport const getStdioItemType = (value, optionName) => {\n\tif (isAsyncGenerator(value)) {\n\t\treturn 'asyncGenerator';\n\t}\n\n\tif (isSyncGenerator(value)) {\n\t\treturn 'generator';\n\t}\n\n\tif (isUrl(value)) {\n\t\treturn 'fileUrl';\n\t}\n\n\tif (isFilePathObject(value)) {\n\t\treturn 'filePath';\n\t}\n\n\tif (isWebStream(value)) {\n\t\treturn 'webStream';\n\t}\n\n\tif (isNodeStream(value, {checkOpen: false})) {\n\t\treturn 'native';\n\t}\n\n\tif (isUint8Array(value)) {\n\t\treturn 'uint8Array';\n\t}\n\n\tif (isAsyncIterableObject(value)) {\n\t\treturn 'asyncIterable';\n\t}\n\n\tif (isIterableObject(value)) {\n\t\treturn 'iterable';\n\t}\n\n\tif (isTransformStream(value)) {\n\t\treturn getTransformStreamType({transform: value}, optionName);\n\t}\n\n\tif (isTransformOptions(value)) {\n\t\treturn getTransformObjectType(value, optionName);\n\t}\n\n\treturn 'native';\n};\n\nconst getTransformObjectType = (value, optionName) => {\n\tif (isDuplexStream(value.transform, {checkOpen: false})) {\n\t\treturn getDuplexType(value, optionName);\n\t}\n\n\tif (isTransformStream(value.transform)) {\n\t\treturn getTransformStreamType(value, optionName);\n\t}\n\n\treturn getGeneratorObjectType(value, optionName);\n};\n\nconst getDuplexType = (value, optionName) => {\n\tvalidateNonGeneratorType(value, optionName, 'Duplex stream');\n\treturn 'duplex';\n};\n\nconst getTransformStreamType = (value, optionName) => {\n\tvalidateNonGeneratorType(value, optionName, 'web TransformStream');\n\treturn 'webTransform';\n};\n\nconst validateNonGeneratorType = ({final, binary, objectMode}, optionName, typeName) => {\n\tcheckUndefinedOption(final, `${optionName}.final`, typeName);\n\tcheckUndefinedOption(binary, `${optionName}.binary`, typeName);\n\tcheckBooleanOption(objectMode, `${optionName}.objectMode`);\n};\n\nconst checkUndefinedOption = (value, optionName, typeName) => {\n\tif (value !== undefined) {\n\t\tthrow new TypeError(`The \\`${optionName}\\` option can only be defined when using a generator, not a ${typeName}.`);\n\t}\n};\n\nconst getGeneratorObjectType = ({transform, final, binary, objectMode}, optionName) => {\n\tif (transform !== undefined && !isGenerator(transform)) {\n\t\tthrow new TypeError(`The \\`${optionName}.transform\\` option must be a generator, a Duplex stream or a web TransformStream.`);\n\t}\n\n\tif (isDuplexStream(final, {checkOpen: false})) {\n\t\tthrow new TypeError(`The \\`${optionName}.final\\` option must not be a Duplex stream.`);\n\t}\n\n\tif (isTransformStream(final)) {\n\t\tthrow new TypeError(`The \\`${optionName}.final\\` option must not be a web TransformStream.`);\n\t}\n\n\tif (final !== undefined && !isGenerator(final)) {\n\t\tthrow new TypeError(`The \\`${optionName}.final\\` option must be a generator.`);\n\t}\n\n\tcheckBooleanOption(binary, `${optionName}.binary`);\n\tcheckBooleanOption(objectMode, `${optionName}.objectMode`);\n\n\treturn isAsyncGenerator(transform) || isAsyncGenerator(final) ? 'asyncGenerator' : 'generator';\n};\n\nconst checkBooleanOption = (value, optionName) => {\n\tif (value !== undefined && typeof value !== 'boolean') {\n\t\tthrow new TypeError(`The \\`${optionName}\\` option must use a boolean.`);\n\t}\n};\n\nconst isGenerator = value => isAsyncGenerator(value) || isSyncGenerator(value);\nexport const isAsyncGenerator = value => Object.prototype.toString.call(value) === '[object AsyncGeneratorFunction]';\nconst isSyncGenerator = value => Object.prototype.toString.call(value) === '[object GeneratorFunction]';\nconst isTransformOptions = value => isPlainObj(value)\n\t&& (value.transform !== undefined || value.final !== undefined);\n\nexport const isUrl = value => Object.prototype.toString.call(value) === '[object URL]';\nexport const isRegularUrl = value => isUrl(value) && value.protocol !== 'file:';\n\nconst isFilePathObject = value => isPlainObj(value)\n\t&& Object.keys(value).length === 1\n\t&& isFilePathString(value.file);\nexport const isFilePathString = file => typeof file === 'string';\n\nexport const isUnknownStdioString = (type, value) => type === 'native'\n\t&& typeof value === 'string'\n\t&& !KNOWN_STDIO_STRINGS.has(value);\nconst KNOWN_STDIO_STRINGS = new Set(['ipc', 'ignore', 'inherit', 'overlapped', 'pipe']);\n\nconst isReadableStream = value => Object.prototype.toString.call(value) === '[object ReadableStream]';\nexport const isWritableStream = value => Object.prototype.toString.call(value) === '[object WritableStream]';\nconst isWebStream = value => isReadableStream(value) || isWritableStream(value);\nconst isTransformStream = value => isReadableStream(value?.readable) && isWritableStream(value?.writable);\n\nconst isAsyncIterableObject = value => isObject(value) && typeof value[Symbol.asyncIterator] === 'function';\nconst isIterableObject = value => isObject(value) && typeof value[Symbol.iterator] === 'function';\nconst isObject = value => typeof value === 'object' && value !== null;\n\n// Types which modify `subprocess.std*`\nexport const TRANSFORM_TYPES = new Set(['generator', 'asyncGenerator', 'duplex', 'webTransform']);\n// Types which write to a file or a file descriptor\nexport const FILE_TYPES = new Set(['fileUrl', 'filePath', 'fileNumber']);\n// When two file descriptors of this type share the same target, we need to do some special logic\nexport const SPECIAL_DUPLICATE_TYPES_SYNC = new Set(['fileUrl', 'filePath']);\nexport const SPECIAL_DUPLICATE_TYPES = new Set([...SPECIAL_DUPLICATE_TYPES_SYNC, 'webStream', 'nodeStream']);\n// Do not allow two file descriptors of this type sharing the same target\nexport const FORBID_DUPLICATE_TYPES = new Set(['webTransform', 'duplex']);\n\n// Convert types to human-friendly strings for error messages\nexport const TYPE_TO_MESSAGE = {\n\tgenerator: 'a generator',\n\tasyncGenerator: 'an async generator',\n\tfileUrl: 'a file URL',\n\tfilePath: 'a file path string',\n\tfileNumber: 'a file descriptor number',\n\twebStream: 'a web stream',\n\tnodeStream: 'a Node.js stream',\n\twebTransform: 'a web TransformStream',\n\tduplex: 'a Duplex stream',\n\tnative: 'any value',\n\titerable: 'an iterable',\n\tasyncIterable: 'an async iterable',\n\tstring: 'a string',\n\tuint8Array: 'a Uint8Array',\n};\n","import {TRANSFORM_TYPES} from '../stdio/type.js';\n\n/*\nRetrieve the `objectMode`s of a single transform.\n`objectMode` determines the return value's type, i.e. the `readableObjectMode`.\nThe chunk argument's type is based on the previous generator's return value, i.e. the `writableObjectMode` is based on the previous `readableObjectMode`.\nThe last input's generator is read by `subprocess.stdin` which:\n- should not be in `objectMode` for performance reasons.\n- can only be strings, Buffers and Uint8Arrays.\nTherefore its `readableObjectMode` must be `false`.\nThe same applies to the first output's generator's `writableObjectMode`.\n*/\nexport const getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === 'output'\n\t? getOutputObjectModes(objectMode, index, newTransforms)\n\t: getInputObjectModes(objectMode, index, newTransforms);\n\nconst getOutputObjectModes = (objectMode, index, newTransforms) => {\n\tconst writableObjectMode = index !== 0 && newTransforms[index - 1].value.readableObjectMode;\n\tconst readableObjectMode = objectMode ?? writableObjectMode;\n\treturn {writableObjectMode, readableObjectMode};\n};\n\nconst getInputObjectModes = (objectMode, index, newTransforms) => {\n\tconst writableObjectMode = index === 0\n\t\t? objectMode === true\n\t\t: newTransforms[index - 1].value.readableObjectMode;\n\tconst readableObjectMode = index !== newTransforms.length - 1 && (objectMode ?? writableObjectMode);\n\treturn {writableObjectMode, readableObjectMode};\n};\n\n// Retrieve the `objectMode` of a file descriptor, e.g. `stdout` or `stderr`\nexport const getFdObjectMode = (stdioItems, direction) => {\n\tconst lastTransform = stdioItems.findLast(({type}) => TRANSFORM_TYPES.has(type));\n\tif (lastTransform === undefined) {\n\t\treturn false;\n\t}\n\n\treturn direction === 'input'\n\t\t? lastTransform.value.writableObjectMode\n\t\t: lastTransform.value.readableObjectMode;\n};\n","import isPlainObj from 'is-plain-obj';\nimport {BINARY_ENCODINGS} from '../arguments/encoding-option.js';\nimport {TRANSFORM_TYPES} from '../stdio/type.js';\nimport {getTransformObjectModes} from './object-mode.js';\n\n// Transforms generators/duplex/TransformStream can have multiple shapes.\n// This normalizes it and applies default values.\nexport const normalizeTransforms = (stdioItems, optionName, direction, options) => [\n\t...stdioItems.filter(({type}) => !TRANSFORM_TYPES.has(type)),\n\t...getTransforms(stdioItems, optionName, direction, options),\n];\n\nconst getTransforms = (stdioItems, optionName, direction, {encoding}) => {\n\tconst transforms = stdioItems.filter(({type}) => TRANSFORM_TYPES.has(type));\n\tconst newTransforms = Array.from({length: transforms.length});\n\n\tfor (const [index, stdioItem] of Object.entries(transforms)) {\n\t\tnewTransforms[index] = normalizeTransform({\n\t\t\tstdioItem,\n\t\t\tindex: Number(index),\n\t\t\tnewTransforms,\n\t\t\toptionName,\n\t\t\tdirection,\n\t\t\tencoding,\n\t\t});\n\t}\n\n\treturn sortTransforms(newTransforms, direction);\n};\n\nconst normalizeTransform = ({stdioItem, stdioItem: {type}, index, newTransforms, optionName, direction, encoding}) => {\n\tif (type === 'duplex') {\n\t\treturn normalizeDuplex({stdioItem, optionName});\n\t}\n\n\tif (type === 'webTransform') {\n\t\treturn normalizeTransformStream({\n\t\t\tstdioItem,\n\t\t\tindex,\n\t\t\tnewTransforms,\n\t\t\tdirection,\n\t\t});\n\t}\n\n\treturn normalizeGenerator({\n\t\tstdioItem,\n\t\tindex,\n\t\tnewTransforms,\n\t\tdirection,\n\t\tencoding,\n\t});\n};\n\nconst normalizeDuplex = ({\n\tstdioItem,\n\tstdioItem: {\n\t\tvalue: {\n\t\t\ttransform,\n\t\t\ttransform: {writableObjectMode, readableObjectMode},\n\t\t\tobjectMode = readableObjectMode,\n\t\t},\n\t},\n\toptionName,\n}) => {\n\tif (objectMode && !readableObjectMode) {\n\t\tthrow new TypeError(`The \\`${optionName}.objectMode\\` option can only be \\`true\\` if \\`new Duplex({objectMode: true})\\` is used.`);\n\t}\n\n\tif (!objectMode && readableObjectMode) {\n\t\tthrow new TypeError(`The \\`${optionName}.objectMode\\` option cannot be \\`false\\` if \\`new Duplex({objectMode: true})\\` is used.`);\n\t}\n\n\treturn {\n\t\t...stdioItem,\n\t\tvalue: {transform, writableObjectMode, readableObjectMode},\n\t};\n};\n\nconst normalizeTransformStream = ({stdioItem, stdioItem: {value}, index, newTransforms, direction}) => {\n\tconst {transform, objectMode} = isPlainObj(value) ? value : {transform: value};\n\tconst {writableObjectMode, readableObjectMode} = getTransformObjectModes(objectMode, index, newTransforms, direction);\n\treturn ({\n\t\t...stdioItem,\n\t\tvalue: {transform, writableObjectMode, readableObjectMode},\n\t});\n};\n\nconst normalizeGenerator = ({stdioItem, stdioItem: {value}, index, newTransforms, direction, encoding}) => {\n\tconst {\n\t\ttransform,\n\t\tfinal,\n\t\tbinary: binaryOption = false,\n\t\tpreserveNewlines = false,\n\t\tobjectMode,\n\t} = isPlainObj(value) ? value : {transform: value};\n\tconst binary = binaryOption || BINARY_ENCODINGS.has(encoding);\n\tconst {writableObjectMode, readableObjectMode} = getTransformObjectModes(objectMode, index, newTransforms, direction);\n\treturn {\n\t\t...stdioItem,\n\t\tvalue: {\n\t\t\ttransform,\n\t\t\tfinal,\n\t\t\tbinary,\n\t\t\tpreserveNewlines,\n\t\t\twritableObjectMode,\n\t\t\treadableObjectMode,\n\t\t},\n\t};\n};\n\nconst sortTransforms = (newTransforms, direction) => direction === 'input' ? newTransforms.reverse() : newTransforms;\n","import process from 'node:process';\nimport {\n\tisStream as isNodeStream,\n\tisReadableStream as isNodeReadableStream,\n\tisWritableStream as isNodeWritableStream,\n} from 'is-stream';\nimport {isWritableStream} from './type.js';\n\n// For `stdio[fdNumber]` beyond stdin/stdout/stderr, we need to guess whether the value passed is intended for inputs or outputs.\n// This allows us to know whether to pipe _into_ or _from_ the stream.\n// When `stdio[fdNumber]` is a single value, this guess is fairly straightforward.\n// However, when it is an array instead, we also need to make sure the different values are not incompatible with each other.\nexport const getStreamDirection = (stdioItems, fdNumber, optionName) => {\n\tconst directions = stdioItems.map(stdioItem => getStdioItemDirection(stdioItem, fdNumber));\n\n\tif (directions.includes('input') && directions.includes('output')) {\n\t\tthrow new TypeError(`The \\`${optionName}\\` option must not be an array of both readable and writable values.`);\n\t}\n\n\treturn directions.find(Boolean) ?? DEFAULT_DIRECTION;\n};\n\nconst getStdioItemDirection = ({type, value}, fdNumber) => KNOWN_DIRECTIONS[fdNumber] ?? guessStreamDirection[type](value);\n\n// `stdin`/`stdout`/`stderr` have a known direction\nconst KNOWN_DIRECTIONS = ['input', 'output', 'output'];\n\nconst anyDirection = () => undefined;\nconst alwaysInput = () => 'input';\n\n// `string` can only be added through the `input` option, i.e. does not need to be handled here\nconst guessStreamDirection = {\n\tgenerator: anyDirection,\n\tasyncGenerator: anyDirection,\n\tfileUrl: anyDirection,\n\tfilePath: anyDirection,\n\titerable: alwaysInput,\n\tasyncIterable: alwaysInput,\n\tuint8Array: alwaysInput,\n\twebStream: value => isWritableStream(value) ? 'output' : 'input',\n\tnodeStream(value) {\n\t\tif (!isNodeReadableStream(value, {checkOpen: false})) {\n\t\t\treturn 'output';\n\t\t}\n\n\t\treturn isNodeWritableStream(value, {checkOpen: false}) ? undefined : 'input';\n\t},\n\twebTransform: anyDirection,\n\tduplex: anyDirection,\n\tnative(value) {\n\t\tconst standardStreamDirection = getStandardStreamDirection(value);\n\t\tif (standardStreamDirection !== undefined) {\n\t\t\treturn standardStreamDirection;\n\t\t}\n\n\t\tif (isNodeStream(value, {checkOpen: false})) {\n\t\t\treturn guessStreamDirection.nodeStream(value);\n\t\t}\n\t},\n};\n\nconst getStandardStreamDirection = value => {\n\tif ([0, process.stdin].includes(value)) {\n\t\treturn 'input';\n\t}\n\n\tif ([1, 2, process.stdout, process.stderr].includes(value)) {\n\t\treturn 'output';\n\t}\n};\n\n// When ambiguous, we initially keep the direction as `undefined`.\n// This allows arrays of `stdio` values to resolve the ambiguity.\n// For example, `stdio[3]: DuplexStream` is ambiguous, but `stdio[3]: [DuplexStream, WritableStream]` is not.\n// When the ambiguity remains, we default to `output` since it is the most common use case for additional file descriptors.\nconst DEFAULT_DIRECTION = 'output';\n","import {STANDARD_STREAMS_ALIASES} from '../utils/standard-stream.js';\nimport {normalizeIpcStdioArray} from '../ipc/array.js';\nimport {isFullVerbose} from '../verbose/values.js';\n\n// Add support for `stdin`/`stdout`/`stderr` as an alias for `stdio`.\n// Also normalize the `stdio` option.\nexport const normalizeStdioOption = ({stdio, ipc, buffer, ...options}, verboseInfo, isSync) => {\n\tconst stdioArray = getStdioArray(stdio, options).map((stdioOption, fdNumber) => addDefaultValue(stdioOption, fdNumber));\n\treturn isSync\n\t\t? normalizeStdioSync(stdioArray, buffer, verboseInfo)\n\t\t: normalizeIpcStdioArray(stdioArray, ipc);\n};\n\nconst getStdioArray = (stdio, options) => {\n\tif (stdio === undefined) {\n\t\treturn STANDARD_STREAMS_ALIASES.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${STANDARD_STREAMS_ALIASES.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio];\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length);\n\treturn Array.from({length}, (_, fdNumber) => stdio[fdNumber]);\n};\n\nconst hasAlias = options => STANDARD_STREAMS_ALIASES.some(alias => options[alias] !== undefined);\n\nconst addDefaultValue = (stdioOption, fdNumber) => {\n\tif (Array.isArray(stdioOption)) {\n\t\treturn stdioOption.map(item => addDefaultValue(item, fdNumber));\n\t}\n\n\tif (stdioOption === null || stdioOption === undefined) {\n\t\treturn fdNumber >= STANDARD_STREAMS_ALIASES.length ? 'ignore' : 'pipe';\n\t}\n\n\treturn stdioOption;\n};\n\n// Using `buffer: false` with synchronous methods implies `stdout`/`stderr`: `ignore`.\n// Unless the output is needed, e.g. due to `verbose: 'full'` or to redirecting to a file.\nconst normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((stdioOption, fdNumber) =>\n\t!buffer[fdNumber]\n\t&& fdNumber !== 0\n\t&& !isFullVerbose(verboseInfo, fdNumber)\n\t&& isOutputPipeOnly(stdioOption)\n\t\t? 'ignore'\n\t\t: stdioOption);\n\nconst isOutputPipeOnly = stdioOption => stdioOption === 'pipe'\n\t|| (Array.isArray(stdioOption) && stdioOption.every(item => item === 'pipe'));\n","import {readFileSync} from 'node:fs';\nimport tty from 'node:tty';\nimport {isStream as isNodeStream} from 'is-stream';\nimport {STANDARD_STREAMS} from '../utils/standard-stream.js';\nimport {bufferToUint8Array} from '../utils/uint-array.js';\nimport {serializeOptionValue} from '../arguments/fd-options.js';\n\n// When we use multiple `stdio` values for the same streams, we pass 'pipe' to `child_process.spawn()`.\n// We then emulate the piping done by core Node.js.\n// To do so, we transform the following values:\n// - Node.js streams are marked as `type: nodeStream`\n// - 'inherit' becomes `process.stdin|stdout|stderr`\n// - any file descriptor integer becomes `process.stdio[fdNumber]`\n// All of the above transformations tell Execa to perform manual piping.\nexport const handleNativeStream = ({stdioItem, stdioItem: {type}, isStdioArray, fdNumber, direction, isSync}) => {\n\tif (!isStdioArray || type !== 'native') {\n\t\treturn stdioItem;\n\t}\n\n\treturn isSync\n\t\t? handleNativeStreamSync({stdioItem, fdNumber, direction})\n\t\t: handleNativeStreamAsync({stdioItem, fdNumber});\n};\n\n// Synchronous methods use a different logic.\n// 'inherit', file descriptors and process.std* are handled by readFileSync()/writeFileSync().\nconst handleNativeStreamSync = ({stdioItem, stdioItem: {value, optionName}, fdNumber, direction}) => {\n\tconst targetFd = getTargetFd({\n\t\tvalue,\n\t\toptionName,\n\t\tfdNumber,\n\t\tdirection,\n\t});\n\tif (targetFd !== undefined) {\n\t\treturn targetFd;\n\t}\n\n\tif (isNodeStream(value, {checkOpen: false})) {\n\t\tthrow new TypeError(`The \\`${optionName}: Stream\\` option cannot both be an array and include a stream with synchronous methods.`);\n\t}\n\n\treturn stdioItem;\n};\n\nconst getTargetFd = ({value, optionName, fdNumber, direction}) => {\n\tconst targetFdNumber = getTargetFdNumber(value, fdNumber);\n\tif (targetFdNumber === undefined) {\n\t\treturn;\n\t}\n\n\tif (direction === 'output') {\n\t\treturn {type: 'fileNumber', value: targetFdNumber, optionName};\n\t}\n\n\tif (tty.isatty(targetFdNumber)) {\n\t\tthrow new TypeError(`The \\`${optionName}: ${serializeOptionValue(value)}\\` option is invalid: it cannot be a TTY with synchronous methods.`);\n\t}\n\n\treturn {type: 'uint8Array', value: bufferToUint8Array(readFileSync(targetFdNumber)), optionName};\n};\n\nconst getTargetFdNumber = (value, fdNumber) => {\n\tif (value === 'inherit') {\n\t\treturn fdNumber;\n\t}\n\n\tif (typeof value === 'number') {\n\t\treturn value;\n\t}\n\n\tconst standardStreamIndex = STANDARD_STREAMS.indexOf(value);\n\tif (standardStreamIndex !== -1) {\n\t\treturn standardStreamIndex;\n\t}\n};\n\nconst handleNativeStreamAsync = ({stdioItem, stdioItem: {value, optionName}, fdNumber}) => {\n\tif (value === 'inherit') {\n\t\treturn {type: 'nodeStream', value: getStandardStream(fdNumber, value, optionName), optionName};\n\t}\n\n\tif (typeof value === 'number') {\n\t\treturn {type: 'nodeStream', value: getStandardStream(value, value, optionName), optionName};\n\t}\n\n\tif (isNodeStream(value, {checkOpen: false})) {\n\t\treturn {type: 'nodeStream', value, optionName};\n\t}\n\n\treturn stdioItem;\n};\n\n// Node.js does not allow to easily retrieve file descriptors beyond stdin/stdout/stderr as streams.\n// - `fs.createReadStream()`/`fs.createWriteStream()` with the `fd` option do not work with character devices that use blocking reads/writes (such as interactive TTYs).\n// - Using a TCP `Socket` would work but be rather complex to implement.\n// Since this is an edge case, we simply throw an error message.\n// See https://github.com/sindresorhus/execa/pull/643#discussion_r1435905707\nconst getStandardStream = (fdNumber, value, optionName) => {\n\tconst standardStream = STANDARD_STREAMS[fdNumber];\n\n\tif (standardStream === undefined) {\n\t\tthrow new TypeError(`The \\`${optionName}: ${value}\\` option is invalid: no such standard stream.`);\n\t}\n\n\treturn standardStream;\n};\n","import {isReadableStream} from 'is-stream';\nimport {isUint8Array} from '../utils/uint-array.js';\nimport {isUrl, isFilePathString} from './type.js';\n\n// Append the `stdin` option with the `input` and `inputFile` options\nexport const handleInputOptions = ({input, inputFile}, fdNumber) => fdNumber === 0\n\t? [\n\t\t...handleInputOption(input),\n\t\t...handleInputFileOption(inputFile),\n\t]\n\t: [];\n\nconst handleInputOption = input => input === undefined ? [] : [{\n\ttype: getInputType(input),\n\tvalue: input,\n\toptionName: 'input',\n}];\n\nconst getInputType = input => {\n\tif (isReadableStream(input, {checkOpen: false})) {\n\t\treturn 'nodeStream';\n\t}\n\n\tif (typeof input === 'string') {\n\t\treturn 'string';\n\t}\n\n\tif (isUint8Array(input)) {\n\t\treturn 'uint8Array';\n\t}\n\n\tthrow new Error('The `input` option must be a string, a Uint8Array or a Node.js Readable stream.');\n};\n\nconst handleInputFileOption = inputFile => inputFile === undefined ? [] : [{\n\t...getInputFileType(inputFile),\n\toptionName: 'inputFile',\n}];\n\nconst getInputFileType = inputFile => {\n\tif (isUrl(inputFile)) {\n\t\treturn {type: 'fileUrl', value: inputFile};\n\t}\n\n\tif (isFilePathString(inputFile)) {\n\t\treturn {type: 'filePath', value: {file: inputFile}};\n\t}\n\n\tthrow new Error('The `inputFile` option must be a file path string or a file URL.');\n};\n","import {\n\tSPECIAL_DUPLICATE_TYPES_SYNC,\n\tSPECIAL_DUPLICATE_TYPES,\n\tFORBID_DUPLICATE_TYPES,\n\tTYPE_TO_MESSAGE,\n} from './type.js';\n\n// Duplicates in the same file descriptor is most likely an error.\n// However, this can be useful with generators.\nexport const filterDuplicates = stdioItems => stdioItems.filter((stdioItemOne, indexOne) =>\n\tstdioItems.every((stdioItemTwo, indexTwo) => stdioItemOne.value !== stdioItemTwo.value\n\t\t|| indexOne >= indexTwo\n\t\t|| stdioItemOne.type === 'generator'\n\t\t|| stdioItemOne.type === 'asyncGenerator'));\n\n// Check if two file descriptors are sharing the same target.\n// For example `{stdout: {file: './output.txt'}, stderr: {file: './output.txt'}}`.\nexport const getDuplicateStream = ({stdioItem: {type, value, optionName}, direction, fileDescriptors, isSync}) => {\n\tconst otherStdioItems = getOtherStdioItems(fileDescriptors, type);\n\tif (otherStdioItems.length === 0) {\n\t\treturn;\n\t}\n\n\tif (isSync) {\n\t\tvalidateDuplicateStreamSync({\n\t\t\totherStdioItems,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\toptionName,\n\t\t\tdirection,\n\t\t});\n\t\treturn;\n\t}\n\n\tif (SPECIAL_DUPLICATE_TYPES.has(type)) {\n\t\treturn getDuplicateStreamInstance({\n\t\t\totherStdioItems,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\toptionName,\n\t\t\tdirection,\n\t\t});\n\t}\n\n\tif (FORBID_DUPLICATE_TYPES.has(type)) {\n\t\tvalidateDuplicateTransform({\n\t\t\totherStdioItems,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\toptionName,\n\t\t});\n\t}\n};\n\n// Values shared by multiple file descriptors\nconst getOtherStdioItems = (fileDescriptors, type) => fileDescriptors\n\t.flatMap(({direction, stdioItems}) => stdioItems\n\t\t.filter(stdioItem => stdioItem.type === type)\n\t\t.map((stdioItem => ({...stdioItem, direction}))));\n\n// With `execaSync()`, do not allow setting a file path both in input and output\nconst validateDuplicateStreamSync = ({otherStdioItems, type, value, optionName, direction}) => {\n\tif (SPECIAL_DUPLICATE_TYPES_SYNC.has(type)) {\n\t\tgetDuplicateStreamInstance({\n\t\t\totherStdioItems,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\toptionName,\n\t\t\tdirection,\n\t\t});\n\t}\n};\n\n// When two file descriptors share the file or stream, we need to re-use the same underlying stream.\n// Otherwise, the stream would be closed twice when piping ends.\n// This is only an issue with output file descriptors.\n// This is not a problem with generator functions since those create a new instance for each file descriptor.\n// We also forbid input and output file descriptors sharing the same file or stream, since that does not make sense.\nconst getDuplicateStreamInstance = ({otherStdioItems, type, value, optionName, direction}) => {\n\tconst duplicateStdioItems = otherStdioItems.filter(stdioItem => hasSameValue(stdioItem, value));\n\tif (duplicateStdioItems.length === 0) {\n\t\treturn;\n\t}\n\n\tconst differentStdioItem = duplicateStdioItems.find(stdioItem => stdioItem.direction !== direction);\n\tthrowOnDuplicateStream(differentStdioItem, optionName, type);\n\n\treturn direction === 'output' ? duplicateStdioItems[0].stream : undefined;\n};\n\nconst hasSameValue = ({type, value}, secondValue) => {\n\tif (type === 'filePath') {\n\t\treturn value.file === secondValue.file;\n\t}\n\n\tif (type === 'fileUrl') {\n\t\treturn value.href === secondValue.href;\n\t}\n\n\treturn value === secondValue;\n};\n\n// We do not allow two file descriptors to share the same Duplex or TransformStream.\n// This is because those are set directly to `subprocess.std*`.\n// For example, this could result in `subprocess.stdout` and `subprocess.stderr` being the same value.\n// This means reading from either would get data from both stdout and stderr.\nconst validateDuplicateTransform = ({otherStdioItems, type, value, optionName}) => {\n\tconst duplicateStdioItem = otherStdioItems.find(({value: {transform}}) => transform === value.transform);\n\tthrowOnDuplicateStream(duplicateStdioItem, optionName, type);\n};\n\nconst throwOnDuplicateStream = (stdioItem, optionName, type) => {\n\tif (stdioItem !== undefined) {\n\t\tthrow new TypeError(`The \\`${stdioItem.optionName}\\` and \\`${optionName}\\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);\n\t}\n};\n","import {getStreamName, isStandardStream} from '../utils/standard-stream.js';\nimport {normalizeTransforms} from '../transform/normalize.js';\nimport {getFdObjectMode} from '../transform/object-mode.js';\nimport {\n\tgetStdioItemType,\n\tisRegularUrl,\n\tisUnknownStdioString,\n\tFILE_TYPES,\n} from './type.js';\nimport {getStreamDirection} from './direction.js';\nimport {normalizeStdioOption} from './stdio-option.js';\nimport {handleNativeStream} from './native.js';\nimport {handleInputOptions} from './input-option.js';\nimport {filterDuplicates, getDuplicateStream} from './duplicate.js';\n\n// Handle `input`, `inputFile`, `stdin`, `stdout` and `stderr` options, before spawning, in async/sync mode\n// They are converted into an array of `fileDescriptors`.\n// Each `fileDescriptor` is normalized, validated and contains all information necessary for further handling.\nexport const handleStdio = (addProperties, options, verboseInfo, isSync) => {\n\tconst stdio = normalizeStdioOption(options, verboseInfo, isSync);\n\tconst initialFileDescriptors = stdio.map((stdioOption, fdNumber) => getFileDescriptor({\n\t\tstdioOption,\n\t\tfdNumber,\n\t\toptions,\n\t\tisSync,\n\t}));\n\tconst fileDescriptors = getFinalFileDescriptors({\n\t\tinitialFileDescriptors,\n\t\taddProperties,\n\t\toptions,\n\t\tisSync,\n\t});\n\toptions.stdio = fileDescriptors.map(({stdioItems}) => forwardStdio(stdioItems));\n\treturn fileDescriptors;\n};\n\nconst getFileDescriptor = ({stdioOption, fdNumber, options, isSync}) => {\n\tconst optionName = getStreamName(fdNumber);\n\tconst {stdioItems: initialStdioItems, isStdioArray} = initializeStdioItems({\n\t\tstdioOption,\n\t\tfdNumber,\n\t\toptions,\n\t\toptionName,\n\t});\n\tconst direction = getStreamDirection(initialStdioItems, fdNumber, optionName);\n\tconst stdioItems = initialStdioItems.map(stdioItem => handleNativeStream({\n\t\tstdioItem,\n\t\tisStdioArray,\n\t\tfdNumber,\n\t\tdirection,\n\t\tisSync,\n\t}));\n\tconst normalizedStdioItems = normalizeTransforms(stdioItems, optionName, direction, options);\n\tconst objectMode = getFdObjectMode(normalizedStdioItems, direction);\n\tvalidateFileObjectMode(normalizedStdioItems, objectMode);\n\treturn {direction, objectMode, stdioItems: normalizedStdioItems};\n};\n\n// We make sure passing an array with a single item behaves the same as passing that item without an array.\n// This is what users would expect.\n// For example, `stdout: ['ignore']` behaves the same as `stdout: 'ignore'`.\nconst initializeStdioItems = ({stdioOption, fdNumber, options, optionName}) => {\n\tconst values = Array.isArray(stdioOption) ? stdioOption : [stdioOption];\n\tconst initialStdioItems = [\n\t\t...values.map(value => initializeStdioItem(value, optionName)),\n\t\t...handleInputOptions(options, fdNumber),\n\t];\n\n\tconst stdioItems = filterDuplicates(initialStdioItems);\n\tconst isStdioArray = stdioItems.length > 1;\n\tvalidateStdioArray(stdioItems, isStdioArray, optionName);\n\tvalidateStreams(stdioItems);\n\treturn {stdioItems, isStdioArray};\n};\n\nconst initializeStdioItem = (value, optionName) => ({\n\ttype: getStdioItemType(value, optionName),\n\tvalue,\n\toptionName,\n});\n\nconst validateStdioArray = (stdioItems, isStdioArray, optionName) => {\n\tif (stdioItems.length === 0) {\n\t\tthrow new TypeError(`The \\`${optionName}\\` option must not be an empty array.`);\n\t}\n\n\tif (!isStdioArray) {\n\t\treturn;\n\t}\n\n\tfor (const {value, optionName} of stdioItems) {\n\t\tif (INVALID_STDIO_ARRAY_OPTIONS.has(value)) {\n\t\t\tthrow new Error(`The \\`${optionName}\\` option must not include \\`${value}\\`.`);\n\t\t}\n\t}\n};\n\n// Using those `stdio` values together with others for the same stream does not make sense, so we make it fail.\n// However, we do allow it if the array has a single item.\nconst INVALID_STDIO_ARRAY_OPTIONS = new Set(['ignore', 'ipc']);\n\nconst validateStreams = stdioItems => {\n\tfor (const stdioItem of stdioItems) {\n\t\tvalidateFileStdio(stdioItem);\n\t}\n};\n\nconst validateFileStdio = ({type, value, optionName}) => {\n\tif (isRegularUrl(value)) {\n\t\tthrow new TypeError(`The \\`${optionName}: URL\\` option must use the \\`file:\\` scheme.\nFor example, you can use the \\`pathToFileURL()\\` method of the \\`url\\` core module.`);\n\t}\n\n\tif (isUnknownStdioString(type, value)) {\n\t\tthrow new TypeError(`The \\`${optionName}: { file: '...' }\\` option must be used instead of \\`${optionName}: '...'\\`.`);\n\t}\n};\n\nconst validateFileObjectMode = (stdioItems, objectMode) => {\n\tif (!objectMode) {\n\t\treturn;\n\t}\n\n\tconst fileStdioItem = stdioItems.find(({type}) => FILE_TYPES.has(type));\n\tif (fileStdioItem !== undefined) {\n\t\tthrow new TypeError(`The \\`${fileStdioItem.optionName}\\` option cannot use both files and transforms in objectMode.`);\n\t}\n};\n\n// Some `stdio` values require Execa to create streams.\n// For example, file paths create file read/write streams.\n// Those transformations are specified in `addProperties`, which is both direction-specific and type-specific.\nconst getFinalFileDescriptors = ({initialFileDescriptors, addProperties, options, isSync}) => {\n\tconst fileDescriptors = [];\n\n\ttry {\n\t\tfor (const fileDescriptor of initialFileDescriptors) {\n\t\t\tfileDescriptors.push(getFinalFileDescriptor({\n\t\t\t\tfileDescriptor,\n\t\t\t\tfileDescriptors,\n\t\t\t\taddProperties,\n\t\t\t\toptions,\n\t\t\t\tisSync,\n\t\t\t}));\n\t\t}\n\n\t\treturn fileDescriptors;\n\t} catch (error) {\n\t\tcleanupCustomStreams(fileDescriptors);\n\t\tthrow error;\n\t}\n};\n\nconst getFinalFileDescriptor = ({\n\tfileDescriptor: {direction, objectMode, stdioItems},\n\tfileDescriptors,\n\taddProperties,\n\toptions,\n\tisSync,\n}) => {\n\tconst finalStdioItems = stdioItems.map(stdioItem => addStreamProperties({\n\t\tstdioItem,\n\t\taddProperties,\n\t\tdirection,\n\t\toptions,\n\t\tfileDescriptors,\n\t\tisSync,\n\t}));\n\treturn {direction, objectMode, stdioItems: finalStdioItems};\n};\n\nconst addStreamProperties = ({stdioItem, addProperties, direction, options, fileDescriptors, isSync}) => {\n\tconst duplicateStream = getDuplicateStream({\n\t\tstdioItem,\n\t\tdirection,\n\t\tfileDescriptors,\n\t\tisSync,\n\t});\n\n\tif (duplicateStream !== undefined) {\n\t\treturn {...stdioItem, stream: duplicateStream};\n\t}\n\n\treturn {\n\t\t...stdioItem,\n\t\t...addProperties[direction][stdioItem.type](stdioItem, options),\n\t};\n};\n\n// The stream error handling is performed by the piping logic above, which cannot be performed before subprocess spawning.\n// If the subprocess spawning fails (e.g. due to an invalid command), the streams need to be manually destroyed.\n// We need to create those streams before subprocess spawning, in case their creation fails, e.g. when passing an invalid generator as argument.\n// Like this, an exception would be thrown, which would prevent spawning a subprocess.\nexport const cleanupCustomStreams = fileDescriptors => {\n\tfor (const {stdioItems} of fileDescriptors) {\n\t\tfor (const {stream} of stdioItems) {\n\t\t\tif (stream !== undefined && !isStandardStream(stream)) {\n\t\t\t\tstream.destroy();\n\t\t\t}\n\t\t}\n\t}\n};\n\n// When the `std*: Iterable | WebStream | URL | filePath`, `input` or `inputFile` option is used, we pipe to `subprocess.std*`.\n// When the `std*: Array` option is used, we emulate some of the native values ('inherit', Node.js stream and file descriptor integer). To do so, we also need to pipe to `subprocess.std*`.\n// Therefore the `std*` options must be either `pipe` or `overlapped`. Other values do not set `subprocess.std*`.\nconst forwardStdio = stdioItems => {\n\tif (stdioItems.length > 1) {\n\t\treturn stdioItems.some(({value}) => value === 'overlapped') ? 'overlapped' : 'pipe';\n\t}\n\n\tconst [{type, value}] = stdioItems;\n\treturn type === 'native' ? value : 'pipe';\n};\n","// The `ipc` option adds an `ipc` item to the `stdio` option\nexport const normalizeIpcStdioArray = (stdioArray, ipc) => ipc && !stdioArray.includes('ipc')\n\t? [...stdioArray, 'ipc']\n\t: stdioArray;\n","import {readFileSync} from 'node:fs';\nimport {bufferToUint8Array} from '../utils/uint-array.js';\nimport {handleStdio} from './handle.js';\nimport {TYPE_TO_MESSAGE} from './type.js';\n\n// Normalize `input`, `inputFile`, `stdin`, `stdout` and `stderr` options, before spawning, in sync mode\nexport const handleStdioSync = (options, verboseInfo) => handleStdio(addPropertiesSync, options, verboseInfo, true);\n\nconst forbiddenIfSync = ({type, optionName}) => {\n\tthrowInvalidSyncValue(optionName, TYPE_TO_MESSAGE[type]);\n};\n\nconst forbiddenNativeIfSync = ({optionName, value}) => {\n\tif (value === 'ipc' || value === 'overlapped') {\n\t\tthrowInvalidSyncValue(optionName, `\"${value}\"`);\n\t}\n\n\treturn {};\n};\n\nconst throwInvalidSyncValue = (optionName, value) => {\n\tthrow new TypeError(`The \\`${optionName}\\` option cannot be ${value} with synchronous methods.`);\n};\n\n// Create streams used internally for redirecting when using specific values for the `std*` options, in sync mode.\n// For example, `stdin: {file}` reads the file synchronously, then passes it as the `input` option.\nconst addProperties = {\n\tgenerator() {},\n\tasyncGenerator: forbiddenIfSync,\n\twebStream: forbiddenIfSync,\n\tnodeStream: forbiddenIfSync,\n\twebTransform: forbiddenIfSync,\n\tduplex: forbiddenIfSync,\n\tasyncIterable: forbiddenIfSync,\n\tnative: forbiddenNativeIfSync,\n};\n\nconst addPropertiesSync = {\n\tinput: {\n\t\t...addProperties,\n\t\tfileUrl: ({value}) => ({contents: [bufferToUint8Array(readFileSync(value))]}),\n\t\tfilePath: ({value: {file}}) => ({contents: [bufferToUint8Array(readFileSync(file))]}),\n\t\tfileNumber: forbiddenIfSync,\n\t\titerable: ({value}) => ({contents: [...value]}),\n\t\tstring: ({value}) => ({contents: [value]}),\n\t\tuint8Array: ({value}) => ({contents: [value]}),\n\t},\n\toutput: {\n\t\t...addProperties,\n\t\tfileUrl: ({value}) => ({path: value}),\n\t\tfilePath: ({value: {file}}) => ({path: file}),\n\t\tfileNumber: ({value}) => ({path: value}),\n\t\titerable: forbiddenIfSync,\n\t\tstring: forbiddenIfSync,\n\t\tuint8Array: forbiddenIfSync,\n\t},\n};\n","import stripFinalNewlineFunction from 'strip-final-newline';\n\n// Apply `stripFinalNewline` option, which applies to `result.stdout|stderr|all|stdio[*]`.\n// If the `lines` option is used, it is applied on each line, but using a different function.\nexport const stripNewline = (value, {stripFinalNewline}, fdNumber) => getStripFinalNewline(stripFinalNewline, fdNumber) && value !== undefined && !Array.isArray(value)\n\t? stripFinalNewlineFunction(value)\n\t: value;\n\n// Retrieve `stripFinalNewline` option value, including with `subprocess.all`\nexport const getStripFinalNewline = (stripFinalNewline, fdNumber) => fdNumber === 'all'\n\t? stripFinalNewline[1] || stripFinalNewline[2]\n\t: stripFinalNewline[fdNumber];\n","// Split chunks line-wise for generators passed to the `std*` options\nexport const getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped\n\t? undefined\n\t: initializeSplitLines(preserveNewlines, state);\n\n// Same but for synchronous methods\nexport const splitLinesSync = (chunk, preserveNewlines, objectMode) => objectMode\n\t? chunk.flatMap(item => splitLinesItemSync(item, preserveNewlines))\n\t: splitLinesItemSync(chunk, preserveNewlines);\n\nconst splitLinesItemSync = (chunk, preserveNewlines) => {\n\tconst {transform, final} = initializeSplitLines(preserveNewlines, {});\n\treturn [...transform(chunk), ...final()];\n};\n\nconst initializeSplitLines = (preserveNewlines, state) => {\n\tstate.previousChunks = '';\n\treturn {\n\t\ttransform: splitGenerator.bind(undefined, state, preserveNewlines),\n\t\tfinal: linesFinal.bind(undefined, state),\n\t};\n};\n\n// This imperative logic is much faster than using `String.split()` and uses very low memory.\nconst splitGenerator = function * (state, preserveNewlines, chunk) {\n\tif (typeof chunk !== 'string') {\n\t\tyield chunk;\n\t\treturn;\n\t}\n\n\tlet {previousChunks} = state;\n\tlet start = -1;\n\n\tfor (let end = 0; end < chunk.length; end += 1) {\n\t\tif (chunk[end] === '\\n') {\n\t\t\tconst newlineLength = getNewlineLength(chunk, end, preserveNewlines, state);\n\t\t\tlet line = chunk.slice(start + 1, end + 1 - newlineLength);\n\n\t\t\tif (previousChunks.length > 0) {\n\t\t\t\tline = concatString(previousChunks, line);\n\t\t\t\tpreviousChunks = '';\n\t\t\t}\n\n\t\t\tyield line;\n\t\t\tstart = end;\n\t\t}\n\t}\n\n\tif (start !== chunk.length - 1) {\n\t\tpreviousChunks = concatString(previousChunks, chunk.slice(start + 1));\n\t}\n\n\tstate.previousChunks = previousChunks;\n};\n\nconst getNewlineLength = (chunk, end, preserveNewlines, state) => {\n\tif (preserveNewlines) {\n\t\treturn 0;\n\t}\n\n\tstate.isWindowsNewline = end !== 0 && chunk[end - 1] === '\\r';\n\treturn state.isWindowsNewline ? 2 : 1;\n};\n\nconst linesFinal = function * ({previousChunks}) {\n\tif (previousChunks.length > 0) {\n\t\tyield previousChunks;\n\t}\n};\n\n// Unless `preserveNewlines: true` is used, we strip the newline of each line.\n// This re-adds them after the user `transform` code has run.\nexport const getAppendNewlineGenerator = ({binary, preserveNewlines, readableObjectMode, state}) => binary || preserveNewlines || readableObjectMode\n\t? undefined\n\t: {transform: appendNewlineGenerator.bind(undefined, state)};\n\nconst appendNewlineGenerator = function * ({isWindowsNewline = false}, chunk) {\n\tconst {unixNewline, windowsNewline, LF, concatBytes} = typeof chunk === 'string' ? linesStringInfo : linesUint8ArrayInfo;\n\n\tif (chunk.at(-1) === LF) {\n\t\tyield chunk;\n\t\treturn;\n\t}\n\n\tconst newline = isWindowsNewline ? windowsNewline : unixNewline;\n\tyield concatBytes(chunk, newline);\n};\n\nconst concatString = (firstChunk, secondChunk) => `${firstChunk}${secondChunk}`;\n\nconst linesStringInfo = {\n\twindowsNewline: '\\r\\n',\n\tunixNewline: '\\n',\n\tLF: '\\n',\n\tconcatBytes: concatString,\n};\n\nconst concatUint8Array = (firstChunk, secondChunk) => {\n\tconst chunk = new Uint8Array(firstChunk.length + secondChunk.length);\n\tchunk.set(firstChunk, 0);\n\tchunk.set(secondChunk, firstChunk.length);\n\treturn chunk;\n};\n\nconst linesUint8ArrayInfo = {\n\twindowsNewline: new Uint8Array([0x0D, 0x0A]),\n\tunixNewline: new Uint8Array([0x0A]),\n\tLF: 0x0A,\n\tconcatBytes: concatUint8Array,\n};\n","import {Buffer} from 'node:buffer';\nimport {isUint8Array} from '../utils/uint-array.js';\n\n// Validate the type of chunk argument passed to transform generators\nexport const getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode\n\t? undefined\n\t: validateStringTransformInput.bind(undefined, optionName);\n\nconst validateStringTransformInput = function * (optionName, chunk) {\n\tif (typeof chunk !== 'string' && !isUint8Array(chunk) && !Buffer.isBuffer(chunk)) {\n\t\tthrow new TypeError(`The \\`${optionName}\\` option's transform must use \"objectMode: true\" to receive as input: ${typeof chunk}.`);\n\t}\n\n\tyield chunk;\n};\n\n// Validate the type of the value returned by transform generators\nexport const getValidateTransformReturn = (readableObjectMode, optionName) => readableObjectMode\n\t? validateObjectTransformReturn.bind(undefined, optionName)\n\t: validateStringTransformReturn.bind(undefined, optionName);\n\nconst validateObjectTransformReturn = function * (optionName, chunk) {\n\tvalidateEmptyReturn(optionName, chunk);\n\tyield chunk;\n};\n\nconst validateStringTransformReturn = function * (optionName, chunk) {\n\tvalidateEmptyReturn(optionName, chunk);\n\n\tif (typeof chunk !== 'string' && !isUint8Array(chunk)) {\n\t\tthrow new TypeError(`The \\`${optionName}\\` option's function must yield a string or an Uint8Array, not ${typeof chunk}.`);\n\t}\n\n\tyield chunk;\n};\n\nconst validateEmptyReturn = (optionName, chunk) => {\n\tif (chunk === null || chunk === undefined) {\n\t\tthrow new TypeError(`The \\`${optionName}\\` option's function must not call \\`yield ${chunk}\\`.\nInstead, \\`yield\\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`);\n\t}\n};\n","import {Buffer} from 'node:buffer';\nimport {StringDecoder} from 'node:string_decoder';\nimport {isUint8Array, bufferToUint8Array} from '../utils/uint-array.js';\n\n/*\nWhen using binary encodings, add an internal generator that converts chunks from `Buffer` to `string` or `Uint8Array`.\nChunks might be Buffer, Uint8Array or strings since:\n- `subprocess.stdout|stderr` emits Buffers\n- `subprocess.stdin.write()` accepts Buffer, Uint8Array or string\n- Previous generators might return Uint8Array or string\n\nHowever, those are converted to Buffer:\n- on writes: `Duplex.writable` `decodeStrings: true` default option\n- on reads: `Duplex.readable` `readableEncoding: null` default option\n*/\nexport const getEncodingTransformGenerator = (binary, encoding, skipped) => {\n\tif (skipped) {\n\t\treturn;\n\t}\n\n\tif (binary) {\n\t\treturn {transform: encodingUint8ArrayGenerator.bind(undefined, new TextEncoder())};\n\t}\n\n\tconst stringDecoder = new StringDecoder(encoding);\n\treturn {\n\t\ttransform: encodingStringGenerator.bind(undefined, stringDecoder),\n\t\tfinal: encodingStringFinal.bind(undefined, stringDecoder),\n\t};\n};\n\nconst encodingUint8ArrayGenerator = function * (textEncoder, chunk) {\n\tif (Buffer.isBuffer(chunk)) {\n\t\tyield bufferToUint8Array(chunk);\n\t} else if (typeof chunk === 'string') {\n\t\tyield textEncoder.encode(chunk);\n\t} else {\n\t\tyield chunk;\n\t}\n};\n\nconst encodingStringGenerator = function * (stringDecoder, chunk) {\n\tyield isUint8Array(chunk) ? stringDecoder.write(chunk) : chunk;\n};\n\nconst encodingStringFinal = function * (stringDecoder) {\n\tconst lastChunk = stringDecoder.end();\n\tif (lastChunk !== '') {\n\t\tyield lastChunk;\n\t}\n};\n","import {callbackify} from 'node:util';\n\n// Applies a series of generator functions asynchronously\nexport const pushChunks = callbackify(async (getChunks, state, getChunksArguments, transformStream) => {\n\tstate.currentIterable = getChunks(...getChunksArguments);\n\n\ttry {\n\t\tfor await (const chunk of state.currentIterable) {\n\t\t\ttransformStream.push(chunk);\n\t\t}\n\t} finally {\n\t\tdelete state.currentIterable;\n\t}\n});\n\n// For each new chunk, apply each `transform()` method\nexport const transformChunk = async function * (chunk, generators, index) {\n\tif (index === generators.length) {\n\t\tyield chunk;\n\t\treturn;\n\t}\n\n\tconst {transform = identityGenerator} = generators[index];\n\tfor await (const transformedChunk of transform(chunk)) {\n\t\tyield * transformChunk(transformedChunk, generators, index + 1);\n\t}\n};\n\n// At the end, apply each `final()` method, followed by the `transform()` method of the next transforms\nexport const finalChunks = async function * (generators) {\n\tfor (const [index, {final}] of Object.entries(generators)) {\n\t\tyield * generatorFinalChunks(final, Number(index), generators);\n\t}\n};\n\nconst generatorFinalChunks = async function * (final, index, generators) {\n\tif (final === undefined) {\n\t\treturn;\n\t}\n\n\tfor await (const finalChunk of final()) {\n\t\tyield * transformChunk(finalChunk, generators, index + 1);\n\t}\n};\n\n// Cancel any ongoing async generator when the Transform is destroyed, e.g. when the subprocess errors\nexport const destroyTransform = callbackify(async ({currentIterable}, error) => {\n\tif (currentIterable !== undefined) {\n\t\tawait (error ? currentIterable.throw(error) : currentIterable.return());\n\t\treturn;\n\t}\n\n\tif (error) {\n\t\tthrow error;\n\t}\n});\n\nconst identityGenerator = function * (chunk) {\n\tyield chunk;\n};\n","// Duplicate the code from `run-async.js` but as synchronous functions\nexport const pushChunksSync = (getChunksSync, getChunksArguments, transformStream, done) => {\n\ttry {\n\t\tfor (const chunk of getChunksSync(...getChunksArguments)) {\n\t\t\ttransformStream.push(chunk);\n\t\t}\n\n\t\tdone();\n\t} catch (error) {\n\t\tdone(error);\n\t}\n};\n\n// Run synchronous generators with `execaSync()`\nexport const runTransformSync = (generators, chunks) => [\n\t...chunks.flatMap(chunk => [...transformChunkSync(chunk, generators, 0)]),\n\t...finalChunksSync(generators),\n];\n\nexport const transformChunkSync = function * (chunk, generators, index) {\n\tif (index === generators.length) {\n\t\tyield chunk;\n\t\treturn;\n\t}\n\n\tconst {transform = identityGenerator} = generators[index];\n\tfor (const transformedChunk of transform(chunk)) {\n\t\tyield * transformChunkSync(transformedChunk, generators, index + 1);\n\t}\n};\n\nexport const finalChunksSync = function * (generators) {\n\tfor (const [index, {final}] of Object.entries(generators)) {\n\t\tyield * generatorFinalChunksSync(final, Number(index), generators);\n\t}\n};\n\nconst generatorFinalChunksSync = function * (final, index, generators) {\n\tif (final === undefined) {\n\t\treturn;\n\t}\n\n\tfor (const finalChunk of final()) {\n\t\tyield * transformChunkSync(finalChunk, generators, index + 1);\n\t}\n};\n\nconst identityGenerator = function * (chunk) {\n\tyield chunk;\n};\n","import {Transform, getDefaultHighWaterMark} from 'node:stream';\nimport {isAsyncGenerator} from '../stdio/type.js';\nimport {getSplitLinesGenerator, getAppendNewlineGenerator} from './split.js';\nimport {getValidateTransformInput, getValidateTransformReturn} from './validate.js';\nimport {getEncodingTransformGenerator} from './encoding-transform.js';\nimport {\n\tpushChunks,\n\ttransformChunk,\n\tfinalChunks,\n\tdestroyTransform,\n} from './run-async.js';\nimport {\n\tpushChunksSync,\n\ttransformChunkSync,\n\tfinalChunksSync,\n\trunTransformSync,\n} from './run-sync.js';\n\n/*\nGenerators can be used to transform/filter standard streams.\n\nGenerators have a simple syntax, yet allows all of the following:\n- Sharing `state` between chunks\n- Flushing logic, by using a `final` function\n- Asynchronous logic\n- Emitting multiple chunks from a single source chunk, even if spaced in time, by using multiple `yield`\n- Filtering, by using no `yield`\n\nTherefore, there is no need to allow Node.js or web transform streams.\n\nThe `highWaterMark` is kept as the default value, since this is what `subprocess.std*` uses.\n\nChunks are currently processed serially. We could add a `concurrency` option to parallelize in the future.\n\nTransform an array of generator functions into a `Transform` stream.\n`Duplex.from(generator)` cannot be used because it does not allow setting the `objectMode` and `highWaterMark`.\n*/\nexport const generatorToStream = ({\n\tvalue,\n\tvalue: {transform, final, writableObjectMode, readableObjectMode},\n\toptionName,\n}, {encoding}) => {\n\tconst state = {};\n\tconst generators = addInternalGenerators(value, encoding, optionName);\n\n\tconst transformAsync = isAsyncGenerator(transform);\n\tconst finalAsync = isAsyncGenerator(final);\n\tconst transformMethod = transformAsync\n\t\t? pushChunks.bind(undefined, transformChunk, state)\n\t\t: pushChunksSync.bind(undefined, transformChunkSync);\n\tconst finalMethod = transformAsync || finalAsync\n\t\t? pushChunks.bind(undefined, finalChunks, state)\n\t\t: pushChunksSync.bind(undefined, finalChunksSync);\n\tconst destroyMethod = transformAsync || finalAsync\n\t\t? destroyTransform.bind(undefined, state)\n\t\t: undefined;\n\n\tconst stream = new Transform({\n\t\twritableObjectMode,\n\t\twritableHighWaterMark: getDefaultHighWaterMark(writableObjectMode),\n\t\treadableObjectMode,\n\t\treadableHighWaterMark: getDefaultHighWaterMark(readableObjectMode),\n\t\ttransform(chunk, encoding, done) {\n\t\t\ttransformMethod([chunk, generators, 0], this, done);\n\t\t},\n\t\tflush(done) {\n\t\t\tfinalMethod([generators], this, done);\n\t\t},\n\t\tdestroy: destroyMethod,\n\t});\n\treturn {stream};\n};\n\n// Applies transform generators in sync mode\nexport const runGeneratorsSync = (chunks, stdioItems, encoding, isInput) => {\n\tconst generators = stdioItems.filter(({type}) => type === 'generator');\n\tconst reversedGenerators = isInput ? generators.reverse() : generators;\n\n\tfor (const {value, optionName} of reversedGenerators) {\n\t\tconst generators = addInternalGenerators(value, encoding, optionName);\n\t\tchunks = runTransformSync(generators, chunks);\n\t}\n\n\treturn chunks;\n};\n\n// Generators used internally to convert the chunk type, validate it, and split into lines\nconst addInternalGenerators = (\n\t{transform, final, binary, writableObjectMode, readableObjectMode, preserveNewlines},\n\tencoding,\n\toptionName,\n) => {\n\tconst state = {};\n\treturn [\n\t\t{transform: getValidateTransformInput(writableObjectMode, optionName)},\n\t\tgetEncodingTransformGenerator(binary, encoding, writableObjectMode),\n\t\tgetSplitLinesGenerator(binary, preserveNewlines, writableObjectMode, state),\n\t\t{transform, final},\n\t\t{transform: getValidateTransformReturn(readableObjectMode, optionName)},\n\t\tgetAppendNewlineGenerator({\n\t\t\tbinary,\n\t\t\tpreserveNewlines,\n\t\t\treadableObjectMode,\n\t\t\tstate,\n\t\t}),\n\t].filter(Boolean);\n};\n","import {runGeneratorsSync} from '../transform/generator.js';\nimport {joinToUint8Array, isUint8Array} from '../utils/uint-array.js';\nimport {TYPE_TO_MESSAGE} from '../stdio/type.js';\n\n// Apply `stdin`/`input`/`inputFile` options, before spawning, in sync mode, by converting it to the `input` option\nexport const addInputOptionsSync = (fileDescriptors, options) => {\n\tfor (const fdNumber of getInputFdNumbers(fileDescriptors)) {\n\t\taddInputOptionSync(fileDescriptors, fdNumber, options);\n\t}\n};\n\nconst getInputFdNumbers = fileDescriptors => new Set(Object.entries(fileDescriptors)\n\t.filter(([, {direction}]) => direction === 'input')\n\t.map(([fdNumber]) => Number(fdNumber)));\n\nconst addInputOptionSync = (fileDescriptors, fdNumber, options) => {\n\tconst {stdioItems} = fileDescriptors[fdNumber];\n\tconst allStdioItems = stdioItems.filter(({contents}) => contents !== undefined);\n\tif (allStdioItems.length === 0) {\n\t\treturn;\n\t}\n\n\tif (fdNumber !== 0) {\n\t\tconst [{type, optionName}] = allStdioItems;\n\t\tthrow new TypeError(`Only the \\`stdin\\` option, not \\`${optionName}\\`, can be ${TYPE_TO_MESSAGE[type]} with synchronous methods.`);\n\t}\n\n\tconst allContents = allStdioItems.map(({contents}) => contents);\n\tconst transformedContents = allContents.map(contents => applySingleInputGeneratorsSync(contents, stdioItems));\n\toptions.input = joinToUint8Array(transformedContents);\n};\n\nconst applySingleInputGeneratorsSync = (contents, stdioItems) => {\n\tconst newContents = runGeneratorsSync(contents, stdioItems, 'utf8', true);\n\tvalidateSerializable(newContents);\n\treturn joinToUint8Array(newContents);\n};\n\nconst validateSerializable = newContents => {\n\tconst invalidItem = newContents.find(item => typeof item !== 'string' && !isUint8Array(item));\n\tif (invalidItem !== undefined) {\n\t\tthrow new TypeError(`The \\`stdin\\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${invalidItem}.`);\n\t}\n};\n","import {BINARY_ENCODINGS} from '../arguments/encoding-option.js';\nimport {TRANSFORM_TYPES} from '../stdio/type.js';\nimport {verboseLog, serializeVerboseMessage} from './log.js';\nimport {isFullVerbose} from './values.js';\n\n// `ignore` opts-out of `verbose` for a specific stream.\n// `ipc` cannot use piping.\n// `inherit` would result in double printing.\n// They can also lead to double printing when passing file descriptor integers or `process.std*`.\n// This only leaves with `pipe` and `overlapped`.\nexport const shouldLogOutput = ({stdioItems, encoding, verboseInfo, fdNumber}) => fdNumber !== 'all'\n\t&& isFullVerbose(verboseInfo, fdNumber)\n\t&& !BINARY_ENCODINGS.has(encoding)\n\t&& fdUsesVerbose(fdNumber)\n\t&& (stdioItems.some(({type, value}) => type === 'native' && PIPED_STDIO_VALUES.has(value))\n\t|| stdioItems.every(({type}) => TRANSFORM_TYPES.has(type)));\n\n// Printing input streams would be confusing.\n// Files and streams can produce big outputs, which we don't want to print.\n// We could print `stdio[3+]` but it often is redirected to files and streams, with the same issue.\n// So we only print stdout and stderr.\nconst fdUsesVerbose = fdNumber => fdNumber === 1 || fdNumber === 2;\n\nconst PIPED_STDIO_VALUES = new Set(['pipe', 'overlapped']);\n\n// `verbose: 'full'` printing logic with async methods\nexport const logLines = async (linesIterable, stream, fdNumber, verboseInfo) => {\n\tfor await (const line of linesIterable) {\n\t\tif (!isPipingStream(stream)) {\n\t\t\tlogLine(line, fdNumber, verboseInfo);\n\t\t}\n\t}\n};\n\n// `verbose: 'full'` printing logic with sync methods\nexport const logLinesSync = (linesArray, fdNumber, verboseInfo) => {\n\tfor (const line of linesArray) {\n\t\tlogLine(line, fdNumber, verboseInfo);\n\t}\n};\n\n// When `subprocess.stdout|stderr.pipe()` is called, `verbose` becomes a noop.\n// This prevents the following problems:\n// - `.pipe()` achieves the same result as using `stdout: 'inherit'`, `stdout: stream`, etc. which also make `verbose` a noop.\n// For example, `subprocess.stdout.pipe(process.stdin)` would print each line twice.\n// - When chaining subprocesses with `subprocess.pipe(otherSubprocess)`, only the last one should print its output.\n// Detecting whether `.pipe()` is impossible without monkey-patching it, so we use the following undocumented property.\n// This is not a critical behavior since changes of the following property would only make `verbose` more verbose.\nconst isPipingStream = stream => stream._readableState.pipes.length > 0;\n\n// When `verbose` is `full`, print stdout|stderr\nconst logLine = (line, fdNumber, verboseInfo) => {\n\tconst verboseMessage = serializeVerboseMessage(line);\n\tverboseLog({\n\t\ttype: 'output',\n\t\tverboseMessage,\n\t\tfdNumber,\n\t\tverboseInfo,\n\t});\n};\n","import {writeFileSync, appendFileSync} from 'node:fs';\nimport {shouldLogOutput, logLinesSync} from '../verbose/output.js';\nimport {runGeneratorsSync} from '../transform/generator.js';\nimport {splitLinesSync} from '../transform/split.js';\nimport {joinToString, joinToUint8Array, bufferToUint8Array} from '../utils/uint-array.js';\nimport {FILE_TYPES} from '../stdio/type.js';\nimport {truncateMaxBufferSync} from './max-buffer.js';\n\n// Apply `stdout`/`stderr` options, after spawning, in sync mode\nexport const transformOutputSync = ({fileDescriptors, syncResult: {output}, options, isMaxBuffer, verboseInfo}) => {\n\tif (output === null) {\n\t\treturn {output: Array.from({length: 3})};\n\t}\n\n\tconst state = {};\n\tconst outputFiles = new Set([]);\n\tconst transformedOutput = output.map((result, fdNumber) =>\n\t\ttransformOutputResultSync({\n\t\t\tresult,\n\t\t\tfileDescriptors,\n\t\t\tfdNumber,\n\t\t\tstate,\n\t\t\toutputFiles,\n\t\t\tisMaxBuffer,\n\t\t\tverboseInfo,\n\t\t}, options));\n\treturn {output: transformedOutput, ...state};\n};\n\nconst transformOutputResultSync = (\n\t{result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo},\n\t{buffer, encoding, lines, stripFinalNewline, maxBuffer},\n) => {\n\tif (result === null) {\n\t\treturn;\n\t}\n\n\tconst truncatedResult = truncateMaxBufferSync(result, isMaxBuffer, maxBuffer);\n\tconst uint8ArrayResult = bufferToUint8Array(truncatedResult);\n\tconst {stdioItems, objectMode} = fileDescriptors[fdNumber];\n\tconst chunks = runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state);\n\tconst {serializedResult, finalResult = serializedResult} = serializeChunks({\n\t\tchunks,\n\t\tobjectMode,\n\t\tencoding,\n\t\tlines,\n\t\tstripFinalNewline,\n\t\tfdNumber,\n\t});\n\n\tlogOutputSync({\n\t\tserializedResult,\n\t\tfdNumber,\n\t\tstate,\n\t\tverboseInfo,\n\t\tencoding,\n\t\tstdioItems,\n\t\tobjectMode,\n\t});\n\n\tconst returnedResult = buffer[fdNumber] ? finalResult : undefined;\n\n\ttry {\n\t\tif (state.error === undefined) {\n\t\t\twriteToFiles(serializedResult, stdioItems, outputFiles);\n\t\t}\n\n\t\treturn returnedResult;\n\t} catch (error) {\n\t\tstate.error = error;\n\t\treturn returnedResult;\n\t}\n};\n\n// Applies transform generators to `stdout`/`stderr`\nconst runOutputGeneratorsSync = (chunks, stdioItems, encoding, state) => {\n\ttry {\n\t\treturn runGeneratorsSync(chunks, stdioItems, encoding, false);\n\t} catch (error) {\n\t\tstate.error = error;\n\t\treturn chunks;\n\t}\n};\n\n// The contents is converted to three stages:\n// - serializedResult: used when the target is a file path/URL or a file descriptor (including 'inherit')\n// - finalResult/returnedResult: returned as `result.std*`\nconst serializeChunks = ({chunks, objectMode, encoding, lines, stripFinalNewline, fdNumber}) => {\n\tif (objectMode) {\n\t\treturn {serializedResult: chunks};\n\t}\n\n\tif (encoding === 'buffer') {\n\t\treturn {serializedResult: joinToUint8Array(chunks)};\n\t}\n\n\tconst serializedResult = joinToString(chunks, encoding);\n\tif (lines[fdNumber]) {\n\t\treturn {serializedResult, finalResult: splitLinesSync(serializedResult, !stripFinalNewline[fdNumber], objectMode)};\n\t}\n\n\treturn {serializedResult};\n};\n\nconst logOutputSync = ({serializedResult, fdNumber, state, verboseInfo, encoding, stdioItems, objectMode}) => {\n\tif (!shouldLogOutput({\n\t\tstdioItems,\n\t\tencoding,\n\t\tverboseInfo,\n\t\tfdNumber,\n\t})) {\n\t\treturn;\n\t}\n\n\tconst linesArray = splitLinesSync(serializedResult, false, objectMode);\n\n\ttry {\n\t\tlogLinesSync(linesArray, fdNumber, verboseInfo);\n\t} catch (error) {\n\t\tstate.error ??= error;\n\t}\n};\n\n// When the `std*` target is a file path/URL or a file descriptor\nconst writeToFiles = (serializedResult, stdioItems, outputFiles) => {\n\tfor (const {path} of stdioItems.filter(({type}) => FILE_TYPES.has(type))) {\n\t\tconst pathString = typeof path === 'string' ? path : path.toString();\n\t\tif (outputFiles.has(pathString)) {\n\t\t\tappendFileSync(path, serializedResult);\n\t\t} else {\n\t\t\toutputFiles.add(pathString);\n\t\t\twriteFileSync(path, serializedResult);\n\t\t}\n\t}\n};\n","import {once} from 'node:events';\nimport {DiscardedError} from '../return/final-error.js';\n\n// If `error` is emitted before `spawn`, `exit` will never be emitted.\n// However, `error` might be emitted after `spawn`.\n// In that case, `exit` will still be emitted.\n// Since the `exit` event contains the signal name, we want to make sure we are listening for it.\n// This function also takes into account the following unlikely cases:\n// - `exit` being emitted in the same microtask as `spawn`\n// - `error` being emitted multiple times\nexport const waitForExit = async (subprocess, context) => {\n\tconst [exitCode, signal] = await waitForExitOrError(subprocess);\n\tcontext.isForcefullyTerminated ??= false;\n\treturn [exitCode, signal];\n};\n\nconst waitForExitOrError = async subprocess => {\n\tconst [spawnPayload, exitPayload] = await Promise.allSettled([\n\t\tonce(subprocess, 'spawn'),\n\t\tonce(subprocess, 'exit'),\n\t]);\n\n\tif (spawnPayload.status === 'rejected') {\n\t\treturn [];\n\t}\n\n\treturn exitPayload.status === 'rejected'\n\t\t? waitForSubprocessExit(subprocess)\n\t\t: exitPayload.value;\n};\n\nconst waitForSubprocessExit = async subprocess => {\n\ttry {\n\t\treturn await once(subprocess, 'exit');\n\t} catch {\n\t\treturn waitForSubprocessExit(subprocess);\n\t}\n};\n\n// Retrieve the final exit code and|or signal name\nexport const waitForSuccessfulExit = async exitPromise => {\n\tconst [exitCode, signal] = await exitPromise;\n\n\tif (!isSubprocessErrorExit(exitCode, signal) && isFailedExit(exitCode, signal)) {\n\t\tthrow new DiscardedError();\n\t}\n\n\treturn [exitCode, signal];\n};\n\n// When the subprocess fails due to an `error` event\nconst isSubprocessErrorExit = (exitCode, signal) => exitCode === undefined && signal === undefined;\n// When the subprocess fails due to a non-0 exit code or to a signal termination\nexport const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;\n","import {DiscardedError} from '../return/final-error.js';\nimport {isMaxBufferSync} from '../io/max-buffer.js';\nimport {isFailedExit} from './exit-async.js';\n\n// Retrieve exit code, signal name and error information, with synchronous methods\nexport const getExitResultSync = ({error, status: exitCode, signal, output}, {maxBuffer}) => {\n\tconst resultError = getResultError(error, exitCode, signal);\n\tconst timedOut = resultError?.code === 'ETIMEDOUT';\n\tconst isMaxBuffer = isMaxBufferSync(resultError, output, maxBuffer);\n\treturn {\n\t\tresultError,\n\t\texitCode,\n\t\tsignal,\n\t\ttimedOut,\n\t\tisMaxBuffer,\n\t};\n};\n\nconst getResultError = (error, exitCode, signal) => {\n\tif (error !== undefined) {\n\t\treturn error;\n\t}\n\n\treturn isFailedExit(exitCode, signal) ? new DiscardedError() : undefined;\n};\n","import {spawnSync} from 'node:child_process';\nimport {handleCommand} from '../arguments/command.js';\nimport {normalizeOptions} from '../arguments/options.js';\nimport {makeError, makeEarlyError, makeSuccessResult} from '../return/result.js';\nimport {handleResult} from '../return/reject.js';\nimport {handleStdioSync} from '../stdio/handle-sync.js';\nimport {stripNewline} from '../io/strip-newline.js';\nimport {addInputOptionsSync} from '../io/input-sync.js';\nimport {transformOutputSync} from '../io/output-sync.js';\nimport {getMaxBufferSync} from '../io/max-buffer.js';\nimport {getAllSync} from '../resolve/all-sync.js';\nimport {getExitResultSync} from '../resolve/exit-sync.js';\n\n// Main shared logic for all sync methods: `execaSync()`, `$.sync()`\nexport const execaCoreSync = (rawFile, rawArguments, rawOptions) => {\n\tconst {file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors} = handleSyncArguments(rawFile, rawArguments, rawOptions);\n\tconst result = spawnSubprocessSync({\n\t\tfile,\n\t\tcommandArguments,\n\t\toptions,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tverboseInfo,\n\t\tfileDescriptors,\n\t\tstartTime,\n\t});\n\treturn handleResult(result, verboseInfo, options);\n};\n\n// Compute arguments to pass to `child_process.spawnSync()`\nconst handleSyncArguments = (rawFile, rawArguments, rawOptions) => {\n\tconst {command, escapedCommand, startTime, verboseInfo} = handleCommand(rawFile, rawArguments, rawOptions);\n\tconst syncOptions = normalizeSyncOptions(rawOptions);\n\tconst {file, commandArguments, options} = normalizeOptions(rawFile, rawArguments, syncOptions);\n\tvalidateSyncOptions(options);\n\tconst fileDescriptors = handleStdioSync(options, verboseInfo);\n\treturn {\n\t\tfile,\n\t\tcommandArguments,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tstartTime,\n\t\tverboseInfo,\n\t\toptions,\n\t\tfileDescriptors,\n\t};\n};\n\n// Options normalization logic specific to sync methods\nconst normalizeSyncOptions = options => options.node && !options.ipc ? {...options, ipc: false} : options;\n\n// Options validation logic specific to sync methods\nconst validateSyncOptions = ({ipc, ipcInput, detached, cancelSignal}) => {\n\tif (ipcInput) {\n\t\tthrowInvalidSyncOption('ipcInput');\n\t}\n\n\tif (ipc) {\n\t\tthrowInvalidSyncOption('ipc: true');\n\t}\n\n\tif (detached) {\n\t\tthrowInvalidSyncOption('detached: true');\n\t}\n\n\tif (cancelSignal) {\n\t\tthrowInvalidSyncOption('cancelSignal');\n\t}\n};\n\nconst throwInvalidSyncOption = value => {\n\tthrow new TypeError(`The \"${value}\" option cannot be used with synchronous methods.`);\n};\n\nconst spawnSubprocessSync = ({file, commandArguments, options, command, escapedCommand, verboseInfo, fileDescriptors, startTime}) => {\n\tconst syncResult = runSubprocessSync({\n\t\tfile,\n\t\tcommandArguments,\n\t\toptions,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tfileDescriptors,\n\t\tstartTime,\n\t});\n\tif (syncResult.failed) {\n\t\treturn syncResult;\n\t}\n\n\tconst {resultError, exitCode, signal, timedOut, isMaxBuffer} = getExitResultSync(syncResult, options);\n\tconst {output, error = resultError} = transformOutputSync({\n\t\tfileDescriptors,\n\t\tsyncResult,\n\t\toptions,\n\t\tisMaxBuffer,\n\t\tverboseInfo,\n\t});\n\tconst stdio = output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber));\n\tconst all = stripNewline(getAllSync(output, options), options, 'all');\n\treturn getSyncResult({\n\t\terror,\n\t\texitCode,\n\t\tsignal,\n\t\ttimedOut,\n\t\tisMaxBuffer,\n\t\tstdio,\n\t\tall,\n\t\toptions,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tstartTime,\n\t});\n};\n\nconst runSubprocessSync = ({file, commandArguments, options, command, escapedCommand, fileDescriptors, startTime}) => {\n\ttry {\n\t\taddInputOptionsSync(fileDescriptors, options);\n\t\tconst normalizedOptions = normalizeSpawnSyncOptions(options);\n\t\treturn spawnSync(file, commandArguments, normalizedOptions);\n\t} catch (error) {\n\t\treturn makeEarlyError({\n\t\t\terror,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tfileDescriptors,\n\t\t\toptions,\n\t\t\tstartTime,\n\t\t\tisSync: true,\n\t\t});\n\t}\n};\n\n// The `encoding` option is handled by Execa, not by `child_process.spawnSync()`\nconst normalizeSpawnSyncOptions = ({encoding, maxBuffer, ...options}) => ({...options, encoding: 'buffer', maxBuffer: getMaxBufferSync(maxBuffer)});\n\nconst getSyncResult = ({error, exitCode, signal, timedOut, isMaxBuffer, stdio, all, options, command, escapedCommand, startTime}) => error === undefined\n\t? makeSuccessResult({\n\t\tcommand,\n\t\tescapedCommand,\n\t\tstdio,\n\t\tall,\n\t\tipcOutput: [],\n\t\toptions,\n\t\tstartTime,\n\t})\n\t: makeError({\n\t\terror,\n\t\tcommand,\n\t\tescapedCommand,\n\t\ttimedOut,\n\t\tisCanceled: false,\n\t\tisGracefullyCanceled: false,\n\t\tisMaxBuffer,\n\t\tisForcefullyTerminated: false,\n\t\texitCode,\n\t\tsignal,\n\t\tstdio,\n\t\tall,\n\t\tipcOutput: [],\n\t\toptions,\n\t\tstartTime,\n\t\tisSync: true,\n\t});\n","import {isUint8Array, concatUint8Arrays} from '../utils/uint-array.js';\nimport {stripNewline} from '../io/strip-newline.js';\n\n// Retrieve `result.all` with synchronous methods\nexport const getAllSync = ([, stdout, stderr], options) => {\n\tif (!options.all) {\n\t\treturn;\n\t}\n\n\tif (stdout === undefined) {\n\t\treturn stderr;\n\t}\n\n\tif (stderr === undefined) {\n\t\treturn stdout;\n\t}\n\n\tif (Array.isArray(stdout)) {\n\t\treturn Array.isArray(stderr)\n\t\t\t? [...stdout, ...stderr]\n\t\t\t: [...stdout, stripNewline(stderr, options, 'all')];\n\t}\n\n\tif (Array.isArray(stderr)) {\n\t\treturn [stripNewline(stdout, options, 'all'), ...stderr];\n\t}\n\n\tif (isUint8Array(stdout) && isUint8Array(stderr)) {\n\t\treturn concatUint8Arrays([stdout, stderr]);\n\t}\n\n\treturn `${stdout}${stderr}`;\n};\n","import {once, on} from 'node:events';\nimport {\n\tvalidateIpcMethod,\n\tthrowOnEarlyDisconnect,\n\tdisconnect,\n\tgetStrictResponseError,\n} from './validation.js';\nimport {getIpcEmitter, isConnected} from './forward.js';\nimport {addReference, removeReference} from './reference.js';\n\n// Like `[sub]process.once('message')` but promise-based\nexport const getOneMessage = ({anyProcess, channel, isSubprocess, ipc}, {reference = true, filter} = {}) => {\n\tvalidateIpcMethod({\n\t\tmethodName: 'getOneMessage',\n\t\tisSubprocess,\n\t\tipc,\n\t\tisConnected: isConnected(anyProcess),\n\t});\n\n\treturn getOneMessageAsync({\n\t\tanyProcess,\n\t\tchannel,\n\t\tisSubprocess,\n\t\tfilter,\n\t\treference,\n\t});\n};\n\nconst getOneMessageAsync = async ({anyProcess, channel, isSubprocess, filter, reference}) => {\n\taddReference(channel, reference);\n\tconst ipcEmitter = getIpcEmitter(anyProcess, channel, isSubprocess);\n\tconst controller = new AbortController();\n\ttry {\n\t\treturn await Promise.race([\n\t\t\tgetMessage(ipcEmitter, filter, controller),\n\t\t\tthrowOnDisconnect(ipcEmitter, isSubprocess, controller),\n\t\t\tthrowOnStrictError(ipcEmitter, isSubprocess, controller),\n\t\t]);\n\t} catch (error) {\n\t\tdisconnect(anyProcess);\n\t\tthrow error;\n\t} finally {\n\t\tcontroller.abort();\n\t\tremoveReference(channel, reference);\n\t}\n};\n\nconst getMessage = async (ipcEmitter, filter, {signal}) => {\n\tif (filter === undefined) {\n\t\tconst [message] = await once(ipcEmitter, 'message', {signal});\n\t\treturn message;\n\t}\n\n\tfor await (const [message] of on(ipcEmitter, 'message', {signal})) {\n\t\tif (filter(message)) {\n\t\t\treturn message;\n\t\t}\n\t}\n};\n\nconst throwOnDisconnect = async (ipcEmitter, isSubprocess, {signal}) => {\n\tawait once(ipcEmitter, 'disconnect', {signal});\n\tthrowOnEarlyDisconnect(isSubprocess);\n};\n\nconst throwOnStrictError = async (ipcEmitter, isSubprocess, {signal}) => {\n\tconst [error] = await once(ipcEmitter, 'strict:error', {signal});\n\tthrow getStrictResponseError(error, isSubprocess);\n};\n","import {once, on} from 'node:events';\nimport {validateIpcMethod, disconnect, getStrictResponseError} from './validation.js';\nimport {getIpcEmitter, isConnected} from './forward.js';\nimport {addReference, removeReference} from './reference.js';\n\n// Like `[sub]process.on('message')` but promise-based\nexport const getEachMessage = ({anyProcess, channel, isSubprocess, ipc}, {reference = true} = {}) => loopOnMessages({\n\tanyProcess,\n\tchannel,\n\tisSubprocess,\n\tipc,\n\tshouldAwait: !isSubprocess,\n\treference,\n});\n\n// Same but used internally\nexport const loopOnMessages = ({anyProcess, channel, isSubprocess, ipc, shouldAwait, reference}) => {\n\tvalidateIpcMethod({\n\t\tmethodName: 'getEachMessage',\n\t\tisSubprocess,\n\t\tipc,\n\t\tisConnected: isConnected(anyProcess),\n\t});\n\n\taddReference(channel, reference);\n\tconst ipcEmitter = getIpcEmitter(anyProcess, channel, isSubprocess);\n\tconst controller = new AbortController();\n\tconst state = {};\n\tstopOnDisconnect(anyProcess, ipcEmitter, controller);\n\tabortOnStrictError({\n\t\tipcEmitter,\n\t\tisSubprocess,\n\t\tcontroller,\n\t\tstate,\n\t});\n\treturn iterateOnMessages({\n\t\tanyProcess,\n\t\tchannel,\n\t\tipcEmitter,\n\t\tisSubprocess,\n\t\tshouldAwait,\n\t\tcontroller,\n\t\tstate,\n\t\treference,\n\t});\n};\n\nconst stopOnDisconnect = async (anyProcess, ipcEmitter, controller) => {\n\ttry {\n\t\tawait once(ipcEmitter, 'disconnect', {signal: controller.signal});\n\t\tcontroller.abort();\n\t} catch {}\n};\n\nconst abortOnStrictError = async ({ipcEmitter, isSubprocess, controller, state}) => {\n\ttry {\n\t\tconst [error] = await once(ipcEmitter, 'strict:error', {signal: controller.signal});\n\t\tstate.error = getStrictResponseError(error, isSubprocess);\n\t\tcontroller.abort();\n\t} catch {}\n};\n\nconst iterateOnMessages = async function * ({anyProcess, channel, ipcEmitter, isSubprocess, shouldAwait, controller, state, reference}) {\n\ttry {\n\t\tfor await (const [message] of on(ipcEmitter, 'message', {signal: controller.signal})) {\n\t\t\tthrowIfStrictError(state);\n\t\t\tyield message;\n\t\t}\n\t} catch {\n\t\tthrowIfStrictError(state);\n\t} finally {\n\t\tcontroller.abort();\n\t\tremoveReference(channel, reference);\n\n\t\tif (!isSubprocess) {\n\t\t\tdisconnect(anyProcess);\n\t\t}\n\n\t\tif (shouldAwait) {\n\t\t\tawait anyProcess;\n\t\t}\n\t}\n};\n\nconst throwIfStrictError = ({error}) => {\n\tif (error) {\n\t\tthrow error;\n\t}\n};\n","import process from 'node:process';\nimport {sendMessage} from './send.js';\nimport {getOneMessage} from './get-one.js';\nimport {getEachMessage} from './get-each.js';\nimport {getCancelSignal} from './graceful.js';\n\n// Add promise-based IPC methods in current process\nexport const addIpcMethods = (subprocess, {ipc}) => {\n\tObject.assign(subprocess, getIpcMethods(subprocess, false, ipc));\n};\n\n// Get promise-based IPC in the subprocess\nexport const getIpcExport = () => {\n\tconst anyProcess = process;\n\tconst isSubprocess = true;\n\tconst ipc = process.channel !== undefined;\n\n\treturn {\n\t\t...getIpcMethods(anyProcess, isSubprocess, ipc),\n\t\tgetCancelSignal: getCancelSignal.bind(undefined, {\n\t\t\tanyProcess,\n\t\t\tchannel: anyProcess.channel,\n\t\t\tisSubprocess,\n\t\t\tipc,\n\t\t}),\n\t};\n};\n\n// Retrieve the `ipc` shared by both the current process and the subprocess\nconst getIpcMethods = (anyProcess, isSubprocess, ipc) => ({\n\tsendMessage: sendMessage.bind(undefined, {\n\t\tanyProcess,\n\t\tchannel: anyProcess.channel,\n\t\tisSubprocess,\n\t\tipc,\n\t}),\n\tgetOneMessage: getOneMessage.bind(undefined, {\n\t\tanyProcess,\n\t\tchannel: anyProcess.channel,\n\t\tisSubprocess,\n\t\tipc,\n\t}),\n\tgetEachMessage: getEachMessage.bind(undefined, {\n\t\tanyProcess,\n\t\tchannel: anyProcess.channel,\n\t\tisSubprocess,\n\t\tipc,\n\t}),\n});\n","import {ChildProcess} from 'node:child_process';\nimport {\n\tPassThrough,\n\tReadable,\n\tWritable,\n\tDuplex,\n} from 'node:stream';\nimport {cleanupCustomStreams} from '../stdio/handle.js';\nimport {makeEarlyError} from './result.js';\nimport {handleResult} from './reject.js';\n\n// When the subprocess fails to spawn.\n// We ensure the returned error is always both a promise and a subprocess.\nexport const handleEarlyError = ({error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo}) => {\n\tcleanupCustomStreams(fileDescriptors);\n\n\tconst subprocess = new ChildProcess();\n\tcreateDummyStreams(subprocess, fileDescriptors);\n\tObject.assign(subprocess, {readable, writable, duplex});\n\n\tconst earlyError = makeEarlyError({\n\t\terror,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tfileDescriptors,\n\t\toptions,\n\t\tstartTime,\n\t\tisSync: false,\n\t});\n\tconst promise = handleDummyPromise(earlyError, verboseInfo, options);\n\treturn {subprocess, promise};\n};\n\nconst createDummyStreams = (subprocess, fileDescriptors) => {\n\tconst stdin = createDummyStream();\n\tconst stdout = createDummyStream();\n\tconst stderr = createDummyStream();\n\tconst extraStdio = Array.from({length: fileDescriptors.length - 3}, createDummyStream);\n\tconst all = createDummyStream();\n\tconst stdio = [stdin, stdout, stderr, ...extraStdio];\n\tObject.assign(subprocess, {\n\t\tstdin,\n\t\tstdout,\n\t\tstderr,\n\t\tall,\n\t\tstdio,\n\t});\n};\n\nconst createDummyStream = () => {\n\tconst stream = new PassThrough();\n\tstream.end();\n\treturn stream;\n};\n\nconst readable = () => new Readable({read() {}});\nconst writable = () => new Writable({write() {}});\nconst duplex = () => new Duplex({read() {}, write() {}});\n\nconst handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);\n","import {createReadStream, createWriteStream} from 'node:fs';\nimport {Buffer} from 'node:buffer';\nimport {Readable, Writable, Duplex} from 'node:stream';\nimport {generatorToStream} from '../transform/generator.js';\nimport {handleStdio} from './handle.js';\nimport {TYPE_TO_MESSAGE} from './type.js';\n\n// Handle `input`, `inputFile`, `stdin`, `stdout` and `stderr` options, before spawning, in async mode\nexport const handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);\n\nconst forbiddenIfAsync = ({type, optionName}) => {\n\tthrow new TypeError(`The \\`${optionName}\\` option cannot be ${TYPE_TO_MESSAGE[type]}.`);\n};\n\n// Create streams used internally for piping when using specific values for the `std*` options, in async mode.\n// For example, `stdout: {file}` creates a file stream, which is piped from/to.\nconst addProperties = {\n\tfileNumber: forbiddenIfAsync,\n\tgenerator: generatorToStream,\n\tasyncGenerator: generatorToStream,\n\tnodeStream: ({value}) => ({stream: value}),\n\twebTransform({value: {transform, writableObjectMode, readableObjectMode}}) {\n\t\tconst objectMode = writableObjectMode || readableObjectMode;\n\t\tconst stream = Duplex.fromWeb(transform, {objectMode});\n\t\treturn {stream};\n\t},\n\tduplex: ({value: {transform}}) => ({stream: transform}),\n\tnative() {},\n};\n\nconst addPropertiesAsync = {\n\tinput: {\n\t\t...addProperties,\n\t\tfileUrl: ({value}) => ({stream: createReadStream(value)}),\n\t\tfilePath: ({value: {file}}) => ({stream: createReadStream(file)}),\n\t\twebStream: ({value}) => ({stream: Readable.fromWeb(value)}),\n\t\titerable: ({value}) => ({stream: Readable.from(value)}),\n\t\tasyncIterable: ({value}) => ({stream: Readable.from(value)}),\n\t\tstring: ({value}) => ({stream: Readable.from(value)}),\n\t\tuint8Array: ({value}) => ({stream: Readable.from(Buffer.from(value))}),\n\t},\n\toutput: {\n\t\t...addProperties,\n\t\tfileUrl: ({value}) => ({stream: createWriteStream(value)}),\n\t\tfilePath: ({value: {file}}) => ({stream: createWriteStream(file)}),\n\t\twebStream: ({value}) => ({stream: Writable.fromWeb(value)}),\n\t\titerable: forbiddenIfAsync,\n\t\tasyncIterable: forbiddenIfAsync,\n\t\tstring: forbiddenIfAsync,\n\t\tuint8Array: forbiddenIfAsync,\n\t},\n};\n","import {finished} from 'node:stream/promises';\nimport {isStandardStream} from '../utils/standard-stream.js';\n\n// Similar to `Stream.pipeline(source, destination)`, but does not destroy standard streams\nexport const pipeStreams = (source, destination) => {\n\tsource.pipe(destination);\n\tonSourceFinish(source, destination);\n\tonDestinationFinish(source, destination);\n};\n\n// `source.pipe(destination)` makes `destination` end when `source` ends.\n// But it does not propagate aborts or errors. This function does it.\nconst onSourceFinish = async (source, destination) => {\n\tif (isStandardStream(source) || isStandardStream(destination)) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tawait finished(source, {cleanup: true, readable: true, writable: false});\n\t} catch {}\n\n\tendDestinationStream(destination);\n};\n\nexport const endDestinationStream = destination => {\n\tif (destination.writable) {\n\t\tdestination.end();\n\t}\n};\n\n// We do the same thing in the other direction as well.\nconst onDestinationFinish = async (source, destination) => {\n\tif (isStandardStream(source) || isStandardStream(destination)) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tawait finished(destination, {cleanup: true, readable: false, writable: true});\n\t} catch {}\n\n\tabortSourceStream(source);\n};\n\nexport const abortSourceStream = source => {\n\tif (source.readable) {\n\t\tsource.destroy();\n\t}\n};\n","import mergeStreams from '@sindresorhus/merge-streams';\nimport {isStandardStream} from '../utils/standard-stream.js';\nimport {incrementMaxListeners} from '../utils/max-listeners.js';\nimport {TRANSFORM_TYPES} from '../stdio/type.js';\nimport {pipeStreams} from './pipeline.js';\n\n// Handle `input`, `inputFile`, `stdin`, `stdout` and `stderr` options, after spawning, in async mode\n// When multiple input streams are used, we merge them to ensure the output stream ends only once each input stream has ended\nexport const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {\n\tconst pipeGroups = new Map();\n\n\tfor (const [fdNumber, {stdioItems, direction}] of Object.entries(fileDescriptors)) {\n\t\tfor (const {stream} of stdioItems.filter(({type}) => TRANSFORM_TYPES.has(type))) {\n\t\t\tpipeTransform(subprocess, stream, direction, fdNumber);\n\t\t}\n\n\t\tfor (const {stream} of stdioItems.filter(({type}) => !TRANSFORM_TYPES.has(type))) {\n\t\t\tpipeStdioItem({\n\t\t\t\tsubprocess,\n\t\t\t\tstream,\n\t\t\t\tdirection,\n\t\t\t\tfdNumber,\n\t\t\t\tpipeGroups,\n\t\t\t\tcontroller,\n\t\t\t});\n\t\t}\n\t}\n\n\tfor (const [outputStream, inputStreams] of pipeGroups.entries()) {\n\t\tconst inputStream = inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams);\n\t\tpipeStreams(inputStream, outputStream);\n\t}\n};\n\n// When using transforms, `subprocess.stdin|stdout|stderr|stdio` is directly mutated\nconst pipeTransform = (subprocess, stream, direction, fdNumber) => {\n\tif (direction === 'output') {\n\t\tpipeStreams(subprocess.stdio[fdNumber], stream);\n\t} else {\n\t\tpipeStreams(stream, subprocess.stdio[fdNumber]);\n\t}\n\n\tconst streamProperty = SUBPROCESS_STREAM_PROPERTIES[fdNumber];\n\tif (streamProperty !== undefined) {\n\t\tsubprocess[streamProperty] = stream;\n\t}\n\n\tsubprocess.stdio[fdNumber] = stream;\n};\n\nconst SUBPROCESS_STREAM_PROPERTIES = ['stdin', 'stdout', 'stderr'];\n\n// Most `std*` option values involve piping `subprocess.std*` to a stream.\n// The stream is either passed by the user or created internally.\nconst pipeStdioItem = ({subprocess, stream, direction, fdNumber, pipeGroups, controller}) => {\n\tif (stream === undefined) {\n\t\treturn;\n\t}\n\n\tsetStandardStreamMaxListeners(stream, controller);\n\n\tconst [inputStream, outputStream] = direction === 'output'\n\t\t? [stream, subprocess.stdio[fdNumber]]\n\t\t: [subprocess.stdio[fdNumber], stream];\n\tconst outputStreams = pipeGroups.get(inputStream) ?? [];\n\tpipeGroups.set(inputStream, [...outputStreams, outputStream]);\n};\n\n// Multiple subprocesses might be piping from/to `process.std*` at the same time.\n// This is not necessarily an error and should not print a `maxListeners` warning.\nconst setStandardStreamMaxListeners = (stream, {signal}) => {\n\tif (isStandardStream(stream)) {\n\t\tincrementMaxListeners(stream, MAX_LISTENERS_INCREMENT, signal);\n\t}\n};\n\n// `source.pipe(destination)` adds at most 1 listener for each event.\n// If `stdin` option is an array, the values might be combined with `merge-streams`.\n// That library also listens for `source` end, which adds 1 more listener.\nconst MAX_LISTENERS_INCREMENT = 2;\n","/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals = [];\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM');\nif (process.platform !== 'win32') {\n signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n );\n}\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT');\n}\n//# sourceMappingURL=signals.js.map","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nimport { signals } from './signals.js';\nexport { signals };\nconst processOk = (process) => !!process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function';\nconst kExitEmitter = Symbol.for('signal-exit emitter');\nconst global = globalThis;\nconst ObjectDefineProperty = Object.defineProperty.bind(Object);\n// teeny special purpose ee\nclass Emitter {\n emitted = {\n afterExit: false,\n exit: false,\n };\n listeners = {\n afterExit: [],\n exit: [],\n };\n count = 0;\n id = Math.random();\n constructor() {\n if (global[kExitEmitter]) {\n return global[kExitEmitter];\n }\n ObjectDefineProperty(global, kExitEmitter, {\n value: this,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n }\n on(ev, fn) {\n this.listeners[ev].push(fn);\n }\n removeListener(ev, fn) {\n const list = this.listeners[ev];\n const i = list.indexOf(fn);\n /* c8 ignore start */\n if (i === -1) {\n return;\n }\n /* c8 ignore stop */\n if (i === 0 && list.length === 1) {\n list.length = 0;\n }\n else {\n list.splice(i, 1);\n }\n }\n emit(ev, code, signal) {\n if (this.emitted[ev]) {\n return false;\n }\n this.emitted[ev] = true;\n let ret = false;\n for (const fn of this.listeners[ev]) {\n ret = fn(code, signal) === true || ret;\n }\n if (ev === 'exit') {\n ret = this.emit('afterExit', code, signal) || ret;\n }\n return ret;\n }\n}\nclass SignalExitBase {\n}\nconst signalExitWrap = (handler) => {\n return {\n onExit(cb, opts) {\n return handler.onExit(cb, opts);\n },\n load() {\n return handler.load();\n },\n unload() {\n return handler.unload();\n },\n };\n};\nclass SignalExitFallback extends SignalExitBase {\n onExit() {\n return () => { };\n }\n load() { }\n unload() { }\n}\nclass SignalExit extends SignalExitBase {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n /* c8 ignore start */\n #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP';\n /* c8 ignore stop */\n #emitter = new Emitter();\n #process;\n #originalProcessEmit;\n #originalProcessReallyExit;\n #sigListeners = {};\n #loaded = false;\n constructor(process) {\n super();\n this.#process = process;\n // { : , ... }\n this.#sigListeners = {};\n for (const sig of signals) {\n this.#sigListeners[sig] = () => {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = this.#process.listeners(sig);\n let { count } = this.#emitter;\n // This is a workaround for the fact that signal-exit v3 and signal\n // exit v4 are not aware of each other, and each will attempt to let\n // the other handle it, so neither of them do. To correct this, we\n // detect if we're the only handler *except* for previous versions\n // of signal-exit, and increment by the count of listeners it has\n // created.\n /* c8 ignore start */\n const p = process;\n if (typeof p.__signal_exit_emitter__ === 'object' &&\n typeof p.__signal_exit_emitter__.count === 'number') {\n count += p.__signal_exit_emitter__.count;\n }\n /* c8 ignore stop */\n if (listeners.length === count) {\n this.unload();\n const ret = this.#emitter.emit('exit', null, sig);\n /* c8 ignore start */\n const s = sig === 'SIGHUP' ? this.#hupSig : sig;\n if (!ret)\n process.kill(process.pid, s);\n /* c8 ignore stop */\n }\n };\n }\n this.#originalProcessReallyExit = process.reallyExit;\n this.#originalProcessEmit = process.emit;\n }\n onExit(cb, opts) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return () => { };\n }\n /* c8 ignore stop */\n if (this.#loaded === false) {\n this.load();\n }\n const ev = opts?.alwaysLast ? 'afterExit' : 'exit';\n this.#emitter.on(ev, cb);\n return () => {\n this.#emitter.removeListener(ev, cb);\n if (this.#emitter.listeners['exit'].length === 0 &&\n this.#emitter.listeners['afterExit'].length === 0) {\n this.unload();\n }\n };\n }\n load() {\n if (this.#loaded) {\n return;\n }\n this.#loaded = true;\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n this.#emitter.count += 1;\n for (const sig of signals) {\n try {\n const fn = this.#sigListeners[sig];\n if (fn)\n this.#process.on(sig, fn);\n }\n catch (_) { }\n }\n this.#process.emit = (ev, ...a) => {\n return this.#processEmit(ev, ...a);\n };\n this.#process.reallyExit = (code) => {\n return this.#processReallyExit(code);\n };\n }\n unload() {\n if (!this.#loaded) {\n return;\n }\n this.#loaded = false;\n signals.forEach(sig => {\n const listener = this.#sigListeners[sig];\n /* c8 ignore start */\n if (!listener) {\n throw new Error('Listener not defined for signal: ' + sig);\n }\n /* c8 ignore stop */\n try {\n this.#process.removeListener(sig, listener);\n /* c8 ignore start */\n }\n catch (_) { }\n /* c8 ignore stop */\n });\n this.#process.emit = this.#originalProcessEmit;\n this.#process.reallyExit = this.#originalProcessReallyExit;\n this.#emitter.count -= 1;\n }\n #processReallyExit(code) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return 0;\n }\n this.#process.exitCode = code || 0;\n /* c8 ignore stop */\n this.#emitter.emit('exit', this.#process.exitCode, null);\n return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);\n }\n #processEmit(ev, ...args) {\n const og = this.#originalProcessEmit;\n if (ev === 'exit' && processOk(this.#process)) {\n if (typeof args[0] === 'number') {\n this.#process.exitCode = args[0];\n /* c8 ignore start */\n }\n /* c8 ignore start */\n const ret = og.call(this.#process, ev, ...args);\n /* c8 ignore start */\n this.#emitter.emit('exit', this.#process.exitCode, null);\n /* c8 ignore stop */\n return ret;\n }\n else {\n return og.call(this.#process, ev, ...args);\n }\n }\n}\nconst process = globalThis.process;\n// wrap so that we call the method on the actual handler, without\n// exporting it directly.\nexport const { \n/**\n * Called when the process is exiting, whether via signal, explicit\n * exit, or running out of stuff to do.\n *\n * If the global process object is not suitable for instrumentation,\n * then this will be a no-op.\n *\n * Returns a function that may be used to unload signal-exit.\n */\nonExit, \n/**\n * Load the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\nload, \n/**\n * Unload the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\nunload, } = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback());\n//# sourceMappingURL=index.js.map","import {addAbortListener} from 'node:events';\nimport {onExit} from 'signal-exit';\n\n// If the `cleanup` option is used, call `subprocess.kill()` when the parent process exits\nexport const cleanupOnExit = (subprocess, {cleanup, detached}, {signal}) => {\n\tif (!cleanup || detached) {\n\t\treturn;\n\t}\n\n\tconst removeExitHandler = onExit(() => {\n\t\tsubprocess.kill();\n\t});\n\taddAbortListener(signal, () => {\n\t\tremoveExitHandler();\n\t});\n};\n","import {normalizeParameters} from '../methods/parameters.js';\nimport {getStartTime} from '../return/duration.js';\nimport {SUBPROCESS_OPTIONS, getToStream, getFromStream} from '../arguments/fd-options.js';\n\n// Normalize and validate arguments passed to `source.pipe(destination)`\nexport const normalizePipeArguments = ({source, sourcePromise, boundOptions, createNested}, ...pipeArguments) => {\n\tconst startTime = getStartTime();\n\tconst {\n\t\tdestination,\n\t\tdestinationStream,\n\t\tdestinationError,\n\t\tfrom,\n\t\tunpipeSignal,\n\t} = getDestinationStream(boundOptions, createNested, pipeArguments);\n\tconst {sourceStream, sourceError} = getSourceStream(source, from);\n\tconst {options: sourceOptions, fileDescriptors} = SUBPROCESS_OPTIONS.get(source);\n\treturn {\n\t\tsourcePromise,\n\t\tsourceStream,\n\t\tsourceOptions,\n\t\tsourceError,\n\t\tdestination,\n\t\tdestinationStream,\n\t\tdestinationError,\n\t\tunpipeSignal,\n\t\tfileDescriptors,\n\t\tstartTime,\n\t};\n};\n\nconst getDestinationStream = (boundOptions, createNested, pipeArguments) => {\n\ttry {\n\t\tconst {\n\t\t\tdestination,\n\t\t\tpipeOptions: {from, to, unpipeSignal} = {},\n\t\t} = getDestination(boundOptions, createNested, ...pipeArguments);\n\t\tconst destinationStream = getToStream(destination, to);\n\t\treturn {\n\t\t\tdestination,\n\t\t\tdestinationStream,\n\t\t\tfrom,\n\t\t\tunpipeSignal,\n\t\t};\n\t} catch (error) {\n\t\treturn {destinationError: error};\n\t}\n};\n\n// Piping subprocesses can use three syntaxes:\n// - source.pipe('command', commandArguments, pipeOptionsOrDestinationOptions)\n// - source.pipe`command commandArgument` or source.pipe(pipeOptionsOrDestinationOptions)`command commandArgument`\n// - source.pipe(execa(...), pipeOptions)\nconst getDestination = (boundOptions, createNested, firstArgument, ...pipeArguments) => {\n\tif (Array.isArray(firstArgument)) {\n\t\tconst destination = createNested(mapDestinationArguments, boundOptions)(firstArgument, ...pipeArguments);\n\t\treturn {destination, pipeOptions: boundOptions};\n\t}\n\n\tif (typeof firstArgument === 'string' || firstArgument instanceof URL) {\n\t\tif (Object.keys(boundOptions).length > 0) {\n\t\t\tthrow new TypeError('Please use .pipe(\"file\", ..., options) or .pipe(execa(\"file\", ..., options)) instead of .pipe(options)(\"file\", ...).');\n\t\t}\n\n\t\tconst [rawFile, rawArguments, rawOptions] = normalizeParameters(firstArgument, ...pipeArguments);\n\t\tconst destination = createNested(mapDestinationArguments)(rawFile, rawArguments, rawOptions);\n\t\treturn {destination, pipeOptions: rawOptions};\n\t}\n\n\tif (SUBPROCESS_OPTIONS.has(firstArgument)) {\n\t\tif (Object.keys(boundOptions).length > 0) {\n\t\t\tthrow new TypeError('Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).');\n\t\t}\n\n\t\treturn {destination: firstArgument, pipeOptions: pipeArguments[0]};\n\t}\n\n\tthrow new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${firstArgument}`);\n};\n\n// Force `stdin: 'pipe'` with the destination subprocess\nconst mapDestinationArguments = ({options}) => ({options: {...options, stdin: 'pipe', piped: true}});\n\nconst getSourceStream = (source, from) => {\n\ttry {\n\t\tconst sourceStream = getFromStream(source, from);\n\t\treturn {sourceStream};\n\t} catch (error) {\n\t\treturn {sourceError: error};\n\t}\n};\n","import {makeEarlyError} from '../return/result.js';\nimport {abortSourceStream, endDestinationStream} from '../io/pipeline.js';\n\n// When passing invalid arguments to `source.pipe()`, throw asynchronously.\n// We also abort both subprocesses.\nexport const handlePipeArgumentsError = ({\n\tsourceStream,\n\tsourceError,\n\tdestinationStream,\n\tdestinationError,\n\tfileDescriptors,\n\tsourceOptions,\n\tstartTime,\n}) => {\n\tconst error = getPipeArgumentsError({\n\t\tsourceStream,\n\t\tsourceError,\n\t\tdestinationStream,\n\t\tdestinationError,\n\t});\n\tif (error !== undefined) {\n\t\tthrow createNonCommandError({\n\t\t\terror,\n\t\t\tfileDescriptors,\n\t\t\tsourceOptions,\n\t\t\tstartTime,\n\t\t});\n\t}\n};\n\nconst getPipeArgumentsError = ({sourceStream, sourceError, destinationStream, destinationError}) => {\n\tif (sourceError !== undefined && destinationError !== undefined) {\n\t\treturn destinationError;\n\t}\n\n\tif (destinationError !== undefined) {\n\t\tabortSourceStream(sourceStream);\n\t\treturn destinationError;\n\t}\n\n\tif (sourceError !== undefined) {\n\t\tendDestinationStream(destinationStream);\n\t\treturn sourceError;\n\t}\n};\n\n// Specific error return value when passing invalid arguments to `subprocess.pipe()` or when using `unpipeSignal`\nexport const createNonCommandError = ({error, fileDescriptors, sourceOptions, startTime}) => makeEarlyError({\n\terror,\n\tcommand: PIPE_COMMAND_MESSAGE,\n\tescapedCommand: PIPE_COMMAND_MESSAGE,\n\tfileDescriptors,\n\toptions: sourceOptions,\n\tstartTime,\n\tisSync: false,\n});\n\nconst PIPE_COMMAND_MESSAGE = 'source.pipe(destination)';\n","// Like Bash, we await both subprocesses. This is unlike some other shells which only await the destination subprocess.\n// Like Bash with the `pipefail` option, if either subprocess fails, the whole pipe fails.\n// Like Bash, if both subprocesses fail, we return the failure of the destination.\n// This ensures both subprocesses' errors are present, using `error.pipedFrom`.\nexport const waitForBothSubprocesses = async subprocessPromises => {\n\tconst [\n\t\t{status: sourceStatus, reason: sourceReason, value: sourceResult = sourceReason},\n\t\t{status: destinationStatus, reason: destinationReason, value: destinationResult = destinationReason},\n\t] = await subprocessPromises;\n\n\tif (!destinationResult.pipedFrom.includes(sourceResult)) {\n\t\tdestinationResult.pipedFrom.push(sourceResult);\n\t}\n\n\tif (destinationStatus === 'rejected') {\n\t\tthrow destinationResult;\n\t}\n\n\tif (sourceStatus === 'rejected') {\n\t\tthrow sourceResult;\n\t}\n\n\treturn destinationResult;\n};\n","import {finished} from 'node:stream/promises';\nimport mergeStreams from '@sindresorhus/merge-streams';\nimport {incrementMaxListeners} from '../utils/max-listeners.js';\nimport {pipeStreams} from '../io/pipeline.js';\n\n// The piping behavior is like Bash.\n// In particular, when one subprocess exits, the other is not terminated by a signal.\n// Instead, its stdout (for the source) or stdin (for the destination) closes.\n// If the subprocess uses it, it will make it error with SIGPIPE or EPIPE (for the source) or end (for the destination).\n// If it does not use it, it will continue running.\n// This allows for subprocesses to gracefully exit and lower the coupling between subprocesses.\nexport const pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {\n\tconst mergedStream = MERGED_STREAMS.has(destinationStream)\n\t\t? pipeMoreSubprocessStream(sourceStream, destinationStream)\n\t\t: pipeFirstSubprocessStream(sourceStream, destinationStream);\n\tincrementMaxListeners(sourceStream, SOURCE_LISTENERS_PER_PIPE, maxListenersController.signal);\n\tincrementMaxListeners(destinationStream, DESTINATION_LISTENERS_PER_PIPE, maxListenersController.signal);\n\tcleanupMergedStreamsMap(destinationStream);\n\treturn mergedStream;\n};\n\n// We use `merge-streams` to allow for multiple sources to pipe to the same destination.\nconst pipeFirstSubprocessStream = (sourceStream, destinationStream) => {\n\tconst mergedStream = mergeStreams([sourceStream]);\n\tpipeStreams(mergedStream, destinationStream);\n\tMERGED_STREAMS.set(destinationStream, mergedStream);\n\treturn mergedStream;\n};\n\nconst pipeMoreSubprocessStream = (sourceStream, destinationStream) => {\n\tconst mergedStream = MERGED_STREAMS.get(destinationStream);\n\tmergedStream.add(sourceStream);\n\treturn mergedStream;\n};\n\nconst cleanupMergedStreamsMap = async destinationStream => {\n\ttry {\n\t\tawait finished(destinationStream, {cleanup: true, readable: false, writable: true});\n\t} catch {}\n\n\tMERGED_STREAMS.delete(destinationStream);\n};\n\nconst MERGED_STREAMS = new WeakMap();\n\n// Number of listeners set up on `sourceStream` by each `sourceStream.pipe(destinationStream)`\n// Those are added by `merge-streams`\nconst SOURCE_LISTENERS_PER_PIPE = 2;\n// Number of listeners set up on `destinationStream` by each `sourceStream.pipe(destinationStream)`\n// Those are added by `finished()` in `cleanupMergedStreamsMap()`\nconst DESTINATION_LISTENERS_PER_PIPE = 1;\n","import {aborted} from 'node:util';\nimport {createNonCommandError} from './throw.js';\n\n// When passing an `unpipeSignal` option, abort piping when the signal is aborted.\n// However, do not terminate the subprocesses.\nexport const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === undefined\n\t? []\n\t: [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];\n\nconst unpipeOnSignalAbort = async (unpipeSignal, {sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime}) => {\n\tawait aborted(unpipeSignal, sourceStream);\n\tawait mergedStream.remove(sourceStream);\n\tconst error = new Error('Pipe canceled by `unpipeSignal` option.');\n\tthrow createNonCommandError({\n\t\terror,\n\t\tfileDescriptors,\n\t\tsourceOptions,\n\t\tstartTime,\n\t});\n};\n","import isPlainObject from 'is-plain-obj';\nimport {normalizePipeArguments} from './pipe-arguments.js';\nimport {handlePipeArgumentsError} from './throw.js';\nimport {waitForBothSubprocesses} from './sequence.js';\nimport {pipeSubprocessStream} from './streaming.js';\nimport {unpipeOnAbort} from './abort.js';\n\n// Pipe a subprocess' `stdout`/`stderr`/`stdio` into another subprocess' `stdin`\nexport const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {\n\tif (isPlainObject(pipeArguments[0])) {\n\t\treturn pipeToSubprocess.bind(undefined, {\n\t\t\t...sourceInfo,\n\t\t\tboundOptions: {...sourceInfo.boundOptions, ...pipeArguments[0]},\n\t\t});\n\t}\n\n\tconst {destination, ...normalizedInfo} = normalizePipeArguments(sourceInfo, ...pipeArguments);\n\tconst promise = handlePipePromise({...normalizedInfo, destination});\n\tpromise.pipe = pipeToSubprocess.bind(undefined, {\n\t\t...sourceInfo,\n\t\tsource: destination,\n\t\tsourcePromise: promise,\n\t\tboundOptions: {},\n\t});\n\treturn promise;\n};\n\n// Asynchronous logic when piping subprocesses\nconst handlePipePromise = async ({\n\tsourcePromise,\n\tsourceStream,\n\tsourceOptions,\n\tsourceError,\n\tdestination,\n\tdestinationStream,\n\tdestinationError,\n\tunpipeSignal,\n\tfileDescriptors,\n\tstartTime,\n}) => {\n\tconst subprocessPromises = getSubprocessPromises(sourcePromise, destination);\n\thandlePipeArgumentsError({\n\t\tsourceStream,\n\t\tsourceError,\n\t\tdestinationStream,\n\t\tdestinationError,\n\t\tfileDescriptors,\n\t\tsourceOptions,\n\t\tstartTime,\n\t});\n\tconst maxListenersController = new AbortController();\n\ttry {\n\t\tconst mergedStream = pipeSubprocessStream(sourceStream, destinationStream, maxListenersController);\n\t\treturn await Promise.race([\n\t\t\twaitForBothSubprocesses(subprocessPromises),\n\t\t\t...unpipeOnAbort(unpipeSignal, {\n\t\t\t\tsourceStream,\n\t\t\t\tmergedStream,\n\t\t\t\tsourceOptions,\n\t\t\t\tfileDescriptors,\n\t\t\t\tstartTime,\n\t\t\t}),\n\t\t]);\n\t} finally {\n\t\tmaxListenersController.abort();\n\t}\n};\n\n// `.pipe()` awaits the subprocess promises.\n// When invalid arguments are passed to `.pipe()`, we throw an error, which prevents awaiting them.\n// We need to ensure this does not create unhandled rejections.\nconst getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);\n","import {on} from 'node:events';\nimport {getDefaultHighWaterMark} from 'node:stream';\nimport {getEncodingTransformGenerator} from '../transform/encoding-transform.js';\nimport {getSplitLinesGenerator} from '../transform/split.js';\nimport {transformChunkSync, finalChunksSync} from '../transform/run-sync.js';\n\n// Iterate over lines of `subprocess.stdout`, used by `subprocess.readable|duplex|iterable()`\nexport const iterateOnSubprocessStream = ({subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines}) => {\n\tconst controller = new AbortController();\n\tstopReadingOnExit(subprocess, controller);\n\treturn iterateOnStream({\n\t\tstream: subprocessStdout,\n\t\tcontroller,\n\t\tbinary,\n\t\tshouldEncode: !subprocessStdout.readableObjectMode && shouldEncode,\n\t\tencoding,\n\t\tshouldSplit: !subprocessStdout.readableObjectMode,\n\t\tpreserveNewlines,\n\t});\n};\n\nconst stopReadingOnExit = async (subprocess, controller) => {\n\ttry {\n\t\tawait subprocess;\n\t} catch {} finally {\n\t\tcontroller.abort();\n\t}\n};\n\n// Iterate over lines of `subprocess.stdout`, used by `result.stdout` and the `verbose: 'full'` option.\n// Applies the `lines` and `encoding` options.\nexport const iterateForResult = ({stream, onStreamEnd, lines, encoding, stripFinalNewline, allMixed}) => {\n\tconst controller = new AbortController();\n\tstopReadingOnStreamEnd(onStreamEnd, controller, stream);\n\tconst objectMode = stream.readableObjectMode && !allMixed;\n\treturn iterateOnStream({\n\t\tstream,\n\t\tcontroller,\n\t\tbinary: encoding === 'buffer',\n\t\tshouldEncode: !objectMode,\n\t\tencoding,\n\t\tshouldSplit: !objectMode && lines,\n\t\tpreserveNewlines: !stripFinalNewline,\n\t});\n};\n\nconst stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {\n\ttry {\n\t\tawait onStreamEnd;\n\t} catch {\n\t\tstream.destroy();\n\t} finally {\n\t\tcontroller.abort();\n\t}\n};\n\nconst iterateOnStream = ({stream, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines}) => {\n\tconst onStdoutChunk = on(stream, 'data', {\n\t\tsignal: controller.signal,\n\t\thighWaterMark: HIGH_WATER_MARK,\n\t\t// Backward compatibility with older name for this option\n\t\t// See https://github.com/nodejs/node/pull/52080#discussion_r1525227861\n\t\t// @todo Remove after removing support for Node 21\n\t\thighWatermark: HIGH_WATER_MARK,\n\t});\n\treturn iterateOnData({\n\t\tonStdoutChunk,\n\t\tcontroller,\n\t\tbinary,\n\t\tshouldEncode,\n\t\tencoding,\n\t\tshouldSplit,\n\t\tpreserveNewlines,\n\t});\n};\n\nexport const DEFAULT_OBJECT_HIGH_WATER_MARK = getDefaultHighWaterMark(true);\n\n// The `highWaterMark` of `events.on()` is measured in number of events, not in bytes.\n// Not knowing the average amount of bytes per `data` event, we use the same heuristic as streams in objectMode, since they have the same issue.\n// Therefore, we use the value of `getDefaultHighWaterMark(true)`.\n// Note: this option does not exist on Node 18, but this is ok since the logic works without it. It just consumes more memory.\nconst HIGH_WATER_MARK = DEFAULT_OBJECT_HIGH_WATER_MARK;\n\nconst iterateOnData = async function * ({onStdoutChunk, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines}) {\n\tconst generators = getGenerators({\n\t\tbinary,\n\t\tshouldEncode,\n\t\tencoding,\n\t\tshouldSplit,\n\t\tpreserveNewlines,\n\t});\n\n\ttry {\n\t\tfor await (const [chunk] of onStdoutChunk) {\n\t\t\tyield * transformChunkSync(chunk, generators, 0);\n\t\t}\n\t} catch (error) {\n\t\tif (!controller.signal.aborted) {\n\t\t\tthrow error;\n\t\t}\n\t} finally {\n\t\tyield * finalChunksSync(generators);\n\t}\n};\n\nconst getGenerators = ({binary, shouldEncode, encoding, shouldSplit, preserveNewlines}) => [\n\tgetEncodingTransformGenerator(binary, encoding, !shouldEncode),\n\tgetSplitLinesGenerator(binary, preserveNewlines, !shouldSplit, {}),\n].filter(Boolean);\n","import {setImmediate} from 'node:timers/promises';\nimport getStream, {getStreamAsArrayBuffer, getStreamAsArray} from 'get-stream';\nimport {isArrayBuffer} from '../utils/uint-array.js';\nimport {shouldLogOutput, logLines} from '../verbose/output.js';\nimport {iterateForResult} from './iterate.js';\nimport {handleMaxBuffer} from './max-buffer.js';\nimport {getStripFinalNewline} from './strip-newline.js';\n\n// Retrieve `result.stdout|stderr|all|stdio[*]`\nexport const getStreamOutput = async ({stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo}) => {\n\tconst logPromise = logOutputAsync({\n\t\tstream,\n\t\tonStreamEnd,\n\t\tfdNumber,\n\t\tencoding,\n\t\tallMixed,\n\t\tverboseInfo,\n\t\tstreamInfo,\n\t});\n\n\tif (!buffer) {\n\t\tawait Promise.all([resumeStream(stream), logPromise]);\n\t\treturn;\n\t}\n\n\tconst stripFinalNewlineValue = getStripFinalNewline(stripFinalNewline, fdNumber);\n\tconst iterable = iterateForResult({\n\t\tstream,\n\t\tonStreamEnd,\n\t\tlines,\n\t\tencoding,\n\t\tstripFinalNewline: stripFinalNewlineValue,\n\t\tallMixed,\n\t});\n\tconst [output] = await Promise.all([\n\t\tgetStreamContents({\n\t\t\tstream,\n\t\t\titerable,\n\t\t\tfdNumber,\n\t\t\tencoding,\n\t\t\tmaxBuffer,\n\t\t\tlines,\n\t\t}),\n\t\tlogPromise,\n\t]);\n\treturn output;\n};\n\nconst logOutputAsync = async ({stream, onStreamEnd, fdNumber, encoding, allMixed, verboseInfo, streamInfo: {fileDescriptors}}) => {\n\tif (!shouldLogOutput({\n\t\tstdioItems: fileDescriptors[fdNumber]?.stdioItems,\n\t\tencoding,\n\t\tverboseInfo,\n\t\tfdNumber,\n\t})) {\n\t\treturn;\n\t}\n\n\tconst linesIterable = iterateForResult({\n\t\tstream,\n\t\tonStreamEnd,\n\t\tlines: true,\n\t\tencoding,\n\t\tstripFinalNewline: true,\n\t\tallMixed,\n\t});\n\tawait logLines(linesIterable, stream, fdNumber, verboseInfo);\n};\n\n// When using `buffer: false`, users need to read `subprocess.stdout|stderr|all` right away\n// See https://github.com/sindresorhus/execa/issues/730 and https://github.com/sindresorhus/execa/pull/729#discussion_r1465496310\nconst resumeStream = async stream => {\n\tawait setImmediate();\n\tif (stream.readableFlowing === null) {\n\t\tstream.resume();\n\t}\n};\n\nconst getStreamContents = async ({stream, stream: {readableObjectMode}, iterable, fdNumber, encoding, maxBuffer, lines}) => {\n\ttry {\n\t\tif (readableObjectMode || lines) {\n\t\t\treturn await getStreamAsArray(iterable, {maxBuffer});\n\t\t}\n\n\t\tif (encoding === 'buffer') {\n\t\t\treturn new Uint8Array(await getStreamAsArrayBuffer(iterable, {maxBuffer}));\n\t\t}\n\n\t\treturn await getStream(iterable, {maxBuffer});\n\t} catch (error) {\n\t\treturn handleBufferedData(handleMaxBuffer({\n\t\t\terror,\n\t\t\tstream,\n\t\t\treadableObjectMode,\n\t\t\tlines,\n\t\t\tencoding,\n\t\t\tfdNumber,\n\t\t}));\n\t}\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\n// They are automatically closed and flushed by Node.js when the subprocess exits\n// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\nexport const getBufferedData = async streamPromise => {\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn handleBufferedData(error);\n\t}\n};\n\n// Ensure we are returning Uint8Arrays when using `encoding: 'buffer'`\nconst handleBufferedData = ({bufferedData}) => isArrayBuffer(bufferedData)\n\t? new Uint8Array(bufferedData)\n\t: bufferedData;\n","import {finished} from 'node:stream/promises';\n\n// Wraps `finished(stream)` to handle the following case:\n// - When the subprocess exits, Node.js automatically calls `subprocess.stdin.destroy()`, which we need to ignore.\n// - However, we still need to throw if `subprocess.stdin.destroy()` is called before subprocess exit.\nexport const waitForStream = async (stream, fdNumber, streamInfo, {isSameDirection, stopOnExit = false} = {}) => {\n\tconst state = handleStdinDestroy(stream, streamInfo);\n\tconst abortController = new AbortController();\n\ttry {\n\t\tawait Promise.race([\n\t\t\t...(stopOnExit ? [streamInfo.exitPromise] : []),\n\t\t\tfinished(stream, {cleanup: true, signal: abortController.signal}),\n\t\t]);\n\t} catch (error) {\n\t\tif (!state.stdinCleanedUp) {\n\t\t\thandleStreamError(error, fdNumber, streamInfo, isSameDirection);\n\t\t}\n\t} finally {\n\t\tabortController.abort();\n\t}\n};\n\n// If `subprocess.stdin` is destroyed before being fully written to, it is considered aborted and should throw an error.\n// This can happen for example when user called `subprocess.stdin.destroy()` before `subprocess.stdin.end()`.\n// However, Node.js calls `subprocess.stdin.destroy()` on exit for cleanup purposes.\n// https://github.com/nodejs/node/blob/0b4cdb4b42956cbd7019058e409e06700a199e11/lib/internal/child_process.js#L278\n// This is normal and should not throw an error.\n// Therefore, we need to differentiate between both situations to know whether to throw an error.\n// Unfortunately, events (`close`, `error`, `end`, `exit`) cannot be used because `.destroy()` can take an arbitrary amount of time.\n// For example, `stdin: 'pipe'` is implemented as a TCP socket, and its `.destroy()` method waits for TCP disconnection.\n// Therefore `.destroy()` might end before or after subprocess exit, based on OS speed and load.\n// The only way to detect this is to spy on `subprocess.stdin._destroy()` by wrapping it.\n// If `subprocess.exitCode` or `subprocess.signalCode` is set, it means `.destroy()` is being called by Node.js itself.\nconst handleStdinDestroy = (stream, {originalStreams: [originalStdin], subprocess}) => {\n\tconst state = {stdinCleanedUp: false};\n\tif (stream === originalStdin) {\n\t\tspyOnStdinDestroy(stream, subprocess, state);\n\t}\n\n\treturn state;\n};\n\nconst spyOnStdinDestroy = (subprocessStdin, subprocess, state) => {\n\tconst {_destroy} = subprocessStdin;\n\tsubprocessStdin._destroy = (...destroyArguments) => {\n\t\tsetStdinCleanedUp(subprocess, state);\n\t\t_destroy.call(subprocessStdin, ...destroyArguments);\n\t};\n};\n\nconst setStdinCleanedUp = ({exitCode, signalCode}, state) => {\n\tif (exitCode !== null || signalCode !== null) {\n\t\tstate.stdinCleanedUp = true;\n\t}\n};\n\n// We ignore EPIPEs on writable streams and aborts on readable streams since those can happen normally.\n// When one stream errors, the error is propagated to the other streams on the same file descriptor.\n// Those other streams might have a different direction due to the above.\n// When this happens, the direction of both the initial stream and the others should then be taken into account.\n// Therefore, we keep track of whether a stream error is currently propagating.\nconst handleStreamError = (error, fdNumber, streamInfo, isSameDirection) => {\n\tif (!shouldIgnoreStreamError(error, fdNumber, streamInfo, isSameDirection)) {\n\t\tthrow error;\n\t}\n};\n\nconst shouldIgnoreStreamError = (error, fdNumber, streamInfo, isSameDirection = true) => {\n\tif (streamInfo.propagating) {\n\t\treturn isStreamEpipe(error) || isStreamAbort(error);\n\t}\n\n\tstreamInfo.propagating = true;\n\treturn isInputFileDescriptor(streamInfo, fdNumber) === isSameDirection\n\t\t? isStreamEpipe(error)\n\t\t: isStreamAbort(error);\n};\n\n// Unfortunately, we cannot use the stream's class or properties to know whether it is readable or writable.\n// For example, `subprocess.stdin` is technically a Duplex, but can only be used as a writable.\n// Therefore, we need to use the file descriptor's direction (`stdin` is input, `stdout` is output, etc.).\n// However, while `subprocess.std*` and transforms follow that direction, any stream passed the `std*` option has the opposite direction.\n// For example, `subprocess.stdin` is a writable, but the `stdin` option is a readable.\nexport const isInputFileDescriptor = ({fileDescriptors}, fdNumber) => fdNumber !== 'all' && fileDescriptors[fdNumber].direction === 'input';\n\n// When `stream.destroy()` is called without an `error` argument, stream is aborted.\n// This is the only way to abort a readable stream, which can be useful in some instances.\n// Therefore, we ignore this error on readable streams.\nexport const isStreamAbort = error => error?.code === 'ERR_STREAM_PREMATURE_CLOSE';\n\n// When `stream.write()` is called but the underlying source has been closed, `EPIPE` is emitted.\n// When piping subprocesses, the source subprocess usually decides when to stop piping.\n// However, there are some instances when the destination does instead, such as `... | head -n1`.\n// It notifies the source by using `EPIPE`.\n// Therefore, we ignore this error on writable streams.\nconst isStreamEpipe = error => error?.code === 'EPIPE';\n","import {getStreamOutput} from '../io/contents.js';\nimport {waitForStream, isInputFileDescriptor} from './wait-stream.js';\n\n// Read the contents of `subprocess.std*` and|or wait for its completion\nexport const waitForStdioStreams = ({subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo}) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({\n\tstream,\n\tfdNumber,\n\tencoding,\n\tbuffer: buffer[fdNumber],\n\tmaxBuffer: maxBuffer[fdNumber],\n\tlines: lines[fdNumber],\n\tallMixed: false,\n\tstripFinalNewline,\n\tverboseInfo,\n\tstreamInfo,\n}));\n\n// Read the contents of `subprocess.std*` or `subprocess.all` and|or wait for its completion\nexport const waitForSubprocessStream = async ({stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo}) => {\n\tif (!stream) {\n\t\treturn;\n\t}\n\n\tconst onStreamEnd = waitForStream(stream, fdNumber, streamInfo);\n\tif (isInputFileDescriptor(streamInfo, fdNumber)) {\n\t\tawait onStreamEnd;\n\t\treturn;\n\t}\n\n\tconst [output] = await Promise.all([\n\t\tgetStreamOutput({\n\t\t\tstream,\n\t\t\tonStreamEnd,\n\t\t\tfdNumber,\n\t\t\tencoding,\n\t\t\tbuffer,\n\t\t\tmaxBuffer,\n\t\t\tlines,\n\t\t\tallMixed,\n\t\t\tstripFinalNewline,\n\t\t\tverboseInfo,\n\t\t\tstreamInfo,\n\t\t}),\n\t\tonStreamEnd,\n\t]);\n\treturn output;\n};\n","import mergeStreams from '@sindresorhus/merge-streams';\nimport {waitForSubprocessStream} from './stdio.js';\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = ({stdout, stderr}, {all}) => all && (stdout || stderr)\n\t? mergeStreams([stdout, stderr].filter(Boolean))\n\t: undefined;\n\n// Read the contents of `subprocess.all` and|or wait for its completion\nexport const waitForAllStream = ({subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo}) => waitForSubprocessStream({\n\t...getAllStream(subprocess, buffer),\n\tfdNumber: 'all',\n\tencoding,\n\tmaxBuffer: maxBuffer[1] + maxBuffer[2],\n\tlines: lines[1] || lines[2],\n\tallMixed: getAllMixed(subprocess),\n\tstripFinalNewline,\n\tverboseInfo,\n\tstreamInfo,\n});\n\nconst getAllStream = ({stdout, stderr, all}, [, bufferStdout, bufferStderr]) => {\n\tconst buffer = bufferStdout || bufferStderr;\n\tif (!buffer) {\n\t\treturn {stream: all, buffer};\n\t}\n\n\tif (!bufferStdout) {\n\t\treturn {stream: stderr, buffer};\n\t}\n\n\tif (!bufferStderr) {\n\t\treturn {stream: stdout, buffer};\n\t}\n\n\treturn {stream: all, buffer};\n};\n\n// When `subprocess.stdout` is in objectMode but not `subprocess.stderr` (or the opposite), we need to use both:\n// - `getStreamAsArray()` for the chunks in objectMode, to return as an array without changing each chunk\n// - `getStreamAsArrayBuffer()` or `getStream()` for the chunks not in objectMode, to convert them from Buffers to string or Uint8Array\n// We do this by emulating the Buffer -> string|Uint8Array conversion performed by `get-stream` with our own, which is identical.\nconst getAllMixed = ({all, stdout, stderr}) => all\n\t&& stdout\n\t&& stderr\n\t&& stdout.readableObjectMode !== stderr.readableObjectMode;\n","import {verboseLog, serializeVerboseMessage} from './log.js';\nimport {isFullVerbose} from './values.js';\n\n// When `verbose` is `'full'`, print IPC messages from the subprocess\nexport const shouldLogIpc = verboseInfo => isFullVerbose(verboseInfo, 'ipc');\n\nexport const logIpcOutput = (message, verboseInfo) => {\n\tconst verboseMessage = serializeVerboseMessage(message);\n\tverboseLog({\n\t\ttype: 'ipc',\n\t\tverboseMessage,\n\t\tfdNumber: 'ipc',\n\t\tverboseInfo,\n\t});\n};\n","import {checkIpcMaxBuffer} from '../io/max-buffer.js';\nimport {shouldLogIpc, logIpcOutput} from '../verbose/ipc.js';\nimport {getFdSpecificValue} from '../arguments/specific.js';\nimport {loopOnMessages} from './get-each.js';\n\n// Iterate through IPC messages sent by the subprocess\nexport const waitForIpcOutput = async ({\n\tsubprocess,\n\tbuffer: bufferArray,\n\tmaxBuffer: maxBufferArray,\n\tipc,\n\tipcOutput,\n\tverboseInfo,\n}) => {\n\tif (!ipc) {\n\t\treturn ipcOutput;\n\t}\n\n\tconst isVerbose = shouldLogIpc(verboseInfo);\n\tconst buffer = getFdSpecificValue(bufferArray, 'ipc');\n\tconst maxBuffer = getFdSpecificValue(maxBufferArray, 'ipc');\n\n\tfor await (const message of loopOnMessages({\n\t\tanyProcess: subprocess,\n\t\tchannel: subprocess.channel,\n\t\tisSubprocess: false,\n\t\tipc,\n\t\tshouldAwait: false,\n\t\treference: true,\n\t})) {\n\t\tif (buffer) {\n\t\t\tcheckIpcMaxBuffer(subprocess, ipcOutput, maxBuffer);\n\t\t\tipcOutput.push(message);\n\t\t}\n\n\t\tif (isVerbose) {\n\t\t\tlogIpcOutput(message, verboseInfo);\n\t\t}\n\t}\n\n\treturn ipcOutput;\n};\n\nexport const getBufferedIpcOutput = async (ipcOutputPromise, ipcOutput) => {\n\tawait Promise.allSettled([ipcOutputPromise]);\n\treturn ipcOutput;\n};\n","import {once} from 'node:events';\nimport {isStream as isNodeStream} from 'is-stream';\nimport {throwOnTimeout} from '../terminate/timeout.js';\nimport {throwOnCancel} from '../terminate/cancel.js';\nimport {throwOnGracefulCancel} from '../terminate/graceful.js';\nimport {isStandardStream} from '../utils/standard-stream.js';\nimport {TRANSFORM_TYPES} from '../stdio/type.js';\nimport {getBufferedData} from '../io/contents.js';\nimport {waitForIpcOutput, getBufferedIpcOutput} from '../ipc/buffer-messages.js';\nimport {sendIpcInput} from '../ipc/ipc-input.js';\nimport {waitForAllStream} from './all-async.js';\nimport {waitForStdioStreams} from './stdio.js';\nimport {waitForExit, waitForSuccessfulExit} from './exit-async.js';\nimport {waitForStream} from './wait-stream.js';\n\n// Retrieve result of subprocess: exit code, signal, error, streams (stdout/stderr/all)\nexport const waitForSubprocessResult = async ({\n\tsubprocess,\n\toptions: {\n\t\tencoding,\n\t\tbuffer,\n\t\tmaxBuffer,\n\t\tlines,\n\t\ttimeoutDuration: timeout,\n\t\tcancelSignal,\n\t\tgracefulCancel,\n\t\tforceKillAfterDelay,\n\t\tstripFinalNewline,\n\t\tipc,\n\t\tipcInput,\n\t},\n\tcontext,\n\tverboseInfo,\n\tfileDescriptors,\n\toriginalStreams,\n\tonInternalError,\n\tcontroller,\n}) => {\n\tconst exitPromise = waitForExit(subprocess, context);\n\tconst streamInfo = {\n\t\toriginalStreams,\n\t\tfileDescriptors,\n\t\tsubprocess,\n\t\texitPromise,\n\t\tpropagating: false,\n\t};\n\n\tconst stdioPromises = waitForStdioStreams({\n\t\tsubprocess,\n\t\tencoding,\n\t\tbuffer,\n\t\tmaxBuffer,\n\t\tlines,\n\t\tstripFinalNewline,\n\t\tverboseInfo,\n\t\tstreamInfo,\n\t});\n\tconst allPromise = waitForAllStream({\n\t\tsubprocess,\n\t\tencoding,\n\t\tbuffer,\n\t\tmaxBuffer,\n\t\tlines,\n\t\tstripFinalNewline,\n\t\tverboseInfo,\n\t\tstreamInfo,\n\t});\n\tconst ipcOutput = [];\n\tconst ipcOutputPromise = waitForIpcOutput({\n\t\tsubprocess,\n\t\tbuffer,\n\t\tmaxBuffer,\n\t\tipc,\n\t\tipcOutput,\n\t\tverboseInfo,\n\t});\n\tconst originalPromises = waitForOriginalStreams(originalStreams, subprocess, streamInfo);\n\tconst customStreamsEndPromises = waitForCustomStreamsEnd(fileDescriptors, streamInfo);\n\n\ttry {\n\t\treturn await Promise.race([\n\t\t\tPromise.all([\n\t\t\t\t{},\n\t\t\t\twaitForSuccessfulExit(exitPromise),\n\t\t\t\tPromise.all(stdioPromises),\n\t\t\t\tallPromise,\n\t\t\t\tipcOutputPromise,\n\t\t\t\tsendIpcInput(subprocess, ipcInput),\n\t\t\t\t...originalPromises,\n\t\t\t\t...customStreamsEndPromises,\n\t\t\t]),\n\t\t\tonInternalError,\n\t\t\tthrowOnSubprocessError(subprocess, controller),\n\t\t\t...throwOnTimeout(subprocess, timeout, context, controller),\n\t\t\t...throwOnCancel({\n\t\t\t\tsubprocess,\n\t\t\t\tcancelSignal,\n\t\t\t\tgracefulCancel,\n\t\t\t\tcontext,\n\t\t\t\tcontroller,\n\t\t\t}),\n\t\t\t...throwOnGracefulCancel({\n\t\t\t\tsubprocess,\n\t\t\t\tcancelSignal,\n\t\t\t\tgracefulCancel,\n\t\t\t\tforceKillAfterDelay,\n\t\t\t\tcontext,\n\t\t\t\tcontroller,\n\t\t\t}),\n\t\t]);\n\t} catch (error) {\n\t\tcontext.terminationReason ??= 'other';\n\t\treturn Promise.all([\n\t\t\t{error},\n\t\t\texitPromise,\n\t\t\tPromise.all(stdioPromises.map(stdioPromise => getBufferedData(stdioPromise))),\n\t\t\tgetBufferedData(allPromise),\n\t\t\tgetBufferedIpcOutput(ipcOutputPromise, ipcOutput),\n\t\t\tPromise.allSettled(originalPromises),\n\t\t\tPromise.allSettled(customStreamsEndPromises),\n\t\t]);\n\t}\n};\n\n// Transforms replace `subprocess.std*`, which means they are not exposed to users.\n// However, we still want to wait for their completion.\nconst waitForOriginalStreams = (originalStreams, subprocess, streamInfo) =>\n\toriginalStreams.map((stream, fdNumber) => stream === subprocess.stdio[fdNumber]\n\t\t? undefined\n\t\t: waitForStream(stream, fdNumber, streamInfo));\n\n// Some `stdin`/`stdout`/`stderr` options create a stream, e.g. when passing a file path.\n// The `.pipe()` method automatically ends that stream when `subprocess` ends.\n// This makes sure we wait for the completion of those streams, in order to catch any error.\nconst waitForCustomStreamsEnd = (fileDescriptors, streamInfo) => fileDescriptors.flatMap(({stdioItems}, fdNumber) => stdioItems\n\t.filter(({value, stream = value}) => isNodeStream(stream, {checkOpen: false}) && !isStandardStream(stream))\n\t.map(({type, value, stream = value}) => waitForStream(stream, fdNumber, streamInfo, {\n\t\tisSameDirection: TRANSFORM_TYPES.has(type),\n\t\tstopOnExit: type === 'native',\n\t})));\n\n// Fails when the subprocess emits an `error` event\nconst throwOnSubprocessError = async (subprocess, {signal}) => {\n\tconst [error] = await once(subprocess, 'error', {signal});\n\tthrow error;\n};\n","import {createDeferred} from '../utils/deferred.js';\n\n// When using multiple `.readable()`/`.writable()`/`.duplex()`, `final` and `destroy` should wait for other streams\nexport const initializeConcurrentStreams = () => ({\n\treadableDestroy: new WeakMap(),\n\twritableFinal: new WeakMap(),\n\twritableDestroy: new WeakMap(),\n});\n\n// Each file descriptor + `waitName` has its own array of promises.\n// Each promise is a single `.readable()`/`.writable()`/`.duplex()` call.\nexport const addConcurrentStream = (concurrentStreams, stream, waitName) => {\n\tconst weakMap = concurrentStreams[waitName];\n\tif (!weakMap.has(stream)) {\n\t\tweakMap.set(stream, []);\n\t}\n\n\tconst promises = weakMap.get(stream);\n\tconst promise = createDeferred();\n\tpromises.push(promise);\n\tconst resolve = promise.resolve.bind(promise);\n\treturn {resolve, promises};\n};\n\n// Wait for other streams, but stop waiting when subprocess ends\nexport const waitForConcurrentStreams = async ({resolve, promises}, subprocess) => {\n\tresolve();\n\tconst [isSubprocessExit] = await Promise.race([\n\t\tPromise.allSettled([true, subprocess]),\n\t\tPromise.all([false, ...promises]),\n\t]);\n\treturn !isSubprocessExit;\n};\n","import {finished} from 'node:stream/promises';\nimport {isStreamAbort} from '../resolve/wait-stream.js';\n\nexport const safeWaitForSubprocessStdin = async subprocessStdin => {\n\tif (subprocessStdin === undefined) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tawait waitForSubprocessStdin(subprocessStdin);\n\t} catch {}\n};\n\nexport const safeWaitForSubprocessStdout = async subprocessStdout => {\n\tif (subprocessStdout === undefined) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\tawait waitForSubprocessStdout(subprocessStdout);\n\t} catch {}\n};\n\nexport const waitForSubprocessStdin = async subprocessStdin => {\n\tawait finished(subprocessStdin, {cleanup: true, readable: false, writable: true});\n};\n\nexport const waitForSubprocessStdout = async subprocessStdout => {\n\tawait finished(subprocessStdout, {cleanup: true, readable: true, writable: false});\n};\n\n// When `readable` or `writable` aborts/errors, awaits the subprocess, for the reason mentioned above\nexport const waitForSubprocess = async (subprocess, error) => {\n\tawait subprocess;\n\tif (error) {\n\t\tthrow error;\n\t}\n};\n\nexport const destroyOtherStream = (stream, isOpen, error) => {\n\tif (error && !isStreamAbort(error)) {\n\t\tstream.destroy(error);\n\t} else if (isOpen) {\n\t\tstream.destroy();\n\t}\n};\n","import {Readable} from 'node:stream';\nimport {callbackify} from 'node:util';\nimport {BINARY_ENCODINGS} from '../arguments/encoding-option.js';\nimport {getFromStream} from '../arguments/fd-options.js';\nimport {iterateOnSubprocessStream, DEFAULT_OBJECT_HIGH_WATER_MARK} from '../io/iterate.js';\nimport {createDeferred} from '../utils/deferred.js';\nimport {addConcurrentStream, waitForConcurrentStreams} from './concurrent.js';\nimport {\n\tsafeWaitForSubprocessStdin,\n\twaitForSubprocessStdout,\n\twaitForSubprocess,\n\tdestroyOtherStream,\n} from './shared.js';\n\n// Create a `Readable` stream that forwards from `stdout` and awaits the subprocess\nexport const createReadable = ({subprocess, concurrentStreams, encoding}, {from, binary: binaryOption = true, preserveNewlines = true} = {}) => {\n\tconst binary = binaryOption || BINARY_ENCODINGS.has(encoding);\n\tconst {subprocessStdout, waitReadableDestroy} = getSubprocessStdout(subprocess, from, concurrentStreams);\n\tconst {readableEncoding, readableObjectMode, readableHighWaterMark} = getReadableOptions(subprocessStdout, binary);\n\tconst {read, onStdoutDataDone} = getReadableMethods({\n\t\tsubprocessStdout,\n\t\tsubprocess,\n\t\tbinary,\n\t\tencoding,\n\t\tpreserveNewlines,\n\t});\n\tconst readable = new Readable({\n\t\tread,\n\t\tdestroy: callbackify(onReadableDestroy.bind(undefined, {subprocessStdout, subprocess, waitReadableDestroy})),\n\t\thighWaterMark: readableHighWaterMark,\n\t\tobjectMode: readableObjectMode,\n\t\tencoding: readableEncoding,\n\t});\n\tonStdoutFinished({\n\t\tsubprocessStdout,\n\t\tonStdoutDataDone,\n\t\treadable,\n\t\tsubprocess,\n\t});\n\treturn readable;\n};\n\n// Retrieve `stdout` (or other stream depending on `from`)\nexport const getSubprocessStdout = (subprocess, from, concurrentStreams) => {\n\tconst subprocessStdout = getFromStream(subprocess, from);\n\tconst waitReadableDestroy = addConcurrentStream(concurrentStreams, subprocessStdout, 'readableDestroy');\n\treturn {subprocessStdout, waitReadableDestroy};\n};\n\nexport const getReadableOptions = ({readableEncoding, readableObjectMode, readableHighWaterMark}, binary) => binary\n\t? {readableEncoding, readableObjectMode, readableHighWaterMark}\n\t: {readableEncoding, readableObjectMode: true, readableHighWaterMark: DEFAULT_OBJECT_HIGH_WATER_MARK};\n\nexport const getReadableMethods = ({subprocessStdout, subprocess, binary, encoding, preserveNewlines}) => {\n\tconst onStdoutDataDone = createDeferred();\n\tconst onStdoutData = iterateOnSubprocessStream({\n\t\tsubprocessStdout,\n\t\tsubprocess,\n\t\tbinary,\n\t\tshouldEncode: !binary,\n\t\tencoding,\n\t\tpreserveNewlines,\n\t});\n\n\treturn {\n\t\tread() {\n\t\t\tonRead(this, onStdoutData, onStdoutDataDone);\n\t\t},\n\t\tonStdoutDataDone,\n\t};\n};\n\n// Forwards data from `stdout` to `readable`\nconst onRead = async (readable, onStdoutData, onStdoutDataDone) => {\n\ttry {\n\t\tconst {value, done} = await onStdoutData.next();\n\t\tif (done) {\n\t\t\tonStdoutDataDone.resolve();\n\t\t} else {\n\t\t\treadable.push(value);\n\t\t}\n\t} catch {}\n};\n\n// When `subprocess.stdout` ends/aborts/errors, do the same on `readable`.\n// Await the subprocess, for the same reason as above.\nexport const onStdoutFinished = async ({subprocessStdout, onStdoutDataDone, readable, subprocess, subprocessStdin}) => {\n\ttry {\n\t\tawait waitForSubprocessStdout(subprocessStdout);\n\t\tawait subprocess;\n\t\tawait safeWaitForSubprocessStdin(subprocessStdin);\n\t\tawait onStdoutDataDone;\n\n\t\tif (readable.readable) {\n\t\t\treadable.push(null);\n\t\t}\n\t} catch (error) {\n\t\tawait safeWaitForSubprocessStdin(subprocessStdin);\n\t\tdestroyOtherReadable(readable, error);\n\t}\n};\n\n// When `readable` aborts/errors, do the same on `subprocess.stdout`\nexport const onReadableDestroy = async ({subprocessStdout, subprocess, waitReadableDestroy}, error) => {\n\tif (await waitForConcurrentStreams(waitReadableDestroy, subprocess)) {\n\t\tdestroyOtherReadable(subprocessStdout, error);\n\t\tawait waitForSubprocess(subprocess, error);\n\t}\n};\n\nconst destroyOtherReadable = (stream, error) => {\n\tdestroyOtherStream(stream, stream.readable, error);\n};\n","import {Writable} from 'node:stream';\nimport {callbackify} from 'node:util';\nimport {getToStream} from '../arguments/fd-options.js';\nimport {addConcurrentStream, waitForConcurrentStreams} from './concurrent.js';\nimport {\n\tsafeWaitForSubprocessStdout,\n\twaitForSubprocessStdin,\n\twaitForSubprocess,\n\tdestroyOtherStream,\n} from './shared.js';\n\n// Create a `Writable` stream that forwards to `stdin` and awaits the subprocess\nexport const createWritable = ({subprocess, concurrentStreams}, {to} = {}) => {\n\tconst {subprocessStdin, waitWritableFinal, waitWritableDestroy} = getSubprocessStdin(subprocess, to, concurrentStreams);\n\tconst writable = new Writable({\n\t\t...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),\n\t\tdestroy: callbackify(onWritableDestroy.bind(undefined, {\n\t\t\tsubprocessStdin,\n\t\t\tsubprocess,\n\t\t\twaitWritableFinal,\n\t\t\twaitWritableDestroy,\n\t\t})),\n\t\thighWaterMark: subprocessStdin.writableHighWaterMark,\n\t\tobjectMode: subprocessStdin.writableObjectMode,\n\t});\n\tonStdinFinished(subprocessStdin, writable);\n\treturn writable;\n};\n\n// Retrieve `stdin` (or other stream depending on `to`)\nexport const getSubprocessStdin = (subprocess, to, concurrentStreams) => {\n\tconst subprocessStdin = getToStream(subprocess, to);\n\tconst waitWritableFinal = addConcurrentStream(concurrentStreams, subprocessStdin, 'writableFinal');\n\tconst waitWritableDestroy = addConcurrentStream(concurrentStreams, subprocessStdin, 'writableDestroy');\n\treturn {subprocessStdin, waitWritableFinal, waitWritableDestroy};\n};\n\nexport const getWritableMethods = (subprocessStdin, subprocess, waitWritableFinal) => ({\n\twrite: onWrite.bind(undefined, subprocessStdin),\n\tfinal: callbackify(onWritableFinal.bind(undefined, subprocessStdin, subprocess, waitWritableFinal)),\n});\n\n// Forwards data from `writable` to `stdin`\nconst onWrite = (subprocessStdin, chunk, encoding, done) => {\n\tif (subprocessStdin.write(chunk, encoding)) {\n\t\tdone();\n\t} else {\n\t\tsubprocessStdin.once('drain', done);\n\t}\n};\n\n// Ensures that the writable `final` and readable `end` events awaits the subprocess.\n// Like this, any subprocess failure is propagated as a stream `error` event, instead of being lost.\n// The user does not need to `await` the subprocess anymore, but now needs to await the stream completion or error.\n// When multiple writables are targeting the same stream, they wait for each other, unless the subprocess ends first.\nconst onWritableFinal = async (subprocessStdin, subprocess, waitWritableFinal) => {\n\tif (await waitForConcurrentStreams(waitWritableFinal, subprocess)) {\n\t\tif (subprocessStdin.writable) {\n\t\t\tsubprocessStdin.end();\n\t\t}\n\n\t\tawait subprocess;\n\t}\n};\n\n// When `subprocess.stdin` ends/aborts/errors, do the same on `writable`.\nexport const onStdinFinished = async (subprocessStdin, writable, subprocessStdout) => {\n\ttry {\n\t\tawait waitForSubprocessStdin(subprocessStdin);\n\t\tif (writable.writable) {\n\t\t\twritable.end();\n\t\t}\n\t} catch (error) {\n\t\tawait safeWaitForSubprocessStdout(subprocessStdout);\n\t\tdestroyOtherWritable(writable, error);\n\t}\n};\n\n// When `writable` aborts/errors, do the same on `subprocess.stdin`\nexport const onWritableDestroy = async ({subprocessStdin, subprocess, waitWritableFinal, waitWritableDestroy}, error) => {\n\tawait waitForConcurrentStreams(waitWritableFinal, subprocess);\n\tif (await waitForConcurrentStreams(waitWritableDestroy, subprocess)) {\n\t\tdestroyOtherWritable(subprocessStdin, error);\n\t\tawait waitForSubprocess(subprocess, error);\n\t}\n};\n\nconst destroyOtherWritable = (stream, error) => {\n\tdestroyOtherStream(stream, stream.writable, error);\n};\n","import {Duplex} from 'node:stream';\nimport {callbackify} from 'node:util';\nimport {BINARY_ENCODINGS} from '../arguments/encoding-option.js';\nimport {\n\tgetSubprocessStdout,\n\tgetReadableOptions,\n\tgetReadableMethods,\n\tonStdoutFinished,\n\tonReadableDestroy,\n} from './readable.js';\nimport {\n\tgetSubprocessStdin,\n\tgetWritableMethods,\n\tonStdinFinished,\n\tonWritableDestroy,\n} from './writable.js';\n\n// Create a `Duplex` stream combining both `subprocess.readable()` and `subprocess.writable()`\nexport const createDuplex = ({subprocess, concurrentStreams, encoding}, {from, to, binary: binaryOption = true, preserveNewlines = true} = {}) => {\n\tconst binary = binaryOption || BINARY_ENCODINGS.has(encoding);\n\tconst {subprocessStdout, waitReadableDestroy} = getSubprocessStdout(subprocess, from, concurrentStreams);\n\tconst {subprocessStdin, waitWritableFinal, waitWritableDestroy} = getSubprocessStdin(subprocess, to, concurrentStreams);\n\tconst {readableEncoding, readableObjectMode, readableHighWaterMark} = getReadableOptions(subprocessStdout, binary);\n\tconst {read, onStdoutDataDone} = getReadableMethods({\n\t\tsubprocessStdout,\n\t\tsubprocess,\n\t\tbinary,\n\t\tencoding,\n\t\tpreserveNewlines,\n\t});\n\tconst duplex = new Duplex({\n\t\tread,\n\t\t...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),\n\t\tdestroy: callbackify(onDuplexDestroy.bind(undefined, {\n\t\t\tsubprocessStdout,\n\t\t\tsubprocessStdin,\n\t\t\tsubprocess,\n\t\t\twaitReadableDestroy,\n\t\t\twaitWritableFinal,\n\t\t\twaitWritableDestroy,\n\t\t})),\n\t\treadableHighWaterMark,\n\t\twritableHighWaterMark: subprocessStdin.writableHighWaterMark,\n\t\treadableObjectMode,\n\t\twritableObjectMode: subprocessStdin.writableObjectMode,\n\t\tencoding: readableEncoding,\n\t});\n\tonStdoutFinished({\n\t\tsubprocessStdout,\n\t\tonStdoutDataDone,\n\t\treadable: duplex,\n\t\tsubprocess,\n\t\tsubprocessStdin,\n\t});\n\tonStdinFinished(subprocessStdin, duplex, subprocessStdout);\n\treturn duplex;\n};\n\nconst onDuplexDestroy = async ({subprocessStdout, subprocessStdin, subprocess, waitReadableDestroy, waitWritableFinal, waitWritableDestroy}, error) => {\n\tawait Promise.all([\n\t\tonReadableDestroy({subprocessStdout, subprocess, waitReadableDestroy}, error),\n\t\tonWritableDestroy({\n\t\t\tsubprocessStdin,\n\t\t\tsubprocess,\n\t\t\twaitWritableFinal,\n\t\t\twaitWritableDestroy,\n\t\t}, error),\n\t]);\n};\n","import {BINARY_ENCODINGS} from '../arguments/encoding-option.js';\nimport {getFromStream} from '../arguments/fd-options.js';\nimport {iterateOnSubprocessStream} from '../io/iterate.js';\n\n// Convert the subprocess to an async iterable\nexport const createIterable = (subprocess, encoding, {\n\tfrom,\n\tbinary: binaryOption = false,\n\tpreserveNewlines = false,\n} = {}) => {\n\tconst binary = binaryOption || BINARY_ENCODINGS.has(encoding);\n\tconst subprocessStdout = getFromStream(subprocess, from);\n\tconst onStdoutData = iterateOnSubprocessStream({\n\t\tsubprocessStdout,\n\t\tsubprocess,\n\t\tbinary,\n\t\tshouldEncode: true,\n\t\tencoding,\n\t\tpreserveNewlines,\n\t});\n\treturn iterateOnStdoutData(onStdoutData, subprocessStdout, subprocess);\n};\n\nconst iterateOnStdoutData = async function * (onStdoutData, subprocessStdout, subprocess) {\n\ttry {\n\t\tyield * onStdoutData;\n\t} finally {\n\t\tif (subprocessStdout.readable) {\n\t\t\tsubprocessStdout.destroy();\n\t\t}\n\n\t\tawait subprocess;\n\t}\n};\n","import {initializeConcurrentStreams} from './concurrent.js';\nimport {createReadable} from './readable.js';\nimport {createWritable} from './writable.js';\nimport {createDuplex} from './duplex.js';\nimport {createIterable} from './iterable.js';\n\n// Add methods to convert the subprocess to a stream or iterable\nexport const addConvertedStreams = (subprocess, {encoding}) => {\n\tconst concurrentStreams = initializeConcurrentStreams();\n\tsubprocess.readable = createReadable.bind(undefined, {subprocess, concurrentStreams, encoding});\n\tsubprocess.writable = createWritable.bind(undefined, {subprocess, concurrentStreams});\n\tsubprocess.duplex = createDuplex.bind(undefined, {subprocess, concurrentStreams, encoding});\n\tsubprocess.iterable = createIterable.bind(undefined, subprocess, encoding);\n\tsubprocess[Symbol.asyncIterator] = createIterable.bind(undefined, subprocess, encoding, {});\n};\n","// The return value is a mixin of `subprocess` and `Promise`\nexport const mergePromise = (subprocess, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\tconst value = descriptor.value.bind(promise);\n\t\tReflect.defineProperty(subprocess, property, {...descriptor, value});\n\t}\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\n\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property),\n]);\n","import {setMaxListeners} from 'node:events';\nimport {spawn} from 'node:child_process';\nimport {MaxBufferError} from 'get-stream';\nimport {handleCommand} from '../arguments/command.js';\nimport {normalizeOptions} from '../arguments/options.js';\nimport {SUBPROCESS_OPTIONS} from '../arguments/fd-options.js';\nimport {addIpcMethods} from '../ipc/methods.js';\nimport {makeError, makeSuccessResult} from '../return/result.js';\nimport {handleResult} from '../return/reject.js';\nimport {handleEarlyError} from '../return/early-error.js';\nimport {handleStdioAsync} from '../stdio/handle-async.js';\nimport {stripNewline} from '../io/strip-newline.js';\nimport {pipeOutputAsync} from '../io/output-async.js';\nimport {subprocessKill} from '../terminate/kill.js';\nimport {cleanupOnExit} from '../terminate/cleanup.js';\nimport {pipeToSubprocess} from '../pipe/setup.js';\nimport {makeAllStream} from '../resolve/all-async.js';\nimport {waitForSubprocessResult} from '../resolve/wait-subprocess.js';\nimport {addConvertedStreams} from '../convert/add.js';\nimport {createDeferred} from '../utils/deferred.js';\nimport {mergePromise} from './promise.js';\n\n// Main shared logic for all async methods: `execa()`, `$`, `execaNode()`\nexport const execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {\n\tconst {file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors} = handleAsyncArguments(rawFile, rawArguments, rawOptions);\n\tconst {subprocess, promise} = spawnSubprocessAsync({\n\t\tfile,\n\t\tcommandArguments,\n\t\toptions,\n\t\tstartTime,\n\t\tverboseInfo,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tfileDescriptors,\n\t});\n\tsubprocess.pipe = pipeToSubprocess.bind(undefined, {\n\t\tsource: subprocess,\n\t\tsourcePromise: promise,\n\t\tboundOptions: {},\n\t\tcreateNested,\n\t});\n\tmergePromise(subprocess, promise);\n\tSUBPROCESS_OPTIONS.set(subprocess, {options, fileDescriptors});\n\treturn subprocess;\n};\n\n// Compute arguments to pass to `child_process.spawn()`\nconst handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {\n\tconst {command, escapedCommand, startTime, verboseInfo} = handleCommand(rawFile, rawArguments, rawOptions);\n\tconst {file, commandArguments, options: normalizedOptions} = normalizeOptions(rawFile, rawArguments, rawOptions);\n\tconst options = handleAsyncOptions(normalizedOptions);\n\tconst fileDescriptors = handleStdioAsync(options, verboseInfo);\n\treturn {\n\t\tfile,\n\t\tcommandArguments,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tstartTime,\n\t\tverboseInfo,\n\t\toptions,\n\t\tfileDescriptors,\n\t};\n};\n\n// Options normalization logic specific to async methods.\n// Prevent passing the `timeout` option directly to `child_process.spawn()`.\nconst handleAsyncOptions = ({timeout, signal, ...options}) => {\n\tif (signal !== undefined) {\n\t\tthrow new TypeError('The \"signal\" option has been renamed to \"cancelSignal\" instead.');\n\t}\n\n\treturn {...options, timeoutDuration: timeout};\n};\n\nconst spawnSubprocessAsync = ({file, commandArguments, options, startTime, verboseInfo, command, escapedCommand, fileDescriptors}) => {\n\tlet subprocess;\n\ttry {\n\t\tsubprocess = spawn(file, commandArguments, options);\n\t} catch (error) {\n\t\treturn handleEarlyError({\n\t\t\terror,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tfileDescriptors,\n\t\t\toptions,\n\t\t\tstartTime,\n\t\t\tverboseInfo,\n\t\t});\n\t}\n\n\tconst controller = new AbortController();\n\tsetMaxListeners(Number.POSITIVE_INFINITY, controller.signal);\n\n\tconst originalStreams = [...subprocess.stdio];\n\tpipeOutputAsync(subprocess, fileDescriptors, controller);\n\tcleanupOnExit(subprocess, options, controller);\n\n\tconst context = {};\n\tconst onInternalError = createDeferred();\n\tsubprocess.kill = subprocessKill.bind(undefined, {\n\t\tkill: subprocess.kill.bind(subprocess),\n\t\toptions,\n\t\tonInternalError,\n\t\tcontext,\n\t\tcontroller,\n\t});\n\tsubprocess.all = makeAllStream(subprocess, options);\n\taddConvertedStreams(subprocess, options);\n\taddIpcMethods(subprocess, options);\n\n\tconst promise = handlePromise({\n\t\tsubprocess,\n\t\toptions,\n\t\tstartTime,\n\t\tverboseInfo,\n\t\tfileDescriptors,\n\t\toriginalStreams,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tcontext,\n\t\tonInternalError,\n\t\tcontroller,\n\t});\n\treturn {subprocess, promise};\n};\n\n// Asynchronous logic, as opposed to the previous logic which can be run synchronously, i.e. can be returned to user right away\nconst handlePromise = async ({subprocess, options, startTime, verboseInfo, fileDescriptors, originalStreams, command, escapedCommand, context, onInternalError, controller}) => {\n\tconst [\n\t\terrorInfo,\n\t\t[exitCode, signal],\n\t\tstdioResults,\n\t\tallResult,\n\t\tipcOutput,\n\t] = await waitForSubprocessResult({\n\t\tsubprocess,\n\t\toptions,\n\t\tcontext,\n\t\tverboseInfo,\n\t\tfileDescriptors,\n\t\toriginalStreams,\n\t\tonInternalError,\n\t\tcontroller,\n\t});\n\tcontroller.abort();\n\tonInternalError.resolve();\n\n\tconst stdio = stdioResults.map((stdioResult, fdNumber) => stripNewline(stdioResult, options, fdNumber));\n\tconst all = stripNewline(allResult, options, 'all');\n\tconst result = getAsyncResult({\n\t\terrorInfo,\n\t\texitCode,\n\t\tsignal,\n\t\tstdio,\n\t\tall,\n\t\tipcOutput,\n\t\tcontext,\n\t\toptions,\n\t\tcommand,\n\t\tescapedCommand,\n\t\tstartTime,\n\t});\n\treturn handleResult(result, verboseInfo, options);\n};\n\nconst getAsyncResult = ({errorInfo, exitCode, signal, stdio, all, ipcOutput, context, options, command, escapedCommand, startTime}) => 'error' in errorInfo\n\t? makeError({\n\t\terror: errorInfo.error,\n\t\tcommand,\n\t\tescapedCommand,\n\t\ttimedOut: context.terminationReason === 'timeout',\n\t\tisCanceled: context.terminationReason === 'cancel' || context.terminationReason === 'gracefulCancel',\n\t\tisGracefullyCanceled: context.terminationReason === 'gracefulCancel',\n\t\tisMaxBuffer: errorInfo.error instanceof MaxBufferError,\n\t\tisForcefullyTerminated: context.isForcefullyTerminated,\n\t\texitCode,\n\t\tsignal,\n\t\tstdio,\n\t\tall,\n\t\tipcOutput,\n\t\toptions,\n\t\tstartTime,\n\t\tisSync: false,\n\t})\n\t: makeSuccessResult({\n\t\tcommand,\n\t\tescapedCommand,\n\t\tstdio,\n\t\tall,\n\t\tipcOutput,\n\t\toptions,\n\t\tstartTime,\n\t});\n","import isPlainObject from 'is-plain-obj';\nimport {FD_SPECIFIC_OPTIONS} from '../arguments/specific.js';\n\n// Deep merge specific options like `env`. Shallow merge the other ones.\nexport const mergeOptions = (boundOptions, options) => {\n\tconst newOptions = Object.fromEntries(\n\t\tObject.entries(options).map(([optionName, optionValue]) => [\n\t\t\toptionName,\n\t\t\tmergeOption(optionName, boundOptions[optionName], optionValue),\n\t\t]),\n\t);\n\treturn {...boundOptions, ...newOptions};\n};\n\nconst mergeOption = (optionName, boundOptionValue, optionValue) => {\n\tif (DEEP_OPTIONS.has(optionName) && isPlainObject(boundOptionValue) && isPlainObject(optionValue)) {\n\t\treturn {...boundOptionValue, ...optionValue};\n\t}\n\n\treturn optionValue;\n};\n\nconst DEEP_OPTIONS = new Set(['env', ...FD_SPECIFIC_OPTIONS]);\n","import isPlainObject from 'is-plain-obj';\nimport {normalizeParameters} from './parameters.js';\nimport {isTemplateString, parseTemplates} from './template.js';\nimport {execaCoreSync} from './main-sync.js';\nimport {execaCoreAsync} from './main-async.js';\nimport {mergeOptions} from './bind.js';\n\n// Wraps every exported methods to provide the following features:\n// - template string syntax: execa`command argument`\n// - options binding: boundExeca = execa(options)\n// - optional argument/options: execa(file), execa(file, args), execa(file, options), execa(file, args, options)\n// `mapArguments()` and `setBoundExeca()` allows for method-specific logic.\nexport const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {\n\tconst createNested = (mapArguments, boundOptions, setBoundExeca) => createExeca(mapArguments, boundOptions, deepOptions, setBoundExeca);\n\tconst boundExeca = (...execaArguments) => callBoundExeca({\n\t\tmapArguments,\n\t\tdeepOptions,\n\t\tboundOptions,\n\t\tsetBoundExeca,\n\t\tcreateNested,\n\t}, ...execaArguments);\n\n\tif (setBoundExeca !== undefined) {\n\t\tsetBoundExeca(boundExeca, createNested, boundOptions);\n\t}\n\n\treturn boundExeca;\n};\n\nconst callBoundExeca = ({mapArguments, deepOptions = {}, boundOptions = {}, setBoundExeca, createNested}, firstArgument, ...nextArguments) => {\n\tif (isPlainObject(firstArgument)) {\n\t\treturn createNested(mapArguments, mergeOptions(boundOptions, firstArgument), setBoundExeca);\n\t}\n\n\tconst {file, commandArguments, options, isSync} = parseArguments({\n\t\tmapArguments,\n\t\tfirstArgument,\n\t\tnextArguments,\n\t\tdeepOptions,\n\t\tboundOptions,\n\t});\n\treturn isSync\n\t\t? execaCoreSync(file, commandArguments, options)\n\t\t: execaCoreAsync(file, commandArguments, options, createNested);\n};\n\nconst parseArguments = ({mapArguments, firstArgument, nextArguments, deepOptions, boundOptions}) => {\n\tconst callArguments = isTemplateString(firstArgument)\n\t\t? parseTemplates(firstArgument, nextArguments)\n\t\t: [firstArgument, ...nextArguments];\n\tconst [initialFile, initialArguments, initialOptions] = normalizeParameters(...callArguments);\n\tconst mergedOptions = mergeOptions(mergeOptions(deepOptions, boundOptions), initialOptions);\n\tconst {\n\t\tfile = initialFile,\n\t\tcommandArguments = initialArguments,\n\t\toptions = mergedOptions,\n\t\tisSync = false,\n\t} = mapArguments({file: initialFile, commandArguments: initialArguments, options: mergedOptions});\n\treturn {\n\t\tfile,\n\t\tcommandArguments,\n\t\toptions,\n\t\tisSync,\n\t};\n};\n","// Main logic for `execaCommand()`\nexport const mapCommandAsync = ({file, commandArguments}) => parseCommand(file, commandArguments);\n\n// Main logic for `execaCommandSync()`\nexport const mapCommandSync = ({file, commandArguments}) => ({...parseCommand(file, commandArguments), isSync: true});\n\n// Convert `execaCommand(command)` into `execa(file, ...commandArguments)`\nconst parseCommand = (command, unusedArguments) => {\n\tif (unusedArguments.length > 0) {\n\t\tthrow new TypeError(`The command and its arguments must be passed as a single string: ${command} ${unusedArguments}.`);\n\t}\n\n\tconst [file, ...commandArguments] = parseCommandString(command);\n\treturn {file, commandArguments};\n};\n\n// Convert `command` string into an array of file or arguments to pass to $`${...fileOrCommandArguments}`\nexport const parseCommandString = command => {\n\tif (typeof command !== 'string') {\n\t\tthrow new TypeError(`The command must be a string: ${String(command)}.`);\n\t}\n\n\tconst trimmedCommand = command.trim();\n\tif (trimmedCommand === '') {\n\t\treturn [];\n\t}\n\n\tconst tokens = [];\n\tfor (const token of trimmedCommand.split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens.at(-1);\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nconst SPACES_REGEXP = / +/g;\n","// Sets `$.sync` and `$.s`\nexport const setScriptSync = (boundExeca, createNested, boundOptions) => {\n\tboundExeca.sync = createNested(mapScriptSync, boundOptions);\n\tboundExeca.s = boundExeca.sync;\n};\n\n// Main logic for `$`\nexport const mapScriptAsync = ({options}) => getScriptOptions(options);\n\n// Main logic for `$.sync`\nconst mapScriptSync = ({options}) => ({...getScriptOptions(options), isSync: true});\n\n// `$` is like `execa` but with script-friendly options: `{stdin: 'inherit', preferLocal: true}`\nconst getScriptOptions = options => ({options: {...getScriptStdinOption(options), ...options}});\n\nconst getScriptStdinOption = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\n// When using $(...).pipe(...), most script-friendly options should apply to both commands.\n// However, some options (like `stdin: 'inherit'`) would create issues with piping, i.e. cannot be deep.\nexport const deepScriptOptions = {preferLocal: true};\n","import {createExeca} from './lib/methods/create.js';\nimport {mapCommandAsync, mapCommandSync} from './lib/methods/command.js';\nimport {mapNode} from './lib/methods/node.js';\nimport {mapScriptAsync, setScriptSync, deepScriptOptions} from './lib/methods/script.js';\nimport {getIpcExport} from './lib/ipc/methods.js';\n\nexport {parseCommandString} from './lib/methods/command.js';\nexport {ExecaError, ExecaSyncError} from './lib/return/final-error.js';\n\nexport const execa = createExeca(() => ({}));\nexport const execaSync = createExeca(() => ({isSync: true}));\nexport const execaCommand = createExeca(mapCommandAsync);\nexport const execaCommandSync = createExeca(mapCommandSync);\nexport const execaNode = createExeca(mapNode);\nexport const $ = createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);\n\nconst {\n\tsendMessage,\n\tgetOneMessage,\n\tgetEachMessage,\n\tgetCancelSignal,\n} = getIpcExport();\nexport {\n\tsendMessage,\n\tgetOneMessage,\n\tgetEachMessage,\n\tgetCancelSignal,\n};\n","\"use strict\";\n/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkStat = (stat, options) => stat.isFile() && checkMode(stat, options);\nconst checkMode = (stat, options) => {\n const myUid = options.uid ?? process.getuid?.();\n const myGroups = options.groups ?? process.getgroups?.() ?? [];\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid');\n }\n const groups = new Set([myGid, ...myGroups]);\n const mod = stat.mode;\n const uid = stat.uid;\n const gid = stat.gid;\n const u = parseInt('100', 8);\n const g = parseInt('010', 8);\n const o = parseInt('001', 8);\n const ug = u | g;\n return !!(mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0));\n};\n//# sourceMappingURL=posix.js.map","\"use strict\";\n/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkPathExt = (path, options) => {\n const { pathExt = process.env.PATHEXT || '' } = options;\n const peSplit = pathExt.split(';');\n if (peSplit.indexOf('') !== -1) {\n return true;\n }\n for (let i = 0; i < peSplit.length; i++) {\n const p = peSplit[i].toLowerCase();\n const ext = path.substring(path.length - p.length).toLowerCase();\n if (p && ext === p) {\n return true;\n }\n }\n return false;\n};\nconst checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options);\n//# sourceMappingURL=win32.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=options.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = exports.posix = exports.win32 = void 0;\nconst posix = __importStar(require(\"./posix.js\"));\nexports.posix = posix;\nconst win32 = __importStar(require(\"./win32.js\"));\nexports.win32 = win32;\n__exportStar(require(\"./options.js\"), exports);\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;\nconst impl = platform === 'win32' ? win32 : posix;\n/**\n * Determine whether a path is executable on the current platform.\n */\nexports.isexe = impl.isexe;\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexports.sync = impl.sync;\n//# sourceMappingURL=index.js.map","const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar sign = Math.sign;\n\tif (typeof sign !== \"function\") return false;\n\treturn sign(10) === 1 && sign(-20) === -1;\n};\n","// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , value = require(\"./valid-value\")\n , bind = Function.prototype.bind\n , call = Function.prototype.call\n , keys = Object.keys\n , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nmodule.exports = function (method, defVal) {\n\treturn function (obj, cb /*, thisArg, compareFn*/) {\n\t\tvar list, thisArg = arguments[2], compareFn = arguments[3];\n\t\tobj = Object(value(obj));\n\t\tcallable(cb);\n\n\t\tlist = keys(obj);\n\t\tif (compareFn) {\n\t\t\tlist.sort(typeof compareFn === \"function\" ? bind.call(compareFn, obj) : undefined);\n\t\t}\n\t\tif (typeof method !== \"function\") method = list[method];\n\t\treturn call.call(method, list, function (key, index) {\n\t\t\tif (!objPropertyIsEnumerable.call(obj, key)) return defVal;\n\t\t\treturn call.call(cb, thisArg, obj[key], key, obj, index);\n\t\t});\n\t};\n};\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn obj.foo + obj.bar + obj.trzy === \"razdwatrzy\";\n};\n","\"use strict\";\n\nvar _undefined = require(\"../function/noop\")(); // Support ES3 engines\n\nmodule.exports = function (val) { return val !== _undefined && val !== null; };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1 /*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n","\"use strict\";\n\nvar sign = require(\"../math/sign\")\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (value) {\n\tif (isNaN(value)) return 0;\n\tvalue = Number(value);\n\tif (value === 0 || !isFinite(value)) return value;\n\treturn sign(value) * floor(abs(value));\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Math.sign : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tvalue = Number(value);\n\tif (isNaN(value) || value === 0) return value;\n\treturn value > 0 ? 1 : -1;\n};\n","\"use strict\";\n\nvar toInteger = require(\"./to-integer\")\n , max = Math.max;\n\nmodule.exports = function (value) { return max(0, toInteger(value)); };\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\");\n\nmodule.exports = function (optsLength, fnLength, isAsync) {\n\tvar length;\n\tif (isNaN(optsLength)) {\n\t\tlength = fnLength;\n\t\tif (!(length >= 0)) return 1;\n\t\tif (isAsync && length) return length - 1;\n\t\treturn length;\n\t}\n\tif (optsLength === false) return false;\n\treturn toPosInt(optsLength);\n};\n","\"use strict\";\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./_iterate\")(\"forEach\");\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.assign : require(\"./shim\");\n","\"use strict\";\n\nvar keys = require(\"../keys\")\n , value = require(\"../valid-value\")\n , max = Math.max;\n\nmodule.exports = function (dest, src /*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.keys : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isValue = require(\"../is-value\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar map = { function: true, object: true };\n\nmodule.exports = function (value) { return (isValue(value) && map[typeof value]) || false; };\n","\"use strict\";\n\nvar assign = require(\"../object/assign\")\n , isObject = require(\"../object/is-object\")\n , isValue = require(\"../object/is-value\")\n , captureStackTrace = Error.captureStackTrace;\n\nmodule.exports = function (message /*, code, ext*/) {\n\tvar err = new Error(message), code = arguments[1], ext = arguments[2];\n\tif (!isValue(ext)) {\n\t\tif (isObject(code)) {\n\t\t\text = code;\n\t\t\tcode = null;\n\t\t}\n\t}\n\tif (isValue(ext)) assign(err, ext);\n\tif (isValue(code)) err.code = code;\n\tif (captureStackTrace) captureStackTrace(err, module.exports);\n\treturn err;\n};\n","\"use strict\";\n\nvar toPosInt = require(\"../number/to-pos-integer\");\n\nvar test = function (arg1, arg2) { return arg2; };\n\nvar desc, defineProperty, generate, mixin;\n\ntry {\n\tObject.defineProperty(test, \"length\", {\n\t\tconfigurable: true,\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tvalue: 1\n\t});\n}\ncatch (ignore) {}\n\nif (test.length === 1) {\n\t// ES6\n\tdesc = { configurable: true, writable: false, enumerable: false };\n\tdefineProperty = Object.defineProperty;\n\tmodule.exports = function (fn, length) {\n\t\tlength = toPosInt(length);\n\t\tif (fn.length === length) return fn;\n\t\tdesc.value = length;\n\t\treturn defineProperty(fn, \"length\", desc);\n\t};\n} else {\n\tmixin = require(\"../object/mixin\");\n\tgenerate = (function () {\n\t\tvar cache = [];\n\t\treturn function (length) {\n\t\t\tvar args, i = 0;\n\t\t\tif (cache[length]) return cache[length];\n\t\t\targs = [];\n\t\t\twhile (length--) args.push(\"a\" + (++i).toString(36));\n\t\t\t// eslint-disable-next-line no-new-func\n\t\t\treturn new Function(\n\t\t\t\t\"fn\",\n\t\t\t\t\"return function (\" + args.join(\", \") + \") { return fn.apply(this, arguments); };\"\n\t\t\t);\n\t\t};\n\t})();\n\tmodule.exports = function (src, length) {\n\t\tvar target;\n\t\tlength = toPosInt(length);\n\t\tif (src.length === length) return src;\n\t\ttarget = generate(length)(src);\n\t\ttry { mixin(target, src); }\n\t\tcatch (ignore) {}\n\t\treturn target;\n\t};\n}\n","\"use strict\";\n\n// ES3 safe\nvar _undefined = void 0;\n\nmodule.exports = function (value) { return value !== _undefined && value !== null; };\n","\"use strict\";\n\nvar isValue = require(\"../value/is\");\n\n// prettier-ignore\nvar possibleTypes = { \"object\": true, \"function\": true, \"undefined\": true /* document.all */ };\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\treturn hasOwnProperty.call(possibleTypes, typeof value);\n};\n","\"use strict\";\n\nvar isPrototype = require(\"../prototype/is\");\n\nmodule.exports = function (value) {\n\tif (typeof value !== \"function\") return false;\n\n\tif (!hasOwnProperty.call(value, \"length\")) return false;\n\n\ttry {\n\t\tif (typeof value.length !== \"number\") return false;\n\t\tif (typeof value.call !== \"function\") return false;\n\t\tif (typeof value.apply !== \"function\") return false;\n\t} catch (error) {\n\t\treturn false;\n\t}\n\n\treturn !isPrototype(value);\n};\n","\"use strict\";\n\nvar isObject = require(\"../object/is\");\n\nmodule.exports = function (value) {\n\tif (!isObject(value)) return false;\n\ttry {\n\t\tif (!value.constructor) return false;\n\t\treturn value.constructor.prototype === value;\n\t} catch (error) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isFunction = require(\"../function/is\");\n\nvar classRe = /^\\s*class[\\s{/}]/, functionToString = Function.prototype.toString;\n\nmodule.exports = function (value) {\n\tif (!isFunction(value)) return false;\n\tif (classRe.test(functionToString.call(value))) return false;\n\treturn true;\n};\n","\"use strict\";\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn str.contains(\"dwa\") === true && str.contains(\"foo\") === false;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? String.prototype.contains : require(\"./shim\");\n","\"use strict\";\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString /*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n","\"use strict\";\n\nvar isValue = require(\"type/value/is\")\n , isPlainFunction = require(\"type/plain-function/is\")\n , assign = require(\"es5-ext/object/assign\")\n , normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , contains = require(\"es5-ext/string/#/contains\");\n\nvar d = (module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif (arguments.length < 2 || typeof dscr !== \"string\") {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t\tw = contains.call(dscr, \"w\");\n\t} else {\n\t\tc = w = true;\n\t\te = false;\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n});\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== \"string\") {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (!isValue(get)) {\n\t\tget = undefined;\n\t} else if (!isPlainFunction(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (!isValue(set)) {\n\t\tset = undefined;\n\t} else if (!isPlainFunction(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t} else {\n\t\tc = true;\n\t\te = false;\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n","'use strict';\n\nvar d = require('d')\n , callable = require('es5-ext/object/valid-callable')\n\n , apply = Function.prototype.apply, call = Function.prototype.call\n , create = Object.create, defineProperty = Object.defineProperty\n , defineProperties = Object.defineProperties\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , descriptor = { configurable: true, enumerable: false, writable: true }\n\n , on, once, off, emit, methods, descriptors, base;\n\non = function (type, listener) {\n\tvar data;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) {\n\t\tdata = descriptor.value = create(null);\n\t\tdefineProperty(this, '__ee__', descriptor);\n\t\tdescriptor.value = null;\n\t} else {\n\t\tdata = this.__ee__;\n\t}\n\tif (!data[type]) data[type] = listener;\n\telse if (typeof data[type] === 'object') data[type].push(listener);\n\telse data[type] = [data[type], listener];\n\n\treturn this;\n};\n\nonce = function (type, listener) {\n\tvar once, self;\n\n\tcallable(listener);\n\tself = this;\n\ton.call(this, type, once = function () {\n\t\toff.call(self, type, once);\n\t\tapply.call(listener, this, arguments);\n\t});\n\n\tonce.__eeOnceListener__ = listener;\n\treturn this;\n};\n\noff = function (type, listener) {\n\tvar data, listeners, candidate, i;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return this;\n\tdata = this.__ee__;\n\tif (!data[type]) return this;\n\tlisteners = data[type];\n\n\tif (typeof listeners === 'object') {\n\t\tfor (i = 0; (candidate = listeners[i]); ++i) {\n\t\t\tif ((candidate === listener) ||\n\t\t\t\t\t(candidate.__eeOnceListener__ === listener)) {\n\t\t\t\tif (listeners.length === 2) data[type] = listeners[i ? 0 : 1];\n\t\t\t\telse listeners.splice(i, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ((listeners === listener) ||\n\t\t\t\t(listeners.__eeOnceListener__ === listener)) {\n\t\t\tdelete data[type];\n\t\t}\n\t}\n\n\treturn this;\n};\n\nemit = function (type) {\n\tvar i, l, listener, listeners, args;\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return;\n\tlisteners = this.__ee__[type];\n\tif (!listeners) return;\n\n\tif (typeof listeners === 'object') {\n\t\tl = arguments.length;\n\t\targs = new Array(l - 1);\n\t\tfor (i = 1; i < l; ++i) args[i - 1] = arguments[i];\n\n\t\tlisteners = listeners.slice();\n\t\tfor (i = 0; (listener = listeners[i]); ++i) {\n\t\t\tapply.call(listener, this, args);\n\t\t}\n\t} else {\n\t\tswitch (arguments.length) {\n\t\tcase 1:\n\t\t\tcall.call(listeners, this);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcall.call(listeners, this, arguments[1]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcall.call(listeners, this, arguments[1], arguments[2]);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tl = arguments.length;\n\t\t\targs = new Array(l - 1);\n\t\t\tfor (i = 1; i < l; ++i) {\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\t}\n\t\t\tapply.call(listeners, this, args);\n\t\t}\n\t}\n};\n\nmethods = {\n\ton: on,\n\tonce: once,\n\toff: off,\n\temit: emit\n};\n\ndescriptors = {\n\ton: d(on),\n\tonce: d(once),\n\toff: d(off),\n\temit: d(emit)\n};\n\nbase = defineProperties({}, descriptors);\n\nmodule.exports = exports = function (o) {\n\treturn (o == null) ? create(base) : defineProperties(Object(o), descriptors);\n};\nexports.methods = methods;\n","\"use strict\";\n\nvar toArray = require(\"es5-ext/array/to-array\")\n , isValue = require(\"es5-ext/object/is-value\")\n , callable = require(\"es5-ext/object/valid-callable\");\n\nvar slice = Array.prototype.slice, resolveArgs;\n\nresolveArgs = function (args) {\n\treturn this.map(function (resolve, i) { return resolve ? resolve(args[i]) : args[i]; }).concat(\n\t\tslice.call(args, this.length)\n\t);\n};\n\nmodule.exports = function (resolvers) {\n\tresolvers = toArray(resolvers);\n\tresolvers.forEach(function (resolve) { if (isValue(resolve)) callable(resolve); });\n\treturn resolveArgs.bind(resolvers);\n};\n","\"use strict\";\n\nvar from = require(\"./from\")\n , isArray = Array.isArray;\n\nmodule.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); };\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\");\n\nmodule.exports = function (userNormalizer) {\n\tvar normalizer;\n\tif (typeof userNormalizer === \"function\") return { set: userNormalizer, get: userNormalizer };\n\tnormalizer = { get: callable(userNormalizer.get) };\n\tif (userNormalizer.set !== undefined) {\n\t\tnormalizer.set = callable(userNormalizer.set);\n\t\tif (userNormalizer.delete) normalizer.delete = callable(userNormalizer.delete);\n\t\tif (userNormalizer.clear) normalizer.clear = callable(userNormalizer.clear);\n\t\treturn normalizer;\n\t}\n\tnormalizer.set = normalizer.get;\n\treturn normalizer;\n};\n","/* eslint no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n\"use strict\";\n\nvar customError = require(\"es5-ext/error/custom\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , d = require(\"d\")\n , ee = require(\"event-emitter\").methods\n , resolveResolve = require(\"./resolve-resolve\")\n , resolveNormalize = require(\"./resolve-normalize\");\n\nvar apply = Function.prototype.apply\n , call = Function.prototype.call\n , create = Object.create\n , defineProperties = Object.defineProperties\n , on = ee.on\n , emit = ee.emit;\n\nmodule.exports = function (original, length, options) {\n\tvar cache = create(null)\n\t , conf\n\t , memLength\n\t , get\n\t , set\n\t , del\n\t , clear\n\t , extDel\n\t , extGet\n\t , extHas\n\t , normalizer\n\t , getListeners\n\t , setListeners\n\t , deleteListeners\n\t , memoized\n\t , resolve;\n\tif (length !== false) memLength = length;\n\telse if (isNaN(original.length)) memLength = 1;\n\telse memLength = original.length;\n\n\tif (options.normalizer) {\n\t\tnormalizer = resolveNormalize(options.normalizer);\n\t\tget = normalizer.get;\n\t\tset = normalizer.set;\n\t\tdel = normalizer.delete;\n\t\tclear = normalizer.clear;\n\t}\n\tif (options.resolvers != null) resolve = resolveResolve(options.resolvers);\n\n\tif (get) {\n\t\tmemoized = defineLength(function (arg) {\n\t\t\tvar id, result, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id !== null) {\n\t\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\t\treturn cache[id];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (id === null) {\n\t\t\t\tid = get(args);\n\t\t\t\tif (id !== null) throw customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t\tid = set(args);\n\t\t\t} else if (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\tmemoized = function () {\n\t\t\tvar result;\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", \"data\", arguments, this);\n\t\t\t\treturn cache.data;\n\t\t\t}\n\t\t\tif (arguments.length) result = apply.call(original, this, arguments);\n\t\t\telse result = call.call(original, this);\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache.data = result;\n\t\t\tif (setListeners) conf.emit(\"set\", \"data\", null, result);\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\tmemoized = function (arg) {\n\t\t\tvar result, args = arguments, id;\n\t\t\tif (resolve) args = resolve(arguments);\n\t\t\tid = String(args[0]);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\treturn cache[id];\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t};\n\t}\n\tconf = {\n\t\toriginal: original,\n\t\tmemoized: memoized,\n\t\tprofileName: options.profileName,\n\t\tget: function (args) {\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tif (get) return get(args);\n\t\t\treturn String(args[0]);\n\t\t},\n\t\thas: function (id) { return hasOwnProperty.call(cache, id); },\n\t\tdelete: function (id) {\n\t\t\tvar result;\n\t\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\t\tif (del) del(id);\n\t\t\tresult = cache[id];\n\t\t\tdelete cache[id];\n\t\t\tif (deleteListeners) conf.emit(\"delete\", id, result);\n\t\t},\n\t\tclear: function () {\n\t\t\tvar oldCache = cache;\n\t\t\tif (clear) clear();\n\t\t\tcache = create(null);\n\t\t\tconf.emit(\"clear\", oldCache);\n\t\t},\n\t\ton: function (type, listener) {\n\t\t\tif (type === \"get\") getListeners = true;\n\t\t\telse if (type === \"set\") setListeners = true;\n\t\t\telse if (type === \"delete\") deleteListeners = true;\n\t\t\treturn on.call(this, type, listener);\n\t\t},\n\t\temit: emit,\n\t\tupdateEnv: function () { original = conf.original; },\n\t};\n\tif (get) {\n\t\textDel = defineLength(function (arg) {\n\t\t\tvar id, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id === null) return;\n\t\t\tconf.delete(id);\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\textDel = function () { return conf.delete(\"data\"); };\n\t} else {\n\t\textDel = function (arg) {\n\t\t\tif (resolve) arg = resolve(arguments)[0];\n\t\t\treturn conf.delete(arg);\n\t\t};\n\t}\n\textGet = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return cache.data;\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\treturn cache[id];\n\t});\n\textHas = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return conf.has(\"data\");\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\tif (id === null) return false;\n\t\treturn conf.has(id);\n\t});\n\tdefineProperties(memoized, {\n\t\t__memoized__: d(true),\n\t\tdelete: d(extDel),\n\t\tclear: d(conf.clear),\n\t\t_get: d(extGet),\n\t\t_has: d(extHas),\n\t});\n\treturn conf;\n};\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"./lib/registered-extensions\")\n , configure = require(\"./lib/configure-map\")\n , resolveLength = require(\"./lib/resolve-length\");\n\nmodule.exports = function self(fn/*, options */) {\n\tvar options, length, conf;\n\n\tcallable(fn);\n\toptions = Object(arguments[1]);\n\n\tif (options.async && options.promise) {\n\t\tthrow new Error(\"Options 'async' and 'promise' cannot be used together\");\n\t}\n\n\t// Do not memoize already memoized function\n\tif (hasOwnProperty.call(fn, \"__memoized__\") && !options.force) return fn;\n\n\t// Resolve length;\n\tlength = resolveLength(options.length, fn.length, options.async && extensions.async);\n\n\t// Configure cache map\n\tconf = configure(fn, length, options);\n\n\t// Bind eventual extensions\n\tforEach(extensions, function (extFn, name) {\n\t\tif (options[name]) extFn(options[name], conf, options);\n\t});\n\n\tif (self.__profiler__) self.__profiler__(conf);\n\n\tconf.updateEnv();\n\treturn conf.memoized;\n};\n","\"use strict\";\n\nvar normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , resolveLength = require(\"./lib/resolve-length\")\n , plain = require(\"./plain\");\n\nmodule.exports = function (fn/*, options*/) {\n\tvar options = normalizeOpts(arguments[1]), length;\n\n\tif (!options.normalizer) {\n\t\tlength = options.length = resolveLength(options.length, fn.length, options.async);\n\t\tif (length !== 0) {\n\t\t\tif (options.primitive) {\n\t\t\t\tif (length === false) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/primitive\");\n\t\t\t\t} else if (length > 1) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/get-primitive-fixed\")(length);\n\t\t\t\t}\n\t\t\t} else if (length === false) options.normalizer = require(\"./normalizers/get\")();\n\t\t\telse if (length === 1) options.normalizer = require(\"./normalizers/get-1\")();\n\t\t\telse options.normalizer = require(\"./normalizers/get-fixed\")(length);\n\t\t}\n\t}\n\n\t// Assure extensions\n\tif (options.async) require(\"./ext/async\");\n\tif (options.promise) require(\"./ext/promise\");\n\tif (options.dispose) require(\"./ext/dispose\");\n\tif (options.maxAge) require(\"./ext/max-age\");\n\tif (options.max) require(\"./ext/max\");\n\tif (options.refCounter) require(\"./ext/ref-counter\");\n\n\treturn plain(fn, options);\n};\n","\"use strict\";\n\nmodule.exports = function (args) {\n\tvar id, i, length = args.length;\n\tif (!length) return \"\\u0002\";\n\tid = String(args[(i = 0)]);\n\twhile (--length) id += \"\\u0001\" + args[++i];\n\treturn id;\n};\n","\"use strict\";\n\nmodule.exports = function (length) {\n\tif (!length) {\n\t\treturn function () { return \"\"; };\n\t}\n\treturn function (args) {\n\t\tvar id = String(args[0]), i = 0, currentLength = length;\n\t\twhile (--currentLength) {\n\t\t\tid += \"\\u0001\" + args[++i];\n\t\t}\n\t\treturn id;\n\t};\n};\n","/* eslint max-statements: 0 */\n\n\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nvar create = Object.create;\n\nmodule.exports = function () {\n\tvar lastId = 0, map = [], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) return set[length] || null;\n\t\t\tif ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) return null;\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\treturn set[1][i] || null;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) {\n\t\t\t\tset[length] = ++lastId;\n\t\t\t} else {\n\t\t\t\tif (!set[length]) {\n\t\t\t\t\tset[length] = [[], []];\n\t\t\t\t}\n\t\t\t\tset = set[length];\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t\t}\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t}\n\t\t\t\tset[1][i] = ++lastId;\n\t\t\t}\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, args = cache[id], length = args.length, path = [];\n\t\t\tif (length === 0) {\n\t\t\t\tdelete set[length];\n\t\t\t} else if ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tpath.push(set, i);\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tid = set[1][i];\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\t\ti = path.pop();\n\t\t\t\t\tset = path.pop();\n\t\t\t\t\tset[0].splice(i, 1);\n\t\t\t\t\tset[1].splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nmodule.exports = function () {\n\tvar lastId = 0, argsMap = [], cache = [];\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = indexOf.call(argsMap, args[0]);\n\t\t\treturn index === -1 ? null : cache[index];\n\t\t},\n\t\tset: function (args) {\n\t\t\targsMap.push(args[0]);\n\t\t\tcache.push(++lastId);\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = indexOf.call(cache, id);\n\t\t\tif (index !== -1) {\n\t\t\t\targsMap.splice(index, 1);\n\t\t\t\tcache.splice(index, 1);\n\t\t\t}\n\t\t},\n\t\tclear: function () {\n\t\t\targsMap = [];\n\t\t\tcache = [];\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\")\n , create = Object.create;\n\nmodule.exports = function (length) {\n\tvar lastId = 0, map = [[], []], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) return null;\n\t\t\treturn set[1][i] || null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t}\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t}\n\t\t\tset[1][i] = ++lastId;\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, path = [], args = cache[id];\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tpath.push(set, i);\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tid = set[1][i];\n\t\t\tset[0].splice(i, 1);\n\t\t\tset[1].splice(i, 1);\n\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\ti = path.pop();\n\t\t\t\tset = path.pop();\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [[], []];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","/* eslint consistent-this: 0, no-shadow:0, no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n// Support for asynchronous functions\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , objectMap = require(\"es5-ext/object/map\")\n , mixin = require(\"es5-ext/object/mixin\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , nextTick = require(\"next-tick\");\n\nvar slice = Array.prototype.slice, apply = Function.prototype.apply, create = Object.create;\n\nrequire(\"../lib/registered-extensions\").async = function (tbi, conf) {\n\tvar waiting = create(null)\n\t , cache = create(null)\n\t , base = conf.memoized\n\t , original = conf.original\n\t , currentCallback\n\t , currentContext\n\t , currentArgs;\n\n\t// Initial\n\tconf.memoized = defineLength(function (arg) {\n\t\tvar args = arguments, last = args[args.length - 1];\n\t\tif (typeof last === \"function\") {\n\t\t\tcurrentCallback = last;\n\t\t\targs = slice.call(args, 0, -1);\n\t\t}\n\t\treturn base.apply((currentContext = this), (currentArgs = args));\n\t}, base);\n\ttry { mixin(conf.memoized, base); }\n\tcatch (ignore) {}\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id) {\n\t\tvar cb, context, args;\n\t\tif (!currentCallback) return;\n\n\t\t// Unresolved\n\t\tif (waiting[id]) {\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback];\n\t\t\telse waiting[id].push(currentCallback);\n\t\t\tcurrentCallback = null;\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolved, assure next tick invocation\n\t\tcb = currentCallback;\n\t\tcontext = currentContext;\n\t\targs = currentArgs;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\tnextTick(function () {\n\t\t\tvar data;\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tdata = cache[id];\n\t\t\t\tconf.emit(\"getasync\", id, args, context);\n\t\t\t\tapply.call(cb, data.context, data.args);\n\t\t\t} else {\n\t\t\t\t// Purged in a meantime, we shouldn't rely on cached value, recall\n\t\t\t\tcurrentCallback = cb;\n\t\t\t\tcurrentContext = context;\n\t\t\t\tcurrentArgs = args;\n\t\t\t\tbase.apply(context, args);\n\t\t\t}\n\t\t});\n\t});\n\n\t// Not from cache\n\tconf.original = function () {\n\t\tvar args, cb, origCb, result;\n\t\tif (!currentCallback) return apply.call(original, this, arguments);\n\t\targs = aFrom(arguments);\n\t\tcb = function self(err) {\n\t\t\tvar cb, args, id = self.id;\n\t\t\tif (id == null) {\n\t\t\t\t// Shouldn't happen, means async callback was called sync way\n\t\t\t\tnextTick(apply.bind(self, this, arguments));\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tdelete self.id;\n\t\t\tcb = waiting[id];\n\t\t\tdelete waiting[id];\n\t\t\tif (!cb) {\n\t\t\t\t// Already processed,\n\t\t\t\t// outcome of race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\targs = aFrom(arguments);\n\t\t\tif (conf.has(id)) {\n\t\t\t\tif (err) {\n\t\t\t\t\tconf.delete(id);\n\t\t\t\t} else {\n\t\t\t\t\tcache[id] = { context: this, args: args };\n\t\t\t\t\tconf.emit(\"setasync\", id, typeof cb === \"function\" ? 1 : cb.length);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof cb === \"function\") {\n\t\t\t\tresult = apply.call(cb, this, args);\n\t\t\t} else {\n\t\t\t\tcb.forEach(function (cb) { result = apply.call(cb, this, args); }, this);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\torigCb = currentCallback;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\targs.push(cb);\n\t\tresult = apply.call(original, this, args);\n\t\tcb.cb = origCb;\n\t\tcurrentCallback = cb;\n\t\treturn result;\n\t};\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id) {\n\t\tif (!currentCallback) {\n\t\t\tconf.delete(id);\n\t\t\treturn;\n\t\t}\n\t\tif (waiting[id]) {\n\t\t\t// Race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback.cb];\n\t\t\telse waiting[id].push(currentCallback.cb);\n\t\t} else {\n\t\t\twaiting[id] = currentCallback.cb;\n\t\t}\n\t\tdelete currentCallback.cb;\n\t\tcurrentCallback.id = id;\n\t\tcurrentCallback = null;\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tvar result;\n\t\t// If false, we don't have value yet, so we assume that intention is not\n\t\t// to memoize this call. After value is obtained we don't cache it but\n\t\t// gracefully pass to callback\n\t\tif (hasOwnProperty.call(waiting, id)) return;\n\t\tif (!cache[id]) return;\n\t\tresult = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, slice.call(result.args, 1));\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\tconf.emit(\n\t\t\t\"clearasync\", objectMap(oldCache, function (data) { return slice.call(data.args, 1); })\n\t\t);\n\t});\n};\n","// Call dispose callback on each cache purge\n\n\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"../lib/registered-extensions\")\n , apply = Function.prototype.apply;\n\nextensions.dispose = function (dispose, conf, options) {\n\tvar del;\n\tcallable(dispose);\n\tif ((options.async && extensions.async) || (options.promise && extensions.promise)) {\n\t\tconf.on(\n\t\t\t\"deleteasync\",\n\t\t\t(del = function (id, resultArray) { apply.call(dispose, null, resultArray); })\n\t\t);\n\t\tconf.on(\"clearasync\", function (cache) {\n\t\t\tforEach(cache, function (result, id) { del(id, result); });\n\t\t});\n\t\treturn;\n\t}\n\tconf.on(\"delete\", (del = function (id, result) { dispose(result); }));\n\tconf.on(\"clear\", function (cache) {\n\t\tforEach(cache, function (result, id) { del(id, result); });\n\t});\n};\n","/* eslint consistent-this: 0 */\n\n// Timeout cached values\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , forEach = require(\"es5-ext/object/for-each\")\n , nextTick = require(\"next-tick\")\n , isPromise = require(\"is-promise\")\n , timeout = require(\"timers-ext/valid-timeout\")\n , extensions = require(\"../lib/registered-extensions\");\n\nvar noop = Function.prototype, max = Math.max, min = Math.min, create = Object.create;\n\nextensions.maxAge = function (maxAge, conf, options) {\n\tvar timeouts, postfix, preFetchAge, preFetchTimeouts;\n\n\tmaxAge = timeout(maxAge);\n\tif (!maxAge) return;\n\n\ttimeouts = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\tconf.on(\"set\" + postfix, function (id) {\n\t\ttimeouts[id] = setTimeout(function () { conf.delete(id); }, maxAge);\n\t\tif (typeof timeouts[id].unref === \"function\") timeouts[id].unref();\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id]) {\n\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\t}\n\t\tpreFetchTimeouts[id] = setTimeout(function () {\n\t\t\tdelete preFetchTimeouts[id];\n\t\t}, preFetchAge);\n\t\tif (typeof preFetchTimeouts[id].unref === \"function\") preFetchTimeouts[id].unref();\n\t});\n\tconf.on(\"delete\" + postfix, function (id) {\n\t\tclearTimeout(timeouts[id]);\n\t\tdelete timeouts[id];\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\tdelete preFetchTimeouts[id];\n\t});\n\n\tif (options.preFetch) {\n\t\tif (options.preFetch === true || isNaN(options.preFetch)) {\n\t\t\tpreFetchAge = 0.333;\n\t\t} else {\n\t\t\tpreFetchAge = max(min(Number(options.preFetch), 1), 0);\n\t\t}\n\t\tif (preFetchAge) {\n\t\t\tpreFetchTimeouts = {};\n\t\t\tpreFetchAge = (1 - preFetchAge) * maxAge;\n\t\t\tconf.on(\"get\" + postfix, function (id, args, context) {\n\t\t\t\tif (!preFetchTimeouts[id]) {\n\t\t\t\t\tpreFetchTimeouts[id] = \"nextTick\";\n\t\t\t\t\tnextTick(function () {\n\t\t\t\t\t\tvar result;\n\t\t\t\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") return;\n\t\t\t\t\t\tdelete preFetchTimeouts[id];\n\t\t\t\t\t\tconf.delete(id);\n\t\t\t\t\t\tif (options.async) {\n\t\t\t\t\t\t\targs = aFrom(args);\n\t\t\t\t\t\t\targs.push(noop);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult = conf.memoized.apply(context, args);\n\t\t\t\t\t\tif (options.promise) {\n\t\t\t\t\t\t\t// Supress eventual error warnings\n\t\t\t\t\t\t\tif (isPromise(result)) {\n\t\t\t\t\t\t\t\tif (typeof result.done === \"function\") result.done(noop, noop);\n\t\t\t\t\t\t\t\telse result.then(noop, noop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tconf.on(\"clear\" + postfix, function () {\n\t\tforEach(timeouts, function (id) { clearTimeout(id); });\n\t\ttimeouts = {};\n\t\tif (preFetchTimeouts) {\n\t\t\tforEach(preFetchTimeouts, function (id) { if (id !== \"nextTick\") clearTimeout(id); });\n\t\t\tpreFetchTimeouts = {};\n\t\t}\n\t});\n};\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\")\n , maxTimeout = require(\"./max-timeout\");\n\nmodule.exports = function (value) {\n\tvalue = toPosInt(value);\n\tif (value > maxTimeout) throw new TypeError(value + \" exceeds maximum possible timeout\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = 2147483647;\n","// Limit cache size, LRU (least recently used) algorithm.\n\n\"use strict\";\n\nvar toPosInteger = require(\"es5-ext/number/to-pos-integer\")\n , lruQueue = require(\"lru-queue\")\n , extensions = require(\"../lib/registered-extensions\");\n\nextensions.max = function (max, conf, options) {\n\tvar postfix, queue, hit;\n\n\tmax = toPosInteger(max);\n\tif (!max) return;\n\n\tqueue = lruQueue(max);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\n\t\t\"set\" + postfix,\n\t\t(hit = function (id) {\n\t\t\tid = queue.hit(id);\n\t\t\tif (id === undefined) return;\n\t\t\tconf.delete(id);\n\t\t})\n\t);\n\tconf.on(\"get\" + postfix, hit);\n\tconf.on(\"delete\" + postfix, queue.delete);\n\tconf.on(\"clear\" + postfix, queue.clear);\n};\n","'use strict';\n\nvar toPosInt = require('es5-ext/number/to-pos-integer')\n\n , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;\n\nmodule.exports = function (limit) {\n\tvar size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;\n\tlimit = toPosInt(limit);\n\treturn {\n\t\thit: function (id) {\n\t\t\tvar oldIndex = map[id], nuIndex = ++index;\n\t\t\tqueue[nuIndex] = id;\n\t\t\tmap[id] = nuIndex;\n\t\t\tif (!oldIndex) {\n\t\t\t\t++size;\n\t\t\t\tif (size <= limit) return;\n\t\t\t\tid = queue[base];\n\t\t\t\tdel(id);\n\t\t\t\treturn id;\n\t\t\t}\n\t\t\tdelete queue[oldIndex];\n\t\t\tif (base !== oldIndex) return;\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tdelete: del = function (id) {\n\t\t\tvar oldIndex = map[id];\n\t\t\tif (!oldIndex) return;\n\t\t\tdelete queue[oldIndex];\n\t\t\tdelete map[id];\n\t\t\t--size;\n\t\t\tif (base !== oldIndex) return;\n\t\t\tif (!size) {\n\t\t\t\tindex = 0;\n\t\t\t\tbase = 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tclear: function () {\n\t\t\tsize = 0;\n\t\t\tbase = 1;\n\t\t\tqueue = create(null);\n\t\t\tmap = create(null);\n\t\t\tindex = 0;\n\t\t}\n\t};\n};\n","// Reference counter, useful for garbage collector like functionality\n\n\"use strict\";\n\nvar d = require(\"d\")\n , extensions = require(\"../lib/registered-extensions\")\n , create = Object.create\n , defineProperties = Object.defineProperties;\n\nextensions.refCounter = function (ignore, conf, options) {\n\tvar cache, postfix;\n\n\tcache = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\"set\" + postfix, function (id, length) { cache[id] = length || 1; });\n\tconf.on(\"get\" + postfix, function (id) { ++cache[id]; });\n\tconf.on(\"delete\" + postfix, function (id) { delete cache[id]; });\n\tconf.on(\"clear\" + postfix, function () { cache = {}; });\n\n\tdefineProperties(conf.memoized, {\n\t\tdeleteRef: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return null;\n\t\t\tif (!cache[id]) return null;\n\t\t\tif (!--cache[id]) {\n\t\t\t\tconf.delete(id);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}),\n\t\tgetRefCount: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return 0;\n\t\t\tif (!cache[id]) return 0;\n\t\t\treturn cache[id];\n\t\t}),\n\t});\n};\n","const os = require(\"os\");\r\n\r\n// to detect on with os user had used path.resolve(...)\r\nconst is_posix_os = (os.platform() !== \"win32\");\r\nconst version = os.release();\r\n\r\n// For some windows version (Windows 10 v1803), it is not useful to escape spaces in path\r\n// https://docs.microsoft.com/en-us/windows/release-information/\r\nconst windows_version_regex = /(\\d+\\.\\d+)\\.(\\d+)/;\r\nconst should_not_escape = (major_release = \"\", os_build = \"\") =>\r\n /1\\d+\\.\\d+/.test(major_release) && Number(os_build) >= 17134.1184;\r\n\r\nmodule.exports = function (given_path) {\r\n return (is_posix_os)\r\n // for posix path, escape is simple\r\n ? given_path.replace(/(\\s+)/g, '\\\\$1')\r\n // for windows, it depend of the build\r\n : (should_not_escape(...windows_version_regex.exec(version).splice(1)))\r\n // on major version, no need to escape anymore\r\n // https://support.microsoft.com/en-us/help/4467268/url-encoded-unc-paths-not-url-decoded-in-windows-10-version-1803-later\r\n ? given_path\r\n // on older version, replace space with symbol %20\r\n : given_path.replace(/(\\s+)/g, '%20');\r\n};","// Generated by CoffeeScript 1.10.0\n(function() {\n var regexEscape, reverse;\n\n regexEscape = require('escape-string-regexp');\n\n reverse = function(s) {\n return s.split('').reverse().join('');\n };\n\n module.exports = function(s, chars, escapeChar) {\n var regex;\n if (chars == null) {\n chars = '\\'';\n }\n if (escapeChar == null) {\n escapeChar = '\\\\';\n }\n if (typeof s !== 'string') {\n return s;\n }\n regex = new RegExp(\"([\" + (regexEscape(chars)) + \"])(?!\" + (regexEscape(escapeChar)) + \")\", 'g');\n return reverse(reverse(s).replace(regex, \"$1\" + escapeChar));\n };\n\n}).call(this);\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","(function () {\n\n 'use strict';\n\n var root = this;\n\n\n //=========//\n // GLOBALS //\n //=========//\n\n var locales = {};\n\n\n //==========//\n // EXPOSING //\n //==========//\n\n var moduleDefinition = {\n create: factory,\n addLocale: addLocale,\n pluralize: pluralize\n };\n\n if ('undefined' !== typeof module && 'undefined' !== typeof module.exports) {\n module.exports = moduleDefinition;\n } else {\n root.numerous = moduleDefinition;\n }\n\n\n //==================//\n // PUBLIC FUNCTIONS //\n //==================//\n\n /**\n * Creates new instance of numerous.\n *\n * @param {string} locale\n * @returns {object}\n */\n function factory (locale) {\n\n checkLocale(locale);\n\n return {\n pluralize: function (value, variants) {\n return pluralize(locale, value, variants);\n }\n };\n }\n\n /**\n * Adds pluralization function for specified locale.\n * Usually externally called by locale itself.\n *\n * @param {string} locale\n * @param {function} callable\n */\n function addLocale (locale, callable) {\n locales[locale] = callable;\n }\n\n /**\n * Returns variant from the specified list of variants\n * according to the specified value and locale.\n *\n * @param {string} locale\n * @param {int} value\n * @param {object} variants\n */\n function pluralize (locale, value, variants) {\n\n checkLocale(locale);\n\n if ('object' !== typeof variants) {\n throw new Error('List of variants should be specified as an object');\n }\n\n var key = locales[locale](value);\n\n return ('undefined' !== typeof variants[key] ? variants[key] : null);\n }\n\n\n //===================//\n // PRIVATE FUNCTIONS //\n //===================//\n\n /**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} locale\n *\n * @returns {boolean}\n */\n function hasLocale (locale) {\n return ('undefined' !== typeof locales[locale]);\n }\n\n /**\n * Checks if locale is loaded. If not, tries to load it.\n *\n * @param {string} locale\n */\n function checkLocale (locale) {\n if (!hasLocale(locale)) {\n requireLocale(locale);\n }\n }\n\n /**\n * Tries to load the specified locale.\n *\n * @param {string} locale\n */\n function requireLocale (locale) {\n try {\n require(__dirname + '/../locales/' + locale + '.js');\n } catch (error) {\n throw Error('Failed to load the following locale: ' + locale);\n }\n }\n\n}).call(this);\n","module.exports = require('./lib/numerous.js');\n","(function () {\n var root = this;\n var numerous;\n if ('function' === typeof require) {\n numerous = require('../lib/numerous.js');\n } else {\n numerous = root.numerous;\n }\n numerous.addLocale('en', function pluralize_en(n /*``*/ ) {\n var i = Math.floor(Math.abs(n)),\n v = n.toString().replace(/^[^.]*\\.?/, \"\").length;\n if (typeof n === \"string\") n = parseInt(n, 10);\n if (i === 1 && v === 0) return \"one\";\n return \"other\"\n });\n}).call(this);","// Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md\n'use strict';\n\nexports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node);\n","module.exports = {\n \"id\": \"en\",\n \"data\": {\n \"long\": {\n \"years\": {\n \"one\": \"{0} year\",\n \"other\": \"{0} years\"\n },\n \"months\": {\n \"one\": \"{0} month\",\n \"other\": \"{0} months\"\n },\n \"weeks\": {\n \"one\": \"{0} week\",\n \"other\": \"{0} weeks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hour\",\n \"other\": \"{0} hours\"\n },\n \"minutes\": {\n \"one\": \"{0} minute\",\n \"other\": \"{0} minutes\"\n },\n \"seconds\": {\n \"one\": \"{0} second\",\n \"other\": \"{0} seconds\"\n }\n },\n \"narrow\": {\n \"years\": {\n \"one\": \"{0}y\",\n \"other\": \"{0}y\"\n },\n \"months\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"weeks\": {\n \"one\": \"{0}w\",\n \"other\": \"{0}w\"\n },\n \"days\": {\n \"one\": \"{0}d\",\n \"other\": \"{0}d\"\n },\n \"hours\": {\n \"one\": \"{0}h\",\n \"other\": \"{0}h\"\n },\n \"minutes\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"seconds\": {\n \"one\": \"{0}s\",\n \"other\": \"{0}s\"\n }\n },\n \"short\": {\n \"years\": {\n \"one\": \"{0} yr\",\n \"other\": \"{0} yrs\"\n },\n \"months\": {\n \"one\": \"{0} mth\",\n \"other\": \"{0} mths\"\n },\n \"weeks\": {\n \"one\": \"{0} wk\",\n \"other\": \"{0} wks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hr\",\n \"other\": \"{0} hr\"\n },\n \"minutes\": {\n \"one\": \"{0} min\",\n \"other\": \"{0} min\"\n },\n \"seconds\": {\n \"one\": \"{0} sec\",\n \"other\": \"{0} sec\"\n }\n }\n }\n};\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // Otherwise it can be determined by checking the high version\n\n if (highVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (highVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","class LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.DownloaderHelper=exports.DH_STATES=void 0;var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},_createClass=function(){function a(a,b){for(var c,d=0;dthis.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=b||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:'getOptions',value:function a(){return this.__opts}},{key:'getMetadata',value:function a(){return this.__opts.metadata}},{key:'getStats',value:function a(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:'getTotalSize',value:function b(){var a=this;return new Promise(function(b,c){var d=function(b){a.__initProtocol(b);var c=Object.assign({},a.__headers);c.hasOwnProperty('range')&&delete c.range;var d=a.__getReqOptions('HEAD',b,c);return Object.assign({},a.__reqOptions,d)},e=function(f,g){var h=a.__protocol.request(g,function(g){if(a.__isRequireRedirect(g)){var h=/^https?:\\/\\//.test(g.headers.location)?g.headers.location:new _url.URL(g.headers.location,f).href;return a.emit('redirected',h,f),e(h,d(h))}return 200===g.statusCode?void b({name:a.__getFileNameFromHeaders(g.headers,g),total:parseInt(g.headers['content-length'])||null}):c(new Error('Response status was '+g.statusCode))});h.on('error',function(a){return c(a)}),h.on('timeout',function(){return c(new Error('timeout'))}),h.on('uncaughtException',function(a){return c(a)}),h.end()};e(a.url,d(a.url))})}},{key:'getResumeState',value:function a(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:'resumeFromFile',value:function d(a){var b=this,c=1=g))return this.emit('skip',{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:f}),this.__setState(this.__states.SKIPPED),b(!0)}this.__fileStream=fs.createWriteStream(this.__filePath,{})}else this.__fileStream=fs.createWriteStream(this.__filePath,{flags:'a'});this.emit('download',{fileName:this.__fileName,filePath:this.__filePath,totalSize:this.__total,isResumed:this.__isResumed,downloadedSize:this.__downloaded}),this.__retryCount=0,this.__isResumed=!1,this.__isRedirected=!1,this.__setState(this.__states.DOWNLOADING),this.__statsEstimate.time=new Date,this.__statsEstimate.throttleTime=new Date,e.on('data',function(a){return d.__calculateStats(a.length)}),this.__pipes.forEach(function(a){e.pipe(a.stream,a.options),e=a.stream}),e.pipe(this.__fileStream),e.on('error',this.__onError(b,c)),this.__fileStream.on('finish',this.__onFinished(b,c)),this.__fileStream.on('error',this.__onError(b,c))}},{key:'__hasFinished',value:function a(){return!this.__isAborted&&-1===[this.__states.PAUSED,this.__states.STOPPED,this.__states.RETRY,this.__states.FAILED,this.__states.RESUMED].indexOf(this.state)}},{key:'__isRequireRedirect',value:function b(a){return 300a.statusCode&&a.headers.hasOwnProperty('location')&&a.headers.location}},{key:'__onFinished',value:function d(a,b){var c=this;return function(){c.__fileStream.close(function(d){if(d)return b(d);if(c.__hasFinished()){var e=!!c.__total&&c.__downloaded!==c.__total;if(e&&c.__isResumable&&c.__opts.resumeOnIncomplete&&c.__resumeRetryCount<=c.__opts.resumeOnIncompleteMaxRetry)return c.__resumeRetryCount++,c.emit('warning',new Error('uncomplete download, retrying')),c.resume();c.__setState(c.__states.FINISHED),c.__pipes=[],c.emit('end',{fileName:c.__fileName,filePath:c.__filePath,totalSize:c.__total,incomplete:e,onDiskSize:c.__getFilesizeInBytes(c.__filePath),downloadedSize:c.__downloaded})}return a(c.__downloaded===c.__total)})}}},{key:'__closeFileStream',value:function b(){var a=this;return this.__fileStream?new Promise(function(b,c){a.__fileStream.close(function(a){return a?c(a):b(!0)})}):Promise.resolve(!0)}},{key:'__onError',value:function e(a,b){var c=this,d=!!(2=g?Promise.reject(b||new Error('reached the maximum retries')):(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit('retry',this.__retryCount,this.__opts.retry,b),this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(a){return a.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return new Promise(function(b){return a.__retryTimeout=setTimeout(function(){return b(0this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=b,this.emit('progress.throttled',this.getStats())),this.emit('progress',this.getStats()))}},{key:'__setState',value:function b(a){this.state=a,this.emit('stateChanged',this.state)}},{key:'__getReqOptions',value:function f(a,b){var c=2 validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n// Get the path of cmd.exe in windows\nfunction getCmdPath() {\n var _a;\n return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;\n}\nexports.getCmdPath = getCmdPath;\n//# sourceMappingURL=io-util.js.map","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0;\nconst semver = __importStar(require(\"semver\"));\nconst core_1 = require(\"@actions/core\");\n// needs to be require for core node modules to be mocked\n/* eslint @typescript-eslint/no-require-imports: 0 */\nconst os = require(\"os\");\nconst cp = require(\"child_process\");\nconst fs = require(\"fs\");\nfunction _findMatch(versionSpec, stable, candidates, archFilter) {\n return __awaiter(this, void 0, void 0, function* () {\n const platFilter = os.platform();\n let result;\n let match;\n let file;\n for (const candidate of candidates) {\n const version = candidate.version;\n core_1.debug(`check ${version} satisfies ${versionSpec}`);\n if (semver.satisfies(version, versionSpec) &&\n (!stable || candidate.stable === stable)) {\n file = candidate.files.find(item => {\n core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);\n let chk = item.arch === archFilter && item.platform === platFilter;\n if (chk && item.platform_version) {\n const osVersion = module.exports._getOsVersion();\n if (osVersion === item.platform_version) {\n chk = true;\n }\n else {\n chk = semver.satisfies(osVersion, item.platform_version);\n }\n }\n return chk;\n });\n if (file) {\n core_1.debug(`matched ${candidate.version}`);\n match = candidate;\n break;\n }\n }\n }\n if (match && file) {\n // clone since we're mutating the file list to be only the file that matches\n result = Object.assign({}, match);\n result.files = [file];\n }\n return result;\n });\n}\nexports._findMatch = _findMatch;\nfunction _getOsVersion() {\n // TODO: add windows and other linux, arm variants\n // right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python)\n const plat = os.platform();\n let version = '';\n if (plat === 'darwin') {\n version = cp.execSync('sw_vers -productVersion').toString();\n }\n else if (plat === 'linux') {\n // lsb_release process not in some containers, readfile\n // Run cat /etc/lsb-release\n // DISTRIB_ID=Ubuntu\n // DISTRIB_RELEASE=18.04\n // DISTRIB_CODENAME=bionic\n // DISTRIB_DESCRIPTION=\"Ubuntu 18.04.4 LTS\"\n const lsbContents = module.exports._readLinuxVersionFile();\n if (lsbContents) {\n const lines = lsbContents.split('\\n');\n for (const line of lines) {\n const parts = line.split('=');\n if (parts.length === 2 &&\n (parts[0].trim() === 'VERSION_ID' ||\n parts[0].trim() === 'DISTRIB_RELEASE')) {\n version = parts[1]\n .trim()\n .replace(/^\"/, '')\n .replace(/\"$/, '');\n break;\n }\n }\n }\n }\n return version;\n}\nexports._getOsVersion = _getOsVersion;\nfunction _readLinuxVersionFile() {\n const lsbReleaseFile = '/etc/lsb-release';\n const osReleaseFile = '/etc/os-release';\n let contents = '';\n if (fs.existsSync(lsbReleaseFile)) {\n contents = fs.readFileSync(lsbReleaseFile).toString();\n }\n else if (fs.existsSync(osReleaseFile)) {\n contents = fs.readFileSync(osReleaseFile).toString();\n }\n return contents;\n}\nexports._readLinuxVersionFile = _readLinuxVersionFile;\n//# sourceMappingURL=manifest.js.map","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RetryHelper = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Internal class for retries\n */\nclass RetryHelper {\n constructor(maxAttempts, minSeconds, maxSeconds) {\n if (maxAttempts < 1) {\n throw new Error('max attempts should be greater than or equal to 1');\n }\n this.maxAttempts = maxAttempts;\n this.minSeconds = Math.floor(minSeconds);\n this.maxSeconds = Math.floor(maxSeconds);\n if (this.minSeconds > this.maxSeconds) {\n throw new Error('min seconds should be less than or equal to max seconds');\n }\n }\n execute(action, isRetryable) {\n return __awaiter(this, void 0, void 0, function* () {\n let attempt = 1;\n while (attempt < this.maxAttempts) {\n // Try\n try {\n return yield action();\n }\n catch (err) {\n if (isRetryable && !isRetryable(err)) {\n throw err;\n }\n core.info(err.message);\n }\n // Sleep\n const seconds = this.getSleepAmount();\n core.info(`Waiting ${seconds} seconds before trying again`);\n yield this.sleep(seconds);\n attempt++;\n }\n // Last attempt\n return yield action();\n });\n }\n getSleepAmount() {\n return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) +\n this.minSeconds);\n }\n sleep(seconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, seconds * 1000));\n });\n }\n}\nexports.RetryHelper = RetryHelper;\n//# sourceMappingURL=retry-helper.js.map","import { mkdir, mkdirSync, stat, statSync, } from 'fs';\nexport const optsArg = (opts) => {\n if (!opts) {\n opts = { mode: 0o777 };\n }\n else if (typeof opts === 'object') {\n opts = { mode: 0o777, ...opts };\n }\n else if (typeof opts === 'number') {\n opts = { mode: opts };\n }\n else if (typeof opts === 'string') {\n opts = { mode: parseInt(opts, 8) };\n }\n else {\n throw new TypeError('invalid options argument');\n }\n const resolved = opts;\n const optsFs = opts.fs || {};\n opts.mkdir = opts.mkdir || optsFs.mkdir || mkdir;\n opts.mkdirAsync = opts.mkdirAsync\n ? opts.mkdirAsync\n : async (path, options) => {\n return new Promise((res, rej) => resolved.mkdir(path, options, (er, made) => er ? rej(er) : res(made)));\n };\n opts.stat = opts.stat || optsFs.stat || stat;\n opts.statAsync = opts.statAsync\n ? opts.statAsync\n : async (path) => new Promise((res, rej) => resolved.stat(path, (err, stats) => (err ? rej(err) : res(stats))));\n opts.statSync = opts.statSync || optsFs.statSync || statSync;\n opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || mkdirSync;\n return resolved;\n};\n//# sourceMappingURL=opts-arg.js.map","import { dirname } from 'path';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpManualSync = (path, options, made) => {\n const parent = dirname(path);\n const opts = { ...optsArg(options), recursive: false };\n if (parent === path) {\n try {\n return opts.mkdirSync(path, opts);\n }\n catch (er) {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n return;\n }\n }\n try {\n opts.mkdirSync(path, opts);\n return made || path;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer && fer.code !== 'EROFS') {\n throw er;\n }\n try {\n if (!opts.statSync(path).isDirectory())\n throw er;\n }\n catch (_) {\n throw er;\n }\n }\n};\nexport const mkdirpManual = Object.assign(async (path, options, made) => {\n const opts = optsArg(options);\n opts.recursive = false;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirAsync(path, opts).catch(er => {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n });\n }\n return opts.mkdirAsync(path, opts).then(() => made || path, async (er) => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(parent, opts).then((made) => mkdirpManual(path, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer.code !== 'EROFS') {\n throw er;\n }\n return opts.statAsync(path).then(st => {\n if (st.isDirectory()) {\n return made;\n }\n else {\n throw er;\n }\n }, () => {\n throw er;\n });\n });\n}, { sync: mkdirpManualSync });\n//# sourceMappingURL=mkdirp-manual.js.map","import { dirname } from 'path';\nexport const findMade = async (opts, parent, path) => {\n // we never want the 'made' return value to be a root directory\n if (path === parent) {\n return;\n }\n return opts.statAsync(parent).then(st => (st.isDirectory() ? path : undefined), // will fail later\n // will fail later\n er => {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMade(opts, dirname(parent), parent)\n : undefined;\n });\n};\nexport const findMadeSync = (opts, parent, path) => {\n if (path === parent) {\n return undefined;\n }\n try {\n return opts.statSync(parent).isDirectory() ? path : undefined;\n }\n catch (er) {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMadeSync(opts, dirname(parent), parent)\n : undefined;\n }\n};\n//# sourceMappingURL=find-made.js.map","import { dirname } from 'path';\nimport { findMade, findMadeSync } from './find-made.js';\nimport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpNativeSync = (path, options) => {\n const opts = optsArg(options);\n opts.recursive = true;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirSync(path, opts);\n }\n const made = findMadeSync(opts, path);\n try {\n opts.mkdirSync(path, opts);\n return made;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts);\n }\n else {\n throw er;\n }\n }\n};\nexport const mkdirpNative = Object.assign(async (path, options) => {\n const opts = { ...optsArg(options), recursive: true };\n const parent = dirname(path);\n if (parent === path) {\n return await opts.mkdirAsync(path, opts);\n }\n return findMade(opts, path).then((made) => opts\n .mkdirAsync(path, opts)\n .then(m => made || m)\n .catch(er => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(path, opts);\n }\n else {\n throw er;\n }\n }));\n}, { sync: mkdirpNativeSync });\n//# sourceMappingURL=mkdirp-native.js.map","const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;\nimport { parse, resolve } from 'path';\nexport const pathArg = (path) => {\n if (/\\0/.test(path)) {\n // simulate same failure that node raises\n throw Object.assign(new TypeError('path must be a string without null bytes'), {\n path,\n code: 'ERR_INVALID_ARG_VALUE',\n });\n }\n path = resolve(path);\n if (platform === 'win32') {\n const badWinChars = /[*|\"<>?:]/;\n const { root } = parse(path);\n if (badWinChars.test(path.substring(root.length))) {\n throw Object.assign(new Error('Illegal characters in path.'), {\n path,\n code: 'EINVAL',\n });\n }\n }\n return path;\n};\n//# sourceMappingURL=path-arg.js.map","import { mkdir, mkdirSync } from 'fs';\nimport { optsArg } from './opts-arg.js';\nconst version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version;\nconst versArr = version.replace(/^v/, '').split('.');\nconst hasNative = +versArr[0] > 10 || (+versArr[0] === 10 && +versArr[1] >= 12);\nexport const useNativeSync = !hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdirSync === mkdirSync;\nexport const useNative = Object.assign(!hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdir === mkdir, {\n sync: useNativeSync,\n});\n//# sourceMappingURL=use-native.js.map","import { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nimport { optsArg } from './opts-arg.js';\nimport { pathArg } from './path-arg.js';\nimport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore start */\nexport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nexport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nexport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore stop */\nexport const mkdirpSync = (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNativeSync(resolved)\n ? mkdirpNativeSync(path, resolved)\n : mkdirpManualSync(path, resolved);\n};\nexport const sync = mkdirpSync;\nexport const manual = mkdirpManual;\nexport const manualSync = mkdirpManualSync;\nexport const native = mkdirpNative;\nexport const nativeSync = mkdirpNativeSync;\nexport const mkdirp = Object.assign(async (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNative(resolved)\n ? mkdirpNative(path, resolved)\n : mkdirpManual(path, resolved);\n}, {\n mkdirpSync,\n mkdirpNative,\n mkdirpNativeSync,\n mkdirpManual,\n mkdirpManualSync,\n sync: mkdirpSync,\n native: mkdirpNative,\n nativeSync: mkdirpNativeSync,\n manual: mkdirpManual,\n manualSync: mkdirpManualSync,\n useNative,\n useNativeSync,\n});\n//# sourceMappingURL=index.js.map","import { isArch } from \"../utils/env/isArch.js\"\n\nconst defaultLLVM = process.platform === \"darwin\" && process.arch === \"x64\"\n ? \"15.0.7\"\n : \"18.1.8\"\n\n/**\n * Default versions for the tools\n * DefaultUbuntuVersion overrides the default version for the tools on Ubuntu\n */\nexport const DefaultVersions: Record = {\n // https://github.com/llvm/llvm-project/releases\n llvm: defaultLLVM,\n clang: defaultLLVM,\n \"clang++\": defaultLLVM,\n \"clang-tidy\": defaultLLVM,\n clangtidy: defaultLLVM,\n \"clang-format\": defaultLLVM,\n clangformat: defaultLLVM,\n ninja: \"1.12.1\", // https://github.com/ninja-build/ninja/releases\n cmake: \"3.30.2\", // https://github.com/Kitware/CMake/releases\n gcovr: \"5.2\", // \"6.0\", // https://pypi.org/project/gcovr/\n conan: \"1.64.1\", // 2.0.17 // https://github.com/conan-io/conan/releases\n meson: \"1.5.1\", // https://github.com/mesonbuild/meson/releases\n kcov: \"42\", // https://github.com/SimonKagstrom/kcov/releases\n task: \"3.38.0\", // https://github.com/go-task/task/releases\n doxygen: isArch() ? \"1.11.0-4\" : \"1.11.0\", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/\n gcc: process.platform === \"win32\"\n ? \"14.2.0posix-18.1.8-12.0.0-ucrt-r1\"\n : \"\", // use the default version on Ubuntu, Fedora, Arch, macOS, etc.\n // mingw: isArch() ? \"12.2.0-1\" : \"8\", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/\n powershell: \"7.4.5\",\n}\n\nexport const MinVersions: Record = {\n pip: \"22.2.0\",\n python: \"3.7.9\",\n}\n\n/// If an ubuntu versions is not in this map:\n// - the newer ubuntu versions use the first entry (e.g. v20),\n// - the older ones use \"\"\nexport const DefaultUbuntuVersion: Record | undefined> = {\n // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=mingw-w64\n mingw: {\n 24: \"8.0.0-1\",\n 22: \"8.0.0-1\",\n 20: \"7.0.0-2\",\n },\n gcovr: {\n 24: \"6.0\",\n 22: \"6.0\",\n 20: \"6.0\",\n 18: \"5.0\",\n },\n meson: {\n 24: \"1.0.0\",\n 22: \"1.0.0\",\n 20: \"1.0.0\",\n 18: \"0.61.4\",\n },\n nala: {\n 24: \"\",\n 22: \"\",\n 21: \"legacy\",\n 20: \"legacy\",\n 18: \"legacy\",\n 16: \"legacy\",\n 14: \"legacy\",\n },\n kcov: {\n 24: \"42-binary\",\n 22: \"42-binary\",\n 20: \"40-binary\", // https://github.com/SimonKagstrom/kcov/releases\n 18: \"40\",\n 16: \"40\",\n 14: \"40\",\n },\n doxygen: {\n 24: \"1.11.0\",\n 22: \"1.11.0\",\n 20: \"1.10.0\",\n 18: \"1.10.0\",\n },\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUbuntuVersion = void 0;\nconst child_process_1 = require(\"child_process\");\nfunction isSystemError(e) {\n return 'errno' in e;\n}\nfunction command(exe, args) {\n return new Promise((resolve, reject) => {\n child_process_1.execFile(exe, args, { encoding: 'utf8', shell: false }, (error, stdout, stderr) => {\n if (error) {\n if (isSystemError(error) && error.code === 'ENOENT') {\n resolve(null); // When lsb_release is not found\n return;\n }\n reject(new Error(`Could not execute \\`${exe} ${args.join(' ')}\\`: ${error} (stderr=${stderr})`));\n return;\n }\n resolve(stdout);\n });\n });\n}\nasync function getUbuntuVersion() {\n if (process.platform !== 'linux') {\n return [];\n }\n const stdout = await command('lsb_release', ['-a']);\n if (stdout === null) {\n return [];\n }\n const reDistributor = /^Distributor ID:\\s*(.+)$/;\n const reDescription = /^Description:\\s*Ubuntu\\s+(\\d+)\\.(\\d+)(?:\\.(\\d+))?/;\n const reRelease = /^Release:\\s*(\\d+)\\.(\\d+)(?:\\.(\\d+))?$/;\n let description = null;\n let release = null;\n let distributorFound = false;\n for (const line of stdout.split('\\n')) {\n const m = line.match(reDistributor);\n if (m !== null) {\n const distributor = m[1];\n if (distributor !== 'Ubuntu') {\n return [];\n }\n distributorFound = true;\n }\n const desc = line.match(reDescription);\n if (desc) {\n description = desc;\n }\n const rel = line.match(reRelease);\n if (rel) {\n release = rel;\n }\n if (distributorFound && description && release) {\n break;\n }\n }\n if (!distributorFound) {\n return [];\n }\n for (const m of [description, release]) {\n if (m) {\n const ss = [m[1], m[2]];\n if (m[3]) {\n ss.push(m[3]);\n }\n return ss.map(s => parseInt(s, 10));\n }\n }\n return [];\n}\nexports.getUbuntuVersion = getUbuntuVersion;\n//# sourceMappingURL=index.js.map","import os from 'node:os';\n\nconst nameMap = new Map([\n\t[24, ['Sequoia', '15']],\n\t[23, ['Sonoma', '14']],\n\t[22, ['Ventura', '13']],\n\t[21, ['Monterey', '12']],\n\t[20, ['Big Sur', '11']],\n\t[19, ['Catalina', '10.15']],\n\t[18, ['Mojave', '10.14']],\n\t[17, ['High Sierra', '10.13']],\n\t[16, ['Sierra', '10.12']],\n\t[15, ['El Capitan', '10.11']],\n\t[14, ['Yosemite', '10.10']],\n\t[13, ['Mavericks', '10.9']],\n\t[12, ['Mountain Lion', '10.8']],\n\t[11, ['Lion', '10.7']],\n\t[10, ['Snow Leopard', '10.6']],\n\t[9, ['Leopard', '10.5']],\n\t[8, ['Tiger', '10.4']],\n\t[7, ['Panther', '10.3']],\n\t[6, ['Jaguar', '10.2']],\n\t[5, ['Puma', '10.1']],\n]);\n\nexport default function macosRelease(release) {\n\trelease = Number((release || os.release()).split('.')[0]);\n\n\tconst [name, version] = nameMap.get(release) || ['Unknown', ''];\n\n\treturn {\n\t\tname,\n\t\tversion,\n\t};\n}\n","import macosRelease from \"macos-release\"\nimport memoize from \"memoizee\"\n\n/**\n * Get macOS version\n *\n * @returns {number[]} - The macOS version as an array of numbers\n */\nfunction macosVersion_() {\n if (process.platform !== \"darwin\") {\n return []\n }\n\n const { version } = macosRelease()\n return version.split(\".\").map((v) => Number.parseInt(v, 10))\n}\nexport const macosVersion = memoize(macosVersion_)\n","import { tmpdir } from \"os\"\nimport { dirname, join } from \"path\"\nimport { execRootSync } from \"admina\"\nimport { error, info } from \"ci-log\"\nimport { readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { hasNala, installAptPack, qualifiedNeededAptPackage } from \"setup-apt\"\nimport which from \"which\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\n\nlet binDir: string | undefined\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupNala(version: string, _setupDir: string, _arch: string) {\n if (!isUbuntu()) {\n return undefined\n }\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"nala\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n await installAptPack([{ name: \"python3-apt\" }])\n\n binDir = \"/usr/bin\" // eslint-disable-line require-atomic-updates\n\n // If nala is available in the default repositories, install it\n try {\n const nalaPack = await qualifiedNeededAptPackage({ name: \"nala\", version })\n if (nalaPack !== undefined) {\n await installAptPack([{ name: nalaPack }])\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala: ${err}`)\n }\n\n // Nala is not available in the default repositories\n // Check if the legacy version is available\n try {\n const nalaLegacyPack = await qualifiedNeededAptPackage({ name: \"nala-legacy\" })\n if (nalaLegacyPack !== undefined) {\n await installAptPack([{ name: nalaLegacyPack }], true)\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala-legacy: ${err}`)\n }\n\n // Install via the installer script\n await setupNalaViaInstaller()\n\n return { binDir }\n}\n\nasync function setupNalaViaInstaller() {\n const installer = new DownloaderHelper(\n \"https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh\",\n tmpdir(),\n { fileName: \"install-nala.sh\" },\n )\n installer.on(\"error\", (err) => {\n throw new Error(`Failed to download install-nala.sh: ${err}`)\n })\n await installer.start()\n\n const installerPath = join(tmpdir(), \"install-nala.sh\")\n\n // Patch the installer script to not use sudo explicitly\n const script = await readFile(installerPath, \"utf8\")\n await writeFile(installerPath, script.replace(/sudo/g, \"\"))\n\n await installAptPack([{ name: \"wget\" }])\n\n try {\n execRootSync(\"bash\", [installerPath])\n } catch (err) {\n error(`Failed to install nala via installer: ${err}`)\n execRootSync(\"apt\", [\"install\", \"-y\", \"-t\", \"nala\", \"nala\"])\n }\n}\n\nexport function bashWithNala(script: string) {\n if (hasNala()) {\n return `apt-get() { nala $@; }; export -f apt-get; ${script}; unset -f apt-get`\n }\n return script\n}\n","import { dirname, join } from \"path\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport { addShExt, addShRelativePrefix } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\nlet hasVCPKG = false\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupVcpkg(version: string, setupDir: string, _arch: string): Promise {\n if (!hasVCPKG || which.sync(\"vcpkg\", { nothrow: true }) === null) {\n if (process.platform === \"linux\") {\n // vcpkg download and extraction dependencies\n if (isArch()) {\n await Promise.all([\n setupPacmanPack(\"curl\"),\n setupPacmanPack(\"zip\"),\n setupPacmanPack(\"unzip\"),\n setupPacmanPack(\"tar\"),\n setupPacmanPack(\"git\"),\n setupPacmanPack(\"pkg-config\"),\n ])\n } else if (hasDnf()) {\n await setupDnfPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n } else if (isUbuntu()) {\n await installAptPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n }\n }\n\n // clone if not already exists\n if (!(await pathExists(join(setupDir, addShExt(\"bootstrap-vcpkg\", \".bat\"))))) {\n execaSync(\"git\", [\"clone\", \"https://github.com/microsoft/vcpkg\"], { cwd: dirname(setupDir), stdio: \"inherit\" })\n } else {\n notice(`Vcpkg folder already exists at ${setupDir}. Skipping the clone`)\n }\n\n // if version specified, checkout the version\n if (version !== \"\" && version !== \"true\") {\n info(`Checking out vcpkg version ${version}`)\n execaSync(\"git\", [\"checkout\", version], {\n cwd: setupDir,\n stdio: \"inherit\",\n })\n }\n\n // bootstrap vcpkg\n execaSync(addShExt(addShRelativePrefix(\"bootstrap-vcpkg\"), \".bat\"), {\n cwd: setupDir,\n shell: true,\n stdio: \"inherit\",\n })\n\n await grantUserWriteAccess(setupDir)\n\n await addPath(setupDir, rcOptions)\n // eslint-disable-next-line require-atomic-updates\n hasVCPKG = true\n return { binDir: setupDir }\n }\n\n return { binDir: dirname(which.sync(\"vcpkg\")) }\n}\n","import { setupBrew } from \"setup-brew\"\nimport { setupBazel } from \"./bazel/bazel.js\"\nimport { setupCcache } from \"./ccache/ccache.js\"\nimport { setupChocolatey } from \"./chocolatey/chocolatey.js\"\nimport { setupCmake } from \"./cmake/cmake.js\"\nimport { setupCmakelang } from \"./cmakelang/cmakelang.js\"\nimport { setupConan } from \"./conan/conan.js\"\nimport { setupCppcheck } from \"./cppcheck/cppcheck.js\"\nimport { setupCpplint } from \"./cpplint/cpplint.js\"\nimport { setupDoxygen } from \"./doxygen/doxygen.js\"\nimport { setupFlawfinder } from \"./flawfinder/flawfinder.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { setupGcovr } from \"./gcovr/gcovr.js\"\nimport { setupGraphviz } from \"./graphviz/graphviz.js\"\nimport { setupInfer } from \"./infer/infer.js\"\nimport { setupKcov } from \"./kcov/kcov.js\"\nimport { setupLizard } from \"./lizard/lizard.js\"\nimport { setupAppleClang } from \"./llvm/apple-clang.js\"\nimport { setupClangFormat, setupClangTools, setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMake } from \"./make/make.js\"\nimport { setupMeson } from \"./meson/meson.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { setupNala } from \"./nala/nala.js\"\nimport { setupNinja } from \"./ninja/ninja.js\"\nimport { setupOpencppcoverage } from \"./opencppcoverage/opencppcoverage.js\"\nimport { setupPowershell } from \"./powershell/powershell.js\"\nimport { setupPython } from \"./python/python.js\"\nimport { setupSccache } from \"./sccache/sccache.js\"\nimport { setupSevenZip } from \"./sevenzip/sevenzip.js\"\nimport { setupTask } from \"./task/task.js\"\nimport { setupVcpkg } from \"./vcpkg/vcpkg.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\n\nexport const llvmSetups = { llvm: setupLLVM, clang: setupLLVM, \"clang++\": setupLLVM } as const\nexport const gccSetups = { gcc: setupGcc, \"g++\": setupGcc } as const\nexport const mingwSetups = { mingw: setupMingw } as const\nexport const msvcSetups = {\n msvc: setupMSVC,\n cl: setupMSVC,\n msbuild: setupMSVC,\n visualstudio: setupMSVC,\n} as const\nexport const appleClangSetups = {\n appleclang: setupAppleClang,\n applellvm: setupAppleClang,\n \"apple-clang\": setupAppleClang,\n \"apple-llvm\": setupAppleClang,\n} as const\n\nconst cmakeLangSetups = {\n cmakelang: setupCmakelang,\n \"cmake-lint\": setupCmakelang,\n \"cmake-format\": setupCmakelang,\n cmakelint: setupCmakelang,\n cmakeformat: setupCmakelang,\n} as const\n\nexport const llvmTools = [\"llvm\", \"clang\", \"clang++\", \"clang-tidy\", \"clang-format\", \"clangtidy\", \"clangformat\"]\n\n/** The setup functions */\nexport const setups = {\n nala: setupNala,\n brew: setupBrew,\n choco: setupChocolatey,\n python: setupPython,\n powershell: setupPowershell,\n pwsh: setupPowershell,\n ...llvmSetups,\n ...gccSetups,\n ...mingwSetups,\n ...msvcSetups,\n ...appleClangSetups,\n ...cmakeLangSetups,\n cmake: setupCmake,\n ninja: setupNinja,\n vcpkg: setupVcpkg,\n bazel: setupBazel,\n conan: setupConan,\n meson: setupMeson,\n gcovr: setupGcovr,\n opencppcoverage: setupOpencppcoverage,\n OpenCppCoverage: setupOpencppcoverage,\n ccache: setupCcache,\n sccache: setupSccache,\n doxygen: setupDoxygen,\n graphviz: setupGraphviz,\n cppcheck: setupCppcheck,\n cpplint: setupCpplint,\n flawfinder: setupFlawfinder,\n lizard: setupLizard,\n infer: setupInfer,\n \"clang-tidy\": setupClangTools,\n clangtidy: setupClangTools,\n \"clang-format\": setupClangFormat,\n clangformat: setupClangFormat,\n vcvarsall: setupVCVarsall,\n kcov: setupKcov,\n make: setupMake,\n task: setupTask,\n sevenzip: setupSevenZip,\n \"7zip\": setupSevenZip,\n \"7z\": setupSevenZip,\n} as const\n\nexport type ToolName = keyof typeof setups\n\n/** The tools that can be installed */\nexport const tools = Object.keys(setups) as Array\n\n/** The possible inputs to the program */\nexport type Inputs = keyof typeof setups | \"compiler\" | \"architecture\" | \"timeout\"\n\n/** An array of possible inputs */\nexport const inputs: Array = [\"compiler\", \"architecture\", \"timeout\", ...tools]\n","import { execRootSync } from \"admina\"\nimport { addAptKeyViaURL, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupBazel(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // install bazelisk because it contains both\n return setupChocoPack(\"bazelisk\", version)\n }\n case \"darwin\": {\n // install bazelisk because it contains both\n return installBrewPack(\"bazelisk\", version)\n }\n case \"linux\": {\n if (isArch()) {\n throw new Error(\"installing bazel on Arch linux is not supported yet\")\n } else if (hasDnf()) {\n // https://bazel.build/install/redhat\n await setupDnfPack([{ name: \"dnf-plugins-core\" }])\n execRootSync(\"dnf\", [\"copr\", \"enable\", \"vbatts/bazel\"])\n return setupDnfPack([{ name: \"bazel4\" }])\n } else if (isUbuntu()) {\n // https://bazel.build/install/ubuntu\n const keyFileName = await addAptKeyViaURL({\n fileName: \"bazel-archive-keyring.gpg\",\n keyUrl: \"https://bazel.build/bazel-release.pub.gpg\",\n })\n execRootSync(\"bash\", [\n \"-c\",\n `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://storage.googleapis.com/bazel-apt stable jdk1.8\" | tee /etc/apt/sources.list.d/bazel.list`,\n ])\n return installAptPack([{ name: \"bazel\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupConan(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"conan\", version)\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupMeson(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"meson\", version)\n}\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupCcache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"ccache\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"ccache\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"ccache\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"ccache\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { installBrewPack } from \"setup-brew\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSccache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"sccache\", version)\n }\n case \"linux\":\n case \"darwin\": {\n return installBrewPack(\"sccache\", version)\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupCppcheck(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"cppcheck\", version)\n const binDir = await activateWinCppcheck()\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"cppcheck\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"cppcheck\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"cppcheck\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinCppcheck() {\n const binDir = \"C:/Program Files/Cppcheck\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupCpplint(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"cpplint\", version)\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupFlawfinder(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"flawfinder\", version)\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupLizard(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"lizard\", version)\n}\n","import { join } from \"path\"\nimport { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { getBrewDir, installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMake(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"make\", version)\n }\n case \"darwin\": {\n await installBrewPack(\"make\", version)\n\n const gnuBinDir = join(getBrewDir(), \"opt/make/libexec/gnubin\")\n await addPath(gnuBinDir, rcOptions)\n return { binDir: gnuBinDir }\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"make\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"make\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"make\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","#!/usr/bin/env node\n/* eslint-disable node/shebang */\n\nimport { GITHUB_ACTIONS, isCI } from \"ci-info\"\nimport { error, info, success, warning } from \"ci-log\"\nimport { finalizeRC } from \"envosman\"\nimport numerous from \"numerous\"\nimport numerousLocale from \"numerous/locales/en.js\"\nimport timeDelta from \"time-delta\"\nimport timeDeltaLocale from \"time-delta/locales/en.js\"\nimport { untildifyUser } from \"untildify-user\"\nimport { checkUpdates } from \"./check-updates.js\"\nimport { parseArgs, printHelp, rcOptions } from \"./cli-options.js\"\nimport { getCompilerInfo, installCompiler } from \"./compilers.js\"\nimport { installTool } from \"./installTool.js\"\nimport { type Inputs, llvmTools, tools } from \"./tool.js\"\nimport { isArch } from \"./utils/env/isArch.js\"\nimport { ubuntuVersion } from \"./utils/env/ubuntu_version.js\"\nimport { setupPacmanPack } from \"./utils/setup/setupPacmanPack.js\"\nimport { syncVersions } from \"./versions/versions.js\"\n\n/** The main entry function */\nasync function main(args: string[]): Promise {\n let checkUpdatePromise = Promise.resolve()\n if (!GITHUB_ACTIONS) {\n checkUpdatePromise = checkUpdates()\n process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS = \"true\"\n }\n\n // parse options using mri or github actions\n const opts = parseArgs(args)\n\n // print help\n if (opts.help) {\n printHelp()\n }\n\n // cpu architecture\n const arch = opts.architecture ?? process.arch\n\n // the installation dir for the tools that are downloaded directly\n const setupCppDir = process.env.SETUP_CPP_DIR ?? untildifyUser(\"~\")\n\n // report messages\n const successMessages: string[] = []\n const errorMessages: string[] = []\n\n const timeFormatter = timeDelta.create({ autoloadLocales: true })\n timeDelta.addLocale(timeDeltaLocale as timeDelta.Locale)\n numerous.addLocale(numerousLocale as numerous.Locale)\n let time1: number\n let time2: number\n\n // installing the specified tools\n\n const osVersion = await ubuntuVersion()\n\n const compilerInfo = opts.compiler !== undefined ? getCompilerInfo(opts.compiler) : undefined\n\n // sync the version for the llvm tools\n if (!syncVersions(opts, [...llvmTools, \"compiler\"] as Inputs[], compilerInfo)) {\n error(\"The same version must be used for llvm, clang-format and clang-tidy\")\n return 1\n }\n\n if (isArch() && typeof opts.cppcheck === \"string\" && typeof opts.gcovr === \"string\") {\n info(\"installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux\")\n await setupPacmanPack(\"python-pygments\")\n }\n\n // loop over the tools and run their setup function\n\n let failedFast = false\n for (const tool of tools) {\n // fail fast inside CI when any tool fails\n if (isCI && errorMessages.length !== 0) {\n failedFast = true\n break\n }\n\n // get the version or \"true\" or undefined for this tool from the options\n const version = opts[tool]\n\n // skip if undefined\n if (version !== undefined) {\n // running the setup function for this tool\n time1 = Date.now()\n // eslint-disable-next-line no-await-in-loop\n await installTool(\n tool,\n version,\n osVersion,\n arch,\n setupCppDir,\n successMessages,\n errorMessages,\n Number.parseFloat(opts.timeout ?? \"20\") * 60 * 1000,\n )\n time2 = Date.now()\n info(`took ${timeFormatter.format(time1, time2) || \"0 seconds\"}`)\n }\n }\n\n if (!failedFast && compilerInfo !== undefined) {\n // install the specified compiler\n const time1Compiler = Date.now()\n await installCompiler(\n compilerInfo.compiler,\n compilerInfo.version,\n osVersion,\n setupCppDir,\n arch,\n successMessages,\n errorMessages,\n )\n const time2Compiler = Date.now()\n info(`took ${timeFormatter.format(time1Compiler, time2Compiler) || \"0 seconds\"}`)\n }\n\n await finalizeRC(rcOptions)\n\n if (successMessages.length === 0 && errorMessages.length === 0) {\n warning(\"setup-cpp was called without any arguments. Nothing to do.\")\n return 0\n }\n\n // report the messages in the end\n for (const tool of successMessages) {\n success(tool)\n }\n for (const tool of errorMessages) {\n error(tool)\n }\n\n info(\"setup-cpp finished\")\n\n if (!GITHUB_ACTIONS) {\n switch (process.platform) {\n case \"win32\": {\n warning(\"Run `RefreshEnv.cmd` or restart your shell to update the environment.\")\n break\n }\n case \"linux\":\n case \"darwin\": {\n warning(\"Run `source ~/.cpprc` or restart your shell to update the environment.\")\n break\n }\n default: {\n // nothing\n }\n }\n }\n\n await checkUpdatePromise\n\n return errorMessages.length === 0 ? 0 : 1 // exit with non-zero if any error message\n}\n\n// Run main\nmain(process.argv)\n .then((ret) => {\n process.exitCode = ret\n })\n .catch((err) => {\n error(\"main() panicked!\")\n error(err as string | Error)\n process.exitCode = 1\n })\n","import { warning } from \"ci-log\"\nimport updateNotifier from \"simple-update-notifier\"\nimport packageJson from \"../package-version.json\"\n\n// auto self update notifier\nexport async function checkUpdates() {\n try {\n await updateNotifier({ pkg: packageJson })\n } catch (err) {\n warning(`Failed to check for updates: ${err instanceof Error ? err.message + err.stack : err}`)\n }\n}\n","import { join } from \"path\"\nimport { endGroup, startGroup } from \"@actions/core\"\nimport { error, info } from \"ci-log\"\nimport semverValid from \"semver/functions/valid\"\nimport { getSuccessMessage } from \"./cli-options.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { activateGcovGCC, activateGcovLLVM } from \"./gcovr/gcovr.js\"\nimport { setupAppleClang } from \"./llvm/apple-clang.js\"\nimport { setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { appleClangSetups, gccSetups, llvmSetups, mingwSetups, msvcSetups } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\nexport type CompilerInfo = {\n compiler: string\n version: string | undefined\n}\n\n/**\n * Detecting the compiler version. Divide the given string by `-` and use the second element as the version\n *\n * @param compilerAndVersion - The compiler and version string\n * @returns The compiler and version\n *\n * @nothrow It doesn't throw any error, but it logs the error if it fails to parse the compiler info\n */\nexport function getCompilerInfo(compilerAndVersion: string): CompilerInfo {\n try {\n const compilerAndMaybeVersion = compilerAndVersion.split(\"-\")\n const compiler = compilerAndMaybeVersion[0]\n if (1 in compilerAndMaybeVersion) {\n const maybeVersion = compilerAndMaybeVersion[1]\n if (semverValid(maybeVersion) === null) {\n info(`Invalid semver version ${maybeVersion} used for the compiler.`)\n }\n return { compiler, version: maybeVersion }\n }\n return { compiler, version: undefined }\n } catch (err) {\n error(`Failed to parse the compiler info ${compilerAndVersion}: ${err}`)\n return { compiler: compilerAndVersion, version: undefined }\n }\n}\n\n/** Installing the specified compiler */\nexport async function installCompiler(\n compiler: string,\n version: string | undefined,\n osVersion: number[] | null,\n setupCppDir: string,\n arch: string,\n successMessages: string[],\n errorMessages: string[],\n) {\n let installationInfo: InstallationInfo | undefined | void | null // null means the compiler is not supported\n try {\n // install the compiler. We allow some aliases for the compiler name\n startGroup(`Installing ${compiler} ${version ?? \"\"}`)\n if (compiler in llvmSetups) {\n installationInfo = await setupLLVM(\n getVersion(\"llvm\", version, osVersion),\n join(setupCppDir, \"llvm\"),\n arch,\n )\n await activateGcovLLVM()\n } else if (compiler in gccSetups) {\n const gccVersion = getVersion(\"gcc\", version, osVersion)\n installationInfo = await setupGcc(gccVersion, join(setupCppDir, \"gcc\"), arch)\n await activateGcovGCC(gccVersion)\n } else if (compiler in mingwSetups) {\n const gccVersion = getVersion(\"mingw\", version, osVersion)\n installationInfo = await setupMingw(gccVersion, join(setupCppDir, \"gcc\"), arch)\n await activateGcovGCC(gccVersion)\n } else if (compiler in msvcSetups) {\n installationInfo = await setupMSVC(\n getVersion(\"msvc\", version, osVersion),\n join(setupCppDir, \"msvc\"),\n arch,\n )\n } else if (compiler in appleClangSetups) {\n await setupAppleClang()\n } else {\n installationInfo = null\n errorMessages.push(`Unsupported compiler ${compiler}`)\n }\n } catch (err) {\n error(err as string | Error)\n errorMessages.push(`Failed to install the ${compiler} ${version}`)\n }\n\n if (installationInfo !== null) {\n successMessages.push(getSuccessMessage(compiler, installationInfo))\n }\n\n endGroup()\n}\n"],"names":["issueCommand","command","properties","message","cmd","Command","process","stdout","write","os","EOL","rng","poolPtr","rnds8Pool","length","crypto","randomFillSync","slice","validate","uuid","REGEX","test","stringify","arr","offset","byteToHex","toLowerCase","TypeError","parse","v","Uint8Array","parseInt","v35","name","version","hashfunc","generateUUID","value","namespace","buf","str","unescape","encodeURIComponent","bytes","i","push","charCodeAt","stringToBytes","set","err","DNS","URL","getProxyUrl","reqUrl","usingSsl","protocol","hostname","host","hostLower","startsWith","isLoopbackAddress","noProxy","env","reqPort","port","Number","upperReqHosts","toUpperCase","upperNoProxyItem","split","map","x","trim","filter","some","endsWith","checkBypass","proxyVar","DecodedURL","TunnelingAgent","options","self","this","proxyOptions","proxy","maxSockets","http","Agent","defaultMaxSockets","requests","sockets","on","socket","localAddress","toOptions","len","pending","splice","request","onSocket","destroy","removeSocket","createSecureSocket","cb","prototype","createSocket","call","hostHeader","getHeader","tlsOptions","mergeOptions","servername","replace","secureSocket","tls","connect","indexOf","target","arguments","overrides","keys","Object","j","keyLen","k","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply","defineProperty","exports","summary","markdownSummary","SUMMARY_DOCS_URL","SUMMARY_ENV_VAR","os_1","require$$0","fs_1","require$$1","access","appendFile","writeFile","promises","_summary","constructor","_buffer","filePath","_filePath","pathFromEnv","Error","constants","R_OK","W_OK","_a","wrap","tag","content","attrs","htmlAttrs","entries","key","join","overwrite","writeFunc","encoding","emptyBuffer","clear","isEmptyBuffer","addRaw","text","addEOL","addCodeBlock","code","lang","assign","element","addList","items","ordered","listItems","item","addTable","rows","tableBody","row","cells","cell","header","data","colspan","rowspan","addDetails","label","addImage","src","alt","width","height","addHeading","level","includes","addSeparator","addBreak","addQuote","cite","addLink","href","getInput","val","required","trimWhitespace","error","command_1","utils_1","toCommandProperties","startGroup","issue","endGroup","__createBinding","create","o","m","k2","enumerable","get","__setModuleDefault","__importStar","mod","__esModule","hasOwnProperty","getIDToken","getState","group","info","notice","warning","debug","isDebug","setCommandEcho","setOutput","getBooleanInput","getMultilineInput","addPath","exportVariable","ExitCode","file_command_1","require$$2","require$$3","path","require$$4","oidc_utils_1","oidcUtils","OidcClient","http_client_1","auth_1","core_1","createHttpClient","allowRetry","maxRetry","requestOptions","allowRetries","maxRetries","HttpClient","BearerCredentialHandler","getRequestToken","token","getIDTokenUrl","runtimeUrl","getCall","id_token_url","httpclient","res","getJson","catch","statusCode","id_token","audience","setSecret","require$$5","convertedVal","toCommandValue","issueFileCommand","prepareKeyValueMessage","secret","inputPath","delimiter","inputs","input","enabled","setFailed","exitCode","Failure","fn","saveState","aud","summary_1","require$$6","summary_2","path_utils_1","pathUtils","toPlatformPath","toWin32Path","toPosixPath","pth","sep","require$$7","GITHUB_ACTIONS","core.error","console","log","msg","core.warning","core.notice","core.info","isPlainObject","getPrototypeOf","Symbol","toStringTag","iterator","isexe","er","is","core","ignoreErrors","resolveCommandAttempt","parsed","withoutPathExt","cwd","hasCustomCwd","shouldSwitchCwd","chdir","disabled","resolved","which","sync","getPathKey","pathExt","notFoundError","original","syscall","errno","spawnargs","args","verifyENOENT","status","isWin","file","spawn","spawned","cp","enoent","hookChildProcess","pathKey","platform","reverse","find","toPath","urlOrPath","fileURLToPath","stripFinalNewline","stripFinalNewlineString","ArrayBuffer","isView","BYTES_PER_ELEMENT","stripFinalNewlineBinary","isStream","stream","checkOpen","writable","readable","pipe","isWritableStream","end","writableObjectMode","destroyed","isReadableStream","read","readableObjectMode","isDuplexStream","n","r","return","h","preventCancel","getReader","t","c","s","u","prettyMilliseconds","milliseconds","isBigInt","isFinite","sign","colonNotation","compact","formatSubMilliseconds","separateMilliseconds","verbose","unitCount","secondsDecimalDigits","millisecondsDecimalDigits","add","long","short","valueString","isZero","String","wholeDigits","repeat","Math","max","word","count","days","trunc","hours","minutes","seconds","microseconds","toZeroIfInfinity","nanoseconds","parseNumber","parseBigint","parseMilliseconds","BigInt","millisecondsAndBelow","roundedMilliseconds","ceil","round","millisecondsString","toFixed","parseFloat","secondsFixed","floor","decimalDigits","secondsString","keepDecimalsOnWholeSeconds","separator","mergeStreams","streams","Array","isArray","validateStream","objectMode","highWaterMark","getHighWaterMark","passThroughStream","MergedStream","writableHighWaterMark","readableHighWaterMark","execPowershell","startupFlags","execOptions","stdio","execa.execa","powershell","maybePwsh","nothrow","maybePowerShell","getPowerShell","configurable","getuid","CI","b","a","l","y","S","f","R","async","p","SUDO_USER","w","statSync","isDirectory","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","mixin$1","source","sourceObject","forEach","symbol","globalThis_1","isImplemented","globalThis","naiveFallback","window","implementation","__global__","isSymbol","validateSymbol","es6Symbol","global","validTypes","object","toPrimitive","SymbolPolyfill","HiddenSymbol","isNativeSafe","d","NativeSymbol","generateName","objPrototype","created","desc","ie11BugWorkaround","postfix","gs","setupStandardSymbols","standardSymbols","defineProperties","hasInstance","isConcatSpreadable","match","search","species","unscopables","setupSymbolRegistry","registry","symbolRegistry","for","keyFor","ignore","description","polyfill","__description__","__name__","toString","valueOf","from","iteratorSymbol","isArguments","objToString","id","isFunction","isFunctionStringTag","RegExp","bind","toPosInt","callable","validValue","isValue","isString","Function","shim","arrayLike","Context","getIterator","mapFn","numberIsNaN","isNan","isNaN","NaN","objHasOwnProperty","abs","eIndexOf","searchElement","fromIndex","obj","targetObj","index","ensureCallable","byObserver","Observer","queue","currentQueue","node","document","createTextNode","callback","concat","shift","observe","characterData","nextTick","queueMicrotask","MutationObserver","WebKitMutationObserver","setImmediate","setTimeout","isCallable","isPromise","isPromiseModule","default","objectMap","primitiveSet","arg","ensureString","ensureValue","stringifiable","validateStringifiable","validateStringifiableValue","toShortString","safeToString","toShortStringRepresentation","string","char","JSON","supportedModes","registeredExtensions","promise","mode","conf","waiting","cache","isFailed","emit","onSuccess","onFailure","delete","resolvedMode","nextTickFailure","finally","context","oldCache","pathExists","fsPromises","untildifyUser","maybeHomeDir","isSudo","homedir","userHomeDir","tildeRegex","addRCHeader","rcHeader","guard","rcPath","readFile","addSourceToTargetRc","sourceRcString","targetRcPath","addEnv","valGiven","givenOptions","escapeSpace","defaultRcPath","shouldEscapeSpace","spaceEscaped","escapeQuote","escapeString","addEnvSystem","sourceRCInRc","ignoredPaths","checkedPath","PATH","isIgnoredPath","ghAddPath","addPathSystem","addLocale","localeData","locales","pluralize","unit","config","unitTypeData","locale","lookupOrder","unitTypeLookupOrder","unshift","unitType","Set","getLocaleDataForUnitType","numerous","SPACE_CHARACTERS","Range","range","parseOptions","loose","includePrerelease","raw","Comparator","formatted","parseRange","first","isNullSet","isAny","comps","format","memoKey","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","cached","re","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","comparatorTrimReplace","TILDETRIM","tildeTrimReplace","CARETTRIM","caretTrimReplace","rangeList","comp","parseComparator","replaceGTE0","COMPARATORLOOSE","rangeMap","Map","comparators","size","has","values","intersects","thisComparators","isSatisfiable","rangeComparators","every","thisComparator","rangeComparator","SemVer","testSet","safeRe","remainingComparators","testComparator","pop","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","replaceTilde","TILDELOOSE","TILDE","_","M","pr","ret","replaceCaret","z","CARETLOOSE","CARET","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xm","xp","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","fb","to","tM","tm","tp","tpr","prerelease","semver","ANY","allowed","major","minor","patch","operator","COMPARATOR","cmp","__generator","body","verb","op","g","ops","trys","sent","throw","toArr","any","toVal","out","opts","old","nxt","boolean","addUpdateAlternativesToRc","rcOptions","priority","execRoot","updateAptAlternatives","sourceRC","getAptEnv","apt","DEBIAN_FRONTEND","LANG","LC_ALL","hasNala","getApt","escapeStringRegexp","isAptPackInstalled","pack","execa","line","filterAndQualifyAptPackages","packages","all","qualifiedNeededAptPackage","qualified","aptPackageType","AptPackageType","NameDashVersion","NameEqualsVersion","Name","getAptArg","escapeRegex","showStdout","updatedRepos","None","updateAptReposMemoized","installAptPack","update","allRepositories","flatMap","repository","repo","initAptMemoized","execRootSync","aptTimeout","defaultExecOptions","installAddAptRepo","addAptRepository","addRepositories","needToInstall","binDir","addAptKeyViaURL","keyServer","defaultKeyServer","fileName","keyStorePath","assertGpgFileName","addAptKeyViaServer","addAptKeys","stderr","isExecaError","retryErrors","stack","keyUrl","defaultKeyStorePath","dlPath","tmpdir","dl","DownloaderHelper","start","initGpg","s$1","setupBrew","maybeBinDir","dirname","execaSync","getDownloadPath","NONINTERACTIVE","getBrewBinDir","getBrewDir","arch","installBrewPack","cask","hasBrew","brewPath","hasDnf","hasDnfCache","isArch","isArchCache","isUbuntu","isUbuntuCache","setupChocolatey","_version","_setupDir","_arch","SystemRoot","chocoPath","ALLUSERSPROFILE","maybeChoco","ChocolateyInstall","setupChocoPack","hasChoco","TMP","TEMP","Path","extendEnv","setupDnfPack","getDnfArg","setupPacmanPack","aur","pacman","yayBuildDir","isRoot","createdBuilderUser","didUpdate","didInit","runInstall","availableVersions","matchAll","pacmanSiVersionRegex","availablePacmanVersions","E","N","rmRF","ioUtil","IS_WINDOWS","rm","force","recursive","retryDelay","mkdirP","fsPath","assert_1$1","ok","mkdir","findInPath","tool","extensions","extension","isRooted","tryGetExecutablePath","directories","matches","directory","cpDirRecursive","sourceDir","destDir","currentDepth","files","readdir","srcFile","destFile","lstat","copyFile","chmod","stat","isSymbolicLink","unlink","symlinkFull","readlink","symlink","exists","exec","commandLine","commandArgs","tr","argStringToArray","toolPath","ToolRunner","findAllVersions","toolName","versions","_getCacheDirectory","fs","existsSync","children","readdirSync","child","isExplicitVersion","fullPath","_createExtractFolder","dest","_getTempDirectory","v4_1","io","_createToolPath","folderPath","clean","core$1","markerPath","_completeToolPath","fs$1","writeFileSync","versionSpec","valid","evaluateVersions","sort","gt","potential","satisfies","cacheDirectory","assert_1","tempDirectory","_getGlobal","defaultValue","retryAsPromised","optionsInput","$current","timeout","backoffBase","backoffExponent","report","Date","toLocaleTimeString","backoffTimeout","lastError","clearTimeout","TimeoutError","current","shouldRetry","pow","setupSevenZip","getArchiveType","ext","extract7Zip","sevenZip","getSevenZip","grantUserWriteAccess","extractExe","extractZip","extractTarByExe","stripComponents","flags","archiveType","installTarDependencies","setupBin","getPackageInfo","setupDir","RUNNER_TEMP","RUNNER_TOOL_CACHE","url","binRelativeDir","binFileName","extractedFolderName","extractFunction","dir","installDir","binFile","givenExtractFunction","downloaded","retry","downloadedFilePath","now","basename","downloadTool","tryDownload","getExtractFunction","downloadExtractInstall","maybeGetInput","CACHE_TOOLS","cacheDir","cacheInstallation","getCmakePackageInfo","semVersion","semverCoerce","isOld","semverLte","osArchStr","x86_64","x86","arm64","folderName","addExeExt","setupCmake","isBinUptoDate","givenFile","targetVersion","versionRegex","defaultVersionRegex","givenVersion","execout","getExecOutput","version_output","getBinVersion","semverCompare","quoteIfHasSpace","quoteChar","setupPython","installInfo","foundPython","findPython","bin","setupActionsPython","import","brewPythonPrefix","brewPythonBin","setupPythonSystem","findOrSetupPython","require$$0$4","foundPip","maybePip","findPip","ensurePipUpgrade","setupPipPackSystem","setupPip","findOrSetupPip","hasPipx","setupPipPackWithPython","upgrade","usePipx","setupVenv","setupPipx","isLibrary","setupWheel","pythonBin","isPythonUpToDate","rootDir","pathParse","root","pythonDirs","pythonDir","candidate","pythonBinPath","MinVersions","pythonBinPaths","pipCandidate","isPipUptoDate","pip","pipPaths","pipPath","err1","err2","getVersion","osVersion","isVersionDefault","DefaultUbuntuVersion","toolLinuxVersions","osVersionMaj","satisfyingVersion","getDefaultLinuxVersion","DefaultVersions","detectUsingOsVersion","versionMatch","setupPipPack","ubuntuVersion","getPython","givenPython","user","isPipx","nameOnly","installed","python","pipxOut","venvs","venv","metadata","main_package","package_or_url","package","pipxPackageInstalled","pipPackageIsInstalled","finishPipxPackageInstall","finishPipPackageInstall","hasPackage","pipHasPackage","nameAndVersion","upgradeFlag","userFlag","PIPX_HOME","getPipxHome","PIPX_BIN_DIR","getPipxBinDir","pythonBaseExecPrefix","addPythonBaseExecPrefix","dirs","dirIndex","findIndex","exist","whichDir","findBinDir","addPythonPrefix","setupCmakelang","setupGraphviz","activateGraphviz","setupDmg","ArchiveHdi","dmg","entry","extract","getDoxygenPackageInfo","setupMacOSSDK","xcrun","sdkroot","loadAssetList","matchAsset","assets","origTags","versionMap","filterMapTag","origTag","mappedTag","candidateTags","candidateTag","assetNames","filterName","matchAssetName","keywords","optionalKeywords","candidates","keyword","candidateScores","score","maxScore","getGccPackageInfo","asset","x64","ia32","setupGcc","installationInfo","setupChocoMingw","gccExe","exe1","exe2","tag1","tag2","v1","v2","compare","localeCompare","compareVersion","versionStdout","getGccCmdVersion","majorVersion","semverMajor","matcherPath","addGccLoggingMatcher","activateGcc","setupMingw","activateGcovGCC","gccVersion","gccSemver","semverValid","gccMajor","getInferPackageInfo","getAssetKeywords","ghAsset","getNinjaPackageInfo","ninjaPlatform","getNinjaPlatformArch","setupNinja","getDownloadKcovPackageInfo","getBuildKcovPackageInfo","buildKcov","cmake","getCmake","buildDir","setupAppleClang","vsversion_to_versionnumber","vsversion","VsYearVersion","vsversion_to_year","year","ver","findVcvarsall","vsversion_number","version_pattern","upper_bound","pattern","child_process","execSync","installationPath","findWithVswhere","years","YEARS","prog_files","PROGRAM_FILES","ed","EDITIONS","PROGRAM_FILES_X86","isPathVariable","setupVCVarsall","VCTargetsPath","toolset","sdk","uwp","spectre","setupMSVCDevCmd","getArch","installTool","setupCppDir","successMessages","errorMessages","fallback","customTimers","timer","cancelablePromise","signal","aborted","getAbortedReason","addEventListener","timeoutError","cancel","pTimeout","hasLLVM","llvmTools","setupVersion","setupFunction","setups","getSuccessMessage","installToolImpl","getLLVMPackageInfo","ubuntuVer","ubuntuMin","armv7","powerpc64le","sparc64","websiteAsset","getLLVMAssetURL","setupLLVM","setupLLVMWithoutActivation","ld","LD_LIBRARY_PATH","dyld","DYLD_LIBRARY_PATH","llvmMajor","majorLLVMVersion","actPromises","activateLLVM","setupClangFormat","setupLLVMOnly","LLVMPackages","ClangFormat","setupClangTools","All","installationFolder","installerScript","installerPath","neededPackages","givenScript","target_path","script","NODE_DEBUG","debugScript","nonInteractiveScript","choosePackages","installingPack","regexp","isAptPackRegexInstalled","info$1","removeConflictingPackages","useNalaScript","patchAptLLVMScript","shell","setupLLVMApt","llvmBinaryDeps","coeredVersion","coercedVersion","semverCoerceIfInvalid","addLLVMLoggingMatcher","setupMSVC","versionGiven","vcvarsall_path","addMSVCLoggingMatcher","setupOpencppcoverage","activateOpencppcoverage","getPowerShellPackageInfo","getPowershellUrl","arm","arm32","aarch64","setupPowershell","ubuntuVerSplitted","setupPowershellSystem","getTaskPackageInfo","taskPlatform","getTaskPlatform","taskArch","getTaskArch","checkEnv","vendors","constant","isPR","vendor","isCI","ne","BUILD_ID","BUILD_NUMBER","CI_APP_ID","CI_BUILD_ID","CI_BUILD_NUMBER","CI_NAME","CONTINUOUS_INTEGRATION","RUN_ID","utils","annotationProperties","title","startLine","endLine","col","startColumn","endColumn","__createBinding$6","cmdStr","escapeData","byteToHex$1","substr","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v3","Buffer","createHash","digest","v5","clockseq","seedBytes","random","msecs","nsecs","dt","tl","tmh","rnds","__createBinding$5","fileCommand","uuid_1","fs$4","appendFileSync","v4","convertedValue","_decodedUsername","_decodedPassword","base","super","decodeURIComponent","username","password","https","events","util","tunnel","httpOverHttp","agent","httpsOverHttp","defaultPort","httpOverHttps","httpsOverHttps","inherits","EventEmitter","addRequest","req","onFree","onCloseOrRemove","removeListener","onConnect","head","connectReq","removeAllListeners","placeholder","connectOptions","method","headers","proxyAuth","useChunkedEncodingByDefault","once","cause","pos","HttpCodes","Headers","MediaTypes","HttpRedirectCodes","MovedPermanently","ResourceMoved","SeeOther","TemporaryRedirect","PermanentRedirect","HttpResponseRetryCodes","BadGateway","ServiceUnavailable","GatewayTimeout","RetryableHttpVerbs","HttpClientError","setPrototypeOf","HttpClientResponse","readBody","output","alloc","chunk","readBodyBuffer","chunks","userAgent","handlers","_ignoreSslError","_socketTimeout","_allowRedirects","_allowRedirectDowngrade","_maxRedirects","_allowRetries","_maxRetries","_agent","_proxyAgent","_proxyAgentDispatcher","_keepAlive","_disposed","ignoreSslError","socketTimeout","allowRedirects","allowRedirectDowngrade","maxRedirects","keepAlive","requestUrl","additionalHeaders","del","post","put","sendStream","Accept","_getExistingOrDefaultHeader","ApplicationJson","_processResponse","postJson","ContentType","putJson","patchJson","parsedUrl","_prepareRequest","maxTries","response","numTries","requestRaw","Unauthorized","authenticationHandler","handler","canHandleAuthentication","handleAuthentication","redirectsRemaining","redirectUrl","parsedRedirectUrl","_performExponentialBackoff","dispose","requestRawWithCallback","onResult","handleResult","callbackCalled","byteLength","httpModule","sock","getAgent","serverUrl","_getAgent","getAgentDispatcher","proxyUrl","pm.getProxyUrl","_getProxyAgentDispatcher","pathname","_mergeHeaders","prepareRequest","lowercaseKeys","_default","clientHeader","useProxy","globalAgent","agentOptions","tunnelAgent","overHttps","tunnel.httpsOverHttps","tunnel.httpsOverHttp","tunnel.httpOverHttps","tunnel.httpOverHttp","rejectUnauthorized","proxyAgent","uri","pipelining","requestTls","retryNumber","ms","min","contents","NotFound","deserializeDates","reduce","auth","PersonalAccessTokenCredentialHandler","BasicCredentialHandler","safeNormalizeFileUrl","fileString","normalizeFileUrl","normalizeParameters","rawFile","rawArguments","rawOptions","commandArguments","commandArgument","normalizedArguments","nullByteArgument","normalizedArgument","objectToString","isUint8Array","bufferToUint8Array","buffer","byteOffset","textEncoder","TextEncoder","stringToUint8Array","encode","textDecoder","TextDecoder","uint8ArrayToString","uint8Array","decode","joinToUint8Array","uint8ArraysOrStrings","concatUint8Arrays","stringsToUint8Arrays","uint8ArrayOrString","uint8Arrays","getJoinLength","joinLength","parseTemplate","templates","expressions","tokens","template","nextTokens","leadingWhitespaces","trailingWhitespaces","splitByWhitespaces","newTokens","concatTokens","expression","expressionTokens","parseExpression","rawTemplate","templateStart","DELIMITERS","templateIndex","rawIndex","rawCharacter","nextRawCharacter","ESCAPE_LENGTH","isSeparated","at","typeOfExpression","getSubprocessResult","ChildProcess","isStandardStream","STANDARD_STREAMS","stdin","STANDARD_STREAMS_ALIASES","getStreamName","fdNumber","normalizeFdSpecificOption","optionName","optionBaseArray","getStdioLength","optionArray","normalizeFdSpecificValue","addDefaultValue","optionValue","normalizeOptionObject","fill","fdName","compareFdName","parseFdName","fdNameA","fdNameB","getFdNameOrder","parseFd","regexpResult","FD_REGEXP","DEFAULT_OPTIONS","lines","maxBuffer","debuglog","FD_SPECIFIC_OPTIONS","getFdSpecificValue","isVerbose","getFdVerbose","isFullVerbose","getFdGenericVerbose","isVerboseFunction","fdVerbose","VERBOSE_VALUES","findLast","escapeLines","stripVTControlCharacters","escapeControlCharacters","replaceAll","SPECIAL_CHAR_REGEXP","character","escapeControlCharacter","commonEscape","COMMON_ESCAPES","codepoint","codePointAt","codepointHex","ASTRAL_START","padStart","getSpecialCharRegExp","NO_ESCAPE_REGEXP","common","circleQuestionMark","questionMarkPrefix","square","squareDarkShade","squareMediumShade","squareLightShade","squareTop","squareBottom","squareLeft","squareRight","squareCenter","bullet","dot","ellipsis","pointerSmall","triangleUp","triangleUpSmall","triangleDown","triangleDownSmall","triangleLeftSmall","triangleRightSmall","home","heart","musicNote","musicNoteBeamed","arrowUp","arrowDown","arrowLeft","arrowRight","arrowLeftRight","arrowUpDown","almostEqual","notEqual","lessOrEqual","greaterOrEqual","identical","infinity","subscriptZero","subscriptOne","subscriptTwo","subscriptThree","subscriptFour","subscriptFive","subscriptSix","subscriptSeven","subscriptEight","subscriptNine","oneHalf","oneThird","oneQuarter","oneFifth","oneSixth","oneEighth","twoThirds","twoFifths","threeQuarters","threeFifths","threeEighths","fourFifths","fiveSixths","fiveEighths","sevenEighths","lineBold","lineDouble","lineDashed0","lineDashed1","lineDashed2","lineDashed3","lineDashed4","lineDashed5","lineDashed6","lineDashed7","lineDashed8","lineDashed9","lineDashed10","lineDashed11","lineDashed12","lineDashed13","lineDashed14","lineDashed15","lineVertical","lineVerticalBold","lineVerticalDouble","lineVerticalDashed0","lineVerticalDashed1","lineVerticalDashed2","lineVerticalDashed3","lineVerticalDashed4","lineVerticalDashed5","lineVerticalDashed6","lineVerticalDashed7","lineVerticalDashed8","lineVerticalDashed9","lineVerticalDashed10","lineVerticalDashed11","lineDownLeft","lineDownLeftArc","lineDownBoldLeftBold","lineDownBoldLeft","lineDownLeftBold","lineDownDoubleLeftDouble","lineDownDoubleLeft","lineDownLeftDouble","lineDownRight","lineDownRightArc","lineDownBoldRightBold","lineDownBoldRight","lineDownRightBold","lineDownDoubleRightDouble","lineDownDoubleRight","lineDownRightDouble","lineUpLeft","lineUpLeftArc","lineUpBoldLeftBold","lineUpBoldLeft","lineUpLeftBold","lineUpDoubleLeftDouble","lineUpDoubleLeft","lineUpLeftDouble","lineUpRight","lineUpRightArc","lineUpBoldRightBold","lineUpBoldRight","lineUpRightBold","lineUpDoubleRightDouble","lineUpDoubleRight","lineUpRightDouble","lineUpDownLeft","lineUpBoldDownBoldLeftBold","lineUpBoldDownBoldLeft","lineUpDownLeftBold","lineUpBoldDownLeftBold","lineUpDownBoldLeftBold","lineUpDownBoldLeft","lineUpBoldDownLeft","lineUpDoubleDownDoubleLeftDouble","lineUpDoubleDownDoubleLeft","lineUpDownLeftDouble","lineUpDownRight","lineUpBoldDownBoldRightBold","lineUpBoldDownBoldRight","lineUpDownRightBold","lineUpBoldDownRightBold","lineUpDownBoldRightBold","lineUpDownBoldRight","lineUpBoldDownRight","lineUpDoubleDownDoubleRightDouble","lineUpDoubleDownDoubleRight","lineUpDownRightDouble","lineDownLeftRight","lineDownBoldLeftBoldRightBold","lineDownLeftBoldRightBold","lineDownBoldLeftRight","lineDownBoldLeftBoldRight","lineDownBoldLeftRightBold","lineDownLeftRightBold","lineDownLeftBoldRight","lineDownDoubleLeftDoubleRightDouble","lineDownDoubleLeftRight","lineDownLeftDoubleRightDouble","lineUpLeftRight","lineUpBoldLeftBoldRightBold","lineUpLeftBoldRightBold","lineUpBoldLeftRight","lineUpBoldLeftBoldRight","lineUpBoldLeftRightBold","lineUpLeftRightBold","lineUpLeftBoldRight","lineUpDoubleLeftDoubleRightDouble","lineUpDoubleLeftRight","lineUpLeftDoubleRightDouble","lineUpDownLeftRight","lineUpBoldDownBoldLeftBoldRightBold","lineUpDownBoldLeftBoldRightBold","lineUpBoldDownLeftBoldRightBold","lineUpBoldDownBoldLeftRightBold","lineUpBoldDownBoldLeftBoldRight","lineUpBoldDownLeftRight","lineUpDownBoldLeftRight","lineUpDownLeftBoldRight","lineUpDownLeftRightBold","lineUpBoldDownBoldLeftRight","lineUpDownLeftBoldRightBold","lineUpBoldDownLeftBoldRight","lineUpBoldDownLeftRightBold","lineUpDownBoldLeftBoldRight","lineUpDownBoldLeftRightBold","lineUpDoubleDownDoubleLeftDoubleRightDouble","lineUpDoubleDownDoubleLeftRight","lineUpDownLeftDoubleRightDouble","lineCross","lineBackslash","lineSlash","mainSymbols","tick","cross","squareSmall","squareSmallFilled","circle","circleFilled","circleDotted","circleDouble","circleCircle","circleCross","circlePipe","radioOn","radioOff","checkboxOn","checkboxOff","checkboxCircleOn","checkboxCircleOff","pointer","triangleUpOutline","triangleLeft","triangleRight","lozenge","lozengeOutline","hamburger","smiley","mustache","star","play","nodejs","oneSeventh","oneNinth","oneTenth","fallbackSymbols","figures","TERM","TERM_PROGRAM","WT_SESSION","TERMINUS_SUBLIME","ConEmuTask","TERMINAL_EMULATOR","isUnicodeSupported","hasColors","tty","WriteStream","open","close","openCode","closeCode","lastIndex","bold","gray","redBright","yellowBright","padField","field","padding","getFinalIcon","failed","ICONS","piped","ipc","duration","identity","COLORS","applyVerboseFunction","verboseLine","verboseObject","verboseFunction","printedLine","appendNewline","verboseLog","type","verboseMessage","verboseInfo","getVerboseObject","finalLines","printedLines","getVerboseFunction","applyVerboseOnLines","getPrintedLines","STDERR_FD","escapedCommand","commandId","timestamp","getPrintedLine","timestampString","getHours","getMinutes","getSeconds","getMilliseconds","serializeTimestamp","icon","color","defaultVerboseFunction","serializeVerboseMessage","messageString","inspect","TAB_SIZE","getCommandId","COMMAND_ID","getStartTime","hrtime","bigint","getDurationMs","startTime","handleCommand","fileAndArguments","fileAndArgument","quoteString","escapedArgument","joinCommand","allowedValues","allowedValue","validateVerbose","getVerboseInfo","logCommand","TESTING_WINDOWS","checkStat","isFile","checkPathExt","pathext","PATHEXT","checkMode","uid","gid","myUid","myGid","getgid","ug","isexe_1","isWindows","OSTYPE","COLON","getNotFoundError","getPathInfo","opt","colon","pathEnv","pathExtExe","found","ppRaw","pathPart","pCmd","subStep","ii","which_1","cur","ex","environment","pathKeyModule","metaCharsRegExp","_escape","argument","doubleEscapeMetaChars","shebangRegex","resolveCommand","escape","readShebang","fd","openSync","readSync","closeSync","binary","shebangCommand","isExecutableRegExp","isCmdShimRegExp","commandFile","shebang","detectShebang","needsShell","forceShell","needsDoubleEscapeMetaChars","normalize","shellCommand","comspec","windowsVerbatimArguments","parseNonShell","originalEmit","arg1","verifyENOENTSync","crossSpawnModule","spawnSync","_parse","_enoent","promisify","execFileCallback","npmRunPathEnv","pathName","pathOption","preferLocal","execPath","addExecPath","cwdPath","pathParts","startPath","previousPath","currentPath","traversePathUp","applyPreferLocal","applyExecPath","npmRunPath","DiscardedError","setErrorName","ErrorClass","execaErrorSymbol","isErrorInstance","ExecaError","ExecaSyncError","getRealtimeSignal","number","SIGRTMIN","action","standard","SIGNALS","forced","getSignals","realtimeSignals","signals","normalizeSignal","defaultNumber","name2","constantSignal","supported","getSignalByName","signalsByName","fromEntries","getSignalsByName","findSignalByNumber","signalA","signalsA","SIGRTMAX","getSignalByNumber","getSignalsByNumber","normalizeSignalArgument","signalNameOrInteger","isInteger","normalizeSignalInteger","normalizeSignalName","getAvailableSignals","signalInteger","signalsIntegerToName","signalName","getAvailableSignalNames","getAvailableSignalIntegers","signalIntegerTwo","getSignalDescription","subprocessKill","kill","forceKillAfterDelay","killSignal","onInternalError","controller","signalOrError","errorArgument","parseKillArguments","emitKillError","killResult","setKillTimeout","killOnTimeout","controllerSignal","isForcefullyTerminated","onAbortedSignal","mainSignal","stopSignal","throwOnCancel","subprocess","cancelSignal","gracefulCancel","terminateOnCancel","terminationReason","reason","validateIpcMethod","methodName","isSubprocess","isConnected","validateIpcOption","validateConnection","getMethodName","getOtherProcessName","getStrictResponseError","SERIALIZATION_ERROR_CODES","SERIALIZATION_ERROR_MESSAGES","parameters","getNamespaceName","disconnect","anyProcess","connected","createDeferred","methods","getToStream","destination","isWritable","fileDescriptors","SUBPROCESS_OPTIONS","getFdNumber","destinationStream","getInvalidStdioOptionMessage","getFromStream","sourceStream","WeakMap","parseFdNumber","validateFdNumber","validOptions","getOptionName","fileDescriptor","getUsedDescriptor","direction","getInvalidStdioOption","serializeOptionValue","usedDescriptor","incrementMaxListeners","eventEmitter","maxListenersIncrement","maxListeners","getMaxListeners","setMaxListeners","addAbortListener","addReference","channel","reference","addReferenceCount","refCounted","removeReference","removeReferenceCount","unrefCounted","onMessage","ipcEmitter","wrappedMessage","handleStrictResponse","handleAbort","INCOMING_MESSAGES","incomingMessages","waitForOutgoingMessages","scheduler","yield","handleStrictRequest","onDisconnect","boundOnMessage","redoAddedReferences","getIpcEmitter","IPC_EMITTERS","forwardEvents","undoAddedReferences","validateStrictDeadlock","outgoingMessages","REQUEST_TYPE","hasListeners","STRICT_RESPONSES","isDeadlock","RESPONSE_TYPE","hasMessageListeners","sendMessage","waitForStrictResponse","deferred","AbortController","race","throwOnDisconnect","throwOnStrictDeadlockError","throwOnMissingStrict","abort","throwOnStrictDisconnect","OUTGOING_MESSAGES","onMessageSent","listenerCount","getMinListenerCount","strict","sendMessageAsync","handleSendStrict","outgoingMessagesState","outgoingMessage","startSendMessage","sendOneMessage","endSendMessage","sendMethod","getSendMethod","handleEpipeError","serializationErrorMessage","isSerializationError","handleSerializationError","PROCESS_SEND_METHODS","send","getCancelSignal","startIpc","cancelController","cancelListening","GRACEFUL_CANCEL_TYPE","abortOnDisconnect","throwOnGracefulCancel","sendOnAbort","getReason","sendAbort","DOMException","throwOnTimeout","killAfterTimeout","validateIpcInput","advanced","ipcInput","serialize","json","sendIpcInput","TEXT_ENCODINGS","BINARY_ENCODINGS","ENCODINGS","ENCODING_ALIASES","ucs2","serializeEncoding","getDefaultCwd","normalizeOptions","cwdString","normalizeCwd","processedFile","processedArguments","processedOptions","shouldHandleNode","nodePath","nodeOptions","execArgv","nodeOption","formerNodePath","normalizedNodePath","resolvedNodePath","newOptions","handleNodeOption","initialOptions","crossSpawn","fdOptions","optionsCopy","normalizeFdSpecificOptions","addDefaultOptions","validateTimeout","correctEncoding","lowerEncoding","getCorrectEncoding","correctEncodings","validateEncoding","serialization","validateIpcInputOption","validateCancelSignal","validateGracefulCancel","getEnv","normalizeKillSignal","normalizeForceKillAfterDelay","localDir","localDirectory","cleanup","windowsHide","envOption","LF","CR","LF_BINARY","subarray","CR_BINARY","c$2","releaseLock","getAsyncIterable","nodeImports","getStreamIterable","asyncIterator","state","handleStreamEnd","finished","getStreamContents","init","convertChunk","getSize","truncateChunk","addChunk","getFinalChunk","finalize","asyncIterable","convertedChunk","getChunkType","appendChunk","appendFinalChunk","normalizedError","bufferedData","chunkSize","newLength","addNewChunk","truncatedChunk","MaxBufferError","typeOfChunk","isBuffer","prototypeName","noop","getContentsProperty","throwObjectStream","getLengthProperty","arrayMethods","arrayBuffer","dataView","typedArray","others","useUint8Array","useUint8ArrayWithOffset","getNewContentsLength","SCALE_FACTOR","hasArrayBufferResize","arrayBufferMethods","previousLength","newContents","maxByteLength","resize","resizeArrayBuffer","resizeArrayBufferSlow","useTextDecoder","stringMethods","finalChunk","checkIpcMaxBuffer","ipcOutput","maxBufferInfo","getMaxBufferSync","stdoutMaxBuffer","getErrorPrefix","originalError","timedOut","isMaxBuffer","errorCode","signalDescription","isCanceled","isGracefullyCanceled","forcefulSuffix","getForcefulSuffix","streamName","threshold","getMaxBufferInfo","getMaxBufferMessage","serializeMessageItem","messageItem","makeSuccessResult","omitUndefinedProperties","durationMs","isTerminated","pipedFrom","makeEarlyError","isSync","makeError","rawExitCode","rawSignal","timeoutDuration","normalizeExitPayload","originalMessage","shortMessage","prefix","escapedOriginalMessage","cwdStat","fixCwdError","getOriginalMessage","ipcMessage","serializeIpcMessage","messagePart","Boolean","serializeMessagePart","createMessages","getFinalError","getErrorProperties","logDuration","prettyMs","logError","logResult","getStdioItemType","isAsyncGenerator","isSyncGenerator","isUrl","isFilePathObject","isWebStream","isNodeStream","isAsyncIterableObject","isIterableObject","isTransformStream","getTransformStreamType","transform","isTransformOptions","getTransformObjectType","getDuplexType","getGeneratorObjectType","validateNonGeneratorType","final","typeName","checkUndefinedOption","checkBooleanOption","isGenerator","isPlainObj","isFilePathString","KNOWN_STDIO_STRINGS","isObject","TRANSFORM_TYPES","FILE_TYPES","SPECIAL_DUPLICATE_TYPES_SYNC","SPECIAL_DUPLICATE_TYPES","FORBID_DUPLICATE_TYPES","TYPE_TO_MESSAGE","asyncGenerator","fileUrl","fileNumber","webStream","nodeStream","webTransform","duplex","native","iterable","getTransformObjectModes","newTransforms","getOutputObjectModes","getInputObjectModes","getTransforms","stdioItems","transforms","stdioItem","normalizeTransform","sortTransforms","normalizeDuplex","normalizeTransformStream","normalizeGenerator","binaryOption","preserveNewlines","KNOWN_DIRECTIONS","anyDirection","alwaysInput","guessStreamDirection","isNodeReadableStream","isNodeWritableStream","standardStreamDirection","getStandardStreamDirection","hasAlias","alias","stdioOption","isOutputPipeOnly","getTargetFd","targetFdNumber","getTargetFdNumber","isatty","readFileSync","standardStreamIndex","getStandardStream","standardStream","handleInputOptions","inputFile","handleInputOption","handleInputFileOption","getInputType","getInputFileType","getDuplicateStreamInstance","otherStdioItems","duplicateStdioItems","hasSameValue","differentStdioItem","throwOnDuplicateStream","secondValue","handleStdio","addProperties","stdioArray","getStdioArray","normalizeStdioSync","normalizeIpcStdioArray","normalizeStdioOption","initialFileDescriptors","getFileDescriptor","getFinalFileDescriptors","forwardStdio","initialStdioItems","isStdioArray","initializeStdioItems","directions","getStdioItemDirection","getStreamDirection","targetFd","handleNativeStreamSync","handleNativeStreamAsync","handleNativeStream","normalizedStdioItems","normalizeTransforms","lastTransform","getFdObjectMode","validateFileObjectMode","stdioItemOne","indexOne","stdioItemTwo","indexTwo","filterDuplicates","initializeStdioItem","validateStdioArray","validateStreams","INVALID_STDIO_ARRAY_OPTIONS","validateFileStdio","isRegularUrl","isUnknownStdioString","fileStdioItem","getFinalFileDescriptor","cleanupCustomStreams","finalStdioItems","addStreamProperties","duplicateStream","getOtherStdioItems","duplicateStdioItem","validateDuplicateTransform","validateDuplicateStreamSync","getDuplicateStream","forbiddenIfSync","throwInvalidSyncValue","addPropertiesSync","stripNewline","getStripFinalNewline","stripFinalNewlineFunction","getSplitLinesGenerator","skipped","initializeSplitLines","splitLinesSync","splitLinesItemSync","previousChunks","splitGenerator","linesFinal","newlineLength","getNewlineLength","concatString","isWindowsNewline","getAppendNewlineGenerator","appendNewlineGenerator","unixNewline","windowsNewline","concatBytes","linesStringInfo","linesUint8ArrayInfo","newline","firstChunk","secondChunk","getValidateTransformInput","validateStringTransformInput","getValidateTransformReturn","validateObjectTransformReturn","validateStringTransformReturn","validateEmptyReturn","getEncodingTransformGenerator","encodingUint8ArrayGenerator","stringDecoder","StringDecoder","encodingStringGenerator","encodingStringFinal","lastChunk","pushChunks","callbackify","getChunks","getChunksArguments","transformStream","currentIterable","transformChunk","generators","identityGenerator","transformedChunk","finalChunks","generatorFinalChunks","destroyTransform","pushChunksSync","getChunksSync","runTransformSync","transformChunkSync","finalChunksSync","generatorFinalChunksSync","generatorToStream","addInternalGenerators","transformAsync","finalAsync","transformMethod","finalMethod","destroyMethod","Transform","getDefaultHighWaterMark","flush","runGeneratorsSync","isInput","reversedGenerators","addInputOptionSync","allStdioItems","transformedContents","applySingleInputGeneratorsSync","validateSerializable","invalidItem","shouldLogOutput","fdUsesVerbose","PIPED_STDIO_VALUES","isPipingStream","_readableState","pipes","logLine","runOutputGeneratorsSync","serializeChunks","serializedResult","decoder","strings","finalString","uint8ArraysToStrings","joinToString","finalResult","logOutputSync","linesArray","logLinesSync","writeToFiles","outputFiles","pathString","waitForSubprocessExit","waitForSuccessfulExit","exitPromise","isSubprocessErrorExit","isFailedExit","getResultError","normalizeSyncOptions","validateSyncOptions","detached","throwInvalidSyncOption","spawnSubprocessSync","syncResult","runSubprocessSync","resultError","isMaxBufferSync","getExitResultSync","truncatedResult","maxBufferValue","truncateMaxBufferSync","uint8ArrayResult","returnedResult","transformOutputResultSync","transformOutputSync","stdioOutput","getAllSync","getSyncResult","getInputFdNumbers","addInputOptionsSync","normalizedOptions","normalizeSpawnSyncOptions","getOneMessage","getOneMessageAsync","getMessage","throwOnStrictError","throwOnEarlyDisconnect","getEachMessage","loopOnMessages","shouldAwait","stopOnDisconnect","abortOnStrictError","iterateOnMessages","throwIfStrictError","getIpcMethods","createDummyStream","PassThrough","Readable","Writable","Duplex","handleDummyPromise","forbiddenIfAsync","fromWeb","addPropertiesAsync","createReadStream","createWriteStream","highWaterMarks","PassThroughStream","ended","onFinished","unpipeEvent","streamPromises","onMergedStreamFinished","streamPromise","endWhenStreamsDone","remove","unpipe","updateMaxListeners","PASSTHROUGH_LISTENERS_COUNT","onMergedStreamEnd","onInputStreamsUnpipe","errorOrAbortStream","unpipedStream","PASSTHROUGH_LISTENERS_PER_STREAM","afterMergedStreamFinished","onInputStreamEnd","onInputStreamUnpipe","abortStream","endStream","isAbortError","errorStream","increment","pipeStreams","onSourceFinish","onDestinationFinish","endDestinationStream","abortSourceStream","pipeTransform","streamProperty","SUBPROCESS_STREAM_PROPERTIES","pipeStdioItem","pipeGroups","setStandardStreamMaxListeners","inputStream","outputStream","outputStreams","MAX_LISTENERS_INCREMENT","processOk","reallyExit","listeners","pid","kExitEmitter","ObjectDefineProperty","Emitter","emitted","afterExit","exit","ev","list","SignalExitBase","onExit","hupSig","emitter","originalProcessEmit","originalProcessReallyExit","sigListeners","loaded","sig","__signal_exit_emitter__","unload","load","alwaysLast","processEmit","processReallyExit","listener","og","getDestination","boundOptions","createNested","firstArgument","pipeArguments","mapDestinationArguments","pipeOptions","createNonCommandError","sourceOptions","PIPE_COMMAND_MESSAGE","waitForBothSubprocesses","subprocessPromises","sourceStatus","sourceReason","sourceResult","destinationStatus","destinationReason","destinationResult","MERGED_STREAMS","unpipeOnAbort","unpipeSignal","unpipeContext","unpipeOnSignalAbort","mergedStream","pipeToSubprocess","sourceInfo","normalizedInfo","sourcePromise","destinationError","getDestinationStream","sourceError","getSourceStream","normalizePipeArguments","handlePipePromise","getSubprocessPromises","getPipeArgumentsError","handlePipeArgumentsError","maxListenersController","pipeMoreSubprocessStream","pipeFirstSubprocessStream","cleanupMergedStreamsMap","pipeSubprocessStream","allSettled","iterateOnSubprocessStream","subprocessStdout","shouldEncode","stopReadingOnExit","iterateOnStream","shouldSplit","iterateForResult","onStreamEnd","allMixed","stopReadingOnStreamEnd","onStdoutChunk","HIGH_WATER_MARK","highWatermark","iterateOnData","DEFAULT_OBJECT_HIGH_WATER_MARK","getGenerators","getStreamOutput","streamInfo","logPromise","logOutputAsync","resumeStream","stripFinalNewlineValue","linesIterable","logLines","readableFlowing","resume","getStreamAsArray","getStreamAsArrayBuffer","getStream","handleBufferedData","getMaxBufferUnit","handleMaxBuffer","getBufferedData","waitForStream","isSameDirection","stopOnExit","handleStdinDestroy","abortController","stdinCleanedUp","originalStreams","originalStdin","spyOnStdinDestroy","subprocessStdin","_destroy","destroyArguments","setStdinCleanedUp","signalCode","handleStreamError","shouldIgnoreStreamError","propagating","isStreamEpipe","isStreamAbort","isInputFileDescriptor","waitForSubprocessStream","getAllStream","bufferStdout","bufferStderr","getAllMixed","logIpcOutput","getBufferedIpcOutput","ipcOutputPromise","waitForSubprocessResult","spawnPayload","exitPayload","waitForExitOrError","waitForExit","stdioPromises","waitForStdioStreams","allPromise","waitForAllStream","bufferArray","maxBufferArray","shouldLogIpc","waitForIpcOutput","originalPromises","waitForOriginalStreams","customStreamsEndPromises","waitForCustomStreamsEnd","throwOnSubprocessError","stdioPromise","addConcurrentStream","concurrentStreams","waitName","weakMap","waitForConcurrentStreams","isSubprocessExit","safeWaitForSubprocessStdin","waitForSubprocessStdin","waitForSubprocessStdout","waitForSubprocess","destroyOtherStream","isOpen","createReadable","waitReadableDestroy","getSubprocessStdout","readableEncoding","getReadableOptions","onStdoutDataDone","getReadableMethods","onReadableDestroy","onStdoutFinished","onStdoutData","onRead","destroyOtherReadable","createWritable","waitWritableFinal","waitWritableDestroy","getSubprocessStdin","getWritableMethods","onWritableDestroy","onStdinFinished","onWrite","onWritableFinal","safeWaitForSubprocessStdout","destroyOtherWritable","createDuplex","onDuplexDestroy","createIterable","iterateOnStdoutData","addConvertedStreams","readableDestroy","writableFinal","writableDestroy","nativePromisePrototype","descriptors","property","Reflect","handleAsyncArguments","handleAsyncOptions","handleStdioAsync","spawnSubprocessAsync","extraStdio","createDummyStreams","earlyError","handleEarlyError","inputStreams","pipeOutputAsync","removeExitHandler","cleanupOnExit","makeAllStream","addIpcMethods","handlePromise","errorInfo","stdioResults","allResult","stdioResult","getAsyncResult","mergeOption","boundOptionValue","DEEP_OPTIONS","createExeca","mapArguments","deepOptions","setBoundExeca","boundExeca","execaArguments","callBoundExeca","nextArguments","parseArguments","syncOptions","handleStdioSync","handleSyncArguments","execaCoreSync","descriptor","mergePromise","execaCoreAsync","callArguments","parseTemplates","initialFile","initialArguments","mergedOptions","parseCommand","unusedArguments","parseCommandString","trimmedCommand","SPACES_REGEXP","previousToken","mapScriptSync","getScriptOptions","getScriptStdinOption","execaCommand","execaCommandSync","getIpcExport","posix","promises_1","myGroups","groups","getgroups","win32","peSplit","substring","__exportStar","impl","_ISEXE_TEST_PLATFORM_","isexeSync","rSlash","rRel","optPath","optPathExt","optDelimiter","getPathPart","envPart","withExt","lib","pathEnvPart","$","A","systemdrive","opts1","forEach$2","process$2","toPosInteger","toInteger","resolveLength","optsLength","fnLength","isAsync","validCallable","objPropertyIsEnumerable","propertyIsEnumerable","compareFn","defVal","foo","bar","trzy","shim$3","function","captureStackTrace","module","generate","mixin","arg2","possibleTypes","undefined","isPrototype","classRe","functionToString","contains","searchString","isPlainFunction","normalizeOpts","dModule","dscr","off","__eeOnceListener__","__ee__","resolveArgs","customError","defineLength","ee","resolveResolve","resolvers","configure","memLength","extDel","extGet","extHas","normalizer","getListeners","setListeners","deleteListeners","memoized","userNormalizer","resolveNormalize","profileName","updateEnv","__memoized__","_get","_has","plain","extFn","__profiler__","memoizee","primitive","getPrimitiveFixed","currentLength","lastId","get1","argsMap","getFixed","aFrom","tbi","currentCallback","currentContext","currentArgs","last","origCb","resultArray","maxAge","maxTimeout","validTimeout","timeouts","preFetchAge","preFetchTimeouts","unref","preFetch","lruQueue","limit","hit","oldIndex","nuIndex","refCounter","deleteRef","getRefCount","memoize","is_posix_os","release","windows_version_regex","given_path","major_release","os_build","should_not_escape","regexEscape","matchOperatorsRe","escapeQuotesModule","chars","escapeChar","regex","variants","checkLocale","hasLocale","commonjsRequire","__dirname","requireLocale","moduleDefinition","isNode","timeUnits","defaultConfig","span","autoloadLocales","firstDate","secondDate","autoload","localeId","require","ensureLocaleLoadedOrThrow","difference","results","divider","getDifference","parts","one","other","months","weeks","narrow","MAX_LENGTH","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","MAX_SAFE_INTEGER","RELEASE_TYPES","SEMVER_SPEC_VERSION","debug_1","LETTERDASHNUMBER","safeRegexReplacements","createToken","isGlobal","safe","makeSafeRegex","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","LONECARET","looseOption","freeze","emptyOpts","parseOptions_1","numeric","compareIdentifiers","anum","bnum","identifiers","rcompareIdentifiers","LOOSE","FULL","num","build","compareMain","comparePre","compareBuild","inc","identifier","identifierBase","parse_1","throwErrors","valid_1","major_1","compare_1","compareBuild_1","versionA","versionB","gt_1","lt_1","eq_1","neq_1","gte_1","lte_1","eq","neq","gte","lt","lte","cmp_1","coerce_1","rtl","coerceRtlRegex","COERCERTLFULL","COERCERTL","lrucache","firstKey","satisfies_1","outside_1","hilo","gtfn","ltefn","ltfn","ecomp","high","low","comparator","outside","minimumVersionWithPreRelease","minimumVersion","simpleSubset","sub","dom","eqSet","gtltComp","higher","lower","hasDomLT","hasDomGT","higherGT","lowerLT","needDomLTPre","needDomGTPre","internalRe","diff","version1","version2","comparison","v1Higher","highVersion","lowVersion","highHasPre","require$$9","require$$13","rcompare","compareLoose","require$$16","rsort","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","coerce","require$$26","require$$27","require$$28","require$$29","toComparators","maxSatisfying","maxSV","rangeObj","minSatisfying","minSV","minVersion","minver","setMin","compver","validRange","require$$35","gtr","ltr","r1","r2","simplifyRange","prev","ranges","simplified","subset","sawNonNull","OUTER","simpleSub","simpleDom","isSub","packageJson","npm_package_json","npm_config_user_agent","isNpm6","isNpm7","isNpm","isYarn","isNpmOrYarn","homeDirectory","configDir","XDG_CONFIG_HOME","getConfigFile","packageName","getDistVersion","distTag","hasNewVersion","pkg","_b","updateCheckInterval","_c","alwaysRun","lastUpdateCheck","latestVersion","_d","mkdirSync","configFile","getLastUpdate","getTime","err_1","isTTY","shouldNotifyInNpmScript","_i","lines_1","padEnd","borderedText","_interopRequireWildcard","_possibleConstructorReturn","ReferenceError","DH_STATES","_typeof","_createClass","_url","_events","IDLE","SKIPPED","STARTED","DOWNLOADING","RETRY","PAUSED","RESUMED","STOPPED","FINISHED","FAILED","_classCallCheck","__proto__","captureRejections","__validate","requestURL","__defaultOpts","override","forceResume","removeOnStop","removeOnFail","progressThrottle","httpRequestOptions","httpsRequestOptions","resumeOnIncomplete","resumeIfFileExists","resumeOnIncompleteMaxRetry","__opts","__pipes","__total","__downloaded","__progress","__retryCount","__retryTimeout","__resumeRetryCount","__states","__promise","__request","__response","__isAborted","__isResumed","__isResumable","__isRedirected","__destFolder","__statsEstimate","time","prevBytes","throttleTime","__fileName","__filePath","updateOptions","_inherits","__start","getTotalSize","total","__getFilePath","__getFilesizeInBytes","resumeFromFile","__fileStream","__requestAbort","__closeFileStream","__setState","__reqOptions","__emitStop","__headers","__getReqOptions","__initProtocol","progress","speed","__protocol","__isRequireRedirect","location","__getFileNameFromHeaders","__downloadRequest","__onError","__onTimeout","__resetStats","__startDownload","skip","skipSmaller","totalSize","downloadedSize","isResumed","__calculateStats","__onFinished","__hasFinished","incomplete","onDiskSize","__retry","__removeFile","delay","__getFileNameFromOpts","__uniqFileNameSync","prevPath","prevFileName","getStats","throwIfNoEntry","accessSync","F_OK","__resolvePending","toInstall","npath","first2chars","nFileName","extname","nFilepath","O","I","T","W","q","B","isUnixExecutable","stats","getCmdPath","UV_FS_O_EXLOCK","rmdir","rename","READONLY","O_RDONLY","useStat","normalizeSeparators","upperExt","validExt","originalFilePath","upperName","actualName","__createBinding$4","mkdirP_1","mv","copySourceDirectory","readCopyOptions","destStat","newDest","relative","destExists","check","tok","makeSafeRe","tb","defaultResult","rangeTmp","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","compRe","_readLinuxVersionFile","_getOsVersion","_findMatch","stable","archFilter","platFilter","chk","platform_version","plat","lsbContents","lsbReleaseFile","osReleaseFile","randomBytes","bytesToUuid","__createBinding$3","toolrunner","timers_1","_debug","_getCommandString","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","_windowsQuoteCmdArg","_processLineBuffer","strBuffer","onLine","argline","_endsWith","upperToolPath","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","quoteHit","_cloneExecOptions","silent","failOnStdErr","ignoreReturnCode","outStream","errStream","_getSpawnOptions","argv0","optionsNonNull","ExecState","stdbuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","processExitCode","argString","append","escaped","inQuotes","charAt","_setResult","HandleTimeout","__createBinding$2","exec_1","getExecOutput_1","string_decoder_1","exec_2","stdoutDecoder","stderrDecoder","originalStdoutListener","originalStdErrListener","__createBinding$1","retryHelper","RetryHelper","maxAttempts","minSeconds","maxSeconds","execute","isRetryable","attempt","core$2","getSleepAmount","sleep","__importDefault","toolCache","findFromManifest","getManifestFromRepo","find_1","cacheFile","cacheDir_1","extractXar","extractTar","extract7z","downloadTool_1","HTTPError","mm","httpm","require$$8","require$$10","require$$12","retry_helper_1","httpStatusCode","HTTPError_1","IS_MAC","authorization","statusMessage","pipeline","readStream","responseMessageFactory","succeeded","downloadToolAttempt","_7zPath","originalCwd","powershellPath","extractTar_1","versionOutput","isGnuTar","destArg","fileArg","xarPath","extractZip_1","escapedFile","escapedDest","pwshPath","extractZipWin","unzipPath","extractZipNix","destPath","itemName","sourceFile","targetFile","destFolder","cachePath","getManifestFromRepo_1","owner","branch","releases","treeUrl","manifestUrl","tree","versionsRaw","findFromManifest_1","manifest","dist","previousError","previous","optsArg","optsFs","mkdirAsync","rej","made","statAsync","mkdirpManualSync","parent","fer","mkdirpManual","st","findMade","findMadeSync","mkdirpNativeSync","mkdirpNative","__TESTING_MKDIRP_PLATFORM__","pathArg","badWinChars","versArr","__TESTING_MKDIRP_NODE_VERSION__","hasNative","useNativeSync","useNative","mkdirpSync","mkdirp","nativeSync","manual","manualSync","defaultLLVM","llvm","clang","clangtidy","clangformat","ninja","gcovr","conan","meson","kcov","task","doxygen","gcc","mingw","nala","base_exec_prefix","unique","getUbuntuVersion_1","getUbuntuVersion","child_process_1","exe","execFile","reDistributor","reDescription","reRelease","distributorFound","rel","ss","versionSplitted","pipxHome","compatHome","pipxBinDir","nameMap","macosVersion","macosRelease","AbortError","getDOMException","errorMessage","vsversion_to_versionnumber_1","VSWHERE_PATH","findVcvarsall_1","setupMSVCDevCmd_1","process$1","arch_aliases","win64","vcvars","cmd_output_parts","old_environment","vcvars_output","new_environment","error_messages","old_env_vars","new_value","_1","setupLLVMDeps","dlErr","hasVCPKG","llvmSetups","gccSetups","mingwSetups","msvcSetups","msvc","cl","msbuild","visualstudio","appleClangSetups","appleclang","applellvm","cmakeLangSetups","cmakelang","cmakelint","cmakeformat","nalaPack","nalaLegacyPack","installer","setupNalaViaInstaller","brew","choco","pwsh","vcpkg","addShExt","addShRelativePrefix","bazel","opencppcoverage","OpenCppCoverage","ccache","sccache","activateWinDoxygen","graphviz","cppcheck","activateWinCppcheck","cpplint","flawfinder","lizard","infer","vcvarsall","versionSplit","addVPrefix","installMethod","version_number","removeVPrefix","make","gnuBinDir","sevenzip","tools","checkUpdatePromise","updateNotifier","checkUpdates","ACTIONS_ALLOW_UNSECURE_COMMANDS","idx","alibi","unknown","defaults","mri","inp","parseArgs","help","table","documentation","coverage","architecture","SETUP_CPP_DIR","timeFormatter","timeDelta","time1","time2","timeDeltaLocale","numerousLocale","compilerInfo","compiler","compilerAndVersion","compilerAndMaybeVersion","maybeVersion","getCompilerInfo","toolsGiven","syncCompiler","toolsInUse","toolsNonDefaultVersion","syncVersions","failedFast","time1Compiler","installCompiler","time2Compiler","uniqueEntries","finalizeRC","main","argv"],"mappings":";whBAkCA,SAASA,EAAaC,EAASC,EAAYC,GACvC,MAAMC,EAAM,IAAIC,GAAQJ,EAASC,EAAYC,GAC7CG,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AAUxK,GAAWwK,EAAU7J,QAAS,CAC9B,MAAAtd,SAAiBud,GAAS4J,EAAU7J,OAAQ,UAAU7jB,MAAM,MAC5D4tH,EAAgB,IAAI,IAAI7nG,IAAIxf,EAAQmM,YAAYA,gBAChDrN,GAAUqoB,EAAU7J,OAAQ+pG,EAAcnnH,KAAK,aAC/Ci1B,EAAqBhO,EAAU7J,OACxC,CACL,CmW8DQgqG,CAAWngG,IAEc,IAA3Bue,EAAgBxvC,QAAyC,IAAzByvC,EAAczvC,OAEzC,OADP0O,EAAQ,8DACD,EAIT,IAAA,MAAW4qB,KAAQkW,ErZzHVr8B,QAAQC,IAAI,QqZ0HXkmB,SAEV,IAAA,MAAWA,KAAQmW,EACjBviC,EAAMosB,GAKJ,GAFJ9qB,EAAK,uBAEAyE,GAAAA,eACH,OAAQzT,QAAQwW,UACd,IAAK,QACHtH,EAAQ,yEACR,MAEF,IAAK,QACL,IAAK,SACHA,EAAQ,0EAWP,aAFDmgH,EAE0B,IAAzBp/E,EAAczvC,OAAe,EAAI,CAC1C,EAGAqxH,CAAK7xH,QAAQ8xH,MACVxpH,MAAM4lB,IACLluB,QAAQyS,SAAWyb,CAAA,IAEpB1c,OAAO7O,IACN+K,EAAM,oBACNA,EAAM/K,GACN3C,QAAQyS,SAAW,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,66,67,68,69,70,74,89,90,91,92,93,116,119,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,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,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,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,383,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,401,402]}