setup-cpp/dist/modern/setup-cpp.mjs.map

1 line
1.1 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"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/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/is-stream@3.0.0/node_modules/is-stream/index.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/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+69d91a41cef28e569be9a2991129f5f7d1f0d00e/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","../../node_modules/.pnpm/patha@0.4.1/node_modules/patha/dist/index.node.mjs","../../src/chocolatey/chocolatey.ts","../../src/utils/setup/setupChocoPack.ts","../../src/utils/setup/setupDnfPack.ts","../../src/utils/setup/setupPacmanPack.ts","../../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","../../node_modules/.pnpm/is-url-online@1.5.0/node_modules/is-url-online/dist/index.mjs","../../src/utils/setup/version.ts","../../src/versions/default_versions.ts","../../src/python/python.ts","../../src/versions/versions.ts","../../src/utils/env/ubuntu_version.ts","../../src/utils/setup/setupPipPack.ts","../../src/graphviz/graphviz.ts","../../src/utils/setup/setupDmg.ts","../../src/doxygen/doxygen.ts","../../src/macos-sdk/macos-sdk.ts","../../src/gcc/gcc.ts","../../src/utils/github/load-assets.ts","../../src/ninja/ninja.ts","../../src/kcov/kcov.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/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/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@5.3.0/node_modules/npm-run-path/index.js","../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js","../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stdio.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js","../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stream.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/promise.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/command.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js","../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/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+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/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","../../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/utils/std/index.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/gcovr/gcovr.ts","../../src/opencppcoverage/opencppcoverage.ts","../../src/ccache/ccache.ts","../../src/sccache/sccache.ts","../../src/cppcheck/cppcheck.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}</${tag}>`;\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>} 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 (<hr>) 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 (<br>) 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxlQUFlLENBQUE7QUFDckMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUV4QyxNQUFNLFVBQVUsS0FBSyxDQUFDLEdBQW1CO0lBQ3ZDLE9BQU8sY0FBYyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLFdBQVcsR0FBRyxTQUFTLENBQUMsQ0FBQTtBQUNoRixDQUFDO0FBRUQsTUFBTSxVQUFVLE9BQU8sQ0FBQyxHQUFXO0lBQ2pDLE9BQU8sT0FBTyxDQUFDLEdBQUcsQ0FBQyxXQUFXLEdBQUcsU0FBUyxDQUFDLENBQUE7QUFDN0MsQ0FBQztBQUVELE1BQU0sVUFBVSxPQUFPLENBQUMs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BmdW5jdGlvbiB3YXJuaW5nKG1zZzogc3RyaW5nKSB7XG4gIHJldHVybiBHSVRIVUJfQUNUSU9OUyA/IGNvcmUud2FybmluZyhtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzMzbSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vdGljZShtc2c6IHN0cmluZykge1xuICByZXR1cm4gR0lUSFVCX0FDVElPTlMgPyBjb3JlLm5vdGljZShtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzk0bSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGluZm8obXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5pbmZvKG1zZykgOiBjb25zb2xlLmxvZyhtc2cpXG59XG4iXX0=","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","export function isStream(stream) {\n\treturn stream !== null\n\t\t&& typeof stream === 'object'\n\t\t&& typeof stream.pipe === 'function';\n}\n\nexport function isWritableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.writable !== false\n\t\t&& typeof stream._write === 'function'\n\t\t&& typeof stream._writableState === 'object';\n}\n\nexport function isReadableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.readable !== false\n\t\t&& typeof stream._read === 'function'\n\t\t&& typeof stream._readableState === 'object';\n}\n\nexport function isDuplexStream(stream) {\n\treturn isWritableStream(stream)\n\t\t&& isReadableStream(stream);\n}\n\nexport function isTransformStream(stream) {\n\treturn isDuplexStream(stream)\n\t\t&& typeof stream._transform === 'function';\n}\n","'use strict';\nconst {constants: BufferConstants} = require('buffer');\nconst stream = require('stream');\nconst {promisify} = require('util');\nconst bufferStream = require('./buffer-stream');\n\nconst streamPipelinePromisified = promisify(stream.pipeline);\n\nclass MaxBufferError extends Error {\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t\tthis.name = 'MaxBufferError';\n\t}\n}\n\nasync function getStream(inputStream, options) {\n\tif (!inputStream) {\n\t\tthrow new Error('Expected a stream');\n\t}\n\n\toptions = {\n\t\tmaxBuffer: Infinity,\n\t\t...options\n\t};\n\n\tconst {maxBuffer} = options;\n\tconst stream = bufferStream(options);\n\n\tawait new Promise((resolve, reject) => {\n\t\tconst rejectPromise = error => {\n\t\t\t// Don't retrieve an oversized buffer.\n\t\t\tif (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {\n\t\t\t\terror.bufferedData = stream.getBufferedValue();\n\t\t\t}\n\n\t\t\treject(error);\n\t\t};\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tawait streamPipelinePromisified(inputStream, stream);\n\t\t\t\tresolve();\n\t\t\t} catch (error) {\n\t\t\t\trejectPromise(error);\n\t\t\t}\n\t\t})();\n\n\t\tstream.on('data', () => {\n\t\t\tif (stream.getBufferedLength() > maxBuffer) {\n\t\t\t\trejectPromise(new MaxBufferError());\n\t\t\t}\n\t\t});\n\t});\n\n\treturn stream.getBufferedValue();\n}\n\nmodule.exports = getStream;\nmodule.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});\nmodule.exports.array = (stream, options) => getStream(stream, {...options, array: true});\nmodule.exports.MaxBufferError = MaxBufferError;\n","import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLGlDQUFpQztBQUNqQyxJQUFJLFVBQThCLENBQUE7QUFFbEM7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLGNBQWMsQ0FDNUIsT0FBZSxFQUNmLGVBQXlCLENBQUMsWUFBWSxFQUFFLFNBQVMsRUFBRSxpQkFBaUIsQ0FBQyxFQUNyRSxjQUE2QixFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUU7SUFFakQsT0FBTyxLQUFLLENBQUMsS0FBSyxDQUFDLGFBQWEsRUFBRSxFQUFFLENBQUMsR0FBRyxZQUFZLEVBQUUsSUFBSSxFQUFFLE9BQU8sQ0FBQyxFQUFFLFdBQVcsQ0FBQyxDQUFBO0FBQ3BGLENBQUM7QUFFRDs7Ozs7Ozs7O0dBU0c7QUFDSCxNQUFNLFVBQVUsa0JBQWtCLENBQ2hDLE9BQWUsRUFDZixlQUF5QixDQUFDLFlB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l19","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 \"<Non-coercible to string value>\";\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM1QixPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFFL0IsTUFBTSxVQUFVLFdBQVc7SUFDekIsSUFBSSxNQUFNLEVBQUUsSUFBSSxPQUFPLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxLQUFLLFFBQVEsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsS0FBSyxFQUFFLEVBQUUsQ0FBQztRQUMxRixvQ0FBb0M7UUFDcEMsSUFBSSxPQUFPLENBQUMsUUFBUSxLQUFLLFFBQVEsRUFBRSxDQUFDO1lBQ2xDLE9BQU8sSUFBSSxDQUFDLFNBQVMsRUFBRSxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFBO1FBQy9DLENBQUM7YUFBTSxDQUFDO1lBQ04sT0FBTyxJQUFJLENBQUMsUUFBUSxFQUFFLE9BQU8sQ0FBQ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KFwiL1VzZXJzL1wiLCBwcm9jZXNzLmVudi5TVURPX1VTRVIpXG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBqb2luKFwiL2hvbWUvXCIsIHByb2Nlc3MuZW52LlNVRE9fVVNFUilcbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgY29uc3QgbWF5YmVIb21lRGlyID0gaG9tZWRpcigpXG4gICAgaWYgKG1heWJlSG9tZURpciA9PT0gXCJcIikge1xuICAgICAgcmV0dXJuIHVuZGVmaW5lZFxuICAgIH1cbiAgICByZXR1cm4gbWF5YmVIb21lRGlyXG4gIH1cbn1cblxuY29uc3QgdGlsZGVSZWdleCA9IC9efig/PSR8XFwvfFxcXFwpL1xuXG4vKipcbiAqIFJlcGxhY2VzIGEgdGlsZGUgd2l0aCB0aGUgdXNlcidzIGhvbWUgZGlyZWN0b3J5XG4gKlxuICogQGV4YW1wbGUgVW50aWxkaWZ5VXNlcihcIn4vZm9vXCIpIC8vIC9ob21lL3VzZXIvZm9vXG4gKlxuICogQHBhcmFtIHBhdGggVGhlIHBhdGggdG8gdW50aWxkaWZ5XG4gKiBAcmV0dXJucyBUaGUgdW50aWxkaWZpZWQgcGF0aFxuICovXG5leHBvcnQgZnVuY3Rpb24gdW50aWxkaWZ5VXNlcihwYXRoOiBzdHJpbmcpIHtcbiAgY29uc3QgbWF5YmVIb21lRGlyID0gdXNlckhvbWVEaXIoKVxuICBpZiAobWF5YmVIb21lRGlyID09PSB1bmRlZmluZWQpIHtcbiAgICByZXR1cm4gcGF0aFxuICB9XG5cbiAgcmV0dXJuIHBhdGgucmVwbGFjZSh0aWxkZVJlZ2V4LCBtYXliZUhvbWVEaXIpXG59XG4iXX0=","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\"));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2V0UmNQYXRoOiBzdHJpbmcpIHtcbiAgaWYgKGF3YWl0IHBhdGhFeGlzdHModGFyZ2V0UmNQYXRoKSkge1xuICAgIGNvbnN0IGJhc2hyY0NvbnRlbnQgPSBhd2FpdCByZWFkRmlsZSh0YXJnZXRSY1BhdGgsIFwidXRmLThcIilcbiAgICBpZiAoIWJhc2hyY0NvbnRlbnQuaW5jbHVkZXMoc291cmNlUmNTdHJpbmcpKSB7XG4gICAgICBhd2FpdCBhcHBlbmRGaWxlKHRhcmdldFJjUGF0aCwgc291cmNlUmNTdHJpbmcpXG4gICAgICBpbmZvKGAke3NvdXJjZVJjU3RyaW5nfSB3YXMgYWRkZWQgdG8gJHt0YXJnZXRSY1BhdGh9YClcbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGZpbmFsaXplUkMocmNPcHRpb25zOiBSY09wdGlvbnMpIHtcbiAgaWYgKGF3YWl0IHBhdGhFeGlzdHMocmNPcHRpb25zLnJjUGF0aCkpIHtcbiAgICBjb25zdCBlbnRyaWVzID0gKGF3YWl0IHJlYWRGaWxlKHJjT3B0aW9ucy5yY1BhdGgsIFwidXRmLThcIikpLnNwbGl0KFwiXFxuXCIpXG5cbiAgICBjb25zdCB1bmlxdWVFbnRyaWVzID0gWy4uLm5ldyBTZXQoZW50cmllcy5yZXZlcnNlKCkpXS5yZXZlcnNlKCkgLy8gcmVtb3ZlIGR1cGxpY2F0ZXMsIGtlZXBpbmcgdGhlIGxhdGVzdCBlbnRyeVxuXG4gICAgYXdhaXQgd3JpdGVGaWxlKHJjT3B0aW9ucy5yY1BhdGgsIHVuaXF1ZUVudHJpZXMuam9pbihcIlxcblwiKSlcblxuICAgIGF3YWl0IGdyYW50VXNlcldyaXRlQWNjZXNzKHJjT3B0aW9ucy5yY1BhdGgpXG4gIH1cbn1cbiJdfQ==","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;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HRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfVxuICAgICAgcmV0dXJuXG4gICAgfVxuICAgIGRlZmF1bHQ6IHtcbiAgICAgIC8vIGZhbGwgdGhyb3VnaCBzaGVsbCBwYXRoIG1vZGlmaWNhdGlvblxuICAgIH1cbiAgfVxuICBwcm9jZXNzLmVudltuYW1lXSA9IHZhbFxufVxuIl19","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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLXBhdGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYWRkLXBhdGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM3QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxPQUFPLElBQUksU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQ3BELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxTQUFTLENBQUE7QUFDeEMsT0FBTyxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDcEMsT0FBTyx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gcmV0dXJuXG4gICAgfVxuICB9XG59XG5cbmNvbnN0IGlnbm9yZWRQYXRocyA9IFsvXFwvdXNyXFwvYmluXFwvPy8sIC9cXC91c3JcXC9sb2NhbFxcL2JpblxcLz8vXVxuXG4vKiogU2tpcCBhZGRpbmcgL3Vzci9iaW4gdG8gUEFUSCBpZiBpdCBpcyBhbHJlYWR5IHRoZXJlICovXG5mdW5jdGlvbiBpc0lnbm9yZWRQYXRoKHBhdGg6IHN0cmluZykge1xuICBpZiAoaWdub3JlZFBhdGhzLnNvbWUoKGNoZWNrZWRQYXRoKSA9PiBjaGVja2VkUGF0aC50ZXN0KHBhdGgpKSkge1xuICAgIGNvbnN0IHBhdGhzID0gcHJvY2Vzcy5lbnYuUEFUSD8uc3BsaXQoZGVsaW1pdGVyKSA/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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWx0ZXJuYXRpdmVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FsdGVybmF0aXZlcy50cyJdLCJuYW1lcyI6W10sIm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wYXJhbSBwYXRoIFRoZSBwYXRoIHRvIHRoZSBiaW5hcnlcbiAqIEBwYXJhbSByY09wdGlvbnMgVGhlIG9wdGlvbnMgZm9yIHRoZSByYyBmaWxlIHRvIGFkZCB0aGUgdXBkYXRlLWFsdGVybmF0aXZlcyBjb21tYW5kIHRvXG4gKiBAcGFyYW0gcHJpb3JpdHkgVGhlIHByaW9yaXR5IG9mIHRoZSBhbHRlcm5hdGl2ZSAoRGVmYXVsdHMgdG8gYDQwYClcbiAqL1xuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGFkZFVwZGF0ZUFsdGVybmF0aXZlc1RvUmMoXG4gIG5hbWU6IHN0cmluZyxcbiAgcGF0aDogc3RyaW5nLFxuICByY09wdGlvbnM6IFJjT3B0aW9ucyxcbiAgcHJpb3JpdHk6IG51bWJlciA9IDQwLFxuKSB7XG4gIGlmIChHSVRIVUJfQUNUSU9OUykge1xuICAgIGF3YWl0IHVwZGF0ZUFwdEFsdGVybmF0aXZlcyhuYW1lLCBwYXRoLCBwcmlvcml0eSlcbiAgfSBlbHNlIHtcbiAgICBhd2FpdCBzb3VyY2VSQyhyY09wdGlvbnMpXG4gICAgYXdhaXQgYXBwZW5kRmlsZShcbiAgICAgIHJjT3B0aW9ucy5yY1BhdGgsXG4gICAgICBgXFxuaWYgWyAkVUlEIC1lcSAwIF07IHRoZW4gdXBkYXRlLWFsdGVybmF0aXZlcyAtLWluc3RhbGwgL3Vzci9iaW4vJHtuYW1lfSAke25hbWV9ICR7cGF0aH0gJHtwcmlvcml0eX07IGZpXFxuYCxcbiAgICApXG4gIH1cbn1cbiJdfQ==","/**\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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geyAuLi5wcm9jZXNzLmVudiwgREVCSUFOX0ZST05URU5EOiBcIm5vbmludGVyYWN0aXZlXCIgfVxuXG4gIGlmIChhcHQgPT09IFwibmFsYVwiKSB7XG4gICAgLy8gaWYgTEFORy9MQ19BTEwgaXMgbm90IHNldCwgZW5hYmxlIHV0Zjggb3RoZXJ3aXNlIG5hbGEgZmFpbHMgYmVjYXVzZSBvZiBBU0NJSSBlbmNvZGluZ1xuICAgIGlmIChlbnYuTEFORyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICBlbnYuTEFORyA9IFwiQy5VVEYtOFwiXG4gICAgfVxuICAgIGlmIChlbnYuTENfQUxMID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGVudi5MQ19BTEwgPSBcIkMuVVRGLThcIlxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBlbnZcbn1cbiJdfQ==","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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWFwdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9nZXQtYXB0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUV6Qjs7R0FFRztBQUNILE1BQU0sVUFBVSxPQUFPO0lBQ3JCLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLENBQUMsS0FBSyxJQUFJLENBQUE7QUFDdkQsQ0FBQztBQUVEOzs7R0FHRztBQUNILE1BQU0sVUFBVSxNQUFNO0lBQ3BCLElBQUksR0FBVyxDQUFBO0lBQ2YsSUFBSSxPQUFPLEVBQUUsRUFBRSxDQUFDO1FBQ2QsR0FBRyxHQUFHLE1BQU0sQ0FBQTtJQUNkLENBQUM7U0FBTSxDQUFDO1FBQ04sR0FBRyxHQUFHLFNBQVMsQ0FBQTtJQUNqQixDQUFDO0lBQ0QsT0FBTyxHQUFHLENBQUE7QUFDWixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHdoaWNoIGZyb20gXCJ3aGljaFwiXG5cbi8qKlxuICogQ2hlY2sgaWYgbmFsYSBpcyBpbnN0YWxsZWRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGhhc05hbGEoKSB7XG4gIHJldHVybiB3aGljaC5zeW5jKFwibmFsYVwiLCB7IG5vdGhyb3c6IHRydWUgfSkgIT09IG51bGxcbn1cblxuLyoqXG4gKiBHZXQgdGhlIGFwdCBjb21tYW5kIHRvIHVzZVxuICogSWYgbmFsYSBpcyBpbnN0YWxsZWQsIHVzZSB0aGF0LCBvdGhlcndpc2UgdXNlIGFwdC1nZXRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEFwdCgpIHtcbiAgbGV0IGFwdDogc3RyaW5nXG4gIGlmIChoYXNOYWxhKCkpIHtcbiAgICBhcHQgPSBcIm5hbGFcIlxuICB9IGVsc2Uge1xuICAgIGFwdCA9IFwiYXB0LWdldFwiXG4gIH1cbiAgcmV0dXJuIGFwdFxufVxuIl19","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 its 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtaW5zdGFsbGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2lzLWluc3RhbGxlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQzdCLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFeEM7Ozs7R0FJRztBQUNILE1BQU0sQ0FBQyxLQUFLLFVBQVUsa0JBQWtCLENBQUMsSUFBWTtJQUNuRCxJQUFJLENBQUM7UUFDSCxrQ0FBa0M7UUFDbEMsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLE1BQU0sS0FBSyxDQUFDLE1BQU0sRUFBRSxDQ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lcbiAgfSBjYXRjaCB7XG4gICAgcmV0dXJuIGZhbHNlXG4gIH1cbn1cbiJdfQ==","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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVhbGlmeS1pbnN0YWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3F1YWxpZnktaW5zdGFsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sV0FBVyxNQUFNLHNCQUFzQixDQUFBO0FBQzlDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBRXJDLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RELE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxZQUFZL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QYWNrYWdlVHlwZS5OYW1lRGFzaFZlcnNpb246XG4gICAgICByZXR1cm4gYCR7bmFtZX0tJHt2ZXJzaW9ufWBcbiAgICBjYXNlIEFwdFBhY2thZ2VUeXBlLk5hbWVFcXVhbHNWZXJzaW9uOlxuICAgICAgcmV0dXJuIGAke25hbWV9PSR7dmVyc2lvbn1gXG4gICAgY2FzZSBBcHRQYWNrYWdlVHlwZS5OYW1lOlxuICAgICAgaWYgKHZlcnNpb24gIT09IHVuZGVmaW5lZCAmJiB2ZXJzaW9uICE9PSBcIlwiKSB7XG4gICAgICAgIHdhcm5pbmcoYENvdWxkIG5vdCBmaW5kIHBhY2thZ2UgJHtuYW1lfSB3aXRoIHZlcnNpb24gJHt2ZXJzaW9ufS4gSW5zdGFsbGluZyB0aGUgbGF0ZXN0IHZlcnNpb24uYClcbiAgICAgIH1cbiAgICAgIHJldHVybiBuYW1lXG4gICAgZGVmYXVsdDpcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ291bGQgbm90IGZpbmQgcGFja2FnZSAke25hbWV9ICR7dmVyc2lvbiA/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 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) => 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}\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIj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3YWl0IFByb21pc2UuYWxsKGFsbFJlcG9zaXRvcmllcy5tYXAoKHJlcG8pID0+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,eyJ2ZXJzaW9uIjozLCJmaWxlI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FsbEFkZEFwdFJlcG8oYXB0KVxuICBleGVjUm9vdFN5bmMoXCJhZGQtYXB0LXJlcG9zaXRvcnlcIiwgW1wiLXlcIiwgXCItLW5vLXVwZGF0ZVwiLCByZXBvXSwgeyAuLi5kZWZhdWx0RXhlY09wdGlvbnMsIGVudjogZ2V0QXB0RW52KGFwdCkgfSlcblxuICAvLyBVcGRhdGUgdGhlIHJlcG9zXG4gIHVwZGF0ZUFwdFJlcG9zTWVtb2l6ZWQuY2xlYXIoKSAvLyBlbnN1cmUgdXBkYXRlIGlzIGNhbGxlZFxuICB1cGRhdGVBcHRSZXBvc01lbW9pemVkKGFwdClcbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGluc3RhbGxBZGRBcHRSZXBvKGFwdDogc3RyaW5nKSB7XG4gIGlmIChhd2FpdCBpc0FwdFBhY2tJbnN0YWxsZWQoXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiKSkge1xuICAgIHJldHVyblxuICB9XG4gIGV4ZWNSb290U3luYyhcbiAgICBhcHQsXG4gICAgW1wiaW5zdGFsbFwiLCBcIi15XCIsIFwiLS1maXgtYnJva2VuXCIsIFwiLW9cIiwgYXB0VGltZW91dCwgXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiXSxcbiAgICB7IC4uLmRlZmF1bHRFeGVjT3B0aW9ucywgZW52OiBnZXRBcHRFbnYoYXB0KSB9LFxuICApXG59XG4iXX0=","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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWtleS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQta2V5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDM0IsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUMzQixPQUFPLEVBQUUsUUFBUSxFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUMvQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ3pELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxhQUFhLENBQUE7QUFDeEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUk3Qzs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUNILE1BQU0sVUFBVSxTQUFTLENBQUMsT0FBeUI7SUFDakQsSUFBSSxRQUFRLElBQUksT0FBTyxFQUFFLENBQUM7UUFDeEIsT0FBTyxlQUFlLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDakMsQ0FBQztTQUFNLENBQUM7UUFDTixPQUFPLGtCQUFrQixDQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQ3BDLENBQUM7QUFDSCxDQUFDO0FBYUQsTUFBTSxDQUFDLE1BQU0sbUJBQW1CLEdBQUcsd0JBQXdCLENBQUE7QUFrQjNELE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1gKVxuICAgIHJldHVybiB1bmRlZmluZWRcbiAgfVxufVxuXG5mdW5jdGlvbiBpbml0R3BnKCkge1xuICBleGVjUm9vdFN5bmMoXCJncGdcIiwgW1wiLWtcIl0pXG59XG5cbmZ1bmN0aW9uIGFzc2VydEdwZ0ZpbGVOYW1lKGZpbGVOYW1lOiBzdHJpbmcpIHtcbiAgaWYgKCFmaWxlTmFtZS5lbmRzV2l0aChcIi5ncGdcIikpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYEtleSBmaWxlIG5hbWUgbXVzdCBlbmQgd2l0aCAuZ3BnOiAke2ZpbGVOYW1lfWApXG4gIH1cbn1cbiJdfQ==","import { tmpdir } from \"os\";\nimport { dirname } 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 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 getBrewBinDir() {\n if (process.platform === \"darwin\") {\n if (process.arch === \"arm64\") {\n return \"/opt/homebrew/bin/\";\n }\n else {\n return \"/usr/local/bin/\";\n }\n }\n if (process.platform === \"linux\") {\n return \"/home/linuxbrew/.linuxbrew/bin/\";\n }\n throw new Error(\"Unsupported platform for brew\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnN0YWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDM0IsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUM5QixPQUFPLEVBQXVCLE9BQU8sRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUN2RCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQ2pDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ3pELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFDMUMsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBR3pCLDJDQUEyQztBQUMzQyxJQUFJLE1BQTBCLENBQUE7QUFhOUIsTUFBTSxDQUFDLEtBQUssVUFBVSxTQUFTLENBQUMsVUFBNEIsRUFBRTtJQUM1RCw2Q0FBNkM7SUFDN0MsSUFBSSxDQUFDLENBQUMsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQztRQUNwRCxPQUFPLFNBQVMsQ0FBQTtJQUNsQixDQUFDO0l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ldLCB7XG4gICAgc3RkaW86IFwiaW5oZXJpdFwiLFxuICAgIGVudjoge1xuICAgICAgTk9OSU5URVJBQ1RJVkU6IFwiMVwiLFxuICAgIH0sXG4gIH0pXG5cbiAgLy8gYWRkIHRoZSBiaW4gZGlyZWN0b3J5IHRvIHRoZSBQQVRIXG4gIGJpbkRpciA9IGdldEJyZXdCaW5EaXIoKVxuICBhd2FpdCBhZGRQYXRoKGJpbkRpciwgb3B0aW9ucy5yY09wdGlvbnMpXG5cbiAgcmV0dXJuIHsgYmluRGlyIH1cbn1cblxuLyoqXG4gKiBHZXQgdGhlIHBhdGggd2hlcmUgYnJldyBpcyBpbnN0YWxsZWRcbiAqIEByZXR1cm5zIHtzdHJpbmd9IFRoZSBwYXRoIHdoZXJlIGJyZXcgaXMgaW5zdGFsbGVkXG4gKlxuICogQmFzZWQgb24gdGhlIGluc3RhbGxhdGlvbiBzY3JpcHQgZnJvbSBodHRwczovL2JyZXcuc2hcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEJyZXdCaW5EaXIoKSB7XG4gIGlmIChwcm9jZXNzLnBsYXRmb3JtID09PSBcImRhcndpblwiKSB7XG4gICAgaWYgKHByb2Nlc3MuYXJjaCA9PT0gXCJhcm02NFwiKSB7XG4gICAgICByZXR1cm4gXCIvb3B0L2hvbWVicmV3L2Jpbi9cIlxuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gXCIvdXNyL2xvY2FsL2Jpbi9cIlxuICAgIH1cbiAgfVxuXG4gIGlmIChwcm9jZXNzLnBsYXRmb3JtID09PSBcImxpbnV4XCIpIHtcbiAgICByZXR1cm4gXCIvaG9tZS9saW51eGJyZXcvLmxpbnV4YnJldy9iaW4vXCJcbiAgfVxuXG4gIHRocm93IG5ldyBFcnJvcihcIlVuc3VwcG9ydGVkIHBsYXRmb3JtIGZvciBicmV3XCIpXG59XG4iXX0=","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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC1wYWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2luc3RhbGwtcGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUNqQyxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekIsT0FBTyxFQUFFLGFBQWEsRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFdkQsMkNBQTJDO0FBQzNDLElBQUksT0FBTyxHQUFHLEtBQUssQ0FBQTtBQVduQjs7Ozs7OztHQU9HO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUF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bWUsXG4gIF1cbiAgaWYgKG9wdGlvbnMub3ZlcndyaXRlKSB7XG4gICAgYXJncy5wdXNoKFwiLS1vdmVyd3JpdGVcIilcbiAgfVxuICBpZiAob3B0aW9ucy5jYXNrKSB7XG4gICAgYXJncy5wdXNoKFwiLS1jYXNrXCIpXG4gIH1cblxuICAvLyBicmV3IGlzIG5vdCB0aHJlYWQtc2FmZVxuICBleGVjYVN5bmMoYnJld1BhdGgsIGFyZ3MsIHsgc3RkaW86IFwiaW5oZXJpdFwiIH0pXG5cbiAgcmV0dXJuIHsgYmluRGlyIH1cbn1cbiJdfQ==","import which from \"which\"\n\nlet hasDnfCache: undefined | boolean = 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","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","import { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport { dirname } from \"patha\"\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<InstallationInfo | undefined> {\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<InstallationInfo> {\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<InstallationInfo> {\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 { execRootSync } 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<InstallationInfo> {\n info(`Installing ${name} ${version ?? \"\"} via pacman`)\n\n const pacman = \"pacman\"\n\n if (aur === \"yay\" && which.sync(\"yay\", { nothrow: true }) === null) {\n // TODO: install yay automatically\n throw new Error(`yay is needed for ${name}, but it is not installed, please install it manually first`)\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, ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.\n return execaSync(aur, [\"-S\", \"--noconfirm\", arg])\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","\"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<void>\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<string> 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<string[]> 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<number> 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<ExecOutput> 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 // if unzip is available use it\n if (which.sync(\"unzip\", { nothrow: true }) !== null) {\n await execa(\"unzip\", [file, \"-d\", dest], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n }\n\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 } 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 { join } from \"patha\"\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<unknown>\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<PackageInfo>,\n setupDir: string,\n arch: string,\n): Promise<InstallationInfo> {\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 { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverLte from \"semver/functions/lte\"\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 ([\"ia32\", \"x86\", \"i386\", \"x32\"].includes(arch)) {\n osArchStr = isOld ? \"win32-x86\" : \"windows-i386\"\n } else {\n osArchStr = isOld ? \"win64-x64\" : \"windows-x86_64\"\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 ([\"aarch64\"].includes(arch)) {\n osArchStr = isOld ? \"Linux-aarch64\" : \"linux-aarch64\"\n } else {\n osArchStr = isOld ? \"Linux-x86_64\" : \"linux-x86_64\"\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<InstallationInfo> {\n return setupBin(\"cmake\", version, getCmakePackageInfo, setupDir, arch)\n}\n","// src/modules/https-utils.ts\nimport { request } from \"https\";\nfunction isStatusOK(result) {\n return result.statusCode !== void 0 && result.statusCode >= 200 && result.statusCode <= 399;\n}\nfunction requestWorks(url, method) {\n return new Promise((resolve) => {\n try {\n const req = request(url, { method }, (result) => {\n resolve(isStatusOK(result));\n });\n req.on(\"error\", (_error) => {\n resolve(false);\n });\n req.end();\n } catch {\n resolve(false);\n }\n });\n}\n\n// src/modules/isUrlString.ts\nimport { URL } from \"url\";\nvar isUrlString = (url) => {\n if (typeof url !== \"string\") {\n return false;\n }\n const trimmedUrl = url.trim();\n if (trimmedUrl.includes(\" \")) {\n return false;\n }\n try {\n new URL(trimmedUrl);\n return true;\n } catch {\n return false;\n }\n};\n\n// src/modules/isUrlOnline.ts\nvar isUrlOnline = async (url) => {\n const isUrl = isUrlString(url);\n if (!isUrl) {\n return false;\n }\n let response = await requestWorks(url, \"HEAD\");\n if (response) {\n return true;\n }\n response = await requestWorks(url, \"GET\");\n return !!response;\n};\n\n// src/modules/prependHttp.ts\nvar prependHttp = ({\n url,\n https = true\n}) => {\n const trimmedUrl = url.trim();\n if (/^\\.*\\/|^(?!localhost)\\w+:/u.test(trimmedUrl)) {\n return url;\n }\n return trimmedUrl.replace(\n /^(?!(?:\\w+:)?\\/\\/)/u,\n https ? \"https://\" : \"http://\"\n );\n};\nexport {\n isUrlOnline,\n isUrlString,\n prependHttp\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<string>, 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<string> {\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<string>,\n platform: string,\n version: string,\n getUrl: (platform: string, version: string) => string | null | Promise<string | null>,\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","import { isArch } from \"../utils/env/isArch.js\"\n\n// passing \"\" to a tool installed by a package manager (apt, brew, choco) will result in the default version of that package manager.\n// the directly downloaded tools require a given version (\"\" doesn't work).\n\nfunction getLLVMDefault() {\n switch (process.platform) {\n case \"win32\":\n return \"17.0.6\"\n case \"linux\":\n // used for non-ubuntu (Fedora, Arch)\n // the suffixes relate to the suffix in the llvm releases\n return \"17.0.6-ubuntu-22.04\"\n case \"darwin\":\n return \"15.0.3\"\n default:\n return \"17.0.6\"\n }\n}\n\nexport const DefaultVersions: Record<string, string | undefined> = {\n llvm: getLLVMDefault(), // https://github.com/llvm/llvm-project/releases\n clangtidy: getLLVMDefault(),\n clangformat: getLLVMDefault(),\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\", // https://github.com/PowerShell/PowerShell/releases/tag/v7.4.5\n}\n\nexport const MinVersions: Record<string, string | undefined> = {\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 DefaultLinuxVersion: Record<string, Record<number, string> | 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 // the suffixes relate to the suffix in the llvm releases\n llvm: {\n 24: \"17.0.6-ubuntu-22.04\",\n 22: \"17.0.6-ubuntu-22.04\",\n 20: \"17.0.6-ubuntu-22.04\",\n 18: \"15.0.6-ubuntu-18.04\",\n 16: \"15.0.6-ubuntu-18.04\",\n 14: \"13.0.0-ubuntu-16.04\",\n },\n clangtidy: {\n 24: \"17.0.6-ubuntu-22.04\",\n 22: \"17.0.6-ubuntu-22.04\",\n 20: \"17.0.6-ubuntu-22.04\",\n 18: \"15.0.6-ubuntu-18.04\",\n 16: \"15.0.6-ubuntu-18.04\",\n 14: \"13.0.0-ubuntu-16.04\",\n },\n clangformat: {\n 24: \"17.0.6-ubuntu-22.04\",\n 22: \"17.0.6-ubuntu-22.04\",\n 20: \"17.0.6-ubuntu-22.04\",\n 18: \"15.0.6-ubuntu-18.04\",\n 16: \"15.0.6-ubuntu-18.04\",\n 14: \"13.0.0-ubuntu-16.04\",\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","import assert from \"assert\"\nimport { homedir } from \"os\"\nimport { 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, dirname, join } 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(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {\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\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 setupPipPackWithPython(foundPython, \"venv\", undefined, { upgrade: false, usePipx: false })\n } catch (err) {\n warning(`Failed to install pipx: ${(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: true, isLibrary: true, usePipx: false })\n } catch (err) {\n warning(`Failed to install setuptools or wheel: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\nasync function findOrSetupPython(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {\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 [\"python3\", \"python\"]) {\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)) {\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\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_raw(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_raw, { promise: true })\n","import type { Opts } from \"../cli-options.js\"\nimport type { Inputs } from \"../tool.js\"\nimport { DefaultLinuxVersion, 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 DefaultLinuxVersion) {\n return getDefaultLinuxVersion(osVersion, DefaultLinuxVersion[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<number, string>) {\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 * If the return is false, it means that versions don't match the target version\n */\nexport function syncVersions(opts: Opts, tools: Inputs[]): boolean {\n const toolsInUse = tools.filter((tool) => opts[tool] !== undefined)\n const toolsNonDefaultVersion = toolsInUse.filter((tool) => !isVersionDefault(opts[tool]))\n\n const targetVersion = toolsNonDefaultVersion.length >= 1 ? opts[toolsNonDefaultVersion[0]] : \"true\"\n\n if (toolsNonDefaultVersion.some((tool) => opts[tool] !== targetVersion)) {\n // error if any explicit versions don't match the target version\n return false\n }\n\n for (const tool of toolsInUse) {\n opts[tool] = 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_raw(): Promise<number[] | null> {\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_raw, { 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 // #46~22.04.1-Ubuntu SMP ...\n const osVersion: string = os.version()\n const versionSplitted = osVersion.split(\".\")\n const majorVersion = Number.parseInt(versionSplitted[0].replace(\"#\", \"\"), 10)\n const minorVersion = Number.parseInt(versionSplitted[1].replace(\"~\", \"\"), 10)\n const patchVersion = Number.parseInt(versionSplitted[2].split(\"-\")[0], 10)\n\n return [majorVersion, minorVersion, patchVersion]\n}\n","import { 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, dirname, join } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\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<InstallationInfo> {\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<InstallationInfo> {\n const { usePipx = true, user = true, upgrade = false, isLibrary = false } = options\n\n const isPipx = usePipx && !isLibrary && (await hasPipx(givenPython))\n const pip = isPipx ? \"pipx\" : \"pip\"\n\n const hasPackage = await pipHasPackage(givenPython, name)\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 info(`Failed to install ${name} via ${pip}: ${err}.`)\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} via ${pip}: ${err}.`)\n }\n }\n } else {\n 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\n const execPaths = await addPythonBaseExecPrefix(givenPython)\n const binDir = await findBinDir(execPaths, name)\n\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n\nexport async function hasPipx(givenPython: string) {\n return (await execa(givenPython, [\"-m\", \"pipx\", \"--help\"], { stdio: \"ignore\", reject: false })).exitCode === 0\n}\n\nasync function getPipxHome_raw() {\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_raw, { promise: true })\n\nasync function getPipxBinDir_raw() {\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_raw, { promise: true })\n\nasync function getPython_raw(): Promise<string> {\n const pythonBin = (await setupPython(getVersion(\"python\", undefined, await ubuntuVersion()), \"\", process.arch)).bin\n if (pythonBin === undefined) {\n throw new Error(\"Python binary was not found\")\n }\n return pythonBin\n}\nconst getPython = memoize(getPython_raw, { promise: true })\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 }\n return null\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<InstallationInfo> {\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 { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt, join } 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 { addEnv, addPath } from \"envosman\"\n\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { type ExecaReturnValue, execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt, join } 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 { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { loadGitHubAssetList, matchAsset } from \"../utils/github/load-assets.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\nasync function getGccPackageInfo(version: string, platform: NodeJS.Platform, arch: string): Promise<PackageInfo> {\n switch (platform) {\n case \"win32\": {\n const mingwAssets = await loadGitHubAssetList(\n join(__dirname, \"github_brechtsanders_winlibs_mingw.json\"),\n )\n const asset = matchAsset(\n mingwAssets,\n {\n version,\n arch: arch === \"x64\"\n ? \"x86_64\"\n : arch === \"ia32\"\n ? \"i386\"\n : arch,\n filterName: (name) => name.endsWith(\".7z\"),\n },\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<InstallationInfo | undefined> {\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\nasync function activateGcc(givenVersion: string, binDir: string, priority: number = 40) {\n const promises: Promise<void | ExecaReturnValue<string>>[] = []\n // Setup gcc as the compiler\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 (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 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 { readFile } from \"fs/promises\"\n\n/**\n * The list of assets of a GitHub release\n * @key tag The tag of the release\n * @value assets The names of the assets of the release\n */\nexport type Assets = Record<string, string[]>\n\nexport async function loadGitHubAssetList(path: string): Promise<Assets> {\n const data = await readFile(path, \"utf-8\")\n return JSON.parse(data)\n}\n\ntype MatchAssetOpts = {\n version: string\n arch?: string\n filterTag?: (version: string) => boolean\n filterName?: (asset: string) => boolean\n}\n\n/**\n * Match the asset that matches the version and arch\n */\nexport function matchAsset(\n assets: Assets,\n opts: MatchAssetOpts,\n): { tag: string; name: string } {\n // get the list of versions\n let tags = Object.keys(assets)\n\n // filter the versions\n if (opts.filterTag !== undefined) {\n tags = tags.filter(opts.filterTag)\n }\n\n if (tags.length === 0) {\n throw new Error(`no tag found for version ${opts.version}`)\n }\n\n // find the first tag that starts with the version\n // loop over the versions starting with the latest\n let tag: string | undefined\n for (const mingwVersion of tags) {\n if (mingwVersion.startsWith(opts.version)) {\n tag = mingwVersion\n break\n }\n }\n if (tag === undefined) {\n throw new Error(`version ${opts.version} is not supported`)\n }\n\n // get the list of assets\n let matchedNames = assets[tag]\n\n // filter the assets\n if (opts.filterName !== undefined) {\n matchedNames = matchedNames.filter(opts.filterName)\n }\n\n if (matchedNames.length === 0) {\n throw new Error(`no asset found for version ${opts.version} and arch ${opts.arch}`)\n }\n\n // use the first asset if the arch is not specified\n if (opts.arch === undefined) {\n return { tag, name: matchedNames[0] }\n }\n\n // find the asset that matches the arch\n for (const name of matchedNames) {\n // search each asset name for the arch\n if (name.includes(opts.arch)) {\n return { tag, name }\n }\n }\n\n throw new Error(`arch ${opts.arch} could not be found among ${JSON.stringify(matchedNames)}`)\n}\n","import { addExeExt } from \"patha\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name Ninja uses in their download links */\nfunction getNinjaPlatform(platform: NodeJS.Platform) {\n switch (platform) {\n case \"win32\":\n return \"win\"\n case \"darwin\":\n return \"mac\"\n case \"linux\":\n return \"linux\"\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Get the platform data for ninja */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction getNinjaPackageInfo(version: string, platform: NodeJS.Platform, _arch: string): PackageInfo {\n const ninjaPlatform = getNinjaPlatform(platform)\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<InstallationInfo> {\n return setupBin(\"ninja\", version, getNinjaPackageInfo, setupDir, arch)\n}\n","import { info } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { addExeExt, join } 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\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","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 { endGroup, startGroup } from \"@actions/core\"\nimport { error } from \"ci-log\"\nimport pTimeout from \"p-timeout\"\nimport { join } from \"patha\"\nimport { setupBrew } from \"setup-brew\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { type ToolName, 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 let hasLLVM = false\n try {\n hasLLVM = 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 return hasLLVM\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 // eslint-disable-next-line no-param-reassign\n const hasLLVM = [\"llvm\", \"clangformat\", \"clangtidy\"].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 return hasLLVM\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 { info, warning } from \"ci-log\"\nimport { isUrlOnline } from \"is-url-online\"\nimport { addExeExt } from \"patha\"\nimport semverLte from \"semver/functions/lte\"\nimport { extractExe, extractTarByExe } from \"../utils/setup/extract.js\"\nimport type { PackageInfo } from \"../utils/setup/setupBin.js\"\nimport { getSpecificVersionAndUrl, getSpecificVersions, getVersions } from \"../utils/setup/version.js\"\n\n// ================================================\n// Version\n// ================================================\n\n/** The specific and minimum LLVM versions supported by this action. */\nexport const VERSIONS: Set<string> = getVersions([\n \"3.5.0\",\n \"3.5.1\",\n \"3.5.2\",\n \"3.6.0\",\n \"3.6.1\",\n \"3.6.2\",\n \"3.7.0\",\n \"3.7.1\",\n \"3.8.0\",\n \"3.8.1\",\n \"3.9.0\",\n \"3.9.1\",\n \"4.0.0\",\n \"4.0.1\",\n \"5.0.0\",\n \"5.0.1\",\n \"5.0.2\",\n \"6.0.0\",\n \"6.0.1\",\n \"7.0.0\",\n \"7.0.1\",\n \"7.1.0\",\n \"8.0.0\",\n \"8.0.1\",\n \"9.0.0\",\n \"9.0.1\",\n \"10.0.0\",\n \"10.0.1\",\n \"11.0.0\",\n \"11.0.1\",\n \"11.1.0\",\n \"12.0.0\",\n \"12.0.1\",\n \"13.0.0\",\n \"13.0.1\",\n \"14.0.0\",\n \"14.0.1\",\n \"14.0.2\",\n \"14.0.3\",\n \"14.0.4\",\n \"14.0.5\",\n \"14.0.6\",\n \"15.0.0\",\n \"15.0.1\",\n \"15.0.2\",\n \"15.0.3\",\n \"15.0.4\",\n \"15.0.5\",\n \"15.0.6\",\n \"15.0.7\",\n \"16.0.0\",\n \"16.0.1\",\n \"16.0.2\",\n \"16.0.3\",\n \"16.0.4\",\n \"16.0.5\",\n \"16.0.6\",\n \"17.0.1\",\n \"17.0.2\",\n \"17.0.3\",\n \"17.0.4\",\n \"17.0.5\",\n \"17.0.6\",\n \"18.1.0\",\n \"18.1.1\",\n \"18.1.2\",\n \"18.1.3\",\n \"18.1.4\",\n \"18.1.5\",\n \"18.1.6\",\n \"18.1.7\",\n \"18.1.8\",\n])\n\n/** The LLVM versions that were never released for the Windows platform. */\nconst WIN32_MISSING: Set<string> = new Set([\"10.0.1\", \"15.0.5\", \"15.0.6\", \"17.0.5\"])\n\n/** The LLVM versions that were never released for the Darwin platform. */\nconst DARWIN_X64_MISSING = new Set([\n \"3.5.1\",\n \"3.6.1\",\n \"3.6.2\",\n \"3.7.1\",\n \"3.8.1\",\n \"3.9.1\",\n \"6.0.1\",\n \"7.0.1\",\n \"7.1.0\",\n \"8.0.1\",\n \"11.0.1\",\n \"11.1.0\",\n \"12.0.1\",\n \"15.0.4\",\n \"15.0.5\",\n \"15.0.6\",\n \"16.0.0\",\n \"16.0.1\",\n \"16.0.2\",\n \"16.0.3\",\n \"16.0.4\",\n \"16.0.5\",\n \"16.0.6\",\n \"17.0.1\",\n \"17.0.2\",\n \"17.0.3\",\n \"17.0.4\",\n \"17.0.5\",\n \"17.0.6\",\n \"18.1.0\",\n \"18.1.1\",\n \"18.1.2\",\n \"18.1.3\",\n \"18.1.4\",\n \"18.1.5\",\n \"18.1.6\",\n \"18.1.7\",\n \"18.1.8\",\n])\n\n/**\n * The LLVM versions that should use the last RC version instead of the release version for the Linux (Ubuntu) platform.\n * This is useful when there were binaries released for the Linux (Ubuntu) platform for the last RC version but not for\n * the actual release version.\n */\nconst UBUNTU_RC: Map<string, string> = new Map()\n\n/**\n * The (latest) Ubuntu versions for each LLVM version.\n *\n * https://github.com/llvm/llvm-project/releases/tag/llvmorg-14.0.1 or https://releases.llvm.org/14.0.1\n */\n// TODO change based on ubuntu version\nconst UBUNTU_X64_SUFFIX_MAP: { [key: string]: string } = {\n \"3.5.0\": \"-ubuntu-14.04\",\n \"3.5.1\": \"\",\n \"3.5.2\": \"-ubuntu-14.04\",\n \"3.6.0\": \"-ubuntu-14.04\",\n \"3.6.1\": \"-ubuntu-14.04\",\n \"3.6.2\": \"-ubuntu-14.04\",\n \"3.7.0\": \"-ubuntu-14.04\",\n \"3.7.1\": \"-ubuntu-14.04\",\n \"3.8.0\": \"-ubuntu-16.04\",\n \"3.8.1\": \"-ubuntu-16.04\",\n \"3.9.0\": \"-ubuntu-16.04\",\n \"3.9.1\": \"-ubuntu-16.04\",\n \"4.0.0\": \"-ubuntu-16.04\",\n \"5.0.0\": \"-ubuntu16.04\",\n \"5.0.1\": \"-ubuntu-16.04\",\n \"5.0.2\": \"-ubuntu-16.04\",\n \"6.0.0\": \"-ubuntu-16.04\",\n \"6.0.1\": \"-ubuntu-16.04\",\n \"7.0.0\": \"-ubuntu-16.04\",\n \"7.0.1\": \"-ubuntu-18.04\",\n \"7.1.0\": \"-ubuntu-14.04\",\n \"8.0.0\": \"-ubuntu-18.04\",\n \"9.0.0\": \"-ubuntu-18.04\",\n \"9.0.1\": \"-ubuntu-16.04\",\n \"10.0.0\": \"-ubuntu-18.04\",\n \"10.0.1\": \"-ubuntu-16.04\",\n \"11.0.0\": \"-ubuntu-20.04\",\n \"11.0.1\": \"-ubuntu-16.04\",\n \"11.1.0\": \"-ubuntu-16.04\",\n \"12.0.0\": \"-ubuntu-20.04\",\n \"12.0.1\": \"-ubuntu-16.04\",\n \"13.0.0\": \"-ubuntu-20.04\",\n \"13.0.0-ubuntu-16.04\": \"-ubuntu-16.04\",\n \"13.0.0-ubuntu-20.04\": \"-ubuntu-20.04\",\n \"13.0.1\": \"-ubuntu-18.04\",\n \"13.0.1-ubuntu-18.04\": \"-ubuntu-18.04\",\n \"14.0.0\": \"-ubuntu-18.04\",\n \"15.0.2\": \"-rhel86\",\n \"15.0.5\": \"-ubuntu-18.04\",\n \"15.0.6\": \"-ubuntu-18.04\",\n \"16.0.0\": \"-ubuntu-18.04\",\n \"16.0.2\": \"-ubuntu-22.04\",\n \"16.0.3\": \"-ubuntu-22.04\",\n \"16.0.4\": \"-ubuntu-22.04\",\n \"17.0.2\": \"-ubuntu-22.04\",\n \"17.0.4\": \"-ubuntu-22.04\",\n \"17.0.5\": \"-ubuntu-22.04\",\n \"17.0.6\": \"-ubuntu-22.04\",\n \"18.1.4\": \"-ubuntu-18.04\",\n \"18.1.7\": \"-ubuntu-18.04\",\n \"18.1.8\": \"-ubuntu-18.04\",\n}\n\n/** The latest supported LLVM version for the Linux (Ubuntu) platform. */\nconst MAX_UBUNTU: string = \"18.1.8\"\n\n// ================================================\n// URL\n// ================================================\n\n/** Gets a LLVM download URL for GitHub. */\nfunction getGitHubUrl(version: string, prefix: string, suffix: string): string {\n const file = `${prefix}${version}${suffix}`\n return `https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${file}`\n}\n\n/** Gets a LLVM download URL for https://releases.llvm.org. */\nfunction getReleaseUrl(version: string, prefix: string, suffix: string): string {\n const file = `${prefix}${version}${suffix}`\n return `https://releases.llvm.org/${version}/${file}`\n}\n\n/** Gets an LLVM download URL for the Darwin platform. */\nfunction getDarwinUrl(version: string): string | null {\n if (DARWIN_X64_MISSING.has(version)) {\n return null\n }\n\n const darwin = version === \"9.0.0\" ? \"-darwin-apple\" : \"-apple-darwin\"\n const prefix = \"clang+llvm-\"\n const suffix = `-x86_64${darwin}.tar.xz`\n if (semverLte(version, \"9.0.1\")) {\n return getReleaseUrl(version, prefix, suffix)\n } else {\n return getGitHubUrl(version, prefix, suffix)\n }\n}\n\n/** Gets an LLVM download URL for the Linux (Ubuntu) platform. */\nexport function getLinuxUrl(versionGiven: string): string {\n let version = versionGiven\n\n const rc = UBUNTU_RC.get(version)\n if (rc !== undefined) {\n version = rc\n }\n\n let linuxVersion: string\n // ubuntu-version is specified\n if (version.includes(\"ubuntu\")) {\n const givenUbuntuVersion = version.replace(/-ubuntu-.*/, \"\")\n if (!VERSIONS.has(givenUbuntuVersion)) {\n throw new Error(`Unsupported Ubuntu version: ${givenUbuntuVersion}`)\n }\n linuxVersion = version.replace(givenUbuntuVersion, \"\")\n version = getSpecificVersions(VERSIONS, givenUbuntuVersion)[0]\n } else if (version !== \"\" && version in UBUNTU_X64_SUFFIX_MAP) {\n linuxVersion = UBUNTU_X64_SUFFIX_MAP[version]\n } else {\n // default to the maximum version\n linuxVersion = UBUNTU_X64_SUFFIX_MAP[MAX_UBUNTU]\n warning(`Falling back to LLVM version ${MAX_UBUNTU} ${linuxVersion} for the Ubuntu.`)\n }\n\n const prefix = \"clang+llvm-\"\n\n let suffix: string\n if (version === \"5.0.0\") {\n suffix = `-linux-x86_64${linuxVersion}.tar.xz`\n } else if (linuxVersion.includes(\"-rhel86\")) {\n suffix = `-x86_64-unknown-linux-gnu${linuxVersion}.tar.xz`\n } else {\n suffix = `-x86_64-linux-gnu${linuxVersion}.tar.xz`\n }\n\n if (semverLte(version, \"9.0.1\")) {\n return getReleaseUrl(version, prefix, suffix)\n } else {\n return getGitHubUrl(version, prefix, suffix)\n }\n}\n\n/** Gets an LLVM download URL for the Windows platform. */\nasync function getWin32Url(version: string): Promise<string | null> {\n if (WIN32_MISSING.has(version)) {\n return null\n }\n\n const prefix = \"LLVM-\"\n const suffix = semverLte(version, \"3.7.0\") ? \"-win32.exe\" : \"-win64.exe\"\n\n const olderThan9_1 = semverLte(version, \"9.0.1\")\n let url: string\n let fallback = false\n if (olderThan9_1) {\n url = getReleaseUrl(version, prefix, suffix)\n if (!(await isUrlOnline(url))) {\n fallback = true // fallback to github\n }\n }\n if (fallback || !olderThan9_1) {\n url = getGitHubUrl(version, prefix, suffix)\n }\n\n return url!\n}\n\n/** Gets an LLVM download URL. */\nexport function getUrl(platform: string, version: string): string | null | Promise<string | null> {\n switch (platform) {\n case \"darwin\":\n return getDarwinUrl(version)\n case \"linux\":\n return getLinuxUrl(version)\n case \"win32\":\n return getWin32Url(version)\n default:\n return null\n }\n}\n\nexport async function getLLVMPackageInfo(\n version: string,\n platform: NodeJS.Platform,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _arch: string,\n): Promise<PackageInfo> {\n const [specificVersion, url] = await getSpecificVersionAndUrl(VERSIONS, platform, version, getUrl)\n info(`specific llvm version: ${specificVersion}`)\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","import { delimiter } from \"path\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt, join } 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 { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type InstallationInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { semverCoerceIfInvalid } from \"../utils/setup/version.js\"\nimport { getVersion } from \"../versions/versions.js\"\nimport { LLVMPackages, setupLLVMApt } from \"./llvm_installer.js\"\nimport { getLLVMPackageInfo } from \"./llvm_url.js\"\n\nexport async function setupLLVM(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {\n const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)\n await activateLLVM(installationInfo.installDir ?? setupDir)\n return installationInfo\n}\n\nasync function setupLLVMWithoutActivation_raw(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_raw, { 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 coeredVersion = semverCoerceIfInvalid(version)\n const majorVersion = Number.parseInt(coeredVersion.split(\".\")[0], 10)\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\nasync function llvmBinaryDeps_raw(majorVersion: number) {\n if (isUbuntu()) {\n if (majorVersion <= 10) {\n await installAptPack([{ name: \"libtinfo5\" }])\n } else {\n await installAptPack([{ name: \"libtinfo-dev\" }])\n }\n }\n}\nconst llvmBinaryDeps = memoize(llvmBinaryDeps_raw, { promise: true })\n\nasync function setupLLVMDeps_raw(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_raw, { promise: true })\n\nexport async function activateLLVM(directory: string) {\n const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n\n const actPromises: Promise<void>[] = [\n // the output of this action\n addEnv(\"LLVM_PATH\", directory, rcOptions),\n\n // Setup LLVM as the compiler\n addEnv(\"LD_LIBRARY_PATH\", `${directory}/lib${delimiter}${ld}`, rcOptions),\n addEnv(\"DYLD_LIBRARY_PATH\", `${directory}/lib${delimiter}${dyld}`, rcOptions),\n\n // compiler flags\n addEnv(\"LDFLAGS\", `-L\"${directory}/lib\"`, rcOptions),\n addEnv(\"CPPFLAGS\", `-I\"${directory}/include\"`, rcOptions),\n\n // compiler paths\n addEnv(\"CC\", addExeExt(`${directory}/bin/clang`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${directory}/bin/clang++`), rcOptions),\n\n addEnv(\"LIBRARY_PATH\", `${directory}/lib`, rcOptions),\n\n // os sdks\n setupMacOSSDK(),\n ]\n\n // TODO Causes issues with clangd\n // TODO Windows builds fail with llvm's CPATH\n // if (process.platform !== \"win32\") {\n // if (await pathExists(`${directory}/lib/clang/${version}/include`)) {\n // promises.push(addEnv(\"CPATH\", `${directory}/lib/clang/${version}/include`, rcOptions))\n // } else if (await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)) {\n // promises.push(addEnv(\"CPATH\", `${directory}/lib/clang/${llvmMajor}/include`, rcOptions))\n // }\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<InstallationInfo> {\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","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { findVcvarsall, vsversion_to_versionnumber } from \"msvc-dev-cmd/lib.js\"\nimport { join } from \"patha\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupVCVarsall } from \"../vcvarsall/vcvarsall.js\"\n\nimport { error, info, warning } from \"ci-log\"\nimport { pathExists } from \"path-exists\"\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 { 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<string, string | undefined>\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<InstallationInfo> {\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<Record<Inputs, string | undefined> & { 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 <compiler> 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 <version> 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\": { tools: \"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat\" },\n \"build system\": { tools: \"--cmake, --ninja, --meson, --make, --task, --bazel\" },\n \"package manager\": { tools: \"--vcpkg, --conan, --choco, --brew, --nala\" },\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<Inputs, string | undefined> & {\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","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 {fileURLToPath} from 'node:url';\nimport pathKey from 'path-key';\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 cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;\n\tconst cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\tif (preferLocal) {\n\t\tapplyPreferLocal(result, cwdPath);\n\t}\n\n\tif (addExecPath) {\n\t\tapplyExecPath(result, execPath, cwdPath);\n\t}\n\n\treturn [...result, pathOption].join(path.delimiter);\n};\n\nconst applyPreferLocal = (result, cwdPath) => {\n\tlet previous;\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n};\n\n// Ensure the running `node` binary is used\nconst applyExecPath = (result, execPath, cwdPath) => {\n\tconst execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;\n\tresult.push(path.resolve(cwdPath, execPathString, '..'));\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","const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n","import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\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 process from 'node:process';\nimport {signalsByName} from 'human-signals';\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nexport const makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout, cwd = process.cwd()}},\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.escapedCommand = escapedCommand;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\terror.cwd = cwd;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n","const aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nexport const normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn 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 ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn 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, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\n// `ipc` is pushed unless it is already present\nexport const normalizeStdioNode = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n","// 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\nvar process = global.process\n\nconst processOk = function (process) {\n return 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'\n}\n\n// some kind of non-node environment, just no-op\n/* istanbul ignore if */\nif (!processOk(process)) {\n module.exports = function () {\n return function () {}\n }\n} else {\n var assert = require('assert')\n var signals = require('./signals.js')\n var isWin = /^win/i.test(process.platform)\n\n var EE = require('events')\n /* istanbul ignore if */\n if (typeof EE !== 'function') {\n EE = EE.EventEmitter\n }\n\n var emitter\n if (process.__signal_exit_emitter__) {\n emitter = process.__signal_exit_emitter__\n } else {\n emitter = process.__signal_exit_emitter__ = new EE()\n emitter.count = 0\n emitter.emitted = {}\n }\n\n // Because this emitter is a global, we have to check to see if a\n // previous version of this library failed to enable infinite listeners.\n // I know what you're about to say. But literally everything about\n // signal-exit is a compromise with evil. Get used to it.\n if (!emitter.infinite) {\n emitter.setMaxListeners(Infinity)\n emitter.infinite = true\n }\n\n module.exports = function (cb, opts) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return function () {}\n }\n assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')\n\n if (loaded === false) {\n load()\n }\n\n var ev = 'exit'\n if (opts && opts.alwaysLast) {\n ev = 'afterexit'\n }\n\n var remove = function () {\n emitter.removeListener(ev, cb)\n if (emitter.listeners('exit').length === 0 &&\n emitter.listeners('afterexit').length === 0) {\n unload()\n }\n }\n emitter.on(ev, cb)\n\n return remove\n }\n\n var unload = function unload () {\n if (!loaded || !processOk(global.process)) {\n return\n }\n loaded = false\n\n signals.forEach(function (sig) {\n try {\n process.removeListener(sig, sigListeners[sig])\n } catch (er) {}\n })\n process.emit = originalProcessEmit\n process.reallyExit = originalProcessReallyExit\n emitter.count -= 1\n }\n module.exports.unload = unload\n\n var emit = function emit (event, code, signal) {\n /* istanbul ignore if */\n if (emitter.emitted[event]) {\n return\n }\n emitter.emitted[event] = true\n emitter.emit(event, code, signal)\n }\n\n // { <signal>: <listener fn>, ... }\n var sigListeners = {}\n signals.forEach(function (sig) {\n sigListeners[sig] = function listener () {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\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 var listeners = process.listeners(sig)\n if (listeners.length === emitter.count) {\n unload()\n emit('exit', null, sig)\n /* istanbul ignore next */\n emit('afterexit', null, sig)\n /* istanbul ignore next */\n if (isWin && sig === 'SIGHUP') {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n sig = 'SIGINT'\n }\n /* istanbul ignore next */\n process.kill(process.pid, sig)\n }\n }\n })\n\n module.exports.signals = function () {\n return signals\n }\n\n var loaded = false\n\n var load = function load () {\n if (loaded || !processOk(global.process)) {\n return\n }\n loaded = true\n\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 emitter.count += 1\n\n signals = signals.filter(function (sig) {\n try {\n process.on(sig, sigListeners[sig])\n return true\n } catch (er) {\n return false\n }\n })\n\n process.emit = processEmit\n process.reallyExit = processReallyExit\n }\n module.exports.load = load\n\n var originalProcessReallyExit = process.reallyExit\n var processReallyExit = function processReallyExit (code) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n process.exitCode = code || /* istanbul ignore next */ 0\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n originalProcessReallyExit.call(process, process.exitCode)\n }\n\n var originalProcessEmit = process.emit\n var processEmit = function processEmit (ev, arg) {\n if (ev === 'exit' && processOk(global.process)) {\n /* istanbul ignore else */\n if (arg !== undefined) {\n process.exitCode = arg\n }\n var ret = originalProcessEmit.apply(this, arguments)\n /* istanbul ignore next */\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n return ret\n } else {\n return originalProcessEmit.apply(this, arguments)\n }\n }\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// 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.\nmodule.exports = [\n 'SIGABRT',\n 'SIGALRM',\n 'SIGHUP',\n 'SIGINT',\n 'SIGTERM'\n]\n\nif (process.platform !== 'win32') {\n module.exports.push(\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n module.exports.push(\n 'SIGIO',\n 'SIGPOLL',\n 'SIGPWR',\n 'SIGSTKFLT',\n 'SIGUNUSED'\n )\n}\n","import os from 'node:os';\nimport onExit from 'signal-exit';\n\nconst DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;\n\n// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior\nexport const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {\n\tconst killResult = kill(signal);\n\tsetKillTimeout(kill, signal, options, killResult);\n\treturn killResult;\n};\n\nconst setKillTimeout = (kill, signal, options, killResult) => {\n\tif (!shouldForceKill(signal, options, killResult)) {\n\t\treturn;\n\t}\n\n\tconst timeout = getForceKillAfterTimeout(options);\n\tconst t = setTimeout(() => {\n\t\tkill('SIGKILL');\n\t}, timeout);\n\n\t// Guarded because there's no `.unref()` when `execa` is used in the renderer\n\t// process in Electron. This cannot be tested since we don't run tests in\n\t// Electron.\n\t// istanbul ignore else\n\tif (t.unref) {\n\t\tt.unref();\n\t}\n};\n\nconst shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;\n\nconst isSigterm = signal => signal === os.constants.signals.SIGTERM\n\t\t|| (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');\n\nconst getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {\n\tif (forceKillAfterTimeout === true) {\n\t\treturn DEFAULT_FORCE_KILL_TIMEOUT;\n\t}\n\n\tif (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {\n\t\tthrow new TypeError(`Expected the \\`forceKillAfterTimeout\\` option to be a non-negative integer, got \\`${forceKillAfterTimeout}\\` (${typeof forceKillAfterTimeout})`);\n\t}\n\n\treturn forceKillAfterTimeout;\n};\n\n// `childProcess.cancel()`\nexport const spawnedCancel = (spawned, context) => {\n\tconst killResult = spawned.kill();\n\n\tif (killResult) {\n\t\tcontext.isCanceled = true;\n\t}\n};\n\nconst timeoutKill = (spawned, signal, reject) => {\n\tspawned.kill(signal);\n\treject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));\n};\n\n// `timeout` option handling\nexport const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {\n\tif (timeout === 0 || timeout === undefined) {\n\t\treturn spawnedPromise;\n\t}\n\n\tlet timeoutId;\n\tconst timeoutPromise = new Promise((resolve, reject) => {\n\t\ttimeoutId = setTimeout(() => {\n\t\t\ttimeoutKill(spawned, killSignal, reject);\n\t\t}, timeout);\n\t});\n\n\tconst safeSpawnedPromise = spawnedPromise.finally(() => {\n\t\tclearTimeout(timeoutId);\n\t});\n\n\treturn Promise.race([timeoutPromise, safeSpawnedPromise]);\n};\n\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// `cleanup` option handling\nexport const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {\n\tif (!cleanup || detached) {\n\t\treturn timedPromise;\n\t}\n\n\tconst removeExitHandler = onExit(() => {\n\t\tspawned.kill();\n\t});\n\n\treturn timedPromise.finally(() => {\n\t\tremoveExitHandler();\n\t});\n};\n","import {createWriteStream} from 'node:fs';\nimport {ChildProcess} from 'node:child_process';\nimport {isWritableStream} from 'is-stream';\n\nconst isExecaChildProcess = target => target instanceof ChildProcess && typeof target.then === 'function';\n\nconst pipeToTarget = (spawned, streamName, target) => {\n\tif (typeof target === 'string') {\n\t\tspawned[streamName].pipe(createWriteStream(target));\n\t\treturn spawned;\n\t}\n\n\tif (isWritableStream(target)) {\n\t\tspawned[streamName].pipe(target);\n\t\treturn spawned;\n\t}\n\n\tif (!isExecaChildProcess(target)) {\n\t\tthrow new TypeError('The second argument must be a string, a stream or an Execa child process.');\n\t}\n\n\tif (!isWritableStream(target.stdin)) {\n\t\tthrow new TypeError('The target child process\\'s stdin must be available.');\n\t}\n\n\tspawned[streamName].pipe(target.stdin);\n\treturn target;\n};\n\nexport const addPipeMethods = spawned => {\n\tif (spawned.stdout !== null) {\n\t\tspawned.pipeStdout = pipeToTarget.bind(undefined, spawned, 'stdout');\n\t}\n\n\tif (spawned.stderr !== null) {\n\t\tspawned.pipeStderr = pipeToTarget.bind(undefined, spawned, 'stderr');\n\t}\n\n\tif (spawned.all !== undefined) {\n\t\tspawned.pipeAll = pipeToTarget.bind(undefined, spawned, 'all');\n\t}\n};\n","'use strict';\nconst {PassThrough: PassThroughStream} = require('stream');\n\nmodule.exports = options => {\n\toptions = {...options};\n\n\tconst {array} = options;\n\tlet {encoding} = options;\n\tconst isBuffer = encoding === 'buffer';\n\tlet objectMode = false;\n\n\tif (array) {\n\t\tobjectMode = !(encoding || isBuffer);\n\t} else {\n\t\tencoding = encoding || 'utf8';\n\t}\n\n\tif (isBuffer) {\n\t\tencoding = null;\n\t}\n\n\tconst stream = new PassThroughStream({objectMode});\n\n\tif (encoding) {\n\t\tstream.setEncoding(encoding);\n\t}\n\n\tlet length = 0;\n\tconst chunks = [];\n\n\tstream.on('data', chunk => {\n\t\tchunks.push(chunk);\n\n\t\tif (objectMode) {\n\t\t\tlength = chunks.length;\n\t\t} else {\n\t\t\tlength += chunk.length;\n\t\t}\n\t});\n\n\tstream.getBufferedValue = () => {\n\t\tif (array) {\n\t\t\treturn chunks;\n\t\t}\n\n\t\treturn isBuffer ? Buffer.concat(chunks, length) : chunks.join('');\n\t};\n\n\tstream.getBufferedLength = () => length;\n\n\treturn stream;\n};\n","'use strict';\n\nconst { PassThrough } = require('stream');\n\nmodule.exports = function (/*streams...*/) {\n var sources = []\n var output = new PassThrough({objectMode: true})\n\n output.setMaxListeners(0)\n\n output.add = add\n output.isEmpty = isEmpty\n\n output.on('unpipe', remove)\n\n Array.prototype.slice.call(arguments).forEach(add)\n\n return output\n\n function add (source) {\n if (Array.isArray(source)) {\n source.forEach(add)\n return this\n }\n\n sources.push(source);\n source.once('end', remove.bind(null, source))\n source.once('error', output.emit.bind(output, 'error'))\n source.pipe(output, {end: false})\n return this\n }\n\n function isEmpty () {\n return sources.length == 0;\n }\n\n function remove (source) {\n sources = sources.filter(function (it) { return it !== source })\n if (!sources.length && output.readable) { output.end() }\n }\n}\n","import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\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\n// The return value is a mixin of `childProcess` and `Promise`\nexport const mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function'\n\t\t\t? (...args) => Reflect.apply(descriptor.value, promise(), args)\n\t\t\t: descriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n};\n\n// Use promises instead of `child_process` events\nexport const getSpawnedPromise = spawned => new Promise((resolve, reject) => {\n\tspawned.on('exit', (exitCode, signal) => {\n\t\tresolve({exitCode, signal});\n\t});\n\n\tspawned.on('error', error => {\n\t\treject(error);\n\t});\n\n\tif (spawned.stdin) {\n\t\tspawned.stdin.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\t}\n});\n","import {Buffer} from 'node:buffer';\nimport {ChildProcess} from 'node:child_process';\n\nconst normalizeArgs = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn [file];\n\t}\n\n\treturn [file, ...args];\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w.-]+$/;\nconst DOUBLE_QUOTES_REGEXP = /\"/g;\n\nconst escapeArg = arg => {\n\tif (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {\n\t\treturn arg;\n\t}\n\n\treturn `\"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\\\\"')}\"`;\n};\n\nexport const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');\n\nexport const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');\n\nconst SPACES_REGEXP = / +/g;\n\n// Handle `execaCommand()`\nexport const parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().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[tokens.length - 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 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 (\n\t\ttypeOfExpression === 'object'\n\t\t&& expression !== null\n\t\t&& !(expression instanceof ChildProcess)\n\t\t&& 'stdout' in expression\n\t) {\n\t\tconst typeOfStdout = typeof expression.stdout;\n\n\t\tif (typeOfStdout === 'string') {\n\t\t\treturn expression.stdout;\n\t\t}\n\n\t\tif (Buffer.isBuffer(expression.stdout)) {\n\t\t\treturn expression.stdout.toString();\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected \"${typeOfStdout}\" stdout in template expression`);\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens[tokens.length - 1]}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tconst templateString = template ?? templates.raw[index];\n\tconst templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);\n\tconst newTokens = concatTokens(\n\t\ttokens,\n\t\ttemplateTokens,\n\t\ttemplateString.startsWith(' '),\n\t);\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(\n\t\tnewTokens,\n\t\texpressionTokens,\n\t\ttemplateString.endsWith(' '),\n\t);\n};\n\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({templates, expressions, tokens, index, template});\n\t}\n\n\treturn tokens;\n};\n\n","import {debuglog} from 'node:util';\nimport process from 'node:process';\n\nexport const verboseDefault = debuglog('execa').enabled;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getTimestamp = () => {\n\tconst date = new Date();\n\treturn `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;\n};\n\nexport const logCommand = (escapedCommand, {verbose}) => {\n\tif (!verbose) {\n\t\treturn;\n\t}\n\n\tprocess.stderr.write(`[${getTimestamp()}] ${escapedCommand}\\n`);\n};\n","export default function stripFinalNewline(input) {\n\tconst LF = typeof input === 'string' ? '\\n' : '\\n'.charCodeAt();\n\tconst CR = typeof input === 'string' ? '\\r' : '\\r'.charCodeAt();\n\n\tif (input[input.length - 1] === LF) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\tif (input[input.length - 1] === CR) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\treturn input;\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","\nmodule.exports = require('./lib/time-delta.js');\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;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_fs=require('fs'),fs=_interopRequireWildcard(_fs),_url=require('url'),_path=require('path'),path=_interopRequireWildcard(_path),_http=require('http'),http=_interopRequireWildcard(_http),_https=require('https'),https=_interopRequireWildcard(_https),_events=require('events');function _interopRequireWildcard(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b.default=a,b}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return b&&('object'==typeof b||'function'==typeof b)?b:a}function _inherits(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function, not '+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var DH_STATES=exports.DH_STATES={IDLE:'IDLE',SKIPPED:'SKIPPED',STARTED:'STARTED',DOWNLOADING:'DOWNLOADING',RETRY:'RETRY',PAUSED:'PAUSED',RESUMED:'RESUMED',STOPPED:'STOPPED',FINISHED:'FINISHED',FAILED:'FAILED'},DownloaderHelper=exports.DownloaderHelper=function(a){function b(a,c){var d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};_classCallCheck(this,b);var e=_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,{captureRejections:!0}));return e.__validate(a,c)?(e.url=e.requestURL=a.trim(),e.state=DH_STATES.IDLE,e.__defaultOpts={body:null,retry:!1,method:'GET',headers:{},fileName:'',timeout:-1,metadata:null,override:!1,forceResume:!1,removeOnStop:!0,removeOnFail:!0,progressThrottle:1e3,httpRequestOptions:{},httpsRequestOptions:{},resumeOnIncomplete:!0,resumeIfFileExists:!1,resumeOnIncompleteMaxRetry:5},e.__opts=Object.assign({},e.__defaultOpts),e.__pipes=[],e.__total=0,e.__downloaded=0,e.__progress=0,e.__retryCount=0,e.__retryTimeout=null,e.__resumeRetryCount=0,e.__states=DH_STATES,e.__promise=null,e.__request=null,e.__response=null,e.__isAborted=!1,e.__isResumed=!1,e.__isResumable=!1,e.__isRedirected=!1,e.__destFolder=c,e.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},e.__fileName='',e.__filePath='',e.updateOptions(d),e):_possibleConstructorReturn(e)}return _inherits(b,a),_createClass(b,[{key:'start',value:function c(){var a=this,b=function(){return new Promise(function(b,c){a.__promise={resolve:b,reject:c},a.__start()})};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then(function(c){var d=c.name,e=c.total,f=a.__opts.override;if(a.__opts.override=!0,a.__filePath=a.__getFilePath(d),a.__opts.override=f,a.__filePath&&fs.existsSync(a.__filePath)){var g=a.__getFilesizeInBytes(a.__filePath);return g===e?b():a.resumeFromFile(a.__filePath,{total:e,fileName:d})}return b()}):b()}},{key:'pause',value:function b(){var a=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(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 a.__setState(a.__states.PAUSED),a.emit('pause'),!0}))}},{key:'resume',value:function a(){return this.__promise?this.state===this.__states.STOPPED?Promise.resolve(!1):(this.__setState(this.__states.RESUMED),this.__isResumable&&(this.__isResumed=!0,this.__reqOptions.headers.range='bytes='+this.__downloaded+'-'),this.emit('resume',this.__isResumed),this.__start()):this.start()}},{key:'stop',value:function c(){var a=this;if(this.state===this.__states.STOPPED)return Promise.resolve(!0);var b=function(){return new Promise(function(b,c){fs.access(a.__filePath,function(d){return d?(a.__emitStop(),b(!0)):void fs.unlink(a.__filePath,function(d){return d?(a.__setState(a.__states.FAILED),a.emit('error',d),c(d)):void(a.__emitStop(),b(!0))})})})};return this.__requestAbort(),this.__closeFileStream().then(function(){return a.__opts.removeOnStop?b():(a.__emitStop(),Promise.resolve(!0))})}},{key:'pipe',value:function c(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return this.__pipes.push({stream:a,options:b}),a}},{key:'unpipe',value:function d(){var a=this,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,c=function(b){return a.__response?a.__response.unpipe(b):b.unpipe()};if(b){var e=this.__pipes.find(function(a){return a.stream===b});return void(e&&(c(b),this.__pipes=this.__pipes.filter(function(a){return a.stream!==b})))}this.__pipes.forEach(function(a){return c(a.stream)}),this.__pipes=[]}},{key:'getDownloadPath',value:function a(){return this.__filePath}},{key:'isResumable',value:function a(){return this.__isResumable}},{key:'updateOptions',value:function c(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'';this.__opts=Object.assign({},this.__opts,a),this.__headers=this.__opts.headers,-1<this.__opts.timeout&&(this.__opts.httpRequestOptions.timeout=this.__opts.timeout,this.__opts.httpsRequestOptions.timeout=this.__opts.timeout),('number'!=typeof this.__opts.progressThrottle||0>this.__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<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return this.__opts.override=!0,this.__filePath=a,(c.total&&c.fileName?Promise.resolve({name:c.fileName,total:c.total}):this.getTotalSize()).then(function(a){var d=a.name,e=a.total;return b.__total=c.total||e,b.__fileName=c.fileName||d,b.__downloaded=c.downloaded||b.__getFilesizeInBytes(b.__filePath),b.__reqOptions.headers.range='bytes='+b.__downloaded+'-',b.__isResumed=!0,b.__isResumable=!0,b.__setState(b.__states.RESUMED),b.emit('resume',b.__isResumed),new Promise(function(a,c){b.__promise={resolve:a,reject:c},b.__start()})})}},{key:'__start',value:function a(){this.__isRedirected||this.state===this.__states.RESUMED||(this.emit('start'),this.__setState(this.__states.STARTED),this.__initProtocol(this.url)),this.__response=null,this.__isAborted=!1,this.__request&&!this.__request.destroyed&&this.__request.destroy(),this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__request=this.__downloadRequest(this.__promise.resolve,this.__promise.reject),this.__request.on('error',this.__onError(this.__promise.resolve,this.__promise.reject)),this.__request.on('timeout',this.__onTimeout(this.__promise.resolve,this.__promise.reject)),this.__request.on('uncaughtException',this.__onError(this.__promise.resolve,this.__promise.reject,!0)),this.__opts.body&&this.__request.write(this.__opts.body),this.__request.end()}},{key:'__resolvePending',value:function b(){if(this.__promise){var a=this.__promise.resolve;return this.__promise=null,a(!0)}}},{key:'__downloadRequest',value:function d(a,b){var c=this;return this.__protocol.request(this.__reqOptions,function(d){if(c.__response=d,c.__isResumed||(c.__total=parseInt(d.headers['content-length'])||null,c.__resetStats()),c.__isRequireRedirect(d)){var e=/^https?:\\/\\//.test(d.headers.location)?d.headers.location:new _url.URL(d.headers.location,c.url).href;return c.__isRedirected=!0,c.__initProtocol(e),c.emit('redirected',e,c.url),c.__start()}if(200!==d.statusCode&&206!==d.statusCode){var f=new Error('Response status was '+d.statusCode);return f.status=d.statusCode||0,f.body=d.body||'',c.__setState(c.__states.FAILED),c.emit('error',f),b(f)}c.__opts.forceResume?c.__isResumable=!0:d.headers.hasOwnProperty('accept-ranges')&&'none'!==d.headers['accept-ranges']&&(c.__isResumable=!0),c.__startDownload(d,a,b)})}},{key:'__startDownload',value:function h(a,b,c){var d=this,e=a;if(!this.__isResumed){var i=this.__getFileNameFromHeaders(a.headers);if(this.__filePath=this.__getFilePath(i),this.__fileName=this.__filePath.split(path.sep).pop(),fs.existsSync(this.__filePath)){var f=this.__getFilesizeInBytes(this.__filePath),g=this.__total?this.__total:0;if('object'===_typeof(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||f>=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 300<a.statusCode&&400>a.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<arguments.length&&void 0!==arguments[2])&&arguments[2];return function(a){return c.__pipes=[],d&&c.__requestAbort(),c.state===c.__states.STOPPED||c.state===c.__states.FAILED?void 0:c.__opts.retry?c.__retry(a).catch(function(d){c.__removeFile().finally(function(){c.__setState(c.__states.FAILED),c.emit('error',d?d:a),b(d?d:a)})}):c.__removeFile().finally(function(){c.__setState(c.__states.FAILED),c.emit('error',a),b(a)})}}},{key:'__retry',value:function h(){var a=this,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(!this.__opts.retry||'object'!==_typeof(this.__opts.retry))return Promise.reject(b||new Error('wrong retry options'));var c=this.__opts.retry,d=c.delay,e=void 0===d?0:d,f=c.maxRetries,g=void 0===f?999:f;return this.__retryCount>=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(0<a.__downloaded?a.resume():a.__start())},e)})}))}},{key:'__onTimeout',value:function d(a,b){var c=this;return function(){return c.__requestAbort(),c.__opts.retry?c.__retry(new Error('timeout')).catch(function(a){c.__removeFile().finally(function(){c.__setState(c.__states.FAILED),a?b(a):(c.emit('timeout'),b(new Error('timeout')))})}):c.__removeFile().finally(function(){c.__setState(c.__states.FAILED),c.emit('timeout'),b(new Error('timeout'))})}}},{key:'__resetStats',value:function a(){this.__retryCount=0,this.__downloaded=0,this.__progress=0,this.__resumeRetryCount=0,this.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0}}},{key:'__getFileNameFromHeaders',value:function k(a,b){var c='',d=/.*filename\\*=.*?'.*?'([^\"].+?[^\"])(?:(?:;)|$)/i,e=/.*filename=\"(.*?)\";?/i,f=/.*filename=([^\"].+?[^\"])(?:(?:;)|$)/i,g=a.hasOwnProperty('content-disposition'),h=g?a['content-disposition'].match(d):null,i=!g||h?null:a['content-disposition'].match(e),j=!g||h||i?null:a['content-disposition'].match(f);return g&&(h||i||j)?(c=a['content-disposition'],c=c.trim(),h?c=h[1]:i?c=i[1]:j&&(c=j[1]),c=c.replace(/[/\\\\]/g,'')):0<path.basename(new _url.URL(this.requestURL).pathname).length?c=path.basename(new _url.URL(this.requestURL).pathname):c=new _url.URL(this.requestURL).hostname+'.html',this.__opts.fileName?this.__getFileNameFromOpts(c,b):c.replace(/\\.*$/,'')}},{key:'__getFilePath',value:function d(a){var b=path.join(this.__destFolder,a),c=b;return this.__opts.override||this.state===this.__states.RESUMED||(c=this.__uniqFileNameSync(c),b!==c&&this.emit('renamed',{path:c,fileName:c.split(path.sep).pop(),prevPath:b,prevFileName:b.split(path.sep).pop()})),c}},{key:'__getFileNameFromOpts',value:function g(a,b){if(!this.__opts.fileName)return a;if('string'==typeof this.__opts.fileName)return this.__opts.fileName;if('function'==typeof this.__opts.fileName){var h=path.join(this.__destFolder,a);return b&&b.headers||this.__response&&this.__response.headers?this.__opts.fileName(a,h,(b?b:this.__response).headers['content-type']):this.__opts.fileName(a,h)}if('object'===_typeof(this.__opts.fileName)){var c=this.__opts.fileName,d=c.name,e=!!c.hasOwnProperty('ext')&&c.ext;if('string'==typeof e)return d+'.'+e;if('boolean'==typeof e){if(e)return d;var f=a.includes('.')?a.split('.').pop():'';return''===f?d:d+'.'+f}}return a}},{key:'__calculateStats',value:function f(a){var b=new Date,c=b-this.__statsEstimate.time,d=b-this.__statsEstimate.throttleTime,e=this.__total||0;a&&(this.__downloaded+=a,this.__progress=0===e?0:100*(this.__downloaded/e),(this.__downloaded===e||1e3<c)&&(this.__statsEstimate.time=b,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===e||d>this.__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<arguments.length&&void 0!==arguments[2]?arguments[2]:{},d=new _url.URL(b),e={protocol:d.protocol,host:d.hostname,port:d.port,path:d.pathname+d.search,method:a};return c&&(e.headers=c),e}},{key:'__getFilesizeInBytes',value:function d(a){try{var b=fs.statSync(a,{throwIfNoEntry:!1}),c=b.size||0;return c}catch(a){this.emit('warning',a)}return 0}},{key:'__validate',value:function d(a,b){if('string'!=typeof a)throw new Error('URL should be an string');if(''===a.trim())throw new Error('URL couldn\\'t be empty');if('string'!=typeof b)throw new Error('Destination Folder should be an string');if(''===b.trim())throw new Error('Destination Folder couldn\\'t be empty');if(!fs.existsSync(b))throw new Error('Destination Folder must exist');var c=fs.statSync(b);if(!c.isDirectory())throw new Error('Destination Folder must be a directory');try{fs.accessSync(b,fs.constants.W_OK)}catch(a){throw new Error('Destination Folder must be writable')}return!0}},{key:'__initProtocol',value:function c(a){var b=this.__getReqOptions(this.__opts.method,a,this.__headers);this.requestURL=a,-1<a.indexOf('https://')?(this.__protocol=https,b.agent=new https.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},b,this.__opts.httpsRequestOptions)):(this.__protocol=http,b.agent=new http.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},b,this.__opts.httpRequestOptions))}},{key:'__uniqFileNameSync',value:function f(a){if('string'!=typeof a||''===a)return a;try{fs.accessSync(a,fs.F_OK);var b=a.match(/(.*)(\\([0-9]+\\))(\\..*)$/),c=b?b[1].trim():a,d=b?parseInt(b[2].replace(/\\(|\\)/,'')):0,e=a.split('.').pop();return e!==a&&0<e.length?(e='.'+e,c=c.replace(e,'')):e='',this.__uniqFileNameSync(c+' ('+ ++d+')'+e)}catch(b){return a}}},{key:'__removeFile',value:function b(){var a=this;return new Promise(function(b){return a.__fileStream?void a.__fileStream.close(function(c){return c&&a.emit('warning',c),a.__opts.removeOnFail?fs.access(a.__filePath,function(d){return d?b():void fs.unlink(a.__filePath,function(d){d&&a.emit('warning',c),b()})}):void b()}):b()})}},{key:'__requestAbort',value:function a(){this.__isAborted=!0,this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__response&&this.__response.destroy(),this.__request&&(this.__request.destroy?this.__request.destroy():this.__request.abort())}},{key:'__emitStop',value:function a(){this.__resolvePending(),this.__setState(this.__states.STOPPED),this.emit('stop')}}]),b}(_events.EventEmitter);","/**\n * The timeout to use for apt commands\n * Wait up to 300 seconds if the apt-get lock is held\n * @private Used internally\n */\nexport const aptTimeout = \"Dpkg::Lock::Timeout=300\";\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LXRpbWVvdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXB0LXRpbWVvdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7R0FJRztBQUVILE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRyx5QkFBeUIsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogVGhlIHRpbWVvdXQgdG8gdXNlIGZvciBhcHQgY29tbWFuZHNcbiAqIFdhaXQgdXAgdG8gMzAwIHNlY29uZHMgaWYgdGhlIGFwdC1nZXQgbG9jayBpcyBoZWxkXG4gKiBAcHJpdmF0ZSBVc2VkIGludGVybmFsbHlcbiAqL1xuXG5leHBvcnQgY29uc3QgYXB0VGltZW91dCA9IFwiRHBrZzo6TG9jazo6VGltZW91dD0zMDBcIlxuIl19","import { defaultExecOptions, execRootSync } from \"admina\";\nimport memoize from \"memoizee\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nexport let updatedRepos = false; // eslint-disable-line import/no-mutable-exports\n/**\n * Update the apt repositories\n * @param apt The apt command to use (optional)\n */\nexport function updateAptRepos(apt = getApt()) {\n execRootSync(apt, apt !== \"nala\" ? [\"update\", \"-y\", \"-o\", aptTimeout] : [\"update\", \"-o\", aptTimeout], { ...defaultExecOptions, env: getAptEnv(apt) });\n updatedRepos = true;\n}\n/**\n * Update the apt repositories (memoized)\n * @param apt The apt command to use (optional)\n */\nexport const updateAptReposMemoized = memoize(updateAptRepos);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBkYXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3VwZGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsWUFBWSxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ3pELE9BQU8sT0FBTyxNQUFNLFVBQVUsQ0FBQTtBQUM5QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUM3QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBRXJDLE1BQU0sQ0FBQyxJQUFJLFlBQVksR0FBRyxLQUFLLENBQUEsQ0FBQyxnREFBZ0Q7QUFFaEY7OztHQUdHO0FBQ0gsTUFBTSxVQUFVLGNBQWMsQ0FBQyxNQUFjLE1BQU0sRUFBRTtJQUNuRCxZQUFZLENBQ1YsR0FBRyxFQUNILEdBQ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9vdFN5bmMoXG4gICAgYXB0LFxuICAgIGFwdCAhPT0gXCJuYWxhXCIgPyBbXCJ1cGRhdGVcIiwgXCIteVwiLCBcIi1vXCIsIGFwdFRpbWVvdXRdIDogW1widXBkYXRlXCIsIFwiLW9cIiwgYXB0VGltZW91dF0sXG4gICAgeyAuLi5kZWZhdWx0RXhlY09wdGlvbnMsIGVudjogZ2V0QXB0RW52KGFwdCkgfSxcbiAgKVxuXG4gIHVwZGF0ZWRSZXBvcyA9IHRydWVcbn1cblxuLyoqXG4gKiBVcGRhdGUgdGhlIGFwdCByZXBvc2l0b3JpZXMgKG1lbW9pemVkKVxuICogQHBhcmFtIGFwdCBUaGUgYXB0IGNvbW1hbmQgdG8gdXNlIChvcHRpb25hbClcbiAqL1xuZXhwb3J0IGNvbnN0IHVwZGF0ZUFwdFJlcG9zTWVtb2l6ZWQgPSBtZW1vaXplKHVwZGF0ZUFwdFJlcG9zKVxuIl19","import { defaultExecOptions, execRootSync } from \"admina\";\nimport memoize from \"memoizee\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { filterAndQualifyAptPackages } from \"./qualify-install.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\n/** Install gnupg and certificates (usually missing from docker containers) */\nexport async function initApt(apt) {\n // Update the repos\n updateAptReposMemoized(apt);\n const toInstall = await filterAndQualifyAptPackages([\n { name: \"ca-certificates\" },\n { name: \"gnupg\" },\n { name: \"apt-utils\" },\n ], apt);\n if (toInstall.length !== 0) {\n execRootSync(apt, [\"install\", \"-y\", \"--fix-broken\", \"-o\", aptTimeout, ...toInstall], {\n ...defaultExecOptions,\n env: getAptEnv(apt),\n });\n }\n}\n/** Install gnupg and certificates (usually missing from docker containers) (memoized) */\nexport const initAptMemoized = memoize(initApt, { promise: true });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5pdC1hcHQuanMiLCJzb3VyY2VSb290IjoiIiwic291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h0b0luc3RhbGwubGVuZ3RoICE9PSAwKSB7XG4gICAgZXhlY1Jvb3RTeW5jKGFwdCwgW1wiaW5zdGFsbFwiLCBcIi15XCIsIFwiLS1maXgtYnJva2VuXCIsIFwiLW9cIiwgYXB0VGltZW91dCwgLi4udG9JbnN0YWxsXSwge1xuICAgICAgLi4uZGVmYXVsdEV4ZWNPcHRpb25zLFxuICAgICAgZW52OiBnZXRBcHRFbnYoYXB0KSxcbiAgICB9KVxuICB9XG59XG5cbi8qKiBJbnN0YWxsIGdudXBnIGFuZCBjZXJ0aWZpY2F0ZXMgKHVzdWFsbHkgbWlzc2luZyBmcm9tIGRvY2tlciBjb250YWluZXJzKSAobWVtb2l6ZWQpICovXG5leHBvcnQgY29uc3QgaW5pdEFwdE1lbW9pemVkID0gbWVtb2l6ZShpbml0QXB0LCB7IHByb21pc2U6IHRydWUgfSlcbiJdfQ==","'use strict';\n\nvar path = require('path');\n\nfunction replaceExt(npath, ext) {\n if (typeof npath !== 'string') {\n return npath;\n }\n\n if (npath.length === 0) {\n return npath;\n }\n\n var nFileName = path.basename(npath, path.extname(npath)) + ext;\n var nFilepath = path.join(path.dirname(npath), nFileName);\n\n // Because `path.join` removes the head './' from the given path.\n // This removal can cause a problem when passing the result to `require` or\n // `import`.\n if (startsWithSingleDot(npath)) {\n return '.' + path.sep + nFilepath;\n }\n\n return nFilepath;\n}\n\nfunction startsWithSingleDot(fpath) {\n var first2chars = fpath.slice(0, 2);\n return first2chars === '.' + path.sep || first2chars === './';\n}\n\nmodule.exports = replaceExt;\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};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\n_a = fs.promises\n// export const {open} = 'fs'\n, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;\n// export const {open} = 'fs'\nexports.IS_WINDOWS = process.platform === 'win32';\n// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691\nexports.UV_FS_O_EXLOCK = 0x10000000;\nexports.READONLY = fs.constants.O_RDONLY;\nfunction exists(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield exports.stat(fsPath);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n return true;\n });\n}\nexports.exists = exists;\nfunction isDirectory(fsPath, useStat = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);\n return stats.isDirectory();\n });\n}\nexports.isDirectory = isDirectory;\n/**\n * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:\n * \\, \\hello, \\\\hello\\share, C:, and C:\\hello (and corresponding alternate separator cases).\n */\nfunction isRooted(p) {\n p = normalizeSeparators(p);\n if (!p) {\n throw new Error('isRooted() parameter \"p\" cannot be empty');\n }\n if (exports.IS_WINDOWS) {\n return (p.startsWith('\\\\') || /^[A-Z]:/i.test(p) // e.g. \\ or \\hello or \\\\hello\n ); // e.g. C: or C:\\hello\n }\n return p.startsWith('/');\n}\nexports.isRooted = isRooted;\n/**\n * Best effort attempt to determine whether a file exists and is executable.\n * @param filePath file path to check\n * @param extensions additional file extensions to try\n * @return if file exists and is executable, returns the file path. otherwise empty string.\n */\nfunction tryGetExecutablePath(filePath, extensions) {\n return __awaiter(this, void 0, void 0, function* () {\n let stats = undefined;\n try {\n // test file exists\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 // on Windows, test for valid extension\n const upperExt = path.extname(filePath).toUpperCase();\n if (extensions.some(validExt => 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","export function unique(dirs: string[]) {\n return [...new Set(dirs)]\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_raw() {\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_raw)\n","import { tmpdir } from \"os\"\nimport { execRootSync } from \"admina\"\nimport { error, info } from \"ci-log\"\nimport { readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { dirname, join } from \"patha\"\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 { 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, dirname, join } 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<InstallationInfo> {\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 { setupConan } from \"./conan/conan.js\"\nimport { setupCppcheck } from \"./cppcheck/cppcheck.js\"\nimport { setupDoxygen } from \"./doxygen/doxygen.js\"\nimport { setupGcc } from \"./gcc/gcc.js\"\nimport { setupGcovr } from \"./gcovr/gcovr.js\"\nimport { setupGraphviz } from \"./graphviz/graphviz.js\"\nimport { setupKcov } from \"./kcov/kcov.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\n/** The setup functions */\nexport const setups = {\n nala: setupNala,\n cmake: setupCmake,\n ninja: setupNinja,\n python: setupPython,\n vcpkg: setupVcpkg,\n bazel: setupBazel,\n conan: setupConan,\n meson: setupMeson,\n gcovr: setupGcovr,\n opencppcoverage: setupOpencppcoverage,\n llvm: setupLLVM,\n gcc: setupGcc,\n choco: setupChocolatey,\n brew: setupBrew,\n powershell: setupPowershell,\n ccache: setupCcache,\n sccache: setupSccache,\n doxygen: setupDoxygen,\n graphviz: setupGraphviz,\n cppcheck: setupCppcheck,\n clangtidy: setupClangTools,\n clangformat: setupClangFormat,\n msvc: setupMSVC,\n vcvarsall: setupVCVarsall,\n kcov: setupKcov,\n make: setupMake,\n task: setupTask,\n sevenzip: setupSevenZip,\n}\n\nexport type ToolName = keyof typeof setups\n\n/** The tools that can be installed */\nexport const tools = Object.keys(setups) as Array<ToolName>\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<Inputs> = [\"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 { 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 { 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 { 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 { 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 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 await addPath(\"/usr/local/opt/make/libexec/gnubin\", rcOptions)\n return { binDir: \"/usr/local/opt/make/libexec/gnubin\" }\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 * as numerous from \"numerous\"\nimport numerousLocale from \"numerous/locales/en.js\"\nimport * as 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 { installCompiler } from \"./compilers.js\"\nimport { installTool } from \"./installTool.js\"\nimport { 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<number> {\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 // sync the version for the llvm tools\n if (!syncVersions(opts, [\"llvm\", \"clangtidy\", \"clangformat\"])) {\n error(\"The same version must be used for llvm, clangformat and clangtidy\")\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 /** Used to unset CPPFLAGS of LLVM when other compilers are used as the main compiler */\n let hasLLVM = false\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) {\n if (errorMessages.length !== 0) {\n failedFast = true\n break\n }\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 hasLLVM = 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) {\n // installing the specified compiler\n const maybeCompiler = opts.compiler\n if (maybeCompiler !== undefined) {\n const time1Compiler = Date.now()\n await installCompiler(maybeCompiler, osVersion, setupCppDir, arch, successMessages, hasLLVM, errorMessages)\n const time2Compiler = Date.now()\n info(`took ${timeFormatter.format(time1Compiler, time2Compiler) || \"0 seconds\"}`)\n }\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, notice, startGroup } from \"@actions/core\"\nimport { error, info } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport semverValid from \"semver/functions/valid\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { activateGcovGCC, activateGcovLLVM } from \"./gcovr/gcovr.js\"\nimport { setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\n/** Detecting the compiler version. Divide the given string by `-` and use the second element as the version */\nexport function getCompilerInfo(compilerAndVersion: string) {\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 return { compiler, version: maybeVersion }\n } else {\n info(`Invalid semver version ${maybeVersion} used for the compiler.`)\n return { compiler, version: maybeVersion }\n }\n }\n return { compiler, version: undefined }\n}\n\n/** Installing the specified compiler */\nexport async function installCompiler(\n compilerAndVersion: string,\n osVersion: number[] | null,\n setupCppDir: string,\n arch: string,\n successMessages: string[],\n hasLLVM: boolean,\n errorMessages: string[],\n) {\n try {\n const { compiler, version } = getCompilerInfo(compilerAndVersion)\n\n // install the compiler. We allow some aliases for the compiler name\n startGroup(`Installing ${compiler} ${version ?? \"\"}`)\n switch (compiler) {\n case \"llvm\":\n case \"clang\":\n case \"clang++\": {\n const installationInfo = await setupLLVM(\n getVersion(\"llvm\", version, osVersion),\n join(setupCppDir, \"llvm\"),\n arch,\n )\n\n await activateGcovLLVM()\n\n successMessages.push(getSuccessMessage(\"llvm\", installationInfo))\n break\n }\n case \"gcc\":\n case \"mingw\":\n case \"cygwin\":\n case \"msys\": {\n const gccVersion = compiler === \"mingw\"\n ? getVersion(\"mingw\", version, osVersion)\n : getVersion(\"gcc\", version, osVersion)\n const installationInfo = compiler === \"mingw\"\n ? await setupMingw(gccVersion, join(setupCppDir, \"gcc\"), arch)\n : await setupGcc(gccVersion, join(setupCppDir, \"gcc\"), arch)\n\n if (hasLLVM) {\n // remove back the added CPPFLAGS of LLVM that include the LLVM headers\n await addEnv(\"CPPFLAGS\", \"\", rcOptions)\n }\n\n await activateGcovGCC(gccVersion)\n\n successMessages.push(getSuccessMessage(\"gcc\", installationInfo))\n break\n }\n case \"cl\":\n case \"msvc\":\n case \"msbuild\":\n case \"vs\":\n case \"visualstudio\":\n case \"visualcpp\":\n case \"visualc++\": {\n const installationInfo = await setupMSVC(\n getVersion(\"msvc\", version, osVersion),\n join(setupCppDir, \"msvc\"),\n arch,\n )\n\n if (hasLLVM) {\n // remove the CPPFLAGS of LLVM that include the LLVM headers\n await addEnv(\"CPPFLAGS\", \"\", rcOptions)\n }\n\n successMessages.push(getSuccessMessage(\"msvc\", installationInfo))\n break\n }\n case \"appleclang\":\n case \"applellvm\": {\n notice(\"Assuming apple-clang is already installed\")\n await Promise.all([addEnv(\"CC\", \"clang\", rcOptions), addEnv(\"CXX\", \"clang++\", rcOptions)])\n successMessages.push(getSuccessMessage(\"apple-clang\", undefined))\n break\n }\n default: {\n errorMessages.push(`Unsupported compiler ${compiler}`)\n }\n }\n } catch (err) {\n error(err as string | Error)\n errorMessages.push(`Failed to install the ${compilerAndVersion}`)\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","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","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","isStream","stream","pipe","isWritableStream","writable","_write","_writableState","async","getStream","inputStream","maxBuffer","Infinity","bufferStream","rejectPromise","getBufferedLength","BufferConstants","MAX_LENGTH","bufferedData","getBufferedValue","streamPipelinePromisified","MaxBufferError","execa","handleArguments","joinCommand","escapedCommand","getEscapedCommand","logCommand","validateTimeout","childProcess","dummySpawned","ChildProcess","errorPromise","makeError","stderr","all","timedOut","isCanceled","killed","mergePromise","spawnedPromise","getSpawnedPromise","timedPromise","setupTimeout","processDone","setExitHandler","kill","spawnedKill","bind","cancel","spawnedCancel","handlePromiseOnce","onetime","signal","stdoutResult","stderrResult","allResult","getSpawnedResult","handleOutput","returnedError","aborted","failed","handleInput","makeAllStream","addPipeMethods","execaSync","handleInputSync","spawnSync","execPowershell","startupFlags","execOptions","stdio","execa.execa","powershell","maybePwsh","nothrow","maybePowerShell","getPowerShell","t","r","configurable","getuid","CI","n","s","h","parseCommand","b","a","l","c","y","S","f","R","p","SUDO_USER","w","statSync","isDirectory","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","mixin$1","source","sourceObject","forEach","symbol","globalThis_1","isImplemented","globalThis","Array","naiveFallback","window","implementation","__global__","isSymbol","toStringTag","validateSymbol","es6Symbol","global","validTypes","object","Symbol","iterator","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","String","keyFor","ignore","description","polyfill","__description__","__name__","toString","valueOf","from","iteratorSymbol","isArguments","objToString","id","isFunction","isFunctionStringTag","RegExp","toPosInt","callable","validValue","isValue","isString","isArray","Function","shim","arrayLike","Context","getIterator","mapFn","numberIsNaN","isNan","Number","isNaN","NaN","objHasOwnProperty","abs","Math","floor","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","count","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","return","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","line","filterAndQualifyAptPackages","packages","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","isExecaError","retryErrors","keyUrl","defaultKeyStorePath","dlPath","tmpdir","dl","DownloaderHelper","start","initGpg","s$1","setupBrew","maybeBinDir","dirname","getDownloadPath","NONINTERACTIVE","getBrewBinDir","arch","installBrewPack","cask","hasBrew","brewPath","hasDnf","hasDnfCache","isArch","isArchCache","isUbuntu","isUbuntuCache","u","E","N","setupChocolatey","_version","_setupDir","_arch","SystemRoot","chocoPath","ALLUSERSPROFILE","maybeChoco","ChocolateyInstall","setupChocoPack","hasChoco","TMP","TEMP","Path","extendEnv","setupDnfPack","getDnfArg","setupPacmanPack","aur","pacman","didUpdate","didInit","runInstall","availableVersions","matchAll","pacmanSiVersionRegex","availablePacmanVersions","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","max","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","folderName","addExeExt","setupCmake","requestWorks","method","req","isStatusOK","_error","end","getSpecificVersions","semversion","semverCompare","localeCompare","isBinUptoDate","givenFile","targetVersion","versionRegex","defaultVersionRegex","givenVersion","execout","getExecOutput","version_output","getBinVersion","getLLVMDefault","setupPython","installInfo","foundPython","findPython","bin","setupActionsPython","import","brewPythonPrefix","brewPythonBin","setupPythonSystem","findOrSetupPython","require$$0$3","foundPip","maybePip","findPip","ensurePipUpgrade","setupPipPackSystem","setupPip","findOrSetupPip","hasPipx","setupPipPackWithPython","upgrade","usePipx","setupPipx","isLibrary","setupWheel","pythonBin","isPythonUpToDate","rootDir","pathParse","root","pythonDirs","pythonDir","candidate","pythonBinPath","MinVersions","python","pythonBinPaths","pipCandidate","isPipUptoDate","pip","pipPaths","pipPath","err1","err2","getVersion","osVersion","isVersionDefault","DefaultLinuxVersion","toolLinuxVersions","osVersionMaj","satisfyingVersion","getDefaultLinuxVersion","DefaultVersions","detectUsingOsVersion","versionSplitted","setupPipPack","getPython","givenPython","user","isPipx","hasPackage","pipHasPackage","nameAndVersion","upgradeFlag","userFlag","PIPX_HOME","getPipxHome","PIPX_BIN_DIR","getPipxBinDir","execPaths","addPythonBaseExecPrefix","dirs","dirIndex","findIndex","exist","whichDir","findBinDir","addPythonPrefix","setupGraphviz","activateGraphviz","setupDmg","ArchiveHdi","dmg","read","entry","extract","getDoxygenPackageInfo","setupMacOSSDK","xcrun","sdkroot","getGccPackageInfo","asset","assets","tags","filterTag","mingwVersion","matchedNames","filterName","matchAsset","loadGitHubAssetList","__dirname","setupGcc","installationInfo","setupChocoMingw","gccExe","exe1","exe2","tag1","tag2","v1","v2","compare","compareVersion","versionStdout","versionMatch","getGccCmdVersion","majorVersion","semverMajor","matcherPath","addGccLoggingMatcher","activateGcc","getNinjaPackageInfo","ninjaPlatform","getNinjaPlatform","setupNinja","getDownloadKcovPackageInfo","getBuildKcovPackageInfo","buildKcov","cmake","ubuntuVersion","getCmake","buildDir","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","DEFAULT_TIMEOUT","hasLLVM","milliseconds","fallback","customTimers","timer","cancelablePromise","sign","getAbortedReason","addEventListener","timeoutError","pTimeout","setupVersion","setupFunction","setups","getSuccessMessage","installToolImpl","stack","getGitHubUrl","prefix","suffix","getReleaseUrl","getUrl","DARWIN_X64_MISSING","getDarwinUrl","versionGiven","rc","UBUNTU_RC","linuxVersion","givenUbuntuVersion","VERSIONS","UBUNTU_X64_SUFFIX_MAP","MAX_UBUNTU","getLinuxUrl","WIN32_MISSING","olderThan9_1","isUrlOnline","getWin32Url","getLLVMPackageInfo","specificVersion","getSpecificVersionAndUrl","setupLLVM","setupLLVMWithoutActivation","ld","LD_LIBRARY_PATH","dyld","DYLD_LIBRARY_PATH","actPromises","activateLLVM","setupLLVMOnly","LLVMPackages","All","coeredVersion","semverValid","coercedVersion","semverCoerceIfInvalid","installationFolder","installerScript","installerPath","neededPackages","givenScript","target_path","script","NODE_DEBUG","debugScript","nonInteractiveScript","choosePackages","installingPack","regexp","isAptPackRegexInstalled","info$1","removeConflictingPackages","useNalaScript","patchAptLLVMScript","shell","setupLLVMApt","llvmBinaryDeps","addLLVMLoggingMatcher","setupMSVC","installed","vcvarsall_path","addMSVCLoggingMatcher","getPowerShellPackageInfo","getPowershellUrl","arm64","arm","arm32","aarch64","x64","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$1","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","onFree","onCloseOrRemove","removeListener","onConnect","head","connectReq","removeAllListeners","placeholder","connectOptions","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","lowercaseKeys","reduce","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","_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","auth","PersonalAccessTokenCredentialHandler","BasicCredentialHandler","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","buffer","fd","openSync","readSync","closeSync","binary","shebangCommand","isExecutableRegExp","isCmdShimRegExp","commandFile","shebang","detectShebang","needsShell","forceShell","needsDoubleEscapeMetaChars","normalize","shellCommand","comspec","windowsVerbatimArguments","parseNonShell","originalEmit","arg1","verifyENOENTSync","crossSpawnModule","_parse","_enoent","npmRunPathEnv","pathName","pathOption","preferLocal","execPath","addExecPath","cwdString","fileURLToPath","cwdPath","previous","applyPreferLocal","execPathString","applyExecPath","npmRunPath","copyProperty","property","ignoreNonConfigurable","toDescriptor","fromDescriptor","canCopyProperty","wrappedToString","withName","fromBody","toStringDescriptor","toStringName","calledFunctions","WeakMap","function_","returnValue","callCount","functionName","displayName","arguments_","Reflect","ownKeys","fromPrototype","getPrototypeOf","changePrototype","newToString","changeToString","mimicFunction","getRealtimeSignal","number","SIGRTMIN","action","standard","SIGNALS","forced","getSignals","realtimeSignals","normalizeSignal","defaultNumber","signals","name2","constantSignal","supported","getSignalByName","signalsByName","fromEntries","getSignalsByName","findSignalByNumber","signalA","signalsA","SIGRTMAX","getSignalByNumber","getSignalsByNumber","signalDescription","errorCode","getErrorPrefix","execaMessage","isError","shortMessage","Boolean","originalMessage","aliases","processOk","reallyExit","listeners","pid","emitter","assert","module","EE","__signal_exit_emitter__","emitted","infinite","setMaxListeners","equal","loaded","load","ev","alwaysLast","unload","sig","sigListeners","originalProcessEmit","originalProcessReallyExit","signalExitModule","event","emit$1","process$3","signalExit","processEmit","processReallyExit","killResult","setKillTimeout","shouldForceKill","getForceKillAfterTimeout","unref","forceKillAfterTimeout","isSigterm","SIGTERM","isFinite","killSignal","timeoutId","timeoutPromise","timeoutKill","safeSpawnedPromise","race","cleanup","detached","removeExitHandler","onExit","pipeToTarget","streamName","createWriteStream","isExecaChildProcess","stdin","pipeStdout","pipeStderr","pipeAll","PassThrough","PassThroughStream","promisify","array","isBuffer","objectMode","setEncoding","pipeline","getStreamModule","add","sources","remove","it","readable","isEmpty","validateInputOptions","inputFile","readFileSync","getInputSync","createReadStream","mixed","mergeStream","getBufferedData","streamPromise","getStreamPromise","stdoutPromise","stderrPromise","allPromise","nativePromisePrototype","descriptors","descriptor","normalizeArgs","NO_ESCAPE_REGEXP","DOUBLE_QUOTES_REGEXP","escapeArg","SPACES_REGEXP","tokens","previousToken","verboseDefault","debuglog","padField","field","padding","padStart","verbose","date","getHours","getMinutes","getSeconds","getMilliseconds","getTimestamp","crossSpawn","stripFinalNewline","localDir","windowsHide","envOption","getEnv","alias","hasAlias","normalizeStdio","CR","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","normalizeOptions","opts1","forEach$2","process$2","toPosInteger","toInteger","resolveLength","optsLength","fnLength","isAsync","validCallable","objPropertyIsEnumerable","propertyIsEnumerable","list","compareFn","defVal","foo","bar","trzy","shim$3","function","isObject","captureStackTrace","generate","mixin","arg2","possibleTypes","undefined","isPrototype","classRe","functionToString","contains","searchString","isPlainFunction","normalizeOpts","dModule","dscr","off","methods","type","listener","__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","noop","timeouts","preFetchAge","preFetchTimeouts","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","requireLocale","isNode","timeUnits","defaultConfig","span","autoloadLocales","timeDelta","firstDate","secondDate","autoload","localeId","require","ensureLocaleLoadedOrThrow","difference","results","divider","getDifference","parts","long","one","other","months","weeks","days","hours","minutes","seconds","narrow","short","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","lastIndex","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","lines","repeat","_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","state","__defaultOpts","metadata","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","unpipe","__fileStream","__requestAbort","__closeFileStream","__setState","__reqOptions","__emitStop","__headers","__getReqOptions","__initProtocol","progress","speed","__protocol","__isRequireRedirect","location","__getFileNameFromHeaders","destroyed","__downloadRequest","__onError","__onTimeout","__resetStats","__startDownload","skip","skipSmaller","totalSize","downloadedSize","isResumed","__calculateStats","__onFinished","close","__hasFinished","resume","incomplete","onDiskSize","__retry","__removeFile","delay","__getFileNameFromOpts","__uniqFileNameSync","prevPath","prevFileName","getStats","throwIfNoEntry","accessSync","F_OK","abort","__resolvePending","toInstall","npath","first2chars","nFileName","extname","nFilepath","O","I","T","W","q","B","isUnixExecutable","stats","getCmdPath","UV_FS_O_EXLOCK","rmdir","rename","open","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","candidates","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","StringDecoder","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$$11","require$$12","retry_helper_1","httpStatusCode","IS_MAC","authorization","statusMessage","readStream","responseMessageFactory","succeeded","downloadToolAttempt","_7zPath","originalCwd","powershellPath","versionOutput","isGnuTar","destArg","fileArg","xarPath","escapedFile","escapedDest","pwshPath","extractZipWin","unzipPath","extractZipNix","destPath","itemName","sourceFile","targetFile","destFolder","cachePath","owner","branch","releases","treeUrl","manifestUrl","tree","versionsRaw","manifest","dist","previousError","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","native","nativeSync","manual","manualSync","isUrl","trimmedUrl","isUrlString","llvm","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","pipxHome","compatHome","pipxBinDir","nameMap","macosVersion","macosRelease","AbortError","getDOMException","errorMessage","DOMException","reason","vsversion_to_versionnumber_1","VSWHERE_PATH","findVcvarsall_1","setupMSVCDevCmd_1","process$1","arch_aliases","win64","x86_64","vcvars","cmd_output_parts","old_environment","vcvars_output","new_environment","error_messages","old_env_vars","new_value","specific","getVersions","_1","setupLLVMDeps","hasVCPKG","nalaPack","nalaLegacyPack","installer","setupNalaViaInstaller","vcpkg","addShExt","addShRelativePrefix","bazel","opencppcoverage","activateOpencppcoverage","choco","brew","ubuntuVerSplitted","setupPowershellSystem","ccache","sccache","activateWinDoxygen","graphviz","cppcheck","activateWinCppcheck","ClangFormat","msvc","vcvarsall","versionSplit","addVPrefix","installMethod","version_number","removeVPrefix","make","sevenzip","tools","checkUpdatePromise","updateNotifier","checkUpdates","ACTIONS_ALLOW_UNSECURE_COMMANDS","idx","alibi","strict","unknown","defaults","mri","inp","parseArgs","help","table","documentation","coverage","architecture","SETUP_CPP_DIR","timeFormatter","timeDelta.create","time1","time2","timeDelta.addLocale","timeDeltaLocale","numerous.addLocale","numerousLocale","toolsInUse","toolsNonDefaultVersion","syncVersions","failedFast","parseFloat","maybeCompiler","compiler","time1Compiler","compilerAndVersion","compilerAndMaybeVersion","maybeVersion","getCompilerInfo","gccVersion","setupMingw","gccSemver","gccMajor","activateGcovGCC","installCompiler","time2Compiler","uniqueEntries","finalizeRC","main","argv"],"mappings":";whBAkCA,SAASA,EAAaC,EAASC,EAAYC,GACvC,MAAMC,EAAM,IAAIC,GAAQJ,EAASC,EAAYC,GAC7CG,QAAQC,OAAOC,MAAMJ,KAAiBK,GAAGC,IAC7C,CCjCe,SAASC,IAMtB,OALIC,GAAUC,GA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K,SACLukD,OAAO,EACPE,OAAO,YACPtmC,YAAY,gCACZumC,SAAS,QAET,CACA1kD,KAAK,UACLukD,OAAO,EACPE,OAAO,OACPtmC,YAAY,iCACZumC,SAAS,SAET,CACA1kD,KAAK,SACLukD,OAAO,EACPE,OAAO,OACPtmC,YAAY,8BACZumC,SAAS,QAET,CACA1kD,KAAK,UACLukD,OAAO,EACPE,OAAO,OACPtmC,YAAY,sBACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,EACPE,OAAO,OACPtmC,YAAY,UACZumC,SAAS,QAET,CACA1kD,KAAK,SACLukD,OAAO,EACPE,OAAO,OACPtmC,YAAY,UACZumC,SAAS,OAET,CACA1kD,KAAK,SACLukD,OAAO,EACPE,OAAO,OACPtmC,YACA,oEACAumC,SAAS,OAET,CACA1kD,KAAK,SACLukD,OAAO,EACPE,OAAO,YACPtmC,YAAY,oDACZumC,SAAS,SAET,CACA1kD,KAAK,SACLukD,OAAO,EACPE,OAAO,OACPtmC,YAAY,kCACZumC,SAAS,QAET,CACA1kD,KAAK,UACLukD,OAAO,EACPE,OAAO,YACPtmC,YAAY,qBACZumC,SAAS,QACTE,QAAO,GAEP,CACA5kD,KAAK,UACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,8BACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,OACPtmC,YAAY,qBACZumC,SAAS,QAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,8BACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,wBACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,mBACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,cACZumC,SAAS,QAET,CACA1kD,KAAK,YACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,+BACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,SACPtmC,YAAY,+CACZumC,SAAS,SAET,CACA1kD,KAAK,SACLukD,OAAO,GACPE,OAAO,SACPtmC,YAAY,+CACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,UACPtmC,YAAY,WACZumC,SAAS,QACTE,QAAO,GAEP,CACA5kD,KAAK,UACLukD,OAAO,GACPE,OAAO,QACPtmC,YAAY,SACZumC,SAAS,QACTE,QAAO,GAEP,CACA5kD,KAAK,UACLukD,OAAO,GACPE,OAAO,QACPtmC,YAAY,mCACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,QACPtmC,YAAY,gDACZumC,SAAS,SAET,CACA1kD,KAAK,WACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,oCACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,QACPtmC,YAAY,qDACZumC,SAAS,SAET,CACA1kD,KAAK,SACLukD,OAAO,GACPE,OAAO,SACPtmC,YAAY,mCACZumC,SAAS,OAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,OACPtmC,YAAY,oBACZumC,SAAS,OAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,OACPtmC,YAAY,eACZumC,SAAS,OAET,CACA1kD,KAAK,YACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,mBACZumC,SAAS,OAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,mBACZumC,SAAS,OAET,CACA1kD,KAAK,WACLukD,OAAO,GACPE,OAAO,SACPtmC,YAAY,+BACZumC,SAAS,OAET,CACA1kD,KAAK,QACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,mBACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,OAAO,GACPE,OAAO,YACPtmC,YAAY,gBACZumC,SAAS,SAET,CACA1kD,KAAK,UACLukD,O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D,EAAW,IAAI5R,IAAIu2D,GAEzB,IAAA,MAAWt9E,KAAWs9E,EACpB3kD,EAAS6xB,IAAI,OAAOtyB,KAAKl4B,GAAU,IACnC24B,EAAS6xB,IAAI,YAAYtyB,KAAKl4B,GAAU,IAGnC,OAAA24B,CACT,CkBxBqC4kD,CAAY,CAC/C,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,WAIIxwC,OAAiChmB,IAAI,CAAC,SAAU,SAAU,SAAU,WAGpEqlB,OAAyBrlB,IAAI,CACjC,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,WAQIylB,OAAqCnjB,IAQrCujB,GAAmD,CACvD,QAAS,gBACT,QAAS,GACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,eACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,QAAS,gBACT,SAAU,gBACV,SAAU,gBACV,SAAU,gBACV,SAAU,gBACV,SAAU,gBACV,SAAU,gBACV,SAAU,gBACV,SAAU,gBACV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OAEzC,OADPyO,EAAQ,8DACD,EAIT,IAAA,MAAWmpB,KAAQmU,EtSvHV74B,QAAQC,IAAI,QsSwHXykB,SAEV,IAAA,MAAWA,KAAQoU,EACjB/+B,EAAM2qB,GAKJ,GAFJrpB,EAAK,uBAEAyE,GAAAA,eACH,OAAQxT,QAAQkW,UACd,IAAK,QACHjH,EAAQ,yEACR,MAEF,IAAK,QACL,IAAK,SACHA,EAAQ,0EAWP,aAFDqyE,EAE0B,IAAzB90C,EAAchsC,OAAe,EAAI,CAC1C,EAGA6jF,CAAKrkF,QAAQskF,MACVj8E,MAAM0kB,IACL/sB,QAAQwS,SAAWua,CAAA,IAEpBxb,OAAO5O,IACN8K,EAAM,oBACNA,EAAM9K,GACN3C,QAAQwS,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,22,23,24,25,26,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,61,62,63,64,65,69,80,85,86,87,88,93,108,111,119,120,121,122,123,124,125,126,127,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,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,291,292]}