From 22ab8af68be43ad02e222de568b7be41448d8bfa Mon Sep 17 00:00:00 2001 From: Andrew Haynes Date: Mon, 30 Mar 2026 00:25:15 -0400 Subject: [PATCH] update --- .Brewfile | 23 +- .config/nvim/init.lua | 94 +- .config/nvim/lsp/deno.lua | 162 ++ .config/nvim/nvim-pack-lock.json | 18 +- .config/tmux/plugins/vim-tmux-navigator | 1 + .config/tmux/tmux.conf | 22 +- .local/share/flox/env-registry.json | 18 + .local/share/flox/env-registry.lock | 0 .local/share/flox/metrics-uuid | 1 + .../share/mise/installs/.mise-installs.toml | 4 + .local/share/mise/installs/aqua/2 | 1 + .local/share/mise/installs/aqua/2.57 | 1 + .../share/mise/installs/aqua/2.57.1/LICENSE | 21 + .../share/mise/installs/aqua/2.57.1/README.md | 47 + .../dario.cat/mergo/LICENSE | 28 + .../Masterminds/goutils/LICENSE.txt | 202 ++ .../Masterminds/semver/v3/LICENSE.txt | 19 + .../Masterminds/sprig/v3/LICENSE.txt | 19 + .../github.com/STARRY-S/zip/LICENSE | 28 + .../github.com/andybalholm/brotli/LICENSE | 19 + .../github.com/aquaproj/aqua/v2/LICENSE | 21 + .../github.com/bahlo/generic-list-go/LICENSE | 27 + .../github.com/bodgit/plumbing/LICENSE | 30 + .../github.com/bodgit/sevenzip/LICENSE | 29 + .../github.com/bodgit/windows/LICENSE | 30 + .../github.com/buger/jsonparser/LICENSE | 21 + .../github.com/charmbracelet/x/term/LICENSE | 21 + .../github.com/dsnet/compress/LICENSE.md | 24 + .../github.com/expr-lang/expr/LICENSE | 21 + .../github.com/forPelevin/gomoji/LICENSE | 21 + .../github.com/gdamore/encoding/LICENSE | 202 ++ .../github.com/gdamore/tcell/v2/LICENSE | 202 ++ .../github.com/goccy/go-yaml/LICENSE | 21 + .../github.com/godbus/dbus/v5/LICENSE | 25 + .../google/go-github/v80/github/LICENSE | 27 + .../google/go-github/v84/github/LICENSE | 27 + .../google/go-querystring/query/LICENSE | 27 + .../github.com/google/uuid/LICENSE | 27 + .../github.com/hashicorp/go-cleanhttp/LICENSE | 363 ++++ .../hashicorp/go-cleanhttp/README.md | 30 + .../hashicorp/go-cleanhttp/cleanhttp.go | 58 + .../github.com/hashicorp/go-cleanhttp/doc.go | 20 + .../github.com/hashicorp/go-cleanhttp/go.mod | 3 + .../hashicorp/go-cleanhttp/handlers.go | 48 + .../hashicorp/go-cleanhttp/handlers_test.go | 72 + .../hashicorp/go-version/.github/CODEOWNERS | 13 + .../go-version/.github/dependabot.yml | 22 + .../.github/pull_request_template.md | 12 + .../go-version/.github/workflows/go-tests.yml | 86 + .../hashicorp/go-version/CHANGELOG.md | 64 + .../github.com/hashicorp/go-version/LICENSE | 356 ++++ .../github.com/hashicorp/go-version/README.md | 67 + .../hashicorp/go-version/constraint.go | 307 +++ .../hashicorp/go-version/constraint_test.go | 258 +++ .../github.com/hashicorp/go-version/go.mod | 1 + .../hashicorp/go-version/version.go | 459 +++++ .../go-version/version_collection.go | 20 + .../go-version/version_collection_test.go | 49 + .../hashicorp/go-version/version_test.go | 762 +++++++ .../golang-lru/v2/.github/workflows/ci.yml | 42 + .../hashicorp/golang-lru/v2/.gitignore | 23 + .../hashicorp/golang-lru/v2/.golangci.yml | 46 + .../github.com/hashicorp/golang-lru/v2/2q.go | 267 +++ .../hashicorp/golang-lru/v2/2q_test.go | 375 ++++ .../hashicorp/golang-lru/v2/LICENSE | 364 ++++ .../hashicorp/golang-lru/v2/README.md | 79 + .../github.com/hashicorp/golang-lru/v2/doc.go | 24 + .../golang-lru/v2/expirable/expirable_lru.go | 338 ++++ .../v2/expirable/expirable_lru_test.go | 573 ++++++ .../github.com/hashicorp/golang-lru/v2/go.mod | 3 + .../hashicorp/golang-lru/v2/internal/list.go | 142 ++ .../github.com/hashicorp/golang-lru/v2/lru.go | 250 +++ .../hashicorp/golang-lru/v2/lru_test.go | 443 +++++ .../golang-lru/v2/simplelru/LICENSE_list | 29 + .../hashicorp/golang-lru/v2/simplelru/lru.go | 177 ++ .../golang-lru/v2/simplelru/lru_interface.go | 46 + .../golang-lru/v2/simplelru/lru_test.go | 255 +++ .../hashicorp/golang-lru/v2/testing_test.go | 19 + .../github.com/huandu/xstrings/LICENSE | 22 + .../github.com/invopop/jsonschema/COPYING | 19 + .../github.com/klauspost/compress/LICENSE | 304 +++ .../compress/internal/snapref/LICENSE | 27 + .../github.com/klauspost/compress/s2/LICENSE | 28 + .../compress/zstd/internal/xxhash/LICENSE.txt | 22 + .../github.com/klauspost/pgzip/LICENSE | 22 + .../github.com/ktr0731/go-ansisgr/LICENSE | 21 + .../github.com/ktr0731/go-fuzzyfinder/LICENSE | 21 + .../github.com/lmittmann/tint/LICENSE | 21 + .../lucasb-eyer/go-colorful/LICENSE | 7 + .../github.com/mailru/easyjson/LICENSE | 7 + .../github.com/mattn/go-colorable/LICENSE | 21 + .../github.com/mattn/go-isatty/LICENSE | 9 + .../github.com/mattn/go-runewidth/LICENSE | 21 + .../github.com/mholt/archives/LICENSE | 21 + .../github.com/mikelolasagasti/xz/LICENSE | 12 + .../github.com/minio/minlz/LICENSE | 177 ++ .../github.com/mitchellh/colorstring/LICENSE | 21 + .../mitchellh/copystructure/LICENSE | 21 + .../github.com/mitchellh/reflectwalk/LICENSE | 21 + .../github.com/nsf/termbox-go/LICENSE | 19 + .../github.com/nwaples/rardecode/v2/LICENSE | 23 + .../github.com/otiai10/copy/LICENSE | 21 + .../github.com/pierrec/lz4/v4/LICENSE | 28 + .../github.com/pkg/errors/LICENSE | 23 + .../github.com/rivo/uniseg/LICENSE.txt | 21 + .../github.com/schollz/progressbar/v3/LICENSE | 21 + .../github.com/shopspring/decimal/LICENSE | 45 + .../sorairolake/lzip-go/LICENSE-APACHE | 201 ++ .../github.com/spf13/afero/LICENSE.txt | 174 ++ .../github.com/spf13/cast/LICENSE | 21 + .../ghtkn-go-sdk/ghtkn/LICENSE | 21 + .../go-error-with-exit-code/ecerror/LICENSE | 21 + .../suzuki-shunsuke/go-exec/goexec/LICENSE | 21 + .../go-findconfig/findconfig/LICENSE | 21 + .../suzuki-shunsuke/go-osenv/osenv/LICENSE | 21 + .../go-retryablehttp/.github/dependabot.yml | 35 + .../.github/pull_request_template.md | 12 + .../.github/workflows/actionlint.yml | 19 + .../.github/workflows/pr-gofmt.yaml | 23 + .../.github/workflows/pr-unit-tests.yaml | 37 + .../go-retryablehttp/.gitignore | 4 + .../go-retryablehttp/.go-version | 1 + .../go-retryablehttp/.golangci.yml | 28 + .../go-retryablehttp/CHANGELOG.md | 33 + .../go-retryablehttp/CODEOWNERS | 13 + .../suzuki-shunsuke/go-retryablehttp/LICENSE | 365 ++++ .../suzuki-shunsuke/go-retryablehttp/Makefile | 11 + .../go-retryablehttp/README.md | 62 + .../go-retryablehttp/cert_error_go119.go | 14 + .../go-retryablehttp/cert_error_go120.go | 14 + .../go-retryablehttp/client.go | 938 +++++++++ .../go-retryablehttp/client_test.go | 1405 +++++++++++++ .../suzuki-shunsuke/go-retryablehttp/go.mod | 15 + .../suzuki-shunsuke/go-retryablehttp/go.sum | 36 + .../go-retryablehttp/roundtripper.go | 55 + .../go-retryablehttp/roundtripper_test.go | 146 ++ .../slog-error/slogerr/LICENSE | 21 + .../slog-util/slogutil/LICENSE | 21 + .../urfave-cli-v3-util/LICENSE | 21 + .../github.com/ulikunitz/xz/LICENSE | 26 + .../github.com/urfave/cli/v3/LICENSE | 21 + .../github.com/wk8/go-ordered-map/v2/LICENSE | 201 ++ .../github.com/zalando/go-keyring/LICENSE | 21 + .../go.yaml.in/yaml/v2/LICENSE | 201 ++ .../go.yaml.in/yaml/v2/NOTICE | 13 + .../go.yaml.in/yaml/v3/LICENSE | 50 + .../go.yaml.in/yaml/v3/NOTICE | 13 + .../2.57.1/third_party_licenses/go/LICENSE | 27 + .../go4.org/readerutil/LICENSE | 202 ++ .../golang.org/x/crypto/LICENSE | 27 + .../golang.org/x/oauth2/LICENSE | 27 + .../golang.org/x/sync/LICENSE | 27 + .../golang.org/x/sys/unix/LICENSE | 27 + .../golang.org/x/term/LICENSE | 27 + .../golang.org/x/text/LICENSE | 27 + .../gopkg.in/yaml.v3/LICENSE | 50 + .../gopkg.in/yaml.v3/NOTICE | 13 + .local/share/mise/installs/aqua/latest | 1 + .local/share/mise/shims/aqua | 1 + .local/share/zinit/completions/_fast-theme | 1 + .local/share/zinit/completions/_zinit | 1 + .../share/zinit/plugins/_local---zinit/_zinit | 1 + .local/share/zinit/plugins/junegunn---fzf | 1 + ...harma-continuum---fast-syntax-highlighting | 1 + .../plugins/zsh-users---zsh-autosuggestions | 1 + .local/share/zinit/polaris/man/man1/zinit.1 | 1754 +++++++++++++++++ .local/share/zinit/snippets/plugins | 1 + .local/share/zinit/zinit.git | 1 + .local/state/nvim/blink/cmp/frecency.dat | Bin 0 -> 1856 bytes .local/state/nvim/conform.log | 3 + .local/state/nvim/mason.log | 75 + .local/state/nvim/nvim-pack.log | 148 ++ .local/state/nvim/nvim.log | 154 ++ .local/state/nvim/shada/main.shada | Bin 0 -> 60466 bytes .../undo/%Users%andrew%dotfiles%.Brewfile | Bin 0 -> 7426 bytes ...sers%andrew%dotfiles%.config%nvim%init.lua | Bin 0 -> 116330 bytes ...%andrew%dotfiles%.config%nvim%lsp%deno.lua | Bin 0 -> 6163 bytes ...ers%andrew%dotfiles%.config%tmux%tmux.conf | Bin 0 -> 9894 bytes .../nvim/undo/%Users%andrew%dotfiles%.zshrc | Bin 0 -> 1202 bytes .local/state/nvim/undo/%Users%andrew%mount.sh | Bin 0 -> 2851 bytes ...%Projects%C%image_processor%CMakeLists.txt | Bin 0 -> 14957 bytes ...Projects%C%image_rasterizer%CMakeLists.txt | Bin 0 -> 20414 bytes ...drew%personal%Projects%C%sudoku%src%main.c | Bin 0 -> 689 bytes ...drew%personal%Projects%C%vector%src%main.c | Bin 0 -> 615 bytes ...rsonal%Projects%Javascript%test%.gitignore | Bin 0 -> 525 bytes ...%personal%Projects%Javascript%test%main.js | Bin 0 -> 1006 bytes ...rsonal%Projects%Javascript%testing%main.js | Bin 0 -> 39623 bytes ...ojects%Lua%Polydev%lua%Polydev%configs.lua | Bin 0 -> 5878 bytes ...ects%Lua%Polydev%lua%Polydev%languages.lua | Bin 0 -> 25159 bytes ...ects%Lua%Polydev%lua%Polydev%templates.lua | Bin 0 -> 27109 bytes ...Projects%Lua%Polydev%lua%Polydev%utils.lua | Bin 0 -> 5354 bytes .ssh/config | 15 - .stow-local-ignore | 1 + .zshrc | 3 +- 194 files changed, 16041 insertions(+), 94 deletions(-) create mode 100644 .config/nvim/lsp/deno.lua create mode 160000 .config/tmux/plugins/vim-tmux-navigator create mode 100644 .local/share/flox/env-registry.json create mode 100644 .local/share/flox/env-registry.lock create mode 100644 .local/share/flox/metrics-uuid create mode 100644 .local/share/mise/installs/.mise-installs.toml create mode 120000 .local/share/mise/installs/aqua/2 create mode 120000 .local/share/mise/installs/aqua/2.57 create mode 100644 .local/share/mise/installs/aqua/2.57.1/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/README.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/dario.cat/mergo/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/goutils/LICENSE.txt create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/semver/v3/LICENSE.txt create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/sprig/v3/LICENSE.txt create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/STARRY-S/zip/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/andybalholm/brotli/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/aquaproj/aqua/v2/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bahlo/generic-list-go/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/plumbing/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/sevenzip/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/windows/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/buger/jsonparser/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/charmbracelet/x/term/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/dsnet/compress/LICENSE.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/expr-lang/expr/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/forPelevin/gomoji/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/gdamore/encoding/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/gdamore/tcell/v2/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/goccy/go-yaml/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/godbus/dbus/v5/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-github/v80/github/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-github/v84/github/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-querystring/query/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/uuid/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/README.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/cleanhttp.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/doc.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/go.mod create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/handlers.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/handlers_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/CODEOWNERS create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/dependabot.yml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/pull_request_template.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/workflows/go-tests.yml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/CHANGELOG.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/README.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/constraint.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/constraint_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/go.mod create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_collection.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_collection_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.github/workflows/ci.yml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.gitignore create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.golangci.yml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/2q.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/2q_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/README.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/doc.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/expirable/expirable_lru.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/expirable/expirable_lru_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/go.mod create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/internal/list.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/lru.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/lru_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/LICENSE_list create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru_interface.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/testing_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/huandu/xstrings/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/invopop/jsonschema/COPYING create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/internal/snapref/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/s2/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/pgzip/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ktr0731/go-ansisgr/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ktr0731/go-fuzzyfinder/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/lmittmann/tint/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/lucasb-eyer/go-colorful/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mailru/easyjson/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-colorable/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-isatty/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-runewidth/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mholt/archives/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mikelolasagasti/xz/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/minio/minlz/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/colorstring/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/copystructure/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/reflectwalk/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/nsf/termbox-go/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/nwaples/rardecode/v2/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/otiai10/copy/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/pierrec/lz4/v4/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/pkg/errors/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/rivo/uniseg/LICENSE.txt create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/schollz/progressbar/v3/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/shopspring/decimal/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/sorairolake/lzip-go/LICENSE-APACHE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/spf13/afero/LICENSE.txt create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/spf13/cast/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/ghtkn-go-sdk/ghtkn/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-error-with-exit-code/ecerror/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-exec/goexec/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-findconfig/findconfig/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-osenv/osenv/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/dependabot.yml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/pull_request_template.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/actionlint.yml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/pr-gofmt.yaml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/pr-unit-tests.yaml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.gitignore create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.go-version create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.golangci.yml create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/CHANGELOG.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/CODEOWNERS create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/Makefile create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/README.md create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/cert_error_go119.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/cert_error_go120.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/client.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/client_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/go.mod create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/go.sum create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/roundtripper.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/roundtripper_test.go create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/slog-error/slogerr/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/slog-util/slogutil/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/urfave-cli-v3-util/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ulikunitz/xz/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/urfave/cli/v3/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/wk8/go-ordered-map/v2/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/zalando/go-keyring/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v2/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v2/NOTICE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v3/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v3/NOTICE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/go/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/go4.org/readerutil/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/crypto/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/oauth2/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/sync/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/sys/unix/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/term/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/text/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/gopkg.in/yaml.v3/LICENSE create mode 100644 .local/share/mise/installs/aqua/2.57.1/third_party_licenses/gopkg.in/yaml.v3/NOTICE create mode 120000 .local/share/mise/installs/aqua/latest create mode 120000 .local/share/mise/shims/aqua create mode 120000 .local/share/zinit/completions/_fast-theme create mode 120000 .local/share/zinit/completions/_zinit create mode 120000 .local/share/zinit/plugins/_local---zinit/_zinit create mode 160000 .local/share/zinit/plugins/junegunn---fzf create mode 160000 .local/share/zinit/plugins/zdharma-continuum---fast-syntax-highlighting create mode 160000 .local/share/zinit/plugins/zsh-users---zsh-autosuggestions create mode 100644 .local/share/zinit/polaris/man/man1/zinit.1 create mode 120000 .local/share/zinit/snippets/plugins create mode 160000 .local/share/zinit/zinit.git create mode 100644 .local/state/nvim/blink/cmp/frecency.dat create mode 100644 .local/state/nvim/conform.log create mode 100644 .local/state/nvim/mason.log create mode 100644 .local/state/nvim/nvim-pack.log create mode 100644 .local/state/nvim/nvim.log create mode 100644 .local/state/nvim/shada/main.shada create mode 100644 .local/state/nvim/undo/%Users%andrew%dotfiles%.Brewfile create mode 100644 .local/state/nvim/undo/%Users%andrew%dotfiles%.config%nvim%init.lua create mode 100644 .local/state/nvim/undo/%Users%andrew%dotfiles%.config%nvim%lsp%deno.lua create mode 100644 .local/state/nvim/undo/%Users%andrew%dotfiles%.config%tmux%tmux.conf create mode 100644 .local/state/nvim/undo/%Users%andrew%dotfiles%.zshrc create mode 100644 .local/state/nvim/undo/%Users%andrew%mount.sh create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%C%image_processor%CMakeLists.txt create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%C%image_rasterizer%CMakeLists.txt create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%C%sudoku%src%main.c create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%C%vector%src%main.c create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%Javascript%test%.gitignore create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%Javascript%test%main.js create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%Javascript%testing%main.js create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%Lua%Polydev%lua%Polydev%configs.lua create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%Lua%Polydev%lua%Polydev%languages.lua create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%Lua%Polydev%lua%Polydev%templates.lua create mode 100644 .local/state/nvim/undo/%Users%andrew%personal%Projects%Lua%Polydev%lua%Polydev%utils.lua delete mode 100644 .ssh/config create mode 100644 .stow-local-ignore diff --git a/.Brewfile b/.Brewfile index d351c34..ef608b7 100644 --- a/.Brewfile +++ b/.Brewfile @@ -1,14 +1,12 @@ -cargo "mdbook" -cargo "rustlings" - -#cask "ghostty" -#cask "localsend" -#cask "tailscale" -#cask "zen" -#cask "autodesk-fusion" -#cask "logi-options+" +cask "ghostty" +cask "localsend" +cask "tailscale-app" +cask "zen" +cask "autodesk-fusion" +cask "logi-options+" cask "font-jetbrains-mono-nerd-font" - +# cask "bitwarden" +cask "utm" brew "ripgrep" brew "eza" @@ -22,3 +20,8 @@ brew "git" brew "zoxide" brew "stow" brew "mosh" +brew "tree-sitter" +brew "tree-sitter-cli" +brew "jpeg-turbo" +brew "npm" +brew "wget" diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index bcc70f5..8e0c003 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,26 +1,32 @@ vim.opt.termguicolors = true vim.pack.add({ - { src = "https://github.com/rose-pine/neovim", name = "rose-pine" }, - { src = "https://github.com/norcalli/nvim-colorizer.lua" }, + { src = "https://github.com/rose-pine/neovim", name = "rose-pine" }, + { src = "https://github.com/brenoprata10/nvim-highlight-colors" }, { src = "https://github.com/mbbill/undotree" }, - { src = "https://github.com/nvim-mini/mini.pairs", version = vim.version.range('*') }, + { src = "https://github.com/nvim-mini/mini.pairs", version = vim.version.range('*') }, { src = "https://github.com/nvim-tree/nvim-web-devicons" }, { src = "https://github.com/ibhagwan/fzf-lua" }, - { src = "https://github.com/saghen/blink.cmp", version = vim.version.range('*'), }, - { src = "git@moo:dmm/polydev.git", version = "main" }, - { src = "https://github.com/nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, + { src = "https://github.com/saghen/blink.cmp", version = vim.version.range('*'), }, + { src = "git@moo:dmm/polydev.git", version = "main" }, + { src = "https://github.com/nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, { src = "https://github.com/alexghergh/nvim-tmux-navigation" }, { src = "https://github.com/mason-org/mason.nvim" }, + { src = "https://github.com/mason-org/mason-lspconfig.nvim" }, + { src = "https://github.com/neovim/nvim-lspconfig" }, { src = "https://github.com/stevearc/conform.nvim" }, }) require("mason").setup() +require("mason-lspconfig").setup({ + ensure_installed = { "ts_ls", "lua_ls", "denols" }, + automatic_enable = true, +}) require 'nvim-tmux-navigation'.setup { disable_when_zoomed = true -- defaults to false } -require('nvim-treesitter').install { 'rust', 'c', 'cpp', 'lua', 'nix' } +require('nvim-treesitter').install { 'rust', 'c', 'cpp', 'lua', 'javascript' } vim.api.nvim_create_autocmd('FileType', { - pattern = { 'c', 'cpp', 'rust', 'lua' }, + pattern = { 'c', 'cpp', 'rust', 'lua', 'javascript' }, callback = function() vim.treesitter.start() vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" @@ -28,15 +34,9 @@ vim.api.nvim_create_autocmd('FileType', { }) require("conform").setup({ formatters_by_ft = { - nix = { "alejandra" }, - -- Conform will run multiple formatters sequentially - -- You can customize some of the format options for the filetype (:help conform.format) rust = { "rustfmt", lsp_format = "fallback" }, - -- Conform will run the first available formatter - -- javascript = { "prettierd", "prettier", stop_after_first = true }, - -- -- Use a "*" to run formatters on all filetypes - ["*"] = { "codespell" }, - -- Use "_" to run formatters on filetypes that don't have other formatters + lua = { "emmylua-codeformat", lsp_format = "fallback" }, + javascript = { "denols", stop_after_first = true }, ["_"] = { "trim_whitespace" }, }, format_on_save = { @@ -45,7 +45,7 @@ require("conform").setup({ }, }) -require('colorizer').setup() +require('nvim-highlight-colors').turnOn() require("Polydev").setup({ terminal = { mode = "split", @@ -92,6 +92,25 @@ require("fzf-lua").setup({ }, }) + + +local capabilities = require('blink.cmp').get_lsp_capabilities() +vim.lsp.config("lua_ls", { + capabilities = capabilities, + settings = { + Lua = { + diagnostics = { globals = { "vim" } }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + checkThirdParty = false, + }, + }, + }, +}) +vim.lsp.enable({ "lua_ls", "clangd", "rust-analyzer", "denols" }) + +--- Options + vim.g.mapleader = " " vim.opt.number = true vim.opt.relativenumber = true @@ -118,48 +137,30 @@ vim.opt.cursorlineopt = { "screenline", "number" } -- cursorline look vim.opt.foldmethod = "indent" vim.opt.foldcolumn = "1" vim.opt.foldenable = false -vim.opt.shortmess = 'aF' -- abbreviates messages and prevents file name being echoed when opened -vim.opt.ignorecase = true -- ignore cases when searching -vim.opt.smartcase = true -- However if we use a capital in search string we then consider case-sensitivity, ignorecase is disabled -vim.opt.smartindent = true -- smarter indentation -vim.opt.smarttab = true -- make tab behaviour smarter +vim.opt.shortmess = 'aF' -- abbreviates messages and prevents file name being echoed when opened +vim.opt.ignorecase = true -- ignore cases when searching +vim.opt.smartcase = true -- However if we use a capital in search string we then consider case-sensitivity, ignorecase is disabled +vim.opt.smartindent = false -- smarter indentation +vim.opt.smarttab = true -- make tab behaviour smarter vim.opt.laststatus = 3 --- vim.opt.list = true --- vim.opt.lcs = "tab:| " --- vim.opt.colorcolumn= "80" +--- COLORS + vim.cmd.colorscheme("rose-pine") --- vim.cmd.colorscheme("tokyonight-moon") -local capabilities = require('blink.cmp').get_lsp_capabilities() - --- 2. Customize the built-in lua_ls config -vim.lsp.config("lua_ls", { - capabilities = capabilities, - settings = { - Lua = { - diagnostics = { globals = { "vim" } }, - workspace = { - library = vim.api.nvim_get_runtime_file("", true), - checkThirdParty = false, - }, - }, - }, -}) -vim.lsp.enable({ "lua_ls", "clangd", "rust-analyzer", "nil_ls" }) vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) vim.api.nvim_set_hl(0, "NormalFloat", { link = 'Normal' }) vim.api.nvim_set_hl(0, "StatusLine", { link = 'Normal' }) vim.api.nvim_set_hl(0, "StatusLineTerm", { link = 'Normal' }) vim.api.nvim_set_hl(0, "StatusLineNC", { link = 'Normal' }) vim.api.nvim_set_hl(0, "SignColumn", { link = 'Normal' }) --- vim.api.nvim_set_hl(0, 'LineNrAbove', { link = 'Conceal', bold = true }) --- vim.api.nvim_set_hl(0, 'LineNrBelow', { link = 'Conceal', bold = true }) vim.api.nvim_set_hl(0, 'LineNrAbove', { link = 'NonText', bold = true }) vim.api.nvim_set_hl(0, 'LineNrBelow', { link = 'NonText', bold = true }) vim.api.nvim_set_hl(0, "LineNr", { link = 'Normal' }) vim.api.nvim_set_hl(0, "FoldColumn", { link = 'Normal' }) vim.api.nvim_set_hl(0, "CursorLineNr", { bg = "none", link = 'MatchParen', bold = true }) +--- KEYMAPS + vim.keymap.set("v", "J", ":m '>+1gv=gv") vim.keymap.set("v", "K", ":m '<-2gv=gv") vim.keymap.set("n", "ff", vim.lsp.buf.format) @@ -168,12 +169,14 @@ vim.keymap.set("n", "ss", ":split") vim.keymap.set("n", "E", ":Ex") vim.keymap.set("n", "", "zz") vim.keymap.set("n", "", "zz") +vim.keymap.set("n", "n", "nzzzv") +vim.keymap.set("n", "N", "Nzzzv") vim.keymap.set("x", "p", [["_dP]]) vim.keymap.set('n', '', ":FzfLua files") vim.keymap.set('n', 'fh', ":FzfLua helptags") vim.keymap.set('n', 'fg', ":FzfLua live_grep") vim.keymap.set('n', 'fm', ":FzfLua manpages") -vim.keymap.set('n', 'xx', ":FzfLua diagnostics_workspace") +vim.keymap.set('n', 'xx', vim.diagnostic.setqflist) vim.keymap.set('n', 'fs', vim.lsp.buf.document_symbol) vim.keymap.set('n', 'gd', vim.lsp.buf.definition) vim.keymap.set("n", "gr", vim.lsp.buf.references) @@ -190,4 +193,3 @@ vim.keymap.set("n", "", ":NvimTmuxNavigateLeft", { silent = true }) vim.keymap.set("n", "", ":NvimTmuxNavigateDown", { silent = true }) vim.keymap.set("n", "", ":NvimTmuxNavigateUp", { silent = true }) vim.keymap.set("n", "", ":NvimTmuxNavigateRight", { silent = true }) - diff --git a/.config/nvim/lsp/deno.lua b/.config/nvim/lsp/deno.lua new file mode 100644 index 0000000..39e65f4 --- /dev/null +++ b/.config/nvim/lsp/deno.lua @@ -0,0 +1,162 @@ +---@brief +--- +--- https://github.com/denoland/deno +--- +--- Deno's built-in language server +--- +--- To appropriately highlight codefences returned from denols, you will need to augment vim.g.markdown_fenced languages +--- in your init.lua. Example: +--- +--- ```lua +--- vim.g.markdown_fenced_languages = { +--- "ts=typescript" +--- } +--- ``` +--- +--- Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that +--- expects to run in Node or Web Browsers. This supports having a Deno module that is a part of a mostly-not-Deno +--- monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json or deno.jsonc. +--- Note that this means that without a deno.json, deno.jsonc, or deno.lock file, this LSP client will not attach. +--- +--- Example: +--- +--- ``` +--- project-root +--- +-- node_modules/... +--- +-- package-lock.json +--- +-- package.json +--- +-- packages +--- +-- deno-module +--- | +-- deno.json +--- | +-- package.json <-- It's normal for Deno projects to have package.json files! +--- | +-- src +--- | +-- index.ts <-- this is a Deno file +--- +-- node-module +--- +-- package.json +--- +-- src +--- +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgo) +--- ``` +--- +--- From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT. +--- From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT. +--- From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT +--- If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we attach. +--- If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we attach. +--- Otherwise, we abort, because this is a non-Deno TS file. + +local lsp = vim.lsp + +local function virtual_text_document_handler(uri, res, client) + if not res then + return nil + end + + local lines = vim.split(res.result, '\n') + local bufnr = vim.uri_to_bufnr(uri) + + local current_buf = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) + if #current_buf ~= 0 then + return nil + end + + vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, lines) + vim.api.nvim_set_option_value('readonly', true, { buf = bufnr }) + vim.api.nvim_set_option_value('modified', false, { buf = bufnr }) + vim.api.nvim_set_option_value('modifiable', false, { buf = bufnr }) + lsp.buf_attach_client(bufnr, client.id) +end + +local function virtual_text_document(uri, client) + local params = { + textDocument = { + uri = uri, + }, + } + local result = client:request_sync('deno/virtualTextDocument', params) + virtual_text_document_handler(uri, result, client) +end + +local function denols_handler(err, result, ctx, config) + if not result or vim.tbl_isempty(result) then + return nil + end + + local client = vim.lsp.get_client_by_id(ctx.client_id) + for _, res in pairs(result) do + local uri = res.uri or res.targetUri + if uri:match '^deno:' then + virtual_text_document(uri, client) + res['uri'] = uri + res['targetUri'] = uri + end + end + + lsp.handlers[ctx.method](err, result, ctx, config) +end + +---@type vim.lsp.Config +return { + cmd = { 'deno', 'lsp' }, + cmd_env = { NO_COLOR = true }, + filetypes = { + 'javascript', + 'javascriptreact', + 'typescript', + 'typescriptreact', + }, + root_dir = function(bufnr, on_dir) + -- The project root is where the LSP can be started from + local root_markers = { 'deno.lock', 'deno.json', 'deno.jsonc' } + -- Give the root markers equal priority by wrapping them in a table + root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } } + or vim.list_extend(root_markers, { '.git' }) + -- only include deno projects + local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' }) + local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' }) + local project_root = vim.fs.root(bufnr, root_markers) + if + (deno_lock_root and (not project_root or #deno_lock_root > #project_root)) + or (deno_root and (not project_root or #deno_root >= #project_root)) + then + -- deno config is closer than or equal to package manager lock, + -- or deno lock is closer than package manager lock. Attach at the project root, + -- or deno lock or deno config path. At least one of these is always set at this point. + on_dir(project_root or deno_lock_root or deno_root) + end + end, + ---@type lspconfig.settings.denols + settings = { + deno = { + enable = true, + suggest = { + imports = { + hosts = { + ['https://deno.land'] = true, + }, + }, + }, + }, + }, + handlers = { + ['textDocument/definition'] = denols_handler, + ['textDocument/typeDefinition'] = denols_handler, + ['textDocument/references'] = denols_handler, + }, + on_attach = function(client, bufnr) + vim.api.nvim_buf_create_user_command(bufnr, 'LspDenolsCache', function() + client:exec_cmd({ + title = 'DenolsCache', + command = 'deno.cache', + arguments = { {}, vim.uri_from_bufnr(bufnr) }, + }, { bufnr = bufnr }, function(err, _, ctx) + if err then + local uri = ctx.params.arguments[2] + vim.notify('cache command failed for' .. vim.uri_to_fname(uri), + vim.log.levels.ERROR) + end + end) + end, { + desc = 'Cache a module and all of its dependencies.', + }) + end, +} diff --git a/.config/nvim/nvim-pack-lock.json b/.config/nvim/nvim-pack-lock.json index bbfb58d..7b2a548 100644 --- a/.config/nvim/nvim-pack-lock.json +++ b/.config/nvim/nvim-pack-lock.json @@ -14,9 +14,13 @@ "src": "https://github.com/stevearc/conform.nvim" }, "fzf-lua": { - "rev": "8a79ee54d6216d10b2f153921a12b152be0c1a20", + "rev": "bde73a6886b607246095aa59f396de5e0d036890", "src": "https://github.com/ibhagwan/fzf-lua" }, + "mason-lspconfig.nvim": { + "rev": "38499e0bda64bc0f3ec6e7f03f8e13dd11c0fa00", + "src": "https://github.com/mason-org/mason-lspconfig.nvim" + }, "mason.nvim": { "rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", "src": "https://github.com/mason-org/mason.nvim" @@ -30,12 +34,20 @@ "rev": "a065833f35a3a7cc3ef137ac88b5381da2ba302e", "src": "https://github.com/norcalli/nvim-colorizer.lua" }, + "nvim-highlight-colors": { + "rev": "e2cb22089cc2358b2b995c09578224f142de6039", + "src": "https://github.com/brenoprata10/nvim-highlight-colors" + }, + "nvim-lspconfig": { + "rev": "16812abf0e8d8175155f26143a8504e8253e92b0", + "src": "https://github.com/neovim/nvim-lspconfig" + }, "nvim-tmux-navigation": { "rev": "4898c98702954439233fdaf764c39636681e2861", "src": "https://github.com/alexghergh/nvim-tmux-navigation" }, "nvim-treesitter": { - "rev": "2b50ab5ccbcd9e5708deb351308edd738adbf84c", + "rev": "7caec274fd19c12b55902a5b795100d21531391f", "src": "https://github.com/nvim-treesitter/nvim-treesitter" }, "nvim-web-devicons": { @@ -43,7 +55,7 @@ "src": "https://github.com/nvim-tree/nvim-web-devicons" }, "polydev": { - "rev": "62015919ddfe04c94aecc1977e6a44c08142ded3", + "rev": "919d141c6a4212d176050ba13fc81d2fa25216a4", "src": "git@moo:dmm/polydev.git", "version": "'main'" }, diff --git a/.config/tmux/plugins/vim-tmux-navigator b/.config/tmux/plugins/vim-tmux-navigator new file mode 160000 index 0000000..e41c431 --- /dev/null +++ b/.config/tmux/plugins/vim-tmux-navigator @@ -0,0 +1 @@ +Subproject commit e41c431a0c7b7388ae7ba341f01a0d217eb3a432 diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 5bbeb4b..f0028d7 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -4,21 +4,10 @@ set -g prefix C-Space bind C-Space send-prefix set -g focus-events on -# set -g default-terminal "screen-256color" -# set -ga terminal-features ',xterm-ghostty:RGB' -# macOS specific (Ghostty) -if-shell '[[ $(uname) == "Darwin" ]]' { - set -ga terminal-features ',xterm-ghostty:RGB' - set -as terminal-overrides ',xterm-ghostty:Tc' -} - -# Linux specific (Foot) -if-shell '[[ $(uname) == "Linux" ]]' { - set -ga terminal-features ',foot:RGB' - set -as terminal-overrides ',foot:Tc' -} +set -ga terminal-features ',xterm-ghostty:RGB' +set -as terminal-overrides ',xterm-ghostty:Tc' set-option -g default-shell $SHELL -set -g status-style 'fg=#eb6f92 bg=#26233a' +set -g status-style 'fg=#eb6f92 bg=#000000' set -g status-left-length 100 set -g status-right-length 20 set -g status-left "#[fg=#f6c177, bold] #S #[fg=#f6c177,nobold]-> " @@ -48,10 +37,5 @@ bind -n C-S-l resize-pane -R 5 set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'christoomey/vim-tmux-navigator' -set -g @plugin 'tmux-plugins/tmux-resurrect' -set -g @plugin 'tmux-plugins/tmux-continuum' - -set -g @continuum-restore 'on' -set -g @resurrect-strategy-nvim 'session' run '$HOME/.config/tmux/plugins/tpm/tpm' diff --git a/.local/share/flox/env-registry.json b/.local/share/flox/env-registry.json new file mode 100644 index 0000000..19da195 --- /dev/null +++ b/.local/share/flox/env-registry.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "entries": [ + { + "hash": "694b2e75", + "path": "/Users/andrew/personal/Projects/C/image_rasterizer/.flox", + "envs": [ + { + "created_at": 1774586704, + "pointer": { + "name": "image-rasterizer", + "version": 1 + } + } + ] + } + ] +} \ No newline at end of file diff --git a/.local/share/flox/env-registry.lock b/.local/share/flox/env-registry.lock new file mode 100644 index 0000000..e69de29 diff --git a/.local/share/flox/metrics-uuid b/.local/share/flox/metrics-uuid new file mode 100644 index 0000000..313c7fa --- /dev/null +++ b/.local/share/flox/metrics-uuid @@ -0,0 +1 @@ +7762a133-9615-4154-b037-977c94ad6325 \ No newline at end of file diff --git a/.local/share/mise/installs/.mise-installs.toml b/.local/share/mise/installs/.mise-installs.toml new file mode 100644 index 0000000..9122ecf --- /dev/null +++ b/.local/share/mise/installs/.mise-installs.toml @@ -0,0 +1,4 @@ +[aqua] +short = "aqua" +full = "github:aquaproj/aqua" +explicit_backend = false \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2 b/.local/share/mise/installs/aqua/2 new file mode 120000 index 0000000..52690f3 --- /dev/null +++ b/.local/share/mise/installs/aqua/2 @@ -0,0 +1 @@ +./2.57.1 \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57 b/.local/share/mise/installs/aqua/2.57 new file mode 120000 index 0000000..52690f3 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57 @@ -0,0 +1 @@ +./2.57.1 \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57.1/LICENSE b/.local/share/mise/installs/aqua/2.57.1/LICENSE new file mode 100644 index 0000000..4d57deb --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/README.md b/.local/share/mise/installs/aqua/2.57.1/README.md new file mode 100644 index 0000000..d69e2ca --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/README.md @@ -0,0 +1,47 @@ +

+ + + logo + +

+ +# + +[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/aquaproj/aqua/main/LICENSE) [![DeepWiki](https://img.shields.io/badge/DeepWiki-aquaproj%2Faqua-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/aquaproj/aqua) | [Document](https://aquaproj.github.io/) | [Contributing](CONTRIBUTING.md) | [Logo](logo) | [Scorecard](https://securityscorecards.dev/viewer/?uri=github.com/aquaproj/aqua) + + +Declarative CLI Version Manager written in Go. + +- Switch tool versions per project +- Unify tool versions and how to install in your teams and CI +- Continuous update by Renovate +- Lazy Install +- Ecosystem by Registry +- Secure +- Easy to use + +[![Star History Chart](https://api.star-history.com/svg?repos=aquaproj/aqua&type=Date)](https://star-history.com/#aquaproj/aqua&Date) + +## Who uses aqua? + +> [!NOTE] +> If you want to add your company, organization, project to the list, please send a pull request or send a comment to the [GitHub Discussion](https://github.com/orgs/aquaproj/discussions/2124)! + +- [GitHub Public repositories that use aqua](https://github.com/aquaproj/user-list) +- [tfaction](https://github.com/suzuki-shunsuke/tfaction) uses aqua heavily to install various tools such as Terraform, tfsec, tflint, tfcmt, and so on +- Recruit Co., Ltd. - [StudySapuri](https://brand.studysapuri.jp/) and [Quipper](https://www.quipper.com/) product team +- [Masterpoint Consulting](https://masterpoint.io/) ([ref](https://github.com/orgs/aquaproj/discussions/2124#discussioncomment-6553057)) +- [Retty](https://retty.me/) ([ref](https://engineer.retty.me/entry/2022/12/14/130000)) +- [Mercari, Inc.](https://about.mercari.com/en/) +- [Gunosy Inc.](https://gunosy.co.jp/en/) ([ref](https://tech.gunosy.io/entry/snyk_iac_reviewdog_aqua_devsecops)) +- [DeNA Co., Ltd.](https://dena.com/intl/) +- [CADDi Inc.](https://caddi.com/) +- [Studist](https://studist.jp/) ([ref](https://studist.tech/entrance-book-4a57bc50aace)) +- [Connehito Inc.](https://connehito.com/) ([ref](https://tech.connehito.com/entry/2024/10/01/184156#%E3%83%87%E3%83%97%E3%83%AD%E3%82%A4%E3%81%A7%E6%89%B1%E3%81%86CLI%E3%83%84%E3%83%BC%E3%83%AB%E3%81%AF-aqua-%E3%81%A7%E7%AE%A1%E7%90%86)) +- [LayerX Inc.](https://layerx.co.jp/) ([ref](https://tech.layerx.co.jp/entry/aqua-local-setup)) + +## License + +[MIT](LICENSE) + +About the license of logo, please see [here](logo/README.md#license). diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/dario.cat/mergo/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/dario.cat/mergo/LICENSE new file mode 100644 index 0000000..6866802 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/dario.cat/mergo/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2013 Dario Castañé. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/goutils/LICENSE.txt b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/goutils/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/goutils/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/semver/v3/LICENSE.txt b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/semver/v3/LICENSE.txt new file mode 100644 index 0000000..9ff7da9 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/semver/v3/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2014-2019, Matt Butcher and Matt Farina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/sprig/v3/LICENSE.txt b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/sprig/v3/LICENSE.txt new file mode 100644 index 0000000..f311b1e --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/Masterminds/sprig/v3/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2013-2020 Masterminds + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/STARRY-S/zip/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/STARRY-S/zip/LICENSE new file mode 100644 index 0000000..7bb02ab --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/STARRY-S/zip/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2023, Starry + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/andybalholm/brotli/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/andybalholm/brotli/LICENSE new file mode 100644 index 0000000..33b7cdd --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/andybalholm/brotli/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/aquaproj/aqua/v2/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/aquaproj/aqua/v2/LICENSE new file mode 100644 index 0000000..4d57deb --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/aquaproj/aqua/v2/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bahlo/generic-list-go/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bahlo/generic-list-go/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bahlo/generic-list-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/plumbing/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/plumbing/LICENSE new file mode 100644 index 0000000..5df2ec5 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/plumbing/LICENSE @@ -0,0 +1,30 @@ +BSD 3-Clause License + +Copyright (c) 2019, Matt Dainty +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/sevenzip/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/sevenzip/LICENSE new file mode 100644 index 0000000..5a19a8f --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/sevenzip/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2020, Matt Dainty +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/windows/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/windows/LICENSE new file mode 100644 index 0000000..08172a9 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/bodgit/windows/LICENSE @@ -0,0 +1,30 @@ +BSD 3-Clause License + +Copyright (c) 2020, Matt Dainty +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/buger/jsonparser/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/buger/jsonparser/LICENSE new file mode 100644 index 0000000..ac25aeb --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/buger/jsonparser/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Leonid Bugaev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/charmbracelet/x/term/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/charmbracelet/x/term/LICENSE new file mode 100644 index 0000000..65a5654 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/charmbracelet/x/term/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Charmbracelet, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/dsnet/compress/LICENSE.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/dsnet/compress/LICENSE.md new file mode 100644 index 0000000..945b396 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/dsnet/compress/LICENSE.md @@ -0,0 +1,24 @@ +Copyright © 2015, Joe Tsai and The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. +* Neither the copyright holder nor the names of its contributors may be used to +endorse or promote products derived from this software without specific prior +written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/expr-lang/expr/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/expr-lang/expr/LICENSE new file mode 100644 index 0000000..ec46ce3 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/expr-lang/expr/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Anton Medvedev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/forPelevin/gomoji/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/forPelevin/gomoji/LICENSE new file mode 100644 index 0000000..56e97e1 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/forPelevin/gomoji/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Vladislav Gukasov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/gdamore/encoding/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/gdamore/encoding/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/gdamore/encoding/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/gdamore/tcell/v2/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/gdamore/tcell/v2/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/gdamore/tcell/v2/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/goccy/go-yaml/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/goccy/go-yaml/LICENSE new file mode 100644 index 0000000..04485ce --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/goccy/go-yaml/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Masaaki Goshima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/godbus/dbus/v5/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/godbus/dbus/v5/LICENSE new file mode 100644 index 0000000..670d88f --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/godbus/dbus/v5/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (), Google +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-github/v80/github/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-github/v80/github/LICENSE new file mode 100644 index 0000000..28b6486 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-github/v80/github/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The go-github AUTHORS. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-github/v84/github/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-github/v84/github/LICENSE new file mode 100644 index 0000000..28b6486 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-github/v84/github/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The go-github AUTHORS. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-querystring/query/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-querystring/query/LICENSE new file mode 100644 index 0000000..ae121a1 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/go-querystring/query/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 Google. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/uuid/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/uuid/LICENSE new file mode 100644 index 0000000..5dc6826 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/google/uuid/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/LICENSE new file mode 100644 index 0000000..e87a115 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/LICENSE @@ -0,0 +1,363 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/README.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/README.md new file mode 100644 index 0000000..036e531 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/README.md @@ -0,0 +1,30 @@ +# cleanhttp + +Functions for accessing "clean" Go http.Client values + +------------- + +The Go standard library contains a default `http.Client` called +`http.DefaultClient`. It is a common idiom in Go code to start with +`http.DefaultClient` and tweak it as necessary, and in fact, this is +encouraged; from the `http` package documentation: + +> The Client's Transport typically has internal state (cached TCP connections), +so Clients should be reused instead of created as needed. Clients are safe for +concurrent use by multiple goroutines. + +Unfortunately, this is a shared value, and it is not uncommon for libraries to +assume that they are free to modify it at will. With enough dependencies, it +can be very easy to encounter strange problems and race conditions due to +manipulation of this shared value across libraries and goroutines (clients are +safe for concurrent use, but writing values to the client struct itself is not +protected). + +Making things worse is the fact that a bare `http.Client` will use a default +`http.Transport` called `http.DefaultTransport`, which is another global value +that behaves the same way. So it is not simply enough to replace +`http.DefaultClient` with `&http.Client{}`. + +This repository provides some simple functions to get a "clean" `http.Client` +-- one that uses the same default values as the Go standard library, but +returns a client that does not share any state with other clients. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/cleanhttp.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/cleanhttp.go new file mode 100644 index 0000000..fe28d15 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/cleanhttp.go @@ -0,0 +1,58 @@ +package cleanhttp + +import ( + "net" + "net/http" + "runtime" + "time" +) + +// DefaultTransport returns a new http.Transport with similar default values to +// http.DefaultTransport, but with idle connections and keepalives disabled. +func DefaultTransport() *http.Transport { + transport := DefaultPooledTransport() + transport.DisableKeepAlives = true + transport.MaxIdleConnsPerHost = -1 + return transport +} + +// DefaultPooledTransport returns a new http.Transport with similar default +// values to http.DefaultTransport. Do not use this for transient transports as +// it can leak file descriptors over time. Only use this for transports that +// will be re-used for the same host(s). +func DefaultPooledTransport() *http.Transport { + transport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + DualStack: true, + }).DialContext, + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + ForceAttemptHTTP2: true, + MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1, + } + return transport +} + +// DefaultClient returns a new http.Client with similar default values to +// http.Client, but with a non-shared Transport, idle connections disabled, and +// keepalives disabled. +func DefaultClient() *http.Client { + return &http.Client{ + Transport: DefaultTransport(), + } +} + +// DefaultPooledClient returns a new http.Client with similar default values to +// http.Client, but with a shared Transport. Do not use this function for +// transient clients as it can leak file descriptors over time. Only use this +// for clients that will be re-used for the same host(s). +func DefaultPooledClient() *http.Client { + return &http.Client{ + Transport: DefaultPooledTransport(), + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/doc.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/doc.go new file mode 100644 index 0000000..0584109 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/doc.go @@ -0,0 +1,20 @@ +// Package cleanhttp offers convenience utilities for acquiring "clean" +// http.Transport and http.Client structs. +// +// Values set on http.DefaultClient and http.DefaultTransport affect all +// callers. This can have detrimental effects, esepcially in TLS contexts, +// where client or root certificates set to talk to multiple endpoints can end +// up displacing each other, leading to hard-to-debug issues. This package +// provides non-shared http.Client and http.Transport structs to ensure that +// the configuration will not be overwritten by other parts of the application +// or dependencies. +// +// The DefaultClient and DefaultTransport functions disable idle connections +// and keepalives. Without ensuring that idle connections are closed before +// garbage collection, short-term clients/transports can leak file descriptors, +// eventually leading to "too many open files" errors. If you will be +// connecting to the same hosts repeatedly from the same client, you can use +// DefaultPooledClient to receive a client that has connection pooling +// semantics similar to http.DefaultClient. +// +package cleanhttp diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/go.mod b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/go.mod new file mode 100644 index 0000000..005ccde --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/go-cleanhttp + +go 1.13 diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/handlers.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/handlers.go new file mode 100644 index 0000000..3c845dc --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/handlers.go @@ -0,0 +1,48 @@ +package cleanhttp + +import ( + "net/http" + "strings" + "unicode" +) + +// HandlerInput provides input options to cleanhttp's handlers +type HandlerInput struct { + ErrStatus int +} + +// PrintablePathCheckHandler is a middleware that ensures the request path +// contains only printable runes. +func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler { + // Nil-check on input to make it optional + if input == nil { + input = &HandlerInput{ + ErrStatus: http.StatusBadRequest, + } + } + + // Default to http.StatusBadRequest on error + if input.ErrStatus == 0 { + input.ErrStatus = http.StatusBadRequest + } + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r != nil { + // Check URL path for non-printable characters + idx := strings.IndexFunc(r.URL.Path, func(c rune) bool { + return !unicode.IsPrint(c) + }) + + if idx != -1 { + w.WriteHeader(input.ErrStatus) + return + } + + if next != nil { + next.ServeHTTP(w, r) + } + } + + return + }) +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/handlers_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/handlers_test.go new file mode 100644 index 0000000..a22e84a --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-cleanhttp/handlers_test.go @@ -0,0 +1,72 @@ +package cleanhttp + +import ( + "fmt" + "net/http" + "net/http/httptest" + "testing" +) + +func TestPrintablePathCheckHandler(t *testing.T) { + getTestHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintln(w, "Hello, client") + }) + + cases := map[string]struct { + path string + expectCode int + input *HandlerInput + }{ + "valid nil input": { + path: "/valid", + expectCode: http.StatusOK, + input: nil, + }, + + "valid empty error status": { + path: "/valid", + expectCode: http.StatusOK, + input: &HandlerInput{}, + }, + + "invalid newline": { + path: "/invalid%0A", + expectCode: http.StatusBadRequest, + }, + + "invalid carriage return": { + path: "/invalid%0D", + expectCode: http.StatusBadRequest, + }, + + "invalid null": { + path: "/invalid%00", + expectCode: http.StatusBadRequest, + }, + + "invalid alternate status": { + path: "/invalid%0A", + expectCode: http.StatusInternalServerError, + input: &HandlerInput{ + ErrStatus: http.StatusInternalServerError, + }, + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + // Create test HTTP server + ts := httptest.NewServer(PrintablePathCheckHandler(getTestHandler, tc.input)) + defer ts.Close() + + res, err := http.Get(ts.URL + tc.path) + if err != nil { + t.Fatal(err) + } + + if tc.expectCode != res.StatusCode { + t.Fatalf("expected %d, got :%d", tc.expectCode, res.StatusCode) + } + }) + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/CODEOWNERS b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/CODEOWNERS new file mode 100644 index 0000000..3da71e0 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/CODEOWNERS @@ -0,0 +1,13 @@ +# Each line is a file pattern followed by one or more owners. +# More on CODEOWNERS files: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners + +# Default owner +* @hashicorp/team-ip-compliance + +# Add override rules below. Each line is a file/folder pattern followed by one or more owners. +# Being an owner means those groups or individuals will be added as reviewers to PRs affecting +# those areas of the code. +# Examples: +# /docs/ @docs-team +# *.js @js-team +# *.go @go-team \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/dependabot.yml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/dependabot.yml new file mode 100644 index 0000000..b763838 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + labels: ["dependencies"] + + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + labels: + - dependencies + groups: + github-actions-breaking: + update-types: + - major + github-actions-backward-compatible: + update-types: + - minor + - patch diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/pull_request_template.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/pull_request_template.md new file mode 100644 index 0000000..877c03e --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/pull_request_template.md @@ -0,0 +1,12 @@ + +## Description + + + +## Related Issue + + + +## How Has This Been Tested? + + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/workflows/go-tests.yml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/workflows/go-tests.yml new file mode 100644 index 0000000..34a4771 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/.github/workflows/go-tests.yml @@ -0,0 +1,86 @@ +name: go-tests + +on: [push] + +env: + TEST_RESULTS: /tmp/test-results + +jobs: + + go-tests: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ 1.15.3, 1.19 ] + + steps: + - name: Setup go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - name: Create test directory + run: | + mkdir -p ${{ env.TEST_RESULTS }} + + - name: Download go modules + run: go mod download + + - name: Cache / restore go modules + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 + with: + path: | + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + # Check go fmt output because it does not report non-zero when there are fmt changes + - name: Run gofmt + run: | + go fmt ./... + files=$(go fmt ./...) + if [ -n "$files" ]; then + echo "The following file(s) do not conform to go fmt:" + echo "$files" + exit 1 + fi + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 + + # Install gotestsum with go get for 1.15.3; otherwise default to go install + - name: Install gotestsum + run: | + GTS="gotest.tools/gotestsum@v1.8.2" + # We use the same error message prefix in either failure case, so just define it once here. + ERROR="Failed to install $GTS" + # First try to 'go install', if that fails try 'go get'... + go install "$GTS" || go get "$GTS" || { echo "$ERROR: both 'go install' and 'go get' failed"; exit 1; } + # Check that the gotestsum command was actually installed in the path... + command -v gotestsum > /dev/null 2>&1 || { echo "$ERROR: gotestsum command not installed"; exit 1; } + echo "OK: Command 'gotestsum' installed ($GTS)" + + - name: Run go tests + run: | + PACKAGE_NAMES=$(go list ./...) + gotestsum --format=short-verbose --junitfile $TEST_RESULTS/gotestsum-report.xml -- -p 2 -cover -coverprofile=coverage.out $PACKAGE_NAMES + + # Save coverage report parts + - name: Upload and save artifacts + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 + with: + name: Test Results-${{matrix.go-version}} + path: ${{ env.TEST_RESULTS }} + + - name: Upload coverage report + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 + with: + path: coverage.out + name: Coverage-report-${{matrix.go-version}} + + - name: Display coverage report + run: go tool cover -func=coverage.out diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/CHANGELOG.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/CHANGELOG.md new file mode 100644 index 0000000..6d48174 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/CHANGELOG.md @@ -0,0 +1,64 @@ +# 1.7.0 (May 24, 2024) + +ENHANCEMENTS: + +- Remove `reflect` dependency ([#91](https://github.com/hashicorp/go-version/pull/91)) +- Implement the `database/sql.Scanner` and `database/sql/driver.Value` interfaces for `Version` ([#133](https://github.com/hashicorp/go-version/pull/133)) + +INTERNAL: + +- [COMPLIANCE] Add Copyright and License Headers ([#115](https://github.com/hashicorp/go-version/pull/115)) +- [COMPLIANCE] Update MPL-2.0 LICENSE ([#105](https://github.com/hashicorp/go-version/pull/105)) +- Bump actions/cache from 3.0.11 to 3.2.5 ([#116](https://github.com/hashicorp/go-version/pull/116)) +- Bump actions/checkout from 3.2.0 to 3.3.0 ([#111](https://github.com/hashicorp/go-version/pull/111)) +- Bump actions/upload-artifact from 3.1.1 to 3.1.2 ([#112](https://github.com/hashicorp/go-version/pull/112)) +- GHA Migration ([#103](https://github.com/hashicorp/go-version/pull/103)) +- github: Pin external GitHub Actions to hashes ([#107](https://github.com/hashicorp/go-version/pull/107)) +- SEC-090: Automated trusted workflow pinning (2023-04-05) ([#124](https://github.com/hashicorp/go-version/pull/124)) +- update readme ([#104](https://github.com/hashicorp/go-version/pull/104)) + +# 1.6.0 (June 28, 2022) + +FEATURES: + +- Add `Prerelease` function to `Constraint` to return true if the version includes a prerelease field ([#100](https://github.com/hashicorp/go-version/pull/100)) + +# 1.5.0 (May 18, 2022) + +FEATURES: + +- Use `encoding` `TextMarshaler` & `TextUnmarshaler` instead of JSON equivalents ([#95](https://github.com/hashicorp/go-version/pull/95)) +- Add JSON handlers to allow parsing from/to JSON ([#93](https://github.com/hashicorp/go-version/pull/93)) + +# 1.4.0 (January 5, 2022) + +FEATURES: + + - Introduce `MustConstraints()` ([#87](https://github.com/hashicorp/go-version/pull/87)) + - `Constraints`: Introduce `Equals()` and `sort.Interface` methods ([#88](https://github.com/hashicorp/go-version/pull/88)) + +# 1.3.0 (March 31, 2021) + +Please note that CHANGELOG.md does not exist in the source code prior to this release. + +FEATURES: + - Add `Core` function to return a version without prerelease or metadata ([#85](https://github.com/hashicorp/go-version/pull/85)) + +# 1.2.1 (June 17, 2020) + +BUG FIXES: + - Prevent `Version.Equal` method from panicking on `nil` encounter ([#73](https://github.com/hashicorp/go-version/pull/73)) + +# 1.2.0 (April 23, 2019) + +FEATURES: + - Add `GreaterThanOrEqual` and `LessThanOrEqual` helper methods ([#53](https://github.com/hashicorp/go-version/pull/53)) + +# 1.1.0 (Jan 07, 2019) + +FEATURES: + - Add `NewSemver` constructor ([#45](https://github.com/hashicorp/go-version/pull/45)) + +# 1.0.0 (August 24, 2018) + +Initial release. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/LICENSE new file mode 100644 index 0000000..bb1e9a4 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/LICENSE @@ -0,0 +1,356 @@ +Copyright IBM Corp. 2014, 2025 + +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/README.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/README.md new file mode 100644 index 0000000..83a8249 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/README.md @@ -0,0 +1,67 @@ +# Versioning Library for Go + +![Build Status](https://github.com/hashicorp/go-version/actions/workflows/go-tests.yml/badge.svg) +[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-version.svg)](https://pkg.go.dev/github.com/hashicorp/go-version) + +go-version is a library for parsing versions and version constraints, +and verifying versions against a set of constraints. go-version +can sort a collection of versions properly, handles prerelease/beta +versions, can increment versions, etc. + +Versions used with go-version must follow [SemVer](http://semver.org/). + +## Installation and Usage + +Package documentation can be found on +[Go Reference](https://pkg.go.dev/github.com/hashicorp/go-version). + +Installation can be done with a normal `go get`: + +``` +$ go get github.com/hashicorp/go-version +``` + +#### Version Parsing and Comparison + +```go +v1, err := version.NewVersion("1.2") +v2, err := version.NewVersion("1.5+metadata") + +// Comparison example. There is also GreaterThan, Equal, and just +// a simple Compare that returns an int allowing easy >=, <=, etc. +if v1.LessThan(v2) { + fmt.Printf("%s is less than %s", v1, v2) +} +``` + +#### Version Constraints + +```go +v1, err := version.NewVersion("1.2") + +// Constraints example. +constraints, err := version.NewConstraint(">= 1.0, < 1.4") +if constraints.Check(v1) { + fmt.Printf("%s satisfies constraints %s", v1, constraints) +} +``` + +#### Version Sorting + +```go +versionsRaw := []string{"1.1", "0.7.1", "1.4-beta", "1.4", "2"} +versions := make([]*version.Version, len(versionsRaw)) +for i, raw := range versionsRaw { + v, _ := version.NewVersion(raw) + versions[i] = v +} + +// After this, the versions are properly sorted +sort.Sort(version.Collection(versions)) +``` + +## Issues and Contributing + +If you find an issue with this library, please report an issue. If you'd +like, we welcome any contributions. Fork this library and submit a pull +request. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/constraint.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/constraint.go new file mode 100644 index 0000000..3964da0 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/constraint.go @@ -0,0 +1,307 @@ +// Copyright IBM Corp. 2014, 2025 +// SPDX-License-Identifier: MPL-2.0 + +package version + +import ( + "fmt" + "regexp" + "sort" + "strings" + "sync" +) + +var ( + constraintRegexp *regexp.Regexp + constraintRegexpOnce sync.Once +) + +func getConstraintRegexp() *regexp.Regexp { + constraintRegexpOnce.Do(func() { + // This heavy lifting only happens the first time this function is called + constraintRegexp = regexp.MustCompile(fmt.Sprintf( + `^\s*(%s)\s*(%s)\s*$`, + `<=|>=|!=|~>|<|>|=|`, + VersionRegexpRaw, + )) + }) + return constraintRegexp +} + +// Constraint represents a single constraint for a version, such as +// ">= 1.0". +type Constraint struct { + f constraintFunc + op operator + check *Version + original string +} + +func (c *Constraint) Equals(con *Constraint) bool { + return c.op == con.op && c.check.Equal(con.check) +} + +// Constraints is a slice of constraints. We make a custom type so that +// we can add methods to it. +type Constraints []*Constraint + +type constraintFunc func(v, c *Version) bool + +type constraintOperation struct { + op operator + f constraintFunc +} + +// NewConstraint will parse one or more constraints from the given +// constraint string. The string must be a comma-separated list of +// constraints. +func NewConstraint(v string) (Constraints, error) { + vs := strings.Split(v, ",") + result := make([]*Constraint, len(vs)) + for i, single := range vs { + c, err := parseSingle(single) + if err != nil { + return nil, err + } + + result[i] = c + } + + return Constraints(result), nil +} + +// MustConstraints is a helper that wraps a call to a function +// returning (Constraints, error) and panics if error is non-nil. +func MustConstraints(c Constraints, err error) Constraints { + if err != nil { + panic(err) + } + + return c +} + +// Check tests if a version satisfies all the constraints. +func (cs Constraints) Check(v *Version) bool { + for _, c := range cs { + if !c.Check(v) { + return false + } + } + + return true +} + +// Equals compares Constraints with other Constraints +// for equality. This may not represent logical equivalence +// of compared constraints. +// e.g. even though '>0.1,>0.2' is logically equivalent +// to '>0.2' it is *NOT* treated as equal. +// +// Missing operator is treated as equal to '=', whitespaces +// are ignored and constraints are sorted before comparison. +func (cs Constraints) Equals(c Constraints) bool { + if len(cs) != len(c) { + return false + } + + // make copies to retain order of the original slices + left := make(Constraints, len(cs)) + copy(left, cs) + sort.Stable(left) + right := make(Constraints, len(c)) + copy(right, c) + sort.Stable(right) + + // compare sorted slices + for i, con := range left { + if !con.Equals(right[i]) { + return false + } + } + + return true +} + +func (cs Constraints) Len() int { + return len(cs) +} + +func (cs Constraints) Less(i, j int) bool { + if cs[i].op < cs[j].op { + return true + } + if cs[i].op > cs[j].op { + return false + } + + return cs[i].check.LessThan(cs[j].check) +} + +func (cs Constraints) Swap(i, j int) { + cs[i], cs[j] = cs[j], cs[i] +} + +// Returns the string format of the constraints +func (cs Constraints) String() string { + csStr := make([]string, len(cs)) + for i, c := range cs { + csStr[i] = c.String() + } + + return strings.Join(csStr, ",") +} + +// Check tests if a constraint is validated by the given version. +func (c *Constraint) Check(v *Version) bool { + return c.f(v, c.check) +} + +// Prerelease returns true if the version underlying this constraint +// contains a prerelease field. +func (c *Constraint) Prerelease() bool { + return len(c.check.Prerelease()) > 0 +} + +func (c *Constraint) String() string { + return c.original +} + +func parseSingle(v string) (*Constraint, error) { + matches := getConstraintRegexp().FindStringSubmatch(v) + if matches == nil { + return nil, fmt.Errorf("malformed constraint: %s", v) + } + + check, err := NewVersion(matches[2]) + if err != nil { + return nil, err + } + + var cop constraintOperation + switch matches[1] { + case "=": + cop = constraintOperation{op: equal, f: constraintEqual} + case "!=": + cop = constraintOperation{op: notEqual, f: constraintNotEqual} + case ">": + cop = constraintOperation{op: greaterThan, f: constraintGreaterThan} + case "<": + cop = constraintOperation{op: lessThan, f: constraintLessThan} + case ">=": + cop = constraintOperation{op: greaterThanEqual, f: constraintGreaterThanEqual} + case "<=": + cop = constraintOperation{op: lessThanEqual, f: constraintLessThanEqual} + case "~>": + cop = constraintOperation{op: pessimistic, f: constraintPessimistic} + default: + cop = constraintOperation{op: equal, f: constraintEqual} + } + + return &Constraint{ + f: cop.f, + op: cop.op, + check: check, + original: v, + }, nil +} + +func prereleaseCheck(v, c *Version) bool { + switch vPre, cPre := v.Prerelease() != "", c.Prerelease() != ""; { + case cPre && vPre: + // A constraint with a pre-release can only match a pre-release version + // with the same base segments. + return v.equalSegments(c) + + case !cPre && vPre: + // A constraint without a pre-release can only match a version without a + // pre-release. + return false + + case cPre && !vPre: + // OK, except with the pessimistic operator + case !cPre && !vPre: + // OK + } + return true +} + +//------------------------------------------------------------------- +// Constraint functions +//------------------------------------------------------------------- + +type operator rune + +const ( + equal operator = '=' + notEqual operator = '≠' + greaterThan operator = '>' + lessThan operator = '<' + greaterThanEqual operator = '≥' + lessThanEqual operator = '≤' + pessimistic operator = '~' +) + +func constraintEqual(v, c *Version) bool { + return v.Equal(c) +} + +func constraintNotEqual(v, c *Version) bool { + return !v.Equal(c) +} + +func constraintGreaterThan(v, c *Version) bool { + return prereleaseCheck(v, c) && v.Compare(c) == 1 +} + +func constraintLessThan(v, c *Version) bool { + return prereleaseCheck(v, c) && v.Compare(c) == -1 +} + +func constraintGreaterThanEqual(v, c *Version) bool { + return prereleaseCheck(v, c) && v.Compare(c) >= 0 +} + +func constraintLessThanEqual(v, c *Version) bool { + return prereleaseCheck(v, c) && v.Compare(c) <= 0 +} + +func constraintPessimistic(v, c *Version) bool { + // Using a pessimistic constraint with a pre-release, restricts versions to pre-releases + if !prereleaseCheck(v, c) || (c.Prerelease() != "" && v.Prerelease() == "") { + return false + } + + // If the version being checked is naturally less than the constraint, then there + // is no way for the version to be valid against the constraint + if v.LessThan(c) { + return false + } + // We'll use this more than once, so grab the length now so it's a little cleaner + // to write the later checks + cs := len(c.segments) + + // If the version being checked has less specificity than the constraint, then there + // is no way for the version to be valid against the constraint + if cs > len(v.segments) { + return false + } + + // Check the segments in the constraint against those in the version. If the version + // being checked, at any point, does not have the same values in each index of the + // constraints segments, then it cannot be valid against the constraint. + for i := 0; i < c.si-1; i++ { + if v.segments[i] != c.segments[i] { + return false + } + } + + // Check the last part of the segment in the constraint. If the version segment at + // this index is less than the constraints segment at this index, then it cannot + // be valid against the constraint + if c.segments[cs-1] > v.segments[cs-1] { + return false + } + + // If nothing has rejected the version by now, it's valid + return true +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/constraint_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/constraint_test.go new file mode 100644 index 0000000..6f3a520 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/constraint_test.go @@ -0,0 +1,258 @@ +// Copyright IBM Corp. 2014, 2025 +// SPDX-License-Identifier: MPL-2.0 + +package version + +import ( + "fmt" + "reflect" + "sort" + "testing" +) + +func TestNewConstraint(t *testing.T) { + cases := []struct { + input string + count int + err bool + }{ + {">= 1.2", 1, false}, + {"1.0", 1, false}, + {">= 1.x", 0, true}, + {">= 1.2, < 1.0", 2, false}, + + // Out of bounds + {"11387778780781445675529500000000000000000", 0, true}, + } + + for _, tc := range cases { + v, err := NewConstraint(tc.input) + if tc.err && err == nil { + t.Fatalf("expected error for input: %s", tc.input) + } else if !tc.err && err != nil { + t.Fatalf("error for input %s: %s", tc.input, err) + } + + if len(v) != tc.count { + t.Fatalf("input: %s\nexpected len: %d\nactual: %d", + tc.input, tc.count, len(v)) + } + } +} + +func TestConstraintCheck(t *testing.T) { + cases := []struct { + constraint string + version string + check bool + }{ + {">= 1.0, < 1.2", "1.1.5", true}, + {"< 1.0, < 1.2", "1.1.5", false}, + {"= 1.0", "1.1.5", false}, + {"= 1.0", "1.0.0", true}, + {"1.0", "1.0.0", true}, + {"~> 1.0", "2.0", false}, + {"~> 1.0", "1.1", true}, + {"~> 1.0", "1.2.3", true}, + {"~> 1.0.0", "1.2.3", false}, + {"~> 1.0.0", "1.0.7", true}, + {"~> 1.0.0", "1.1.0", false}, + {"~> 1.0.7", "1.0.4", false}, + {"~> 1.0.7", "1.0.7", true}, + {"~> 1.0.7", "1.0.8", true}, + {"~> 1.0.7", "1.0.7.5", true}, + {"~> 1.0.7", "1.0.6.99", false}, + {"~> 1.0.7", "1.0.8.0", true}, + {"~> 1.0.9.5", "1.0.9.5", true}, + {"~> 1.0.9.5", "1.0.9.4", false}, + {"~> 1.0.9.5", "1.0.9.6", true}, + {"~> 1.0.9.5", "1.0.9.5.0", true}, + {"~> 1.0.9.5", "1.0.9.5.1", true}, + {"~> 2.0", "2.1.0-beta", false}, + {"~> 2.1.0-a", "2.2.0", false}, + {"~> 2.1.0-a", "2.1.0", false}, + {"~> 2.1.0-a", "2.1.0-beta", true}, + {"~> 2.1.0-a", "2.2.0-alpha", false}, + {"> 2.0", "2.1.0-beta", false}, + {">= 2.1.0-a", "2.1.0-beta", true}, + {">= 2.1.0-a", "2.1.1-beta", false}, + {">= 2.0.0", "2.1.0-beta", false}, + {">= 2.1.0-a", "2.1.1", true}, + {">= 2.1.0-a", "2.1.1-beta", false}, + {">= 2.1.0-a", "2.1.0", true}, + {"<= 2.1.0-a", "2.0.0", true}, + } + + for _, tc := range cases { + c, err := NewConstraint(tc.constraint) + if err != nil { + t.Fatalf("err: %s", err) + } + + v, err := NewVersion(tc.version) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := c.Check(v) + expected := tc.check + if actual != expected { + t.Fatalf("Version: %s\nConstraint: %s\nExpected: %#v", + tc.version, tc.constraint, expected) + } + } +} + +func TestConstraintPrerelease(t *testing.T) { + cases := []struct { + constraint string + prerelease bool + }{ + {"= 1.0", false}, + {"= 1.0-beta", true}, + {"~> 2.1.0", false}, + {"~> 2.1.0-dev", true}, + {"> 2.0", false}, + {">= 2.1.0-a", true}, + } + + for _, tc := range cases { + c, err := parseSingle(tc.constraint) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := c.Prerelease() + expected := tc.prerelease + if actual != expected { + t.Fatalf("Constraint: %s\nExpected: %#v", + tc.constraint, expected) + } + } +} + +func TestConstraintEqual(t *testing.T) { + cases := []struct { + leftConstraint string + rightConstraint string + expectedEqual bool + }{ + { + "0.0.1", + "0.0.1", + true, + }, + { // whitespaces + " 0.0.1 ", + "0.0.1", + true, + }, + { // equal op implied + "=0.0.1 ", + "0.0.1", + true, + }, + { // version difference + "=0.0.1", + "=0.0.2", + false, + }, + { // operator difference + ">0.0.1", + "=0.0.1", + false, + }, + { // different order + ">0.1.0, <=1.0.0", + "<=1.0.0, >0.1.0", + true, + }, + } + + for _, tc := range cases { + leftCon, err := NewConstraint(tc.leftConstraint) + if err != nil { + t.Fatalf("err: %s", err) + } + rightCon, err := NewConstraint(tc.rightConstraint) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := leftCon.Equals(rightCon) + if actual != tc.expectedEqual { + t.Fatalf("Constraints: %s vs %s\nExpected: %t\nActual: %t", + tc.leftConstraint, tc.rightConstraint, tc.expectedEqual, actual) + } + } +} + +func TestConstraint_sort(t *testing.T) { + cases := []struct { + constraint string + expectedConstraints string + }{ + { + ">= 0.1.0,< 1.12", + "< 1.12,>= 0.1.0", + }, + { + "< 1.12,>= 0.1.0", + "< 1.12,>= 0.1.0", + }, + { + "< 1.12,>= 0.1.0,0.2.0", + "< 1.12,0.2.0,>= 0.1.0", + }, + { + ">1.0,>0.1.0,>0.3.0,>0.2.0", + ">0.1.0,>0.2.0,>0.3.0,>1.0", + }, + } + + for i, tc := range cases { + t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { + c, err := NewConstraint(tc.constraint) + if err != nil { + t.Fatalf("err: %s", err) + } + + sort.Sort(c) + + actual := c.String() + + if !reflect.DeepEqual(actual, tc.expectedConstraints) { + t.Fatalf("unexpected order\nexpected: %#v\nactual: %#v", + tc.expectedConstraints, actual) + } + }) + } +} + +func TestConstraintsString(t *testing.T) { + cases := []struct { + constraint string + result string + }{ + {">= 1.0, < 1.2", ""}, + {"~> 1.0.7", ""}, + } + + for _, tc := range cases { + c, err := NewConstraint(tc.constraint) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := c.String() + expected := tc.result + if expected == "" { + expected = tc.constraint + } + + if actual != expected { + t.Fatalf("Constraint: %s\nExpected: %#v\nActual: %s", + tc.constraint, expected, actual) + } + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/go.mod b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/go.mod new file mode 100644 index 0000000..f528555 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/go-version diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version.go new file mode 100644 index 0000000..17b2973 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version.go @@ -0,0 +1,459 @@ +// Copyright IBM Corp. 2014, 2025 +// SPDX-License-Identifier: MPL-2.0 + +package version + +import ( + "database/sql/driver" + "fmt" + "regexp" + "strconv" + "strings" + "sync" +) + +// The compiled regular expression used to test the validity of a version. +var ( + versionRegexp *regexp.Regexp + versionRegexpOnce sync.Once + semverRegexp *regexp.Regexp + semverRegexpOnce sync.Once +) + +func getVersionRegexp() *regexp.Regexp { + versionRegexpOnce.Do(func() { + versionRegexp = regexp.MustCompile("^" + VersionRegexpRaw + "$") + }) + return versionRegexp +} + +func getSemverRegexp() *regexp.Regexp { + semverRegexpOnce.Do(func() { + semverRegexp = regexp.MustCompile("^" + SemverRegexpRaw + "$") + }) + return semverRegexp +} + +// The raw regular expression string used for testing the validity +// of a version. +const ( + VersionRegexpRaw string = `v?([0-9]+(\.[0-9]+)*?)` + + `(-([0-9]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)|(-?([A-Za-z\-~]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)))?` + + `(\+([0-9A-Za-z\-~]+(\.[0-9A-Za-z\-~]+)*))?` + + `?` + + // SemverRegexpRaw requires a separator between version and prerelease + SemverRegexpRaw string = `v?([0-9]+(\.[0-9]+)*?)` + + `(-([0-9]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)|(-([A-Za-z\-~]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)))?` + + `(\+([0-9A-Za-z\-~]+(\.[0-9A-Za-z\-~]+)*))?` + + `?` +) + +// Version represents a single version. +type Version struct { + metadata string + pre string + segments []int64 + si int + original string +} + +// NewVersion parses the given version and returns a new +// Version. +func NewVersion(v string) (*Version, error) { + return newVersion(v, getVersionRegexp()) +} + +// NewSemver parses the given version and returns a new +// Version that adheres strictly to SemVer specs +// https://semver.org/ +func NewSemver(v string) (*Version, error) { + return newVersion(v, getSemverRegexp()) +} + +func newVersion(v string, pattern *regexp.Regexp) (*Version, error) { + matches := pattern.FindStringSubmatch(v) + if matches == nil { + return nil, fmt.Errorf("malformed version: %s", v) + } + segmentsStr := strings.Split(matches[1], ".") + segments := make([]int64, len(segmentsStr)) + for i, str := range segmentsStr { + val, err := strconv.ParseInt(str, 10, 64) + if err != nil { + return nil, fmt.Errorf( + "error parsing version: %s", err) + } + + segments[i] = val + } + + // Even though we could support more than three segments, if we + // got less than three, pad it with 0s. This is to cover the basic + // default usecase of semver, which is MAJOR.MINOR.PATCH at the minimum + for i := len(segments); i < 3; i++ { + segments = append(segments, 0) + } + + pre := matches[7] + if pre == "" { + pre = matches[4] + } + + return &Version{ + metadata: matches[10], + pre: pre, + segments: segments, + si: len(segmentsStr), + original: v, + }, nil +} + +// Must is a helper that wraps a call to a function returning (*Version, error) +// and panics if error is non-nil. +func Must(v *Version, err error) *Version { + if err != nil { + panic(err) + } + + return v +} + +// Compare compares this version to another version. This +// returns -1, 0, or 1 if this version is smaller, equal, +// or larger than the other version, respectively. +// +// If you want boolean results, use the LessThan, Equal, +// GreaterThan, GreaterThanOrEqual or LessThanOrEqual methods. +func (v *Version) Compare(other *Version) int { + // A quick, efficient equality check + if v.String() == other.String() { + return 0 + } + + // If the segments are the same, we must compare on prerelease info + if v.equalSegments(other) { + preSelf := v.Prerelease() + preOther := other.Prerelease() + if preSelf == "" && preOther == "" { + return 0 + } + if preSelf == "" { + return 1 + } + if preOther == "" { + return -1 + } + + return comparePrereleases(preSelf, preOther) + } + + segmentsSelf := v.Segments64() + segmentsOther := other.Segments64() + // Get the highest specificity (hS), or if they're equal, just use segmentSelf length + lenSelf := len(segmentsSelf) + lenOther := len(segmentsOther) + hS := lenSelf + if lenSelf < lenOther { + hS = lenOther + } + // Compare the segments + // Because a constraint could have more/less specificity than the version it's + // checking, we need to account for a lopsided or jagged comparison + for i := 0; i < hS; i++ { + if i > lenSelf-1 { + // This means Self had the lower specificity + // Check to see if the remaining segments in Other are all zeros + if !allZero(segmentsOther[i:]) { + // if not, it means that Other has to be greater than Self + return -1 + } + break + } else if i > lenOther-1 { + // this means Other had the lower specificity + // Check to see if the remaining segments in Self are all zeros - + if !allZero(segmentsSelf[i:]) { + // if not, it means that Self has to be greater than Other + return 1 + } + break + } + lhs := segmentsSelf[i] + rhs := segmentsOther[i] + if lhs == rhs { + continue + } else if lhs < rhs { + return -1 + } + // Otherwise, rhs was > lhs, they're not equal + return 1 + } + + // if we got this far, they're equal + return 0 +} + +func (v *Version) equalSegments(other *Version) bool { + segmentsSelf := v.Segments64() + segmentsOther := other.Segments64() + + if len(segmentsSelf) != len(segmentsOther) { + return false + } + for i, v := range segmentsSelf { + if v != segmentsOther[i] { + return false + } + } + return true +} + +func allZero(segs []int64) bool { + for _, s := range segs { + if s != 0 { + return false + } + } + return true +} + +func comparePart(preSelf string, preOther string) int { + if preSelf == preOther { + return 0 + } + + var selfInt int64 + selfNumeric := true + selfInt, err := strconv.ParseInt(preSelf, 10, 64) + if err != nil { + selfNumeric = false + } + + var otherInt int64 + otherNumeric := true + otherInt, err = strconv.ParseInt(preOther, 10, 64) + if err != nil { + otherNumeric = false + } + + // if a part is empty, we use the other to decide + if preSelf == "" { + if otherNumeric { + return -1 + } + return 1 + } + + if preOther == "" { + if selfNumeric { + return 1 + } + return -1 + } + + if selfNumeric && !otherNumeric { + return -1 + } else if !selfNumeric && otherNumeric { + return 1 + } else if !selfNumeric && !otherNumeric && preSelf > preOther { + return 1 + } else if selfInt > otherInt { + return 1 + } + + return -1 +} + +func comparePrereleases(v string, other string) int { + // the same pre release! + if v == other { + return 0 + } + + // split both pre releases for analyse their parts + selfPreReleaseMeta := strings.Split(v, ".") + otherPreReleaseMeta := strings.Split(other, ".") + + selfPreReleaseLen := len(selfPreReleaseMeta) + otherPreReleaseLen := len(otherPreReleaseMeta) + + biggestLen := otherPreReleaseLen + if selfPreReleaseLen > otherPreReleaseLen { + biggestLen = selfPreReleaseLen + } + + // loop for parts to find the first difference + for i := 0; i < biggestLen; i = i + 1 { + partSelfPre := "" + if i < selfPreReleaseLen { + partSelfPre = selfPreReleaseMeta[i] + } + + partOtherPre := "" + if i < otherPreReleaseLen { + partOtherPre = otherPreReleaseMeta[i] + } + + compare := comparePart(partSelfPre, partOtherPre) + // if parts are equals, continue the loop + if compare != 0 { + return compare + } + } + + return 0 +} + +// Core returns a new version constructed from only the MAJOR.MINOR.PATCH +// segments of the version, without prerelease or metadata. +func (v *Version) Core() *Version { + segments := v.Segments64() + segmentsOnly := fmt.Sprintf("%d.%d.%d", segments[0], segments[1], segments[2]) + return Must(NewVersion(segmentsOnly)) +} + +// Equal tests if two versions are equal. +func (v *Version) Equal(o *Version) bool { + if v == nil || o == nil { + return v == o + } + + return v.Compare(o) == 0 +} + +// GreaterThan tests if this version is greater than another version. +func (v *Version) GreaterThan(o *Version) bool { + return v.Compare(o) > 0 +} + +// GreaterThanOrEqual tests if this version is greater than or equal to another version. +func (v *Version) GreaterThanOrEqual(o *Version) bool { + return v.Compare(o) >= 0 +} + +// LessThan tests if this version is less than another version. +func (v *Version) LessThan(o *Version) bool { + return v.Compare(o) < 0 +} + +// LessThanOrEqual tests if this version is less than or equal to another version. +func (v *Version) LessThanOrEqual(o *Version) bool { + return v.Compare(o) <= 0 +} + +// Metadata returns any metadata that was part of the version +// string. +// +// Metadata is anything that comes after the "+" in the version. +// For example, with "1.2.3+beta", the metadata is "beta". +func (v *Version) Metadata() string { + return v.metadata +} + +// Prerelease returns any prerelease data that is part of the version, +// or blank if there is no prerelease data. +// +// Prerelease information is anything that comes after the "-" in the +// version (but before any metadata). For example, with "1.2.3-beta", +// the prerelease information is "beta". +func (v *Version) Prerelease() string { + return v.pre +} + +// Segments returns the numeric segments of the version as a slice of ints. +// +// This excludes any metadata or pre-release information. For example, +// for a version "1.2.3-beta", segments will return a slice of +// 1, 2, 3. +func (v *Version) Segments() []int { + segmentSlice := make([]int, len(v.segments)) + for i, v := range v.segments { + segmentSlice[i] = int(v) + } + return segmentSlice +} + +// Segments64 returns the numeric segments of the version as a slice of int64s. +// +// This excludes any metadata or pre-release information. For example, +// for a version "1.2.3-beta", segments will return a slice of +// 1, 2, 3. +func (v *Version) Segments64() []int64 { + result := make([]int64, len(v.segments)) + copy(result, v.segments) + return result +} + +// String returns the full version string included pre-release +// and metadata information. +// +// This value is rebuilt according to the parsed segments and other +// information. Therefore, ambiguities in the version string such as +// prefixed zeroes (1.04.0 => 1.4.0), `v` prefix (v1.0.0 => 1.0.0), and +// missing parts (1.0 => 1.0.0) will be made into a canonicalized form +// as shown in the parenthesized examples. +func (v *Version) String() string { + return string(v.bytes()) +} + +func (v *Version) bytes() []byte { + var buf []byte + for i, s := range v.segments { + if i > 0 { + buf = append(buf, '.') + } + buf = strconv.AppendInt(buf, s, 10) + } + + if v.pre != "" { + buf = append(buf, '-') + buf = append(buf, v.pre...) + } + + if v.metadata != "" { + buf = append(buf, '+') + buf = append(buf, v.metadata...) + } + + return buf +} + +// Original returns the original parsed version as-is, including any +// potential whitespace, `v` prefix, etc. +func (v *Version) Original() string { + return v.original +} + +// UnmarshalText implements encoding.TextUnmarshaler interface. +func (v *Version) UnmarshalText(b []byte) error { + temp, err := NewVersion(string(b)) + if err != nil { + return err + } + + *v = *temp + + return nil +} + +// MarshalText implements encoding.TextMarshaler interface. +func (v *Version) MarshalText() ([]byte, error) { + return []byte(v.String()), nil +} + +// Scan implements the sql.Scanner interface. +func (v *Version) Scan(src interface{}) error { + switch src := src.(type) { + case string: + return v.UnmarshalText([]byte(src)) + case nil: + return nil + default: + return fmt.Errorf("cannot scan %T as Version", src) + } +} + +// Value implements the driver.Valuer interface. +func (v *Version) Value() (driver.Value, error) { + return v.String(), nil +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_collection.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_collection.go new file mode 100644 index 0000000..11bc8b1 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_collection.go @@ -0,0 +1,20 @@ +// Copyright IBM Corp. 2014, 2025 +// SPDX-License-Identifier: MPL-2.0 + +package version + +// Collection is a type that implements the sort.Interface interface +// so that versions can be sorted. +type Collection []*Version + +func (v Collection) Len() int { + return len(v) +} + +func (v Collection) Less(i, j int) bool { + return v[i].LessThan(v[j]) +} + +func (v Collection) Swap(i, j int) { + v[i], v[j] = v[j], v[i] +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_collection_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_collection_test.go new file mode 100644 index 0000000..cb0749a --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_collection_test.go @@ -0,0 +1,49 @@ +// Copyright IBM Corp. 2014, 2025 +// SPDX-License-Identifier: MPL-2.0 + +package version + +import ( + "reflect" + "sort" + "testing" +) + +func TestCollection(t *testing.T) { + versionsRaw := []string{ + "1.1.1", + "1.0", + "1.2", + "2", + "0.7.1", + } + + versions := make([]*Version, len(versionsRaw)) + for i, raw := range versionsRaw { + v, err := NewVersion(raw) + if err != nil { + t.Fatalf("err: %s", err) + } + + versions[i] = v + } + + sort.Sort(Collection(versions)) + + actual := make([]string, len(versions)) + for i, v := range versions { + actual[i] = v.String() + } + + expected := []string{ + "0.7.1", + "1.0.0", + "1.1.1", + "1.2.0", + "2.0.0", + } + + if !reflect.DeepEqual(actual, expected) { + t.Fatalf("bad: %#v", actual) + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_test.go new file mode 100644 index 0000000..15a0623 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/go-version/version_test.go @@ -0,0 +1,762 @@ +// Copyright IBM Corp. 2014, 2025 +// SPDX-License-Identifier: MPL-2.0 + +package version + +import ( + "encoding/json" + "fmt" + "reflect" + "testing" +) + +func TestNewVersion(t *testing.T) { + cases := []struct { + version string + err bool + }{ + {"", true}, + {"1.2.3", false}, + {"1.0", false}, + {"1", false}, + {"1.2.beta", true}, + {"1.21.beta", true}, + {"foo", true}, + {"1.2-5", false}, + {"1.2-beta.5", false}, + {"\n1.2", true}, + {"1.2.0-x.Y.0+metadata", false}, + {"1.2.0-x.Y.0+metadata-width-hyphen", false}, + {"1.2.3-rc1-with-hyphen", false}, + {"1.2.3.4", false}, + {"1.2.0.4-x.Y.0+metadata", false}, + {"1.2.0.4-x.Y.0+metadata-width-hyphen", false}, + {"1.2.0-X-1.2.0+metadata~dist", false}, + {"1.2.3.4-rc1-with-hyphen", false}, + {"1.2.3.4", false}, + {"v1.2.3", false}, + {"foo1.2.3", true}, + {"1.7rc2", false}, + {"v1.7rc2", false}, + {"1.0-", false}, + } + + for _, tc := range cases { + _, err := NewVersion(tc.version) + if tc.err && err == nil { + t.Fatalf("expected error for version: %q", tc.version) + } else if !tc.err && err != nil { + t.Fatalf("error for version %q: %s", tc.version, err) + } + } +} + +func TestNewSemver(t *testing.T) { + cases := []struct { + version string + err bool + }{ + {"", true}, + {"1.2.3", false}, + {"1.0", false}, + {"1", false}, + {"1.2.beta", true}, + {"1.21.beta", true}, + {"foo", true}, + {"1.2-5", false}, + {"1.2-beta.5", false}, + {"\n1.2", true}, + {"1.2.0-x.Y.0+metadata", false}, + {"1.2.0-x.Y.0+metadata-width-hyphen", false}, + {"1.2.3-rc1-with-hyphen", false}, + {"1.2.3.4", false}, + {"1.2.0.4-x.Y.0+metadata", false}, + {"1.2.0.4-x.Y.0+metadata-width-hyphen", false}, + {"1.2.0-X-1.2.0+metadata~dist", false}, + {"1.2.3.4-rc1-with-hyphen", false}, + {"1.2.3.4", false}, + {"v1.2.3", false}, + {"foo1.2.3", true}, + {"1.7rc2", true}, + {"v1.7rc2", true}, + {"1.0-", true}, + } + + for _, tc := range cases { + _, err := NewSemver(tc.version) + if tc.err && err == nil { + t.Fatalf("expected error for version: %q", tc.version) + } else if !tc.err && err != nil { + t.Fatalf("error for version %q: %s", tc.version, err) + } + } +} + +func TestCore(t *testing.T) { + cases := []struct { + v1 string + v2 string + }{ + {"1.2.3", "1.2.3"}, + {"2.3.4-alpha1", "2.3.4"}, + {"3.4.5alpha1", "3.4.5"}, + {"1.2.3-2", "1.2.3"}, + {"4.5.6-beta1+meta", "4.5.6"}, + {"5.6.7.1.2.3", "5.6.7"}, + } + + for _, tc := range cases { + v1, err := NewVersion(tc.v1) + if err != nil { + t.Fatalf("error for version %q: %s", tc.v1, err) + } + v2, err := NewVersion(tc.v2) + if err != nil { + t.Fatalf("error for version %q: %s", tc.v2, err) + } + + actual := v1.Core() + expected := v2 + + if !reflect.DeepEqual(actual, expected) { + t.Fatalf("expected: %s\nactual: %s", expected, actual) + } + } +} + +func TestVersionCompare(t *testing.T) { + cases := []struct { + v1 string + v2 string + expected int + }{ + {"1.2.3", "1.4.5", -1}, + {"1.2-beta", "1.2-beta", 0}, + {"1.2", "1.1.4", 1}, + {"1.2", "1.2-beta", 1}, + {"1.2+foo", "1.2+beta", 0}, + {"v1.2", "v1.2-beta", 1}, + {"v1.2+foo", "v1.2+beta", 0}, + {"v1.2.3.4", "v1.2.3.4", 0}, + {"v1.2.0.0", "v1.2", 0}, + {"v1.2.0.0.1", "v1.2", 1}, + {"v1.2", "v1.2.0.0", 0}, + {"v1.2", "v1.2.0.0.1", -1}, + {"v1.2.0.0", "v1.2.0.0.1", -1}, + {"v1.2.3.0", "v1.2.3.4", -1}, + {"1.7rc2", "1.7rc1", 1}, + {"1.7rc2", "1.7", -1}, + {"1.2.0", "1.2.0-X-1.2.0+metadata~dist", 1}, + } + + for _, tc := range cases { + v1, err := NewVersion(tc.v1) + if err != nil { + t.Fatalf("err: %s", err) + } + + v2, err := NewVersion(tc.v2) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v1.Compare(v2) + expected := tc.expected + if actual != expected { + t.Fatalf( + "%s <=> %s\nexpected: %d\nactual: %d", + tc.v1, tc.v2, + expected, actual) + } + } +} + +func TestVersionCompare_versionAndSemver(t *testing.T) { + cases := []struct { + versionRaw string + semverRaw string + expected int + }{ + {"0.0.2", "0.0.2", 0}, + {"1.0.2alpha", "1.0.2-alpha", 0}, + {"v1.2+foo", "v1.2+beta", 0}, + {"v1.2", "v1.2+meta", 0}, + {"1.2", "1.2-beta", 1}, + {"v1.2", "v1.2-beta", 1}, + {"1.2.3", "1.4.5", -1}, + {"v1.2", "v1.2.0.0.1", -1}, + {"v1.0.3-", "v1.0.3", -1}, + } + + for _, tc := range cases { + ver, err := NewVersion(tc.versionRaw) + if err != nil { + t.Fatalf("err: %s", err) + } + + semver, err := NewSemver(tc.semverRaw) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := ver.Compare(semver) + if actual != tc.expected { + t.Fatalf( + "%s <=> %s\nexpected: %d\n actual: %d", + tc.versionRaw, tc.semverRaw, tc.expected, actual, + ) + } + } +} + +func TestVersionEqual_nil(t *testing.T) { + mustVersion := func(v string) *Version { + ver, err := NewVersion(v) + if err != nil { + t.Fatal(err) + } + return ver + } + cases := []struct { + leftVersion *Version + rightVersion *Version + expected bool + }{ + {mustVersion("1.0.0"), nil, false}, + {nil, mustVersion("1.0.0"), false}, + {nil, nil, true}, + } + + for _, tc := range cases { + given := tc.leftVersion.Equal(tc.rightVersion) + if given != tc.expected { + t.Fatalf("expected Equal to nil to be %t", tc.expected) + } + } +} + +func TestComparePreReleases(t *testing.T) { + cases := []struct { + v1 string + v2 string + expected int + }{ + {"1.2-beta.2", "1.2-beta.2", 0}, + {"1.2-beta.1", "1.2-beta.2", -1}, + {"1.2-beta.2", "1.2-beta.11", -1}, + {"3.2-alpha.1", "3.2-alpha", 1}, + {"1.2-beta.2", "1.2-beta.1", 1}, + {"1.2-beta.11", "1.2-beta.2", 1}, + {"1.2-beta", "1.2-beta.3", -1}, + {"1.2-alpha", "1.2-beta.3", -1}, + {"1.2-beta", "1.2-alpha.3", 1}, + {"3.0-alpha.3", "3.0-rc.1", -1}, + {"3.0-alpha3", "3.0-rc1", -1}, + {"3.0-alpha.1", "3.0-alpha.beta", -1}, + {"5.4-alpha", "5.4-alpha.beta", 1}, + {"v1.2-beta.2", "v1.2-beta.2", 0}, + {"v1.2-beta.1", "v1.2-beta.2", -1}, + {"v3.2-alpha.1", "v3.2-alpha", 1}, + {"v3.2-rc.1-1-g123", "v3.2-rc.2", 1}, + } + + for _, tc := range cases { + v1, err := NewVersion(tc.v1) + if err != nil { + t.Fatalf("err: %s", err) + } + + v2, err := NewVersion(tc.v2) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v1.Compare(v2) + expected := tc.expected + if actual != expected { + t.Fatalf( + "%s <=> %s\nexpected: %d\nactual: %d", + tc.v1, tc.v2, + expected, actual) + } + } +} + +func TestVersionMetadata(t *testing.T) { + cases := []struct { + version string + expected string + }{ + {"1.2.3", ""}, + {"1.2-beta", ""}, + {"1.2.0-x.Y.0", ""}, + {"1.2.0-x.Y.0+metadata", "metadata"}, + {"1.2.0-metadata-1.2.0+metadata~dist", "metadata~dist"}, + } + + for _, tc := range cases { + v, err := NewVersion(tc.version) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v.Metadata() + expected := tc.expected + if actual != expected { + t.Fatalf("expected: %s\nactual: %s", expected, actual) + } + } +} + +func TestVersionPrerelease(t *testing.T) { + cases := []struct { + version string + expected string + }{ + {"1.2.3", ""}, + {"1.2-beta", "beta"}, + {"1.2.0-x.Y.0", "x.Y.0"}, + {"1.2.0-7.Y.0", "7.Y.0"}, + {"1.2.0-x.Y.0+metadata", "x.Y.0"}, + {"1.2.0-metadata-1.2.0+metadata~dist", "metadata-1.2.0"}, + {"17.03.0-ce", "ce"}, // zero-padded fields + } + + for _, tc := range cases { + v, err := NewVersion(tc.version) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v.Prerelease() + expected := tc.expected + if actual != expected { + t.Fatalf("expected: %s\nactual: %s", expected, actual) + } + } +} + +func TestVersionSegments(t *testing.T) { + cases := []struct { + version string + expected []int + }{ + {"1.2.3", []int{1, 2, 3}}, + {"1.2-beta", []int{1, 2, 0}}, + {"1-x.Y.0", []int{1, 0, 0}}, + {"1.2.0-x.Y.0+metadata", []int{1, 2, 0}}, + {"1.2.0-metadata-1.2.0+metadata~dist", []int{1, 2, 0}}, + {"17.03.0-ce", []int{17, 3, 0}}, // zero-padded fields + } + + for _, tc := range cases { + v, err := NewVersion(tc.version) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v.Segments() + expected := tc.expected + if !reflect.DeepEqual(actual, expected) { + t.Fatalf("expected: %#v\nactual: %#v", expected, actual) + } + } +} + +func TestVersionSegments64(t *testing.T) { + cases := []struct { + version string + expected []int64 + }{ + {"1.2.3", []int64{1, 2, 3}}, + {"1.2-beta", []int64{1, 2, 0}}, + {"1-x.Y.0", []int64{1, 0, 0}}, + {"1.2.0-x.Y.0+metadata", []int64{1, 2, 0}}, + {"1.4.9223372036854775807", []int64{1, 4, 9223372036854775807}}, + } + + for _, tc := range cases { + v, err := NewVersion(tc.version) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v.Segments64() + expected := tc.expected + if !reflect.DeepEqual(actual, expected) { + t.Fatalf("expected: %#v\nactual: %#v", expected, actual) + } + + { + expected := actual[0] + actual[0]++ + actual = v.Segments64() + if actual[0] != expected { + t.Fatalf("Segments64 is mutable") + } + } + } +} + +func TestJsonMarshal(t *testing.T) { + cases := []struct { + version string + err bool + }{ + {"1.2.3", false}, + {"1.2.0-x.Y.0+metadata", false}, + {"1.2.0-x.Y.0+metadata-width-hyphen", false}, + {"1.2.3-rc1-with-hyphen", false}, + {"1.2.3.4", false}, + {"1.2.0.4-x.Y.0+metadata", false}, + {"1.2.0.4-x.Y.0+metadata-width-hyphen", false}, + {"1.2.0-X-1.2.0+metadata~dist", false}, + {"1.2.3.4-rc1-with-hyphen", false}, + {"1.2.3.4", false}, + } + + for _, tc := range cases { + v, err1 := NewVersion(tc.version) + if err1 != nil { + t.Fatalf("error for version %q: %s", tc.version, err1) + } + + parsed, err2 := json.Marshal(v) + if err2 != nil { + t.Fatalf("error marshaling version %q: %s", tc.version, err2) + } + result := string(parsed) + expected := fmt.Sprintf("%q", tc.version) + if result != expected && !tc.err { + t.Fatalf("Error marshaling unexpected marshaled content: result=%q expected=%q", result, expected) + } + } +} + +func TestJsonUnmarshal(t *testing.T) { + cases := []struct { + version string + err bool + }{ + {"1.2.3", false}, + {"1.2.0-x.Y.0+metadata", false}, + {"1.2.0-x.Y.0+metadata-width-hyphen", false}, + {"1.2.3-rc1-with-hyphen", false}, + {"1.2.3.4", false}, + {"1.2.0.4-x.Y.0+metadata", false}, + {"1.2.0.4-x.Y.0+metadata-width-hyphen", false}, + {"1.2.0-X-1.2.0+metadata~dist", false}, + {"1.2.3.4-rc1-with-hyphen", false}, + {"1.2.3.4", false}, + } + + for _, tc := range cases { + expected, err1 := NewVersion(tc.version) + if err1 != nil { + t.Fatalf("err: %s", err1) + } + + actual := &Version{} + err2 := json.Unmarshal([]byte(fmt.Sprintf("%q", tc.version)), actual) + if err2 != nil { + t.Fatalf("error unmarshaling version: %s", err2) + } + if !reflect.DeepEqual(actual, expected) { + t.Fatalf("error unmarshaling, unexpected object content: actual=%q expected=%q", actual, expected) + } + } +} + +func TestVersionString(t *testing.T) { + cases := [][]string{ + {"1.2.3", "1.2.3"}, + {"1.2-beta", "1.2.0-beta"}, + {"1.2.0-x.Y.0", "1.2.0-x.Y.0"}, + {"1.2.0-x.Y.0+metadata", "1.2.0-x.Y.0+metadata"}, + {"1.2.0-metadata-1.2.0+metadata~dist", "1.2.0-metadata-1.2.0+metadata~dist"}, + {"17.03.0-ce", "17.3.0-ce"}, // zero-padded fields + } + + for _, tc := range cases { + v, err := NewVersion(tc[0]) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v.String() + expected := tc[1] + if actual != expected { + t.Fatalf("expected: %s\nactual: %s", expected, actual) + } + if actual := v.Original(); actual != tc[0] { + t.Fatalf("expected original: %q\nactual: %q", tc[0], actual) + } + } +} + +func TestEqual(t *testing.T) { + cases := []struct { + v1 string + v2 string + expected bool + }{ + {"1.2.3", "1.4.5", false}, + {"1.2-beta", "1.2-beta", true}, + {"1.2", "1.1.4", false}, + {"1.2", "1.2-beta", false}, + {"1.2+foo", "1.2+beta", true}, + {"v1.2", "v1.2-beta", false}, + {"v1.2+foo", "v1.2+beta", true}, + {"v1.2.3.4", "v1.2.3.4", true}, + {"v1.2.0.0", "v1.2", true}, + {"v1.2.0.0.1", "v1.2", false}, + {"v1.2", "v1.2.0.0", true}, + {"v1.2", "v1.2.0.0.1", false}, + {"v1.2.0.0", "v1.2.0.0.1", false}, + {"v1.2.3.0", "v1.2.3.4", false}, + {"1.7rc2", "1.7rc1", false}, + {"1.7rc2", "1.7", false}, + {"1.2.0", "1.2.0-X-1.2.0+metadata~dist", false}, + } + + for _, tc := range cases { + v1, err := NewVersion(tc.v1) + if err != nil { + t.Fatalf("err: %s", err) + } + + v2, err := NewVersion(tc.v2) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v1.Equal(v2) + expected := tc.expected + if actual != expected { + t.Fatalf( + "%s <=> %s\nexpected: %t\nactual: %t", + tc.v1, tc.v2, + expected, actual) + } + } +} + +func TestGreaterThan(t *testing.T) { + cases := []struct { + v1 string + v2 string + expected bool + }{ + {"1.2.3", "1.4.5", false}, + {"1.2-beta", "1.2-beta", false}, + {"1.2", "1.1.4", true}, + {"1.2", "1.2-beta", true}, + {"1.2+foo", "1.2+beta", false}, + {"v1.2", "v1.2-beta", true}, + {"v1.2+foo", "v1.2+beta", false}, + {"v1.2.3.4", "v1.2.3.4", false}, + {"v1.2.0.0", "v1.2", false}, + {"v1.2.0.0.1", "v1.2", true}, + {"v1.2", "v1.2.0.0", false}, + {"v1.2", "v1.2.0.0.1", false}, + {"v1.2.0.0", "v1.2.0.0.1", false}, + {"v1.2.3.0", "v1.2.3.4", false}, + {"1.7rc2", "1.7rc1", true}, + {"1.7rc2", "1.7", false}, + {"1.2.0", "1.2.0-X-1.2.0+metadata~dist", true}, + } + + for _, tc := range cases { + v1, err := NewVersion(tc.v1) + if err != nil { + t.Fatalf("err: %s", err) + } + + v2, err := NewVersion(tc.v2) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v1.GreaterThan(v2) + expected := tc.expected + if actual != expected { + t.Fatalf( + "%s > %s\nexpected: %t\nactual: %t", + tc.v1, tc.v2, + expected, actual) + } + } +} + +func TestLessThan(t *testing.T) { + cases := []struct { + v1 string + v2 string + expected bool + }{ + {"1.2.3", "1.4.5", true}, + {"1.2-beta", "1.2-beta", false}, + {"1.2", "1.1.4", false}, + {"1.2", "1.2-beta", false}, + {"1.2+foo", "1.2+beta", false}, + {"v1.2", "v1.2-beta", false}, + {"v1.2+foo", "v1.2+beta", false}, + {"v1.2.3.4", "v1.2.3.4", false}, + {"v1.2.0.0", "v1.2", false}, + {"v1.2.0.0.1", "v1.2", false}, + {"v1.2", "v1.2.0.0", false}, + {"v1.2", "v1.2.0.0.1", true}, + {"v1.2.0.0", "v1.2.0.0.1", true}, + {"v1.2.3.0", "v1.2.3.4", true}, + {"1.7rc2", "1.7rc1", false}, + {"1.7rc2", "1.7", true}, + {"1.2.0", "1.2.0-X-1.2.0+metadata~dist", false}, + } + + for _, tc := range cases { + v1, err := NewVersion(tc.v1) + if err != nil { + t.Fatalf("err: %s", err) + } + + v2, err := NewVersion(tc.v2) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v1.LessThan(v2) + expected := tc.expected + if actual != expected { + t.Fatalf( + "%s < %s\nexpected: %t\nactual: %t", + tc.v1, tc.v2, + expected, actual) + } + } +} + +func TestGreaterThanOrEqual(t *testing.T) { + cases := []struct { + v1 string + v2 string + expected bool + }{ + {"1.2.3", "1.4.5", false}, + {"1.2-beta", "1.2-beta", true}, + {"1.2", "1.1.4", true}, + {"1.2", "1.2-beta", true}, + {"1.2+foo", "1.2+beta", true}, + {"v1.2", "v1.2-beta", true}, + {"v1.2+foo", "v1.2+beta", true}, + {"v1.2.3.4", "v1.2.3.4", true}, + {"v1.2.0.0", "v1.2", true}, + {"v1.2.0.0.1", "v1.2", true}, + {"v1.2", "v1.2.0.0", true}, + {"v1.2", "v1.2.0.0.1", false}, + {"v1.2.0.0", "v1.2.0.0.1", false}, + {"v1.2.3.0", "v1.2.3.4", false}, + {"1.7rc2", "1.7rc1", true}, + {"1.7rc2", "1.7", false}, + {"1.2.0", "1.2.0-X-1.2.0+metadata~dist", true}, + } + + for _, tc := range cases { + v1, err := NewVersion(tc.v1) + if err != nil { + t.Fatalf("err: %s", err) + } + + v2, err := NewVersion(tc.v2) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v1.GreaterThanOrEqual(v2) + expected := tc.expected + if actual != expected { + t.Fatalf( + "%s >= %s\nexpected: %t\nactual: %t", + tc.v1, tc.v2, + expected, actual) + } + } +} + +func TestLessThanOrEqual(t *testing.T) { + cases := []struct { + v1 string + v2 string + expected bool + }{ + {"1.2.3", "1.4.5", true}, + {"1.2-beta", "1.2-beta", true}, + {"1.2", "1.1.4", false}, + {"1.2", "1.2-beta", false}, + {"1.2+foo", "1.2+beta", true}, + {"v1.2", "v1.2-beta", false}, + {"v1.2+foo", "v1.2+beta", true}, + {"v1.2.3.4", "v1.2.3.4", true}, + {"v1.2.0.0", "v1.2", true}, + {"v1.2.0.0.1", "v1.2", false}, + {"v1.2", "v1.2.0.0", true}, + {"v1.2", "v1.2.0.0.1", true}, + {"v1.2.0.0", "v1.2.0.0.1", true}, + {"v1.2.3.0", "v1.2.3.4", true}, + {"1.7rc2", "1.7rc1", false}, + {"1.7rc2", "1.7", true}, + {"1.2.0", "1.2.0-X-1.2.0+metadata~dist", false}, + } + + for _, tc := range cases { + v1, err := NewVersion(tc.v1) + if err != nil { + t.Fatalf("err: %s", err) + } + + v2, err := NewVersion(tc.v2) + if err != nil { + t.Fatalf("err: %s", err) + } + + actual := v1.LessThanOrEqual(v2) + expected := tc.expected + if actual != expected { + t.Fatalf( + "%s <= %s\nexpected: %t\nactual: %t", + tc.v1, tc.v2, + expected, actual) + } + } +} + +func BenchmarkVersionString(b *testing.B) { + v, _ := NewVersion("3.4.5-rc1+meta") + _ = v.String() + + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + _ = v.String() + } +} + +func BenchmarkCompareVersionV1(b *testing.B) { + v, _ := NewVersion("3.4.5") + + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + v.Compare(v) + } +} + +func BenchmarkVersionCompareV2(b *testing.B) { + v, _ := NewVersion("1.2.3") + o, _ := NewVersion("v1.2.3.4") + + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + v.Compare(o) + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.github/workflows/ci.yml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.github/workflows/ci.yml new file mode 100644 index 0000000..0037dce --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: build + +on: + push: + branches: + tags: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: set up go 1.19 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 + with: + go-version: 1.19 + id: go + + - name: checkout + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + + - name: build and test + run: | + go test -timeout=60s -race ./... + go build -race ./... + + - name: build and test ARC + working-directory: ./arc + run: | + go test -timeout=60s -race + go build -race + + - name: install golangci-lint + run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.53.3 + + - name: run golangci-lint + run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions ./... ./simplelru/... ./expirable/... + + - name: run golangci-lint on ARC + working-directory: ./arc + run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions ./... diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.gitignore b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.gitignore new file mode 100644 index 0000000..8365624 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.gitignore @@ -0,0 +1,23 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.golangci.yml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.golangci.yml new file mode 100644 index 0000000..7e7b8a9 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/.golangci.yml @@ -0,0 +1,46 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +linters: + fast: false + disable-all: true + enable: + - revive + - megacheck + - govet + - unconvert + - gas + - gocyclo + - dupl + - misspell + - unparam + - unused + - typecheck + - ineffassign + # - stylecheck + - exportloopref + - gocritic + - nakedret + - gosimple + - prealloc + +# golangci-lint configuration file +linters-settings: + revive: + ignore-generated-header: true + severity: warning + rules: + - name: package-comments + severity: warning + disabled: true + - name: exported + severity: warning + disabled: false + arguments: ["checkPrivateReceivers", "disableStutteringCheck"] + +issues: + exclude-use-default: false + exclude-rules: + - path: _test\.go + linters: + - dupl diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/2q.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/2q.go new file mode 100644 index 0000000..8c95252 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/2q.go @@ -0,0 +1,267 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package lru + +import ( + "errors" + "sync" + + "github.com/hashicorp/golang-lru/v2/simplelru" +) + +const ( + // Default2QRecentRatio is the ratio of the 2Q cache dedicated + // to recently added entries that have only been accessed once. + Default2QRecentRatio = 0.25 + + // Default2QGhostEntries is the default ratio of ghost + // entries kept to track entries recently evicted + Default2QGhostEntries = 0.50 +) + +// TwoQueueCache is a thread-safe fixed size 2Q cache. +// 2Q is an enhancement over the standard LRU cache +// in that it tracks both frequently and recently used +// entries separately. This avoids a burst in access to new +// entries from evicting frequently used entries. It adds some +// additional tracking overhead to the standard LRU cache, and is +// computationally about 2x the cost, and adds some metadata over +// head. The ARCCache is similar, but does not require setting any +// parameters. +type TwoQueueCache[K comparable, V any] struct { + size int + recentSize int + recentRatio float64 + ghostRatio float64 + + recent simplelru.LRUCache[K, V] + frequent simplelru.LRUCache[K, V] + recentEvict simplelru.LRUCache[K, struct{}] + lock sync.RWMutex +} + +// New2Q creates a new TwoQueueCache using the default +// values for the parameters. +func New2Q[K comparable, V any](size int) (*TwoQueueCache[K, V], error) { + return New2QParams[K, V](size, Default2QRecentRatio, Default2QGhostEntries) +} + +// New2QParams creates a new TwoQueueCache using the provided +// parameter values. +func New2QParams[K comparable, V any](size int, recentRatio, ghostRatio float64) (*TwoQueueCache[K, V], error) { + if size <= 0 { + return nil, errors.New("invalid size") + } + if recentRatio < 0.0 || recentRatio > 1.0 { + return nil, errors.New("invalid recent ratio") + } + if ghostRatio < 0.0 || ghostRatio > 1.0 { + return nil, errors.New("invalid ghost ratio") + } + + // Determine the sub-sizes + recentSize := int(float64(size) * recentRatio) + evictSize := int(float64(size) * ghostRatio) + + // Allocate the LRUs + recent, err := simplelru.NewLRU[K, V](size, nil) + if err != nil { + return nil, err + } + frequent, err := simplelru.NewLRU[K, V](size, nil) + if err != nil { + return nil, err + } + recentEvict, err := simplelru.NewLRU[K, struct{}](evictSize, nil) + if err != nil { + return nil, err + } + + // Initialize the cache + c := &TwoQueueCache[K, V]{ + size: size, + recentSize: recentSize, + recentRatio: recentRatio, + ghostRatio: ghostRatio, + recent: recent, + frequent: frequent, + recentEvict: recentEvict, + } + return c, nil +} + +// Get looks up a key's value from the cache. +func (c *TwoQueueCache[K, V]) Get(key K) (value V, ok bool) { + c.lock.Lock() + defer c.lock.Unlock() + + // Check if this is a frequent value + if val, ok := c.frequent.Get(key); ok { + return val, ok + } + + // If the value is contained in recent, then we + // promote it to frequent + if val, ok := c.recent.Peek(key); ok { + c.recent.Remove(key) + c.frequent.Add(key, val) + return val, ok + } + + // No hit + return +} + +// Add adds a value to the cache. +func (c *TwoQueueCache[K, V]) Add(key K, value V) { + c.lock.Lock() + defer c.lock.Unlock() + + // Check if the value is frequently used already, + // and just update the value + if c.frequent.Contains(key) { + c.frequent.Add(key, value) + return + } + + // Check if the value is recently used, and promote + // the value into the frequent list + if c.recent.Contains(key) { + c.recent.Remove(key) + c.frequent.Add(key, value) + return + } + + // If the value was recently evicted, add it to the + // frequently used list + if c.recentEvict.Contains(key) { + c.ensureSpace(true) + c.recentEvict.Remove(key) + c.frequent.Add(key, value) + return + } + + // Add to the recently seen list + c.ensureSpace(false) + c.recent.Add(key, value) +} + +// ensureSpace is used to ensure we have space in the cache +func (c *TwoQueueCache[K, V]) ensureSpace(recentEvict bool) { + // If we have space, nothing to do + recentLen := c.recent.Len() + freqLen := c.frequent.Len() + if recentLen+freqLen < c.size { + return + } + + // If the recent buffer is larger than + // the target, evict from there + if recentLen > 0 && (recentLen > c.recentSize || (recentLen == c.recentSize && !recentEvict)) { + k, _, _ := c.recent.RemoveOldest() + c.recentEvict.Add(k, struct{}{}) + return + } + + // Remove from the frequent list otherwise + c.frequent.RemoveOldest() +} + +// Len returns the number of items in the cache. +func (c *TwoQueueCache[K, V]) Len() int { + c.lock.RLock() + defer c.lock.RUnlock() + return c.recent.Len() + c.frequent.Len() +} + +// Resize changes the cache size. +func (c *TwoQueueCache[K, V]) Resize(size int) (evicted int) { + c.lock.Lock() + defer c.lock.Unlock() + + // Recalculate the sub-sizes + recentSize := int(float64(size) * c.recentRatio) + evictSize := int(float64(size) * c.ghostRatio) + c.size = size + c.recentSize = recentSize + + // ensureSpace + diff := c.recent.Len() + c.frequent.Len() - size + if diff < 0 { + diff = 0 + } + for i := 0; i < diff; i++ { + c.ensureSpace(true) + } + + // Reallocate the LRUs + c.recent.Resize(size) + c.frequent.Resize(size) + c.recentEvict.Resize(evictSize) + + return diff +} + +// Keys returns a slice of the keys in the cache. +// The frequently used keys are first in the returned slice. +func (c *TwoQueueCache[K, V]) Keys() []K { + c.lock.RLock() + defer c.lock.RUnlock() + k1 := c.frequent.Keys() + k2 := c.recent.Keys() + return append(k1, k2...) +} + +// Values returns a slice of the values in the cache. +// The frequently used values are first in the returned slice. +func (c *TwoQueueCache[K, V]) Values() []V { + c.lock.RLock() + defer c.lock.RUnlock() + v1 := c.frequent.Values() + v2 := c.recent.Values() + return append(v1, v2...) +} + +// Remove removes the provided key from the cache. +func (c *TwoQueueCache[K, V]) Remove(key K) { + c.lock.Lock() + defer c.lock.Unlock() + if c.frequent.Remove(key) { + return + } + if c.recent.Remove(key) { + return + } + if c.recentEvict.Remove(key) { + return + } +} + +// Purge is used to completely clear the cache. +func (c *TwoQueueCache[K, V]) Purge() { + c.lock.Lock() + defer c.lock.Unlock() + c.recent.Purge() + c.frequent.Purge() + c.recentEvict.Purge() +} + +// Contains is used to check if the cache contains a key +// without updating recency or frequency. +func (c *TwoQueueCache[K, V]) Contains(key K) bool { + c.lock.RLock() + defer c.lock.RUnlock() + return c.frequent.Contains(key) || c.recent.Contains(key) +} + +// Peek is used to inspect the cache value of a key +// without updating recency or frequency. +func (c *TwoQueueCache[K, V]) Peek(key K) (value V, ok bool) { + c.lock.RLock() + defer c.lock.RUnlock() + if val, ok := c.frequent.Peek(key); ok { + return val, ok + } + return c.recent.Peek(key) +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/2q_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/2q_test.go new file mode 100644 index 0000000..efa6e86 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/2q_test.go @@ -0,0 +1,375 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package lru + +import ( + "testing" +) + +func Benchmark2Q_Rand(b *testing.B) { + l, err := New2Q[int64, int64](8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + trace[i] = getRand(b) % 32768 + } + + b.ResetTimer() + + var hit, miss int + for i := 0; i < 2*b.N; i++ { + if i%2 == 0 { + l.Add(trace[i], trace[i]) + } else { + if _, ok := l.Get(trace[i]); ok { + hit++ + } else { + miss++ + } + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss)) +} + +func Benchmark2Q_Freq(b *testing.B) { + l, err := New2Q[int64, int64](8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + if i%2 == 0 { + trace[i] = getRand(b) % 16384 + } else { + trace[i] = getRand(b) % 32768 + } + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + l.Add(trace[i], trace[i]) + } + var hit, miss int + for i := 0; i < b.N; i++ { + if _, ok := l.Get(trace[i]); ok { + hit++ + } else { + miss++ + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss)) +} + +func Test2Q_RandomOps(t *testing.T) { + size := 128 + l, err := New2Q[int64, int64](128) + if err != nil { + t.Fatalf("err: %v", err) + } + + n := 200000 + for i := 0; i < n; i++ { + key := getRand(t) % 512 + r := getRand(t) + switch r % 3 { + case 0: + l.Add(key, key) + case 1: + l.Get(key) + case 2: + l.Remove(key) + } + + if l.recent.Len()+l.frequent.Len() > size { + t.Fatalf("bad: recent: %d freq: %d", + l.recent.Len(), l.frequent.Len()) + } + } +} + +func Test2Q_Get_RecentToFrequent(t *testing.T) { + l, err := New2Q[int, int](128) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Touch all the entries, should be in t1 + for i := 0; i < 128; i++ { + l.Add(i, i) + } + if n := l.recent.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + // Get should upgrade to t2 + for i := 0; i < 128; i++ { + if _, ok := l.Get(i); !ok { + t.Fatalf("missing: %d", i) + } + } + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } + + // Get be from t2 + for i := 0; i < 128; i++ { + if _, ok := l.Get(i); !ok { + t.Fatalf("missing: %d", i) + } + } + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } +} + +func Test2Q_Add_RecentToFrequent(t *testing.T) { + l, err := New2Q[int, int](128) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Add initially to recent + l.Add(1, 1) + if n := l.recent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + // Add should upgrade to frequent + l.Add(1, 1) + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + + // Add should remain in frequent + l.Add(1, 1) + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } +} + +func Test2Q_Add_RecentEvict(t *testing.T) { + l, err := New2Q[int, int](4) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Add 1,2,3,4,5 -> Evict 1 + l.Add(1, 1) + l.Add(2, 2) + l.Add(3, 3) + l.Add(4, 4) + l.Add(5, 5) + if n := l.recent.Len(); n != 4 { + t.Fatalf("bad: %d", n) + } + if n := l.recentEvict.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + // Pull in the recently evicted + l.Add(1, 1) + if n := l.recent.Len(); n != 3 { + t.Fatalf("bad: %d", n) + } + if n := l.recentEvict.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + + // Add 6, should cause another recent evict + l.Add(6, 6) + if n := l.recent.Len(); n != 3 { + t.Fatalf("bad: %d", n) + } + if n := l.recentEvict.Len(); n != 2 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } +} + +func Test2Q_Resize(t *testing.T) { + l, err := New2Q[int, int](100) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Touch all the entries, should be in t1 + for i := 0; i < 100; i++ { + l.Add(i, i) + } + + evicted := l.Resize(50) + if evicted != 50 { + t.Fatalf("bad: %d", evicted) + } + + if n := l.recent.Len(); n != 50 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + l, err = New2Q[int, int](100) + if err != nil { + t.Fatalf("err: %v", err) + } + for i := 0; i < 100; i++ { + l.Add(i, i) + } + + for i := 0; i < 50; i++ { + l.Add(i, i) + } + + evicted = l.Resize(50) + if evicted != 50 { + t.Fatalf("bad: %d", evicted) + } + + if n := l.recent.Len(); n != 12 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 38 { + t.Fatalf("bad: %d", n) + } + + l, err = New2Q[int, int](100) + if err != nil { + t.Fatalf("err: %v", err) + } + for i := 0; i < 100; i++ { + l.Add(i, i) + l.Add(i, i) + } + + evicted = l.Resize(50) + if evicted != 50 { + t.Fatalf("bad: %d", evicted) + } + + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 50 { + t.Fatalf("bad: %d", n) + } +} + +func Test2Q(t *testing.T) { + l, err := New2Q[int, int](128) + if err != nil { + t.Fatalf("err: %v", err) + } + + for i := 0; i < 256; i++ { + l.Add(i, i) + } + if l.Len() != 128 { + t.Fatalf("bad len: %v", l.Len()) + } + + for i, k := range l.Keys() { + if v, ok := l.Get(k); !ok || v != k || v != i+128 { + t.Fatalf("bad key: %v", k) + } + } + for i, v := range l.Values() { + if v != i+128 { + t.Fatalf("bad key: %v", v) + } + } + for i := 0; i < 128; i++ { + if _, ok := l.Get(i); ok { + t.Fatalf("should be evicted") + } + } + for i := 128; i < 256; i++ { + if _, ok := l.Get(i); !ok { + t.Fatalf("should not be evicted") + } + } + for i := 128; i < 192; i++ { + l.Remove(i) + if _, ok := l.Get(i); ok { + t.Fatalf("should be deleted") + } + } + + l.Purge() + if l.Len() != 0 { + t.Fatalf("bad len: %v", l.Len()) + } + if _, ok := l.Get(200); ok { + t.Fatalf("should contain nothing") + } +} + +// Test that Contains doesn't update recent-ness +func Test2Q_Contains(t *testing.T) { + l, err := New2Q[int, int](2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if !l.Contains(1) { + t.Errorf("1 should be contained") + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Contains should not have updated recent-ness of 1") + } +} + +// Test that Peek doesn't update recent-ness +func Test2Q_Peek(t *testing.T) { + l, err := New2Q[int, int](2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if v, ok := l.Peek(1); !ok || v != 1 { + t.Errorf("1 should be set to 1: %v, %v", v, ok) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("should not have updated recent-ness of 1") + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/LICENSE new file mode 100644 index 0000000..0e5d580 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/LICENSE @@ -0,0 +1,364 @@ +Copyright (c) 2014 HashiCorp, Inc. + +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/README.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/README.md new file mode 100644 index 0000000..a942eb5 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/README.md @@ -0,0 +1,79 @@ +golang-lru +========== + +This provides the `lru` package which implements a fixed-size +thread safe LRU cache. It is based on the cache in Groupcache. + +Documentation +============= + +Full docs are available on [Go Packages](https://pkg.go.dev/github.com/hashicorp/golang-lru/v2) + +LRU cache example +================= + +```go +package main + +import ( + "fmt" + "github.com/hashicorp/golang-lru/v2" +) + +func main() { + l, _ := lru.New[int, any](128) + for i := 0; i < 256; i++ { + l.Add(i, nil) + } + if l.Len() != 128 { + panic(fmt.Sprintf("bad len: %v", l.Len())) + } +} +``` + +Expirable LRU cache example +=========================== + +```go +package main + +import ( + "fmt" + "time" + + "github.com/hashicorp/golang-lru/v2/expirable" +) + +func main() { + // make cache with 10ms TTL and 5 max keys + cache := expirable.NewLRU[string, string](5, nil, time.Millisecond*10) + + + // set value under key1. + cache.Add("key1", "val1") + + // get value under key1 + r, ok := cache.Get("key1") + + // check for OK value + if ok { + fmt.Printf("value before expiration is found: %v, value: %q\n", ok, r) + } + + // wait for cache to expire + time.Sleep(time.Millisecond * 12) + + // get value under key1 after key expiration + r, ok = cache.Get("key1") + fmt.Printf("value after expiration is found: %v, value: %q\n", ok, r) + + // set value under key2, would evict old entry because it is already expired. + cache.Add("key2", "val2") + + fmt.Printf("Cache len: %d\n", cache.Len()) + // Output: + // value before expiration is found: true, value: "val1" + // value after expiration is found: false, value: "" + // Cache len: 1 +} +``` diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/doc.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/doc.go new file mode 100644 index 0000000..24107ee --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/doc.go @@ -0,0 +1,24 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Package lru provides three different LRU caches of varying sophistication. +// +// Cache is a simple LRU cache. It is based on the LRU implementation in +// groupcache: https://github.com/golang/groupcache/tree/master/lru +// +// TwoQueueCache tracks frequently used and recently used entries separately. +// This avoids a burst of accesses from taking out frequently used entries, at +// the cost of about 2x computational overhead and some extra bookkeeping. +// +// ARCCache is an adaptive replacement cache. It tracks recent evictions as well +// as recent usage in both the frequent and recent caches. Its computational +// overhead is comparable to TwoQueueCache, but the memory overhead is linear +// with the size of the cache. +// +// ARC has been patented by IBM, so do not use it if that is problematic for +// your program. For this reason, it is in a separate go module contained within +// this repository. +// +// All caches in this package take locks while operating, and are therefore +// thread-safe for consumers. +package lru diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/expirable/expirable_lru.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/expirable/expirable_lru.go new file mode 100644 index 0000000..89978d6 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/expirable/expirable_lru.go @@ -0,0 +1,338 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package expirable + +import ( + "sync" + "time" + + "github.com/hashicorp/golang-lru/v2/internal" +) + +// EvictCallback is used to get a callback when a cache entry is evicted +type EvictCallback[K comparable, V any] func(key K, value V) + +// LRU implements a thread-safe LRU with expirable entries. +type LRU[K comparable, V any] struct { + size int + evictList *internal.LruList[K, V] + items map[K]*internal.Entry[K, V] + onEvict EvictCallback[K, V] + + // expirable options + mu sync.Mutex + ttl time.Duration + done chan struct{} + + // buckets for expiration + buckets []bucket[K, V] + // uint8 because it's number between 0 and numBuckets + nextCleanupBucket uint8 +} + +// bucket is a container for holding entries to be expired +type bucket[K comparable, V any] struct { + entries map[K]*internal.Entry[K, V] + newestEntry time.Time +} + +// noEvictionTTL - very long ttl to prevent eviction +const noEvictionTTL = time.Hour * 24 * 365 * 10 + +// because of uint8 usage for nextCleanupBucket, should not exceed 256. +// casting it as uint8 explicitly requires type conversions in multiple places +const numBuckets = 100 + +// NewLRU returns a new thread-safe cache with expirable entries. +// +// Size parameter set to 0 makes cache of unlimited size, e.g. turns LRU mechanism off. +// +// Providing 0 TTL turns expiring off. +// +// Delete expired entries every 1/100th of ttl value. Goroutine which deletes expired entries runs indefinitely. +func NewLRU[K comparable, V any](size int, onEvict EvictCallback[K, V], ttl time.Duration) *LRU[K, V] { + if size < 0 { + size = 0 + } + if ttl <= 0 { + ttl = noEvictionTTL + } + + res := LRU[K, V]{ + ttl: ttl, + size: size, + evictList: internal.NewList[K, V](), + items: make(map[K]*internal.Entry[K, V]), + onEvict: onEvict, + done: make(chan struct{}), + } + + // initialize the buckets + res.buckets = make([]bucket[K, V], numBuckets) + for i := 0; i < numBuckets; i++ { + res.buckets[i] = bucket[K, V]{entries: make(map[K]*internal.Entry[K, V])} + } + + // enable deleteExpired() running in separate goroutine for cache with non-zero TTL + // + // Important: done channel is never closed, so deleteExpired() goroutine will never exit, + // it's decided to add functionality to close it in the version later than v2. + if res.ttl != noEvictionTTL { + go func(done <-chan struct{}) { + ticker := time.NewTicker(res.ttl / numBuckets) + defer ticker.Stop() + for { + select { + case <-done: + return + case <-ticker.C: + res.deleteExpired() + } + } + }(res.done) + } + return &res +} + +// Purge clears the cache completely. +// onEvict is called for each evicted key. +func (c *LRU[K, V]) Purge() { + c.mu.Lock() + defer c.mu.Unlock() + for k, v := range c.items { + if c.onEvict != nil { + c.onEvict(k, v.Value) + } + delete(c.items, k) + } + for _, b := range c.buckets { + for _, ent := range b.entries { + delete(b.entries, ent.Key) + } + } + c.evictList.Init() +} + +// Add adds a value to the cache. Returns true if an eviction occurred. +// Returns false if there was no eviction: the item was already in the cache, +// or the size was not exceeded. +func (c *LRU[K, V]) Add(key K, value V) (evicted bool) { + c.mu.Lock() + defer c.mu.Unlock() + now := time.Now() + + // Check for existing item + if ent, ok := c.items[key]; ok { + c.evictList.MoveToFront(ent) + c.removeFromBucket(ent) // remove the entry from its current bucket as expiresAt is renewed + ent.Value = value + ent.ExpiresAt = now.Add(c.ttl) + c.addToBucket(ent) + return false + } + + // Add new item + ent := c.evictList.PushFrontExpirable(key, value, now.Add(c.ttl)) + c.items[key] = ent + c.addToBucket(ent) // adds the entry to the appropriate bucket and sets entry.expireBucket + + evict := c.size > 0 && c.evictList.Length() > c.size + // Verify size not exceeded + if evict { + c.removeOldest() + } + return evict +} + +// Get looks up a key's value from the cache. +func (c *LRU[K, V]) Get(key K) (value V, ok bool) { + c.mu.Lock() + defer c.mu.Unlock() + var ent *internal.Entry[K, V] + if ent, ok = c.items[key]; ok { + // Expired item check + if time.Now().After(ent.ExpiresAt) { + return value, false + } + c.evictList.MoveToFront(ent) + return ent.Value, true + } + return +} + +// Contains checks if a key is in the cache, without updating the recent-ness +// or deleting it for being stale. +func (c *LRU[K, V]) Contains(key K) (ok bool) { + c.mu.Lock() + defer c.mu.Unlock() + _, ok = c.items[key] + return ok +} + +// Peek returns the key value (or undefined if not found) without updating +// the "recently used"-ness of the key. +func (c *LRU[K, V]) Peek(key K) (value V, ok bool) { + c.mu.Lock() + defer c.mu.Unlock() + var ent *internal.Entry[K, V] + if ent, ok = c.items[key]; ok { + // Expired item check + if time.Now().After(ent.ExpiresAt) { + return value, false + } + return ent.Value, true + } + return +} + +// Remove removes the provided key from the cache, returning if the +// key was contained. +func (c *LRU[K, V]) Remove(key K) bool { + c.mu.Lock() + defer c.mu.Unlock() + if ent, ok := c.items[key]; ok { + c.removeElement(ent) + return true + } + return false +} + +// RemoveOldest removes the oldest item from the cache. +func (c *LRU[K, V]) RemoveOldest() (key K, value V, ok bool) { + c.mu.Lock() + defer c.mu.Unlock() + if ent := c.evictList.Back(); ent != nil { + c.removeElement(ent) + return ent.Key, ent.Value, true + } + return +} + +// GetOldest returns the oldest entry +func (c *LRU[K, V]) GetOldest() (key K, value V, ok bool) { + c.mu.Lock() + defer c.mu.Unlock() + if ent := c.evictList.Back(); ent != nil { + return ent.Key, ent.Value, true + } + return +} + +// Keys returns a slice of the keys in the cache, from oldest to newest. +func (c *LRU[K, V]) Keys() []K { + c.mu.Lock() + defer c.mu.Unlock() + keys := make([]K, 0, len(c.items)) + for ent := c.evictList.Back(); ent != nil; ent = ent.PrevEntry() { + keys = append(keys, ent.Key) + } + return keys +} + +// Values returns a slice of the values in the cache, from oldest to newest. +// Expired entries are filtered out. +func (c *LRU[K, V]) Values() []V { + c.mu.Lock() + defer c.mu.Unlock() + values := make([]V, len(c.items)) + i := 0 + now := time.Now() + for ent := c.evictList.Back(); ent != nil; ent = ent.PrevEntry() { + if now.After(ent.ExpiresAt) { + continue + } + values[i] = ent.Value + i++ + } + return values +} + +// Len returns the number of items in the cache. +func (c *LRU[K, V]) Len() int { + c.mu.Lock() + defer c.mu.Unlock() + return c.evictList.Length() +} + +// Resize changes the cache size. Size of 0 means unlimited. +func (c *LRU[K, V]) Resize(size int) (evicted int) { + c.mu.Lock() + defer c.mu.Unlock() + if size <= 0 { + c.size = 0 + return 0 + } + diff := c.evictList.Length() - size + if diff < 0 { + diff = 0 + } + for i := 0; i < diff; i++ { + c.removeOldest() + } + c.size = size + return diff +} + +// Close destroys cleanup goroutine. To clean up the cache, run Purge() before Close(). +// func (c *LRU[K, V]) Close() { +// c.mu.Lock() +// defer c.mu.Unlock() +// select { +// case <-c.done: +// return +// default: +// } +// close(c.done) +// } + +// removeOldest removes the oldest item from the cache. Has to be called with lock! +func (c *LRU[K, V]) removeOldest() { + if ent := c.evictList.Back(); ent != nil { + c.removeElement(ent) + } +} + +// removeElement is used to remove a given list element from the cache. Has to be called with lock! +func (c *LRU[K, V]) removeElement(e *internal.Entry[K, V]) { + c.evictList.Remove(e) + delete(c.items, e.Key) + c.removeFromBucket(e) + if c.onEvict != nil { + c.onEvict(e.Key, e.Value) + } +} + +// deleteExpired deletes expired records from the oldest bucket, waiting for the newest entry +// in it to expire first. +func (c *LRU[K, V]) deleteExpired() { + c.mu.Lock() + bucketIdx := c.nextCleanupBucket + timeToExpire := time.Until(c.buckets[bucketIdx].newestEntry) + // wait for newest entry to expire before cleanup without holding lock + if timeToExpire > 0 { + c.mu.Unlock() + time.Sleep(timeToExpire) + c.mu.Lock() + } + for _, ent := range c.buckets[bucketIdx].entries { + c.removeElement(ent) + } + c.nextCleanupBucket = (c.nextCleanupBucket + 1) % numBuckets + c.mu.Unlock() +} + +// addToBucket adds entry to expire bucket so that it will be cleaned up when the time comes. Has to be called with lock! +func (c *LRU[K, V]) addToBucket(e *internal.Entry[K, V]) { + bucketID := (numBuckets + c.nextCleanupBucket - 1) % numBuckets + e.ExpireBucket = bucketID + c.buckets[bucketID].entries[e.Key] = e + if c.buckets[bucketID].newestEntry.Before(e.ExpiresAt) { + c.buckets[bucketID].newestEntry = e.ExpiresAt + } +} + +// removeFromBucket removes the entry from its corresponding bucket. Has to be called with lock! +func (c *LRU[K, V]) removeFromBucket(e *internal.Entry[K, V]) { + delete(c.buckets[e.ExpireBucket].entries, e.Key) +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/expirable/expirable_lru_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/expirable/expirable_lru_test.go new file mode 100644 index 0000000..fd3b255 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/expirable/expirable_lru_test.go @@ -0,0 +1,573 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package expirable + +import ( + "crypto/rand" + "fmt" + "math" + "math/big" + "reflect" + "sync" + "testing" + "time" + + "github.com/hashicorp/golang-lru/v2/simplelru" +) + +func BenchmarkLRU_Rand_NoExpire(b *testing.B) { + l := NewLRU[int64, int64](8192, nil, 0) + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + trace[i] = getRand(b) % 32768 + } + + b.ResetTimer() + + var hit, miss int + for i := 0; i < 2*b.N; i++ { + if i%2 == 0 { + l.Add(trace[i], trace[i]) + } else { + if _, ok := l.Get(trace[i]); ok { + hit++ + } else { + miss++ + } + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss)) +} + +func BenchmarkLRU_Freq_NoExpire(b *testing.B) { + l := NewLRU[int64, int64](8192, nil, 0) + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + if i%2 == 0 { + trace[i] = getRand(b) % 16384 + } else { + trace[i] = getRand(b) % 32768 + } + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + l.Add(trace[i], trace[i]) + } + var hit, miss int + for i := 0; i < b.N; i++ { + if _, ok := l.Get(trace[i]); ok { + hit++ + } else { + miss++ + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss)) +} + +func BenchmarkLRU_Rand_WithExpire(b *testing.B) { + l := NewLRU[int64, int64](8192, nil, time.Millisecond*10) + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + trace[i] = getRand(b) % 32768 + } + + b.ResetTimer() + + var hit, miss int + for i := 0; i < 2*b.N; i++ { + if i%2 == 0 { + l.Add(trace[i], trace[i]) + } else { + if _, ok := l.Get(trace[i]); ok { + hit++ + } else { + miss++ + } + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss)) +} + +func BenchmarkLRU_Freq_WithExpire(b *testing.B) { + l := NewLRU[int64, int64](8192, nil, time.Millisecond*10) + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + if i%2 == 0 { + trace[i] = getRand(b) % 16384 + } else { + trace[i] = getRand(b) % 32768 + } + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + l.Add(trace[i], trace[i]) + } + var hit, miss int + for i := 0; i < b.N; i++ { + if _, ok := l.Get(trace[i]); ok { + hit++ + } else { + miss++ + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss)) +} + +func TestLRUInterface(_ *testing.T) { + var _ simplelru.LRUCache[int, int] = &LRU[int, int]{} +} + +func TestLRUNoPurge(t *testing.T) { + lc := NewLRU[string, string](10, nil, 0) + + lc.Add("key1", "val1") + if lc.Len() != 1 { + t.Fatalf("length differs from expected") + } + + v, ok := lc.Peek("key1") + if v != "val1" { + t.Fatalf("value differs from expected") + } + if !ok { + t.Fatalf("should be true") + } + + if !lc.Contains("key1") { + t.Fatalf("should contain key1") + } + if lc.Contains("key2") { + t.Fatalf("should not contain key2") + } + + v, ok = lc.Peek("key2") + if v != "" { + t.Fatalf("should be empty") + } + if ok { + t.Fatalf("should be false") + } + + if !reflect.DeepEqual(lc.Keys(), []string{"key1"}) { + t.Fatalf("value differs from expected") + } + + if lc.Resize(0) != 0 { + t.Fatalf("evicted count differs from expected") + } + if lc.Resize(2) != 0 { + t.Fatalf("evicted count differs from expected") + } + lc.Add("key2", "val2") + if lc.Resize(1) != 1 { + t.Fatalf("evicted count differs from expected") + } +} + +func TestLRUEdgeCases(t *testing.T) { + lc := NewLRU[string, *string](2, nil, 0) + + // Adding a nil value + lc.Add("key1", nil) + + value, exists := lc.Get("key1") + if value != nil || !exists { + t.Fatalf("unexpected value or existence flag for key1: value=%v, exists=%v", value, exists) + } + + // Adding an entry with the same key but different value + newVal := "val1" + lc.Add("key1", &newVal) + + value, exists = lc.Get("key1") + if value != &newVal || !exists { + t.Fatalf("unexpected value or existence flag for key1: value=%v, exists=%v", value, exists) + } +} + +func TestLRU_Values(t *testing.T) { + lc := NewLRU[string, string](3, nil, 0) + + lc.Add("key1", "val1") + lc.Add("key2", "val2") + lc.Add("key3", "val3") + + values := lc.Values() + if !reflect.DeepEqual(values, []string{"val1", "val2", "val3"}) { + t.Fatalf("values differs from expected") + } +} + +// func TestExpirableMultipleClose(_ *testing.T) { +// lc := NewLRU[string, string](10, nil, 0) +// lc.Close() +// // should not panic +// lc.Close() +// } + +func TestLRUWithPurge(t *testing.T) { + var evicted []string + lc := NewLRU(10, func(key string, value string) { evicted = append(evicted, key, value) }, 150*time.Millisecond) + + k, v, ok := lc.GetOldest() + if k != "" { + t.Fatalf("should be empty") + } + if v != "" { + t.Fatalf("should be empty") + } + if ok { + t.Fatalf("should be false") + } + + lc.Add("key1", "val1") + + time.Sleep(100 * time.Millisecond) // not enough to expire + if lc.Len() != 1 { + t.Fatalf("length differs from expected") + } + + v, ok = lc.Get("key1") + if v != "val1" { + t.Fatalf("value differs from expected") + } + if !ok { + t.Fatalf("should be true") + } + + time.Sleep(200 * time.Millisecond) // expire + v, ok = lc.Get("key1") + if ok { + t.Fatalf("should be false") + } + if v != "" { + t.Fatalf("should be nil") + } + + if lc.Len() != 0 { + t.Fatalf("length differs from expected") + } + if !reflect.DeepEqual(evicted, []string{"key1", "val1"}) { + t.Fatalf("value differs from expected") + } + + // add new entry + lc.Add("key2", "val2") + if lc.Len() != 1 { + t.Fatalf("length differs from expected") + } + + k, v, ok = lc.GetOldest() + if k != "key2" { + t.Fatalf("value differs from expected") + } + if v != "val2" { + t.Fatalf("value differs from expected") + } + if !ok { + t.Fatalf("should be true") + } + + // DeleteExpired, nothing deleted + lc.deleteExpired() + if lc.Len() != 1 { + t.Fatalf("length differs from expected") + } + if !reflect.DeepEqual(evicted, []string{"key1", "val1"}) { + t.Fatalf("value differs from expected") + } + + // Purge, cache should be clean + lc.Purge() + if lc.Len() != 0 { + t.Fatalf("length differs from expected") + } + if !reflect.DeepEqual(evicted, []string{"key1", "val1", "key2", "val2"}) { + t.Fatalf("value differs from expected") + } +} + +func TestLRUWithPurgeEnforcedBySize(t *testing.T) { + lc := NewLRU[string, string](10, nil, time.Hour) + + for i := 0; i < 100; i++ { + i := i + lc.Add(fmt.Sprintf("key%d", i), fmt.Sprintf("val%d", i)) + v, ok := lc.Get(fmt.Sprintf("key%d", i)) + if v != fmt.Sprintf("val%d", i) { + t.Fatalf("value differs from expected") + } + if !ok { + t.Fatalf("should be true") + } + if lc.Len() > 20 { + t.Fatalf("length should be less than 20") + } + } + + if lc.Len() != 10 { + t.Fatalf("length differs from expected") + } +} + +func TestLRUConcurrency(t *testing.T) { + lc := NewLRU[string, string](0, nil, 0) + wg := sync.WaitGroup{} + wg.Add(1000) + for i := 0; i < 1000; i++ { + go func(i int) { + lc.Add(fmt.Sprintf("key-%d", i/10), fmt.Sprintf("val-%d", i/10)) + wg.Done() + }(i) + } + wg.Wait() + if lc.Len() != 100 { + t.Fatalf("length differs from expected") + } +} + +func TestLRUInvalidateAndEvict(t *testing.T) { + var evicted int + lc := NewLRU(-1, func(_, _ string) { evicted++ }, 0) + + lc.Add("key1", "val1") + lc.Add("key2", "val2") + + val, ok := lc.Get("key1") + if !ok { + t.Fatalf("should be true") + } + if val != "val1" { + t.Fatalf("value differs from expected") + } + if evicted != 0 { + t.Fatalf("value differs from expected") + } + + lc.Remove("key1") + if evicted != 1 { + t.Fatalf("value differs from expected") + } + val, ok = lc.Get("key1") + if val != "" { + t.Fatalf("should be empty") + } + if ok { + t.Fatalf("should be false") + } +} + +func TestLoadingExpired(t *testing.T) { + lc := NewLRU[string, string](0, nil, time.Millisecond*5) + + lc.Add("key1", "val1") + if lc.Len() != 1 { + t.Fatalf("length differs from expected") + } + + v, ok := lc.Peek("key1") + if v != "val1" { + t.Fatalf("value differs from expected") + } + if !ok { + t.Fatalf("should be true") + } + + v, ok = lc.Get("key1") + if v != "val1" { + t.Fatalf("value differs from expected") + } + if !ok { + t.Fatalf("should be true") + } + + for { + result, ok := lc.Get("key1") + if ok && result == "" { + t.Fatalf("ok should return a result") + } + if !ok { + break + } + } + + time.Sleep(time.Millisecond * 100) // wait for expiration reaper + if lc.Len() != 0 { + t.Fatalf("length differs from expected") + } + + v, ok = lc.Peek("key1") + if v != "" { + t.Fatalf("should be empty") + } + if ok { + t.Fatalf("should be false") + } + + v, ok = lc.Get("key1") + if v != "" { + t.Fatalf("should be empty") + } + if ok { + t.Fatalf("should be false") + } +} + +func TestLRURemoveOldest(t *testing.T) { + lc := NewLRU[string, string](2, nil, 0) + + k, v, ok := lc.RemoveOldest() + if k != "" { + t.Fatalf("should be empty") + } + if v != "" { + t.Fatalf("should be empty") + } + if ok { + t.Fatalf("should be false") + } + + ok = lc.Remove("non_existent") + if ok { + t.Fatalf("should be false") + } + + lc.Add("key1", "val1") + if lc.Len() != 1 { + t.Fatalf("length differs from expected") + } + + v, ok = lc.Get("key1") + if !ok { + t.Fatalf("should be true") + } + if v != "val1" { + t.Fatalf("value differs from expected") + } + + if !reflect.DeepEqual(lc.Keys(), []string{"key1"}) { + t.Fatalf("value differs from expected") + } + if lc.Len() != 1 { + t.Fatalf("length differs from expected") + } + + lc.Add("key2", "val2") + if !reflect.DeepEqual(lc.Keys(), []string{"key1", "key2"}) { + t.Fatalf("value differs from expected") + } + if lc.Len() != 2 { + t.Fatalf("length differs from expected") + } + + k, v, ok = lc.RemoveOldest() + if k != "key1" { + t.Fatalf("value differs from expected") + } + if v != "val1" { + t.Fatalf("value differs from expected") + } + if !ok { + t.Fatalf("should be true") + } + + if !reflect.DeepEqual(lc.Keys(), []string{"key2"}) { + t.Fatalf("value differs from expected") + } + if lc.Len() != 1 { + t.Fatalf("length differs from expected") + } +} + +func ExampleLRU() { + // make cache with 10ms TTL and 5 max keys + cache := NewLRU[string, string](5, nil, time.Millisecond*10) + + // set value under key1. + cache.Add("key1", "val1") + + // get value under key1 + r, ok := cache.Get("key1") + + // check for OK value + if ok { + fmt.Printf("value before expiration is found: %v, value: %q\n", ok, r) + } + + // wait for cache to expire + time.Sleep(time.Millisecond * 100) + + // get value under key1 after key expiration + r, ok = cache.Get("key1") + fmt.Printf("value after expiration is found: %v, value: %q\n", ok, r) + + // set value under key2, would evict old entry because it is already expired. + cache.Add("key2", "val2") + + fmt.Printf("Cache len: %d\n", cache.Len()) + // Output: + // value before expiration is found: true, value: "val1" + // value after expiration is found: false, value: "" + // Cache len: 1 +} + +func getRand(tb testing.TB) int64 { + out, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64)) + if err != nil { + tb.Fatal(err) + } + return out.Int64() +} + +func (c *LRU[K, V]) wantKeys(t *testing.T, want []K) { + t.Helper() + got := c.Keys() + if !reflect.DeepEqual(got, want) { + t.Errorf("wrong keys got: %v, want: %v ", got, want) + } +} + +func TestCache_EvictionSameKey(t *testing.T) { + var evictedKeys []int + + cache := NewLRU[int, struct{}]( + 2, + func(key int, _ struct{}) { + evictedKeys = append(evictedKeys, key) + }, + 0) + + if evicted := cache.Add(1, struct{}{}); evicted { + t.Error("First 1: got unexpected eviction") + } + cache.wantKeys(t, []int{1}) + + if evicted := cache.Add(2, struct{}{}); evicted { + t.Error("2: got unexpected eviction") + } + cache.wantKeys(t, []int{1, 2}) + + if evicted := cache.Add(1, struct{}{}); evicted { + t.Error("Second 1: got unexpected eviction") + } + cache.wantKeys(t, []int{2, 1}) + + if evicted := cache.Add(3, struct{}{}); !evicted { + t.Error("3: did not get expected eviction") + } + cache.wantKeys(t, []int{1, 3}) + + want := []int{2} + if !reflect.DeepEqual(evictedKeys, want) { + t.Errorf("evictedKeys got: %v want: %v", evictedKeys, want) + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/go.mod b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/go.mod new file mode 100644 index 0000000..8aaa473 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/golang-lru/v2 + +go 1.18 diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/internal/list.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/internal/list.go new file mode 100644 index 0000000..5cd74a0 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/internal/list.go @@ -0,0 +1,142 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE_list file. + +package internal + +import "time" + +// Entry is an LRU Entry +type Entry[K comparable, V any] struct { + // Next and previous pointers in the doubly-linked list of elements. + // To simplify the implementation, internally a list l is implemented + // as a ring, such that &l.root is both the next element of the last + // list element (l.Back()) and the previous element of the first list + // element (l.Front()). + next, prev *Entry[K, V] + + // The list to which this element belongs. + list *LruList[K, V] + + // The LRU Key of this element. + Key K + + // The Value stored with this element. + Value V + + // The time this element would be cleaned up, optional + ExpiresAt time.Time + + // The expiry bucket item was put in, optional + ExpireBucket uint8 +} + +// PrevEntry returns the previous list element or nil. +func (e *Entry[K, V]) PrevEntry() *Entry[K, V] { + if p := e.prev; e.list != nil && p != &e.list.root { + return p + } + return nil +} + +// LruList represents a doubly linked list. +// The zero Value for LruList is an empty list ready to use. +type LruList[K comparable, V any] struct { + root Entry[K, V] // sentinel list element, only &root, root.prev, and root.next are used + len int // current list Length excluding (this) sentinel element +} + +// Init initializes or clears list l. +func (l *LruList[K, V]) Init() *LruList[K, V] { + l.root.next = &l.root + l.root.prev = &l.root + l.len = 0 + return l +} + +// NewList returns an initialized list. +func NewList[K comparable, V any]() *LruList[K, V] { return new(LruList[K, V]).Init() } + +// Length returns the number of elements of list l. +// The complexity is O(1). +func (l *LruList[K, V]) Length() int { return l.len } + +// Back returns the last element of list l or nil if the list is empty. +func (l *LruList[K, V]) Back() *Entry[K, V] { + if l.len == 0 { + return nil + } + return l.root.prev +} + +// lazyInit lazily initializes a zero List Value. +func (l *LruList[K, V]) lazyInit() { + if l.root.next == nil { + l.Init() + } +} + +// insert inserts e after at, increments l.len, and returns e. +func (l *LruList[K, V]) insert(e, at *Entry[K, V]) *Entry[K, V] { + e.prev = at + e.next = at.next + e.prev.next = e + e.next.prev = e + e.list = l + l.len++ + return e +} + +// insertValue is a convenience wrapper for insert(&Entry{Value: v, ExpiresAt: ExpiresAt}, at). +func (l *LruList[K, V]) insertValue(k K, v V, expiresAt time.Time, at *Entry[K, V]) *Entry[K, V] { + return l.insert(&Entry[K, V]{Value: v, Key: k, ExpiresAt: expiresAt}, at) +} + +// Remove removes e from its list, decrements l.len +func (l *LruList[K, V]) Remove(e *Entry[K, V]) V { + e.prev.next = e.next + e.next.prev = e.prev + e.next = nil // avoid memory leaks + e.prev = nil // avoid memory leaks + e.list = nil + l.len-- + + return e.Value +} + +// move moves e to next to at. +func (l *LruList[K, V]) move(e, at *Entry[K, V]) { + if e == at { + return + } + e.prev.next = e.next + e.next.prev = e.prev + + e.prev = at + e.next = at.next + e.prev.next = e + e.next.prev = e +} + +// PushFront inserts a new element e with value v at the front of list l and returns e. +func (l *LruList[K, V]) PushFront(k K, v V) *Entry[K, V] { + l.lazyInit() + return l.insertValue(k, v, time.Time{}, &l.root) +} + +// PushFrontExpirable inserts a new expirable element e with Value v at the front of list l and returns e. +func (l *LruList[K, V]) PushFrontExpirable(k K, v V, expiresAt time.Time) *Entry[K, V] { + l.lazyInit() + return l.insertValue(k, v, expiresAt, &l.root) +} + +// MoveToFront moves element e to the front of list l. +// If e is not an element of l, the list is not modified. +// The element must not be nil. +func (l *LruList[K, V]) MoveToFront(e *Entry[K, V]) { + if e.list != l || l.root.next == e { + return + } + // see comment in List.Remove about initialization of l + l.move(e, &l.root) +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/lru.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/lru.go new file mode 100644 index 0000000..a2655f1 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/lru.go @@ -0,0 +1,250 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package lru + +import ( + "sync" + + "github.com/hashicorp/golang-lru/v2/simplelru" +) + +const ( + // DefaultEvictedBufferSize defines the default buffer size to store evicted key/val + DefaultEvictedBufferSize = 16 +) + +// Cache is a thread-safe fixed size LRU cache. +type Cache[K comparable, V any] struct { + lru *simplelru.LRU[K, V] + evictedKeys []K + evictedVals []V + onEvictedCB func(k K, v V) + lock sync.RWMutex +} + +// New creates an LRU of the given size. +func New[K comparable, V any](size int) (*Cache[K, V], error) { + return NewWithEvict[K, V](size, nil) +} + +// NewWithEvict constructs a fixed size cache with the given eviction +// callback. +func NewWithEvict[K comparable, V any](size int, onEvicted func(key K, value V)) (c *Cache[K, V], err error) { + // create a cache with default settings + c = &Cache[K, V]{ + onEvictedCB: onEvicted, + } + if onEvicted != nil { + c.initEvictBuffers() + onEvicted = c.onEvicted + } + c.lru, err = simplelru.NewLRU(size, onEvicted) + return +} + +func (c *Cache[K, V]) initEvictBuffers() { + c.evictedKeys = make([]K, 0, DefaultEvictedBufferSize) + c.evictedVals = make([]V, 0, DefaultEvictedBufferSize) +} + +// onEvicted save evicted key/val and sent in externally registered callback +// outside of critical section +func (c *Cache[K, V]) onEvicted(k K, v V) { + c.evictedKeys = append(c.evictedKeys, k) + c.evictedVals = append(c.evictedVals, v) +} + +// Purge is used to completely clear the cache. +func (c *Cache[K, V]) Purge() { + var ks []K + var vs []V + c.lock.Lock() + c.lru.Purge() + if c.onEvictedCB != nil && len(c.evictedKeys) > 0 { + ks, vs = c.evictedKeys, c.evictedVals + c.initEvictBuffers() + } + c.lock.Unlock() + // invoke callback outside of critical section + if c.onEvictedCB != nil { + for i := 0; i < len(ks); i++ { + c.onEvictedCB(ks[i], vs[i]) + } + } +} + +// Add adds a value to the cache. Returns true if an eviction occurred. +func (c *Cache[K, V]) Add(key K, value V) (evicted bool) { + var k K + var v V + c.lock.Lock() + evicted = c.lru.Add(key, value) + if c.onEvictedCB != nil && evicted { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } + c.lock.Unlock() + if c.onEvictedCB != nil && evicted { + c.onEvictedCB(k, v) + } + return +} + +// Get looks up a key's value from the cache. +func (c *Cache[K, V]) Get(key K) (value V, ok bool) { + c.lock.Lock() + value, ok = c.lru.Get(key) + c.lock.Unlock() + return value, ok +} + +// Contains checks if a key is in the cache, without updating the +// recent-ness or deleting it for being stale. +func (c *Cache[K, V]) Contains(key K) bool { + c.lock.RLock() + containKey := c.lru.Contains(key) + c.lock.RUnlock() + return containKey +} + +// Peek returns the key value (or undefined if not found) without updating +// the "recently used"-ness of the key. +func (c *Cache[K, V]) Peek(key K) (value V, ok bool) { + c.lock.RLock() + value, ok = c.lru.Peek(key) + c.lock.RUnlock() + return value, ok +} + +// ContainsOrAdd checks if a key is in the cache without updating the +// recent-ness or deleting it for being stale, and if not, adds the value. +// Returns whether found and whether an eviction occurred. +func (c *Cache[K, V]) ContainsOrAdd(key K, value V) (ok, evicted bool) { + var k K + var v V + c.lock.Lock() + if c.lru.Contains(key) { + c.lock.Unlock() + return true, false + } + evicted = c.lru.Add(key, value) + if c.onEvictedCB != nil && evicted { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } + c.lock.Unlock() + if c.onEvictedCB != nil && evicted { + c.onEvictedCB(k, v) + } + return false, evicted +} + +// PeekOrAdd checks if a key is in the cache without updating the +// recent-ness or deleting it for being stale, and if not, adds the value. +// Returns whether found and whether an eviction occurred. +func (c *Cache[K, V]) PeekOrAdd(key K, value V) (previous V, ok, evicted bool) { + var k K + var v V + c.lock.Lock() + previous, ok = c.lru.Peek(key) + if ok { + c.lock.Unlock() + return previous, true, false + } + evicted = c.lru.Add(key, value) + if c.onEvictedCB != nil && evicted { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } + c.lock.Unlock() + if c.onEvictedCB != nil && evicted { + c.onEvictedCB(k, v) + } + return +} + +// Remove removes the provided key from the cache. +func (c *Cache[K, V]) Remove(key K) (present bool) { + var k K + var v V + c.lock.Lock() + present = c.lru.Remove(key) + if c.onEvictedCB != nil && present { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } + c.lock.Unlock() + if c.onEvictedCB != nil && present { + c.onEvictedCB(k, v) + } + return +} + +// Resize changes the cache size. +func (c *Cache[K, V]) Resize(size int) (evicted int) { + var ks []K + var vs []V + c.lock.Lock() + evicted = c.lru.Resize(size) + if c.onEvictedCB != nil && evicted > 0 { + ks, vs = c.evictedKeys, c.evictedVals + c.initEvictBuffers() + } + c.lock.Unlock() + if c.onEvictedCB != nil && evicted > 0 { + for i := 0; i < len(ks); i++ { + c.onEvictedCB(ks[i], vs[i]) + } + } + return evicted +} + +// RemoveOldest removes the oldest item from the cache. +func (c *Cache[K, V]) RemoveOldest() (key K, value V, ok bool) { + var k K + var v V + c.lock.Lock() + key, value, ok = c.lru.RemoveOldest() + if c.onEvictedCB != nil && ok { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } + c.lock.Unlock() + if c.onEvictedCB != nil && ok { + c.onEvictedCB(k, v) + } + return +} + +// GetOldest returns the oldest entry +func (c *Cache[K, V]) GetOldest() (key K, value V, ok bool) { + c.lock.RLock() + key, value, ok = c.lru.GetOldest() + c.lock.RUnlock() + return +} + +// Keys returns a slice of the keys in the cache, from oldest to newest. +func (c *Cache[K, V]) Keys() []K { + c.lock.RLock() + keys := c.lru.Keys() + c.lock.RUnlock() + return keys +} + +// Values returns a slice of the values in the cache, from oldest to newest. +func (c *Cache[K, V]) Values() []V { + c.lock.RLock() + values := c.lru.Values() + c.lock.RUnlock() + return values +} + +// Len returns the number of items in the cache. +func (c *Cache[K, V]) Len() int { + c.lock.RLock() + length := c.lru.Len() + c.lock.RUnlock() + return length +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/lru_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/lru_test.go new file mode 100644 index 0000000..36cbfff --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/lru_test.go @@ -0,0 +1,443 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package lru + +import ( + "reflect" + "testing" +) + +func BenchmarkLRU_Rand(b *testing.B) { + l, err := New[int64, int64](8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + trace[i] = getRand(b) % 32768 + } + + b.ResetTimer() + + var hit, miss int + for i := 0; i < 2*b.N; i++ { + if i%2 == 0 { + l.Add(trace[i], trace[i]) + } else { + if _, ok := l.Get(trace[i]); ok { + hit++ + } else { + miss++ + } + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss)) +} + +func BenchmarkLRU_Freq(b *testing.B) { + l, err := New[int64, int64](8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + if i%2 == 0 { + trace[i] = getRand(b) % 16384 + } else { + trace[i] = getRand(b) % 32768 + } + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + l.Add(trace[i], trace[i]) + } + var hit, miss int + for i := 0; i < b.N; i++ { + if _, ok := l.Get(trace[i]); ok { + hit++ + } else { + miss++ + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss)) +} + +func TestLRU(t *testing.T) { + evictCounter := 0 + onEvicted := func(k int, v int) { + if k != v { + t.Fatalf("Evict values not equal (%v!=%v)", k, v) + } + evictCounter++ + } + l, err := NewWithEvict(128, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + for i := 0; i < 256; i++ { + l.Add(i, i) + } + if l.Len() != 128 { + t.Fatalf("bad len: %v", l.Len()) + } + + if evictCounter != 128 { + t.Fatalf("bad evict count: %v", evictCounter) + } + + for i, k := range l.Keys() { + if v, ok := l.Get(k); !ok || v != k || v != i+128 { + t.Fatalf("bad key: %v", k) + } + } + for i, v := range l.Values() { + if v != i+128 { + t.Fatalf("bad value: %v", v) + } + } + for i := 0; i < 128; i++ { + if _, ok := l.Get(i); ok { + t.Fatalf("should be evicted") + } + } + for i := 128; i < 256; i++ { + if _, ok := l.Get(i); !ok { + t.Fatalf("should not be evicted") + } + } + for i := 128; i < 192; i++ { + l.Remove(i) + if _, ok := l.Get(i); ok { + t.Fatalf("should be deleted") + } + } + + l.Get(192) // expect 192 to be last key in l.Keys() + + for i, k := range l.Keys() { + if (i < 63 && k != i+193) || (i == 63 && k != 192) { + t.Fatalf("out of order key: %v", k) + } + } + + l.Purge() + if l.Len() != 0 { + t.Fatalf("bad len: %v", l.Len()) + } + if _, ok := l.Get(200); ok { + t.Fatalf("should contain nothing") + } +} + +// test that Add returns true/false if an eviction occurred +func TestLRUAdd(t *testing.T) { + evictCounter := 0 + onEvicted := func(k int, v int) { + evictCounter++ + } + + l, err := NewWithEvict(1, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + if l.Add(1, 1) == true || evictCounter != 0 { + t.Errorf("should not have an eviction") + } + if l.Add(2, 2) == false || evictCounter != 1 { + t.Errorf("should have an eviction") + } +} + +// test that Contains doesn't update recent-ness +func TestLRUContains(t *testing.T) { + l, err := New[int, int](2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if !l.Contains(1) { + t.Errorf("1 should be contained") + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Contains should not have updated recent-ness of 1") + } +} + +// test that ContainsOrAdd doesn't update recent-ness +func TestLRUContainsOrAdd(t *testing.T) { + l, err := New[int, int](2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + contains, evict := l.ContainsOrAdd(1, 1) + if !contains { + t.Errorf("1 should be contained") + } + if evict { + t.Errorf("nothing should be evicted here") + } + + l.Add(3, 3) + contains, evict = l.ContainsOrAdd(1, 1) + if contains { + t.Errorf("1 should not have been contained") + } + if !evict { + t.Errorf("an eviction should have occurred") + } + if !l.Contains(1) { + t.Errorf("now 1 should be contained") + } +} + +// test that PeekOrAdd doesn't update recent-ness +func TestLRUPeekOrAdd(t *testing.T) { + l, err := New[int, int](2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + previous, contains, evict := l.PeekOrAdd(1, 1) + if !contains { + t.Errorf("1 should be contained") + } + if evict { + t.Errorf("nothing should be evicted here") + } + if previous != 1 { + t.Errorf("previous is not equal to 1") + } + + l.Add(3, 3) + contains, evict = l.ContainsOrAdd(1, 1) + if contains { + t.Errorf("1 should not have been contained") + } + if !evict { + t.Errorf("an eviction should have occurred") + } + if !l.Contains(1) { + t.Errorf("now 1 should be contained") + } +} + +// test that Peek doesn't update recent-ness +func TestLRUPeek(t *testing.T) { + l, err := New[int, int](2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if v, ok := l.Peek(1); !ok || v != 1 { + t.Errorf("1 should be set to 1: %v, %v", v, ok) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("should not have updated recent-ness of 1") + } +} + +// test that Resize can upsize and downsize +func TestLRUResize(t *testing.T) { + onEvictCounter := 0 + onEvicted := func(k int, v int) { + onEvictCounter++ + } + l, err := NewWithEvict(2, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Downsize + l.Add(1, 1) + l.Add(2, 2) + evicted := l.Resize(1) + if evicted != 1 { + t.Errorf("1 element should have been evicted: %v", evicted) + } + if onEvictCounter != 1 { + t.Errorf("onEvicted should have been called 1 time: %v", onEvictCounter) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Element 1 should have been evicted") + } + + // Upsize + evicted = l.Resize(2) + if evicted != 0 { + t.Errorf("0 elements should have been evicted: %v", evicted) + } + + l.Add(4, 4) + if !l.Contains(3) || !l.Contains(4) { + t.Errorf("Cache should have contained 2 elements") + } +} + +func (c *Cache[K, V]) wantKeys(t *testing.T, want []K) { + t.Helper() + got := c.Keys() + if !reflect.DeepEqual(got, want) { + t.Errorf("wrong keys got: %v, want: %v ", got, want) + } +} + +func TestCache_EvictionSameKey(t *testing.T) { + t.Run("Add", func(t *testing.T) { + var evictedKeys []int + + cache, _ := NewWithEvict( + 2, + func(key int, _ struct{}) { + evictedKeys = append(evictedKeys, key) + }) + + if evicted := cache.Add(1, struct{}{}); evicted { + t.Error("First 1: got unexpected eviction") + } + cache.wantKeys(t, []int{1}) + + if evicted := cache.Add(2, struct{}{}); evicted { + t.Error("2: got unexpected eviction") + } + cache.wantKeys(t, []int{1, 2}) + + if evicted := cache.Add(1, struct{}{}); evicted { + t.Error("Second 1: got unexpected eviction") + } + cache.wantKeys(t, []int{2, 1}) + + if evicted := cache.Add(3, struct{}{}); !evicted { + t.Error("3: did not get expected eviction") + } + cache.wantKeys(t, []int{1, 3}) + + want := []int{2} + if !reflect.DeepEqual(evictedKeys, want) { + t.Errorf("evictedKeys got: %v want: %v", evictedKeys, want) + } + }) + + t.Run("ContainsOrAdd", func(t *testing.T) { + var evictedKeys []int + + cache, _ := NewWithEvict( + 2, + func(key int, _ struct{}) { + evictedKeys = append(evictedKeys, key) + }) + + contained, evicted := cache.ContainsOrAdd(1, struct{}{}) + if contained { + t.Error("First 1: got unexpected contained") + } + if evicted { + t.Error("First 1: got unexpected eviction") + } + cache.wantKeys(t, []int{1}) + + contained, evicted = cache.ContainsOrAdd(2, struct{}{}) + if contained { + t.Error("2: got unexpected contained") + } + if evicted { + t.Error("2: got unexpected eviction") + } + cache.wantKeys(t, []int{1, 2}) + + contained, evicted = cache.ContainsOrAdd(1, struct{}{}) + if !contained { + t.Error("Second 1: did not get expected contained") + } + if evicted { + t.Error("Second 1: got unexpected eviction") + } + cache.wantKeys(t, []int{1, 2}) + + contained, evicted = cache.ContainsOrAdd(3, struct{}{}) + if contained { + t.Error("3: got unexpected contained") + } + if !evicted { + t.Error("3: did not get expected eviction") + } + cache.wantKeys(t, []int{2, 3}) + + want := []int{1} + if !reflect.DeepEqual(evictedKeys, want) { + t.Errorf("evictedKeys got: %v want: %v", evictedKeys, want) + } + }) + + t.Run("PeekOrAdd", func(t *testing.T) { + var evictedKeys []int + + cache, _ := NewWithEvict( + 2, + func(key int, _ struct{}) { + evictedKeys = append(evictedKeys, key) + }) + + _, contained, evicted := cache.PeekOrAdd(1, struct{}{}) + if contained { + t.Error("First 1: got unexpected contained") + } + if evicted { + t.Error("First 1: got unexpected eviction") + } + cache.wantKeys(t, []int{1}) + + _, contained, evicted = cache.PeekOrAdd(2, struct{}{}) + if contained { + t.Error("2: got unexpected contained") + } + if evicted { + t.Error("2: got unexpected eviction") + } + cache.wantKeys(t, []int{1, 2}) + + _, contained, evicted = cache.PeekOrAdd(1, struct{}{}) + if !contained { + t.Error("Second 1: did not get expected contained") + } + if evicted { + t.Error("Second 1: got unexpected eviction") + } + cache.wantKeys(t, []int{1, 2}) + + _, contained, evicted = cache.PeekOrAdd(3, struct{}{}) + if contained { + t.Error("3: got unexpected contained") + } + if !evicted { + t.Error("3: did not get expected eviction") + } + cache.wantKeys(t, []int{2, 3}) + + want := []int{1} + if !reflect.DeepEqual(evictedKeys, want) { + t.Errorf("evictedKeys got: %v want: %v", evictedKeys, want) + } + }) +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/LICENSE_list b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/LICENSE_list new file mode 100644 index 0000000..c4764e6 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/LICENSE_list @@ -0,0 +1,29 @@ +This license applies to simplelru/list.go + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru.go new file mode 100644 index 0000000..f697923 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru.go @@ -0,0 +1,177 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package simplelru + +import ( + "errors" + + "github.com/hashicorp/golang-lru/v2/internal" +) + +// EvictCallback is used to get a callback when a cache entry is evicted +type EvictCallback[K comparable, V any] func(key K, value V) + +// LRU implements a non-thread safe fixed size LRU cache +type LRU[K comparable, V any] struct { + size int + evictList *internal.LruList[K, V] + items map[K]*internal.Entry[K, V] + onEvict EvictCallback[K, V] +} + +// NewLRU constructs an LRU of the given size +func NewLRU[K comparable, V any](size int, onEvict EvictCallback[K, V]) (*LRU[K, V], error) { + if size <= 0 { + return nil, errors.New("must provide a positive size") + } + + c := &LRU[K, V]{ + size: size, + evictList: internal.NewList[K, V](), + items: make(map[K]*internal.Entry[K, V]), + onEvict: onEvict, + } + return c, nil +} + +// Purge is used to completely clear the cache. +func (c *LRU[K, V]) Purge() { + for k, v := range c.items { + if c.onEvict != nil { + c.onEvict(k, v.Value) + } + delete(c.items, k) + } + c.evictList.Init() +} + +// Add adds a value to the cache. Returns true if an eviction occurred. +func (c *LRU[K, V]) Add(key K, value V) (evicted bool) { + // Check for existing item + if ent, ok := c.items[key]; ok { + c.evictList.MoveToFront(ent) + ent.Value = value + return false + } + + // Add new item + ent := c.evictList.PushFront(key, value) + c.items[key] = ent + + evict := c.evictList.Length() > c.size + // Verify size not exceeded + if evict { + c.removeOldest() + } + return evict +} + +// Get looks up a key's value from the cache. +func (c *LRU[K, V]) Get(key K) (value V, ok bool) { + if ent, ok := c.items[key]; ok { + c.evictList.MoveToFront(ent) + return ent.Value, true + } + return +} + +// Contains checks if a key is in the cache, without updating the recent-ness +// or deleting it for being stale. +func (c *LRU[K, V]) Contains(key K) (ok bool) { + _, ok = c.items[key] + return ok +} + +// Peek returns the key value (or undefined if not found) without updating +// the "recently used"-ness of the key. +func (c *LRU[K, V]) Peek(key K) (value V, ok bool) { + var ent *internal.Entry[K, V] + if ent, ok = c.items[key]; ok { + return ent.Value, true + } + return +} + +// Remove removes the provided key from the cache, returning if the +// key was contained. +func (c *LRU[K, V]) Remove(key K) (present bool) { + if ent, ok := c.items[key]; ok { + c.removeElement(ent) + return true + } + return false +} + +// RemoveOldest removes the oldest item from the cache. +func (c *LRU[K, V]) RemoveOldest() (key K, value V, ok bool) { + if ent := c.evictList.Back(); ent != nil { + c.removeElement(ent) + return ent.Key, ent.Value, true + } + return +} + +// GetOldest returns the oldest entry +func (c *LRU[K, V]) GetOldest() (key K, value V, ok bool) { + if ent := c.evictList.Back(); ent != nil { + return ent.Key, ent.Value, true + } + return +} + +// Keys returns a slice of the keys in the cache, from oldest to newest. +func (c *LRU[K, V]) Keys() []K { + keys := make([]K, c.evictList.Length()) + i := 0 + for ent := c.evictList.Back(); ent != nil; ent = ent.PrevEntry() { + keys[i] = ent.Key + i++ + } + return keys +} + +// Values returns a slice of the values in the cache, from oldest to newest. +func (c *LRU[K, V]) Values() []V { + values := make([]V, len(c.items)) + i := 0 + for ent := c.evictList.Back(); ent != nil; ent = ent.PrevEntry() { + values[i] = ent.Value + i++ + } + return values +} + +// Len returns the number of items in the cache. +func (c *LRU[K, V]) Len() int { + return c.evictList.Length() +} + +// Resize changes the cache size. +func (c *LRU[K, V]) Resize(size int) (evicted int) { + diff := c.Len() - size + if diff < 0 { + diff = 0 + } + for i := 0; i < diff; i++ { + c.removeOldest() + } + c.size = size + return diff +} + +// removeOldest removes the oldest item from the cache. +func (c *LRU[K, V]) removeOldest() { + if ent := c.evictList.Back(); ent != nil { + c.removeElement(ent) + } +} + +// removeElement is used to remove a given list element from the cache +func (c *LRU[K, V]) removeElement(e *internal.Entry[K, V]) { + c.evictList.Remove(e) + delete(c.items, e.Key) + if c.onEvict != nil { + c.onEvict(e.Key, e.Value) + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru_interface.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru_interface.go new file mode 100644 index 0000000..043b8bc --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru_interface.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Package simplelru provides simple LRU implementation based on build-in container/list. +package simplelru + +// LRUCache is the interface for simple LRU cache. +type LRUCache[K comparable, V any] interface { + // Adds a value to the cache, returns true if an eviction occurred and + // updates the "recently used"-ness of the key. + Add(key K, value V) bool + + // Returns key's value from the cache and + // updates the "recently used"-ness of the key. #value, isFound + Get(key K) (value V, ok bool) + + // Checks if a key exists in cache without updating the recent-ness. + Contains(key K) (ok bool) + + // Returns key's value without updating the "recently used"-ness of the key. + Peek(key K) (value V, ok bool) + + // Removes a key from the cache. + Remove(key K) bool + + // Removes the oldest entry from cache. + RemoveOldest() (K, V, bool) + + // Returns the oldest entry from the cache. #key, value, isFound + GetOldest() (K, V, bool) + + // Returns a slice of the keys in the cache, from oldest to newest. + Keys() []K + + // Values returns a slice of the values in the cache, from oldest to newest. + Values() []V + + // Returns the number of items in the cache. + Len() int + + // Clears all cache entries. + Purge() + + // Resizes cache, returning number evicted + Resize(int) int +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru_test.go new file mode 100644 index 0000000..19a8fac --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/simplelru/lru_test.go @@ -0,0 +1,255 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package simplelru + +import ( + "reflect" + "testing" +) + +func TestLRU(t *testing.T) { + evictCounter := 0 + onEvicted := func(k int, v int) { + if k != v { + t.Fatalf("Evict values not equal (%v!=%v)", k, v) + } + evictCounter++ + } + l, err := NewLRU(128, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + for i := 0; i < 256; i++ { + l.Add(i, i) + } + if l.Len() != 128 { + t.Fatalf("bad len: %v", l.Len()) + } + + if evictCounter != 128 { + t.Fatalf("bad evict count: %v", evictCounter) + } + + for i, k := range l.Keys() { + if v, ok := l.Get(k); !ok || v != k || v != i+128 { + t.Fatalf("bad key: %v", k) + } + } + for i, v := range l.Values() { + if v != i+128 { + t.Fatalf("bad value: %v", v) + } + } + for i := 0; i < 128; i++ { + if _, ok := l.Get(i); ok { + t.Fatalf("should be evicted") + } + } + for i := 128; i < 256; i++ { + if _, ok := l.Get(i); !ok { + t.Fatalf("should not be evicted") + } + } + for i := 128; i < 192; i++ { + if ok := l.Remove(i); !ok { + t.Fatalf("should be contained") + } + if ok := l.Remove(i); ok { + t.Fatalf("should not be contained") + } + if _, ok := l.Get(i); ok { + t.Fatalf("should be deleted") + } + } + + l.Get(192) // expect 192 to be last key in l.Keys() + + for i, k := range l.Keys() { + if (i < 63 && k != i+193) || (i == 63 && k != 192) { + t.Fatalf("out of order key: %v", k) + } + } + + l.Purge() + if l.Len() != 0 { + t.Fatalf("bad len: %v", l.Len()) + } + if _, ok := l.Get(200); ok { + t.Fatalf("should contain nothing") + } +} + +func TestLRU_GetOldest_RemoveOldest(t *testing.T) { + l, err := NewLRU[int, int](128, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + for i := 0; i < 256; i++ { + l.Add(i, i) + } + k, _, ok := l.GetOldest() + if !ok { + t.Fatalf("missing") + } + if k != 128 { + t.Fatalf("bad: %v", k) + } + + k, _, ok = l.RemoveOldest() + if !ok { + t.Fatalf("missing") + } + if k != 128 { + t.Fatalf("bad: %v", k) + } + + k, _, ok = l.RemoveOldest() + if !ok { + t.Fatalf("missing") + } + if k != 129 { + t.Fatalf("bad: %v", k) + } +} + +// Test that Add returns true/false if an eviction occurred +func TestLRU_Add(t *testing.T) { + evictCounter := 0 + onEvicted := func(k int, v int) { + evictCounter++ + } + + l, err := NewLRU(1, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + if l.Add(1, 1) == true || evictCounter != 0 { + t.Errorf("should not have an eviction") + } + if l.Add(2, 2) == false || evictCounter != 1 { + t.Errorf("should have an eviction") + } +} + +// Test that Contains doesn't update recent-ness +func TestLRU_Contains(t *testing.T) { + l, err := NewLRU[int, int](2, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if !l.Contains(1) { + t.Errorf("1 should be contained") + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Contains should not have updated recent-ness of 1") + } +} + +// Test that Peek doesn't update recent-ness +func TestLRU_Peek(t *testing.T) { + l, err := NewLRU[int, int](2, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if v, ok := l.Peek(1); !ok || v != 1 { + t.Errorf("1 should be set to 1: %v, %v", v, ok) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("should not have updated recent-ness of 1") + } +} + +// Test that Resize can upsize and downsize +func TestLRU_Resize(t *testing.T) { + onEvictCounter := 0 + onEvicted := func(k int, v int) { + onEvictCounter++ + } + l, err := NewLRU(2, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Downsize + l.Add(1, 1) + l.Add(2, 2) + evicted := l.Resize(1) + if evicted != 1 { + t.Errorf("1 element should have been evicted: %v", evicted) + } + if onEvictCounter != 1 { + t.Errorf("onEvicted should have been called 1 time: %v", onEvictCounter) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Element 1 should have been evicted") + } + + // Upsize + evicted = l.Resize(2) + if evicted != 0 { + t.Errorf("0 elements should have been evicted: %v", evicted) + } + + l.Add(4, 4) + if !l.Contains(3) || !l.Contains(4) { + t.Errorf("Cache should have contained 2 elements") + } +} + +func (c *LRU[K, V]) wantKeys(t *testing.T, want []K) { + t.Helper() + got := c.Keys() + if !reflect.DeepEqual(got, want) { + t.Errorf("wrong keys got: %v, want: %v ", got, want) + } +} + +func TestCache_EvictionSameKey(t *testing.T) { + var evictedKeys []int + + cache, _ := NewLRU( + 2, + func(key int, _ struct{}) { + evictedKeys = append(evictedKeys, key) + }) + + if evicted := cache.Add(1, struct{}{}); evicted { + t.Error("First 1: got unexpected eviction") + } + cache.wantKeys(t, []int{1}) + + if evicted := cache.Add(2, struct{}{}); evicted { + t.Error("2: got unexpected eviction") + } + cache.wantKeys(t, []int{1, 2}) + + if evicted := cache.Add(1, struct{}{}); evicted { + t.Error("Second 1: got unexpected eviction") + } + cache.wantKeys(t, []int{2, 1}) + + if evicted := cache.Add(3, struct{}{}); !evicted { + t.Error("3: did not get expected eviction") + } + cache.wantKeys(t, []int{1, 3}) + + want := []int{2} + if !reflect.DeepEqual(evictedKeys, want) { + t.Errorf("evictedKeys got: %v want: %v", evictedKeys, want) + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/testing_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/testing_test.go new file mode 100644 index 0000000..3277c21 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/hashicorp/golang-lru/v2/testing_test.go @@ -0,0 +1,19 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package lru + +import ( + "crypto/rand" + "math" + "math/big" + "testing" +) + +func getRand(tb testing.TB) int64 { + out, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64)) + if err != nil { + tb.Fatal(err) + } + return out.Int64() +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/huandu/xstrings/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/huandu/xstrings/LICENSE new file mode 100644 index 0000000..2701772 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/huandu/xstrings/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Huan Du + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/invopop/jsonschema/COPYING b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/invopop/jsonschema/COPYING new file mode 100644 index 0000000..2993ec0 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/invopop/jsonschema/COPYING @@ -0,0 +1,19 @@ +Copyright (C) 2014 Alec Thomas + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/LICENSE new file mode 100644 index 0000000..87d5574 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/LICENSE @@ -0,0 +1,304 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2019 Klaus Post. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------ + +Files: gzhttp/* + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016-2017 The New York Times Company + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +------------------ + +Files: s2/cmd/internal/readahead/* + +The MIT License (MIT) + +Copyright (c) 2015 Klaus Post + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--------------------- +Files: snappy/* +Files: internal/snapref/* + +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----------------- + +Files: s2/cmd/internal/filepathx/* + +Copyright 2016 The filepathx Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/internal/snapref/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/internal/snapref/LICENSE new file mode 100644 index 0000000..6050c10 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/internal/snapref/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/s2/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/s2/LICENSE new file mode 100644 index 0000000..1d2d645 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/s2/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. +Copyright (c) 2019 Klaus Post. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt new file mode 100644 index 0000000..24b5306 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2016 Caleb Spare + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/pgzip/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/pgzip/LICENSE new file mode 100644 index 0000000..2bdc0d7 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/klauspost/pgzip/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 Klaus Post + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ktr0731/go-ansisgr/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ktr0731/go-ansisgr/LICENSE new file mode 100644 index 0000000..4b9a5ab --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ktr0731/go-ansisgr/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 ktr + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ktr0731/go-fuzzyfinder/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ktr0731/go-fuzzyfinder/LICENSE new file mode 100644 index 0000000..2591bc9 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ktr0731/go-fuzzyfinder/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019-2021 ktr0731 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/lmittmann/tint/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/lmittmann/tint/LICENSE new file mode 100644 index 0000000..3f49589 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/lmittmann/tint/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 lmittmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/lucasb-eyer/go-colorful/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/lucasb-eyer/go-colorful/LICENSE new file mode 100644 index 0000000..4e402a0 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/lucasb-eyer/go-colorful/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2013 Lucas Beyer + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mailru/easyjson/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mailru/easyjson/LICENSE new file mode 100644 index 0000000..fbff658 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mailru/easyjson/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2016 Mail.Ru Group + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-colorable/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-colorable/LICENSE new file mode 100644 index 0000000..91b5cef --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-colorable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-isatty/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-isatty/LICENSE new file mode 100644 index 0000000..65dc692 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-isatty/LICENSE @@ -0,0 +1,9 @@ +Copyright (c) Yasuhiro MATSUMOTO + +MIT License (Expat) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-runewidth/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-runewidth/LICENSE new file mode 100644 index 0000000..91b5cef --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mattn/go-runewidth/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mholt/archives/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mholt/archives/LICENSE new file mode 100644 index 0000000..315d04f --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mholt/archives/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Matthew Holt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mikelolasagasti/xz/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mikelolasagasti/xz/LICENSE new file mode 100644 index 0000000..3e77abf --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mikelolasagasti/xz/LICENSE @@ -0,0 +1,12 @@ +Copyright (C) 2015-2017 Michael Cross + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/minio/minlz/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/minio/minlz/LICENSE new file mode 100644 index 0000000..a1482d9 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/minio/minlz/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/colorstring/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/colorstring/LICENSE new file mode 100644 index 0000000..2298515 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/colorstring/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/copystructure/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/copystructure/LICENSE new file mode 100644 index 0000000..2298515 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/copystructure/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/reflectwalk/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/reflectwalk/LICENSE new file mode 100644 index 0000000..f9c841a --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/mitchellh/reflectwalk/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/nsf/termbox-go/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/nsf/termbox-go/LICENSE new file mode 100644 index 0000000..d9bc068 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/nsf/termbox-go/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012 termbox-go authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/nwaples/rardecode/v2/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/nwaples/rardecode/v2/LICENSE new file mode 100644 index 0000000..0050f92 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/nwaples/rardecode/v2/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2015, Nicholas Waples +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/otiai10/copy/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/otiai10/copy/LICENSE new file mode 100644 index 0000000..1f0cc5d --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/otiai10/copy/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 otiai10 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/pierrec/lz4/v4/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/pierrec/lz4/v4/LICENSE new file mode 100644 index 0000000..bd899d8 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/pierrec/lz4/v4/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2015, Pierre Curto +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of xxHash nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/pkg/errors/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/pkg/errors/LICENSE new file mode 100644 index 0000000..835ba3e --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/pkg/errors/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2015, Dave Cheney +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/rivo/uniseg/LICENSE.txt b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/rivo/uniseg/LICENSE.txt new file mode 100644 index 0000000..5040f1e --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/rivo/uniseg/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Oliver Kuederle + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/schollz/progressbar/v3/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/schollz/progressbar/v3/LICENSE new file mode 100644 index 0000000..0ca9765 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/schollz/progressbar/v3/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Zack + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/shopspring/decimal/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/shopspring/decimal/LICENSE new file mode 100644 index 0000000..ad2148a --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/shopspring/decimal/LICENSE @@ -0,0 +1,45 @@ +The MIT License (MIT) + +Copyright (c) 2015 Spring, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +- Based on https://github.com/oguzbilgic/fpd, which has the following license: +""" +The MIT License (MIT) + +Copyright (c) 2013 Oguz Bilgic + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/sorairolake/lzip-go/LICENSE-APACHE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/sorairolake/lzip-go/LICENSE-APACHE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/sorairolake/lzip-go/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/spf13/afero/LICENSE.txt b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/spf13/afero/LICENSE.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/spf13/afero/LICENSE.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/spf13/cast/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/spf13/cast/LICENSE new file mode 100644 index 0000000..4527efb --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/spf13/cast/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Steve Francia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/ghtkn-go-sdk/ghtkn/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/ghtkn-go-sdk/ghtkn/LICENSE new file mode 100644 index 0000000..d91a478 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/ghtkn-go-sdk/ghtkn/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-error-with-exit-code/ecerror/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-error-with-exit-code/ecerror/LICENSE new file mode 100644 index 0000000..419d916 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-error-with-exit-code/ecerror/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-exec/goexec/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-exec/goexec/LICENSE new file mode 100644 index 0000000..d91a478 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-exec/goexec/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-findconfig/findconfig/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-findconfig/findconfig/LICENSE new file mode 100644 index 0000000..59b633b --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-findconfig/findconfig/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-osenv/osenv/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-osenv/osenv/LICENSE new file mode 100644 index 0000000..514a2c4 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-osenv/osenv/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/dependabot.yml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/dependabot.yml new file mode 100644 index 0000000..3fe4e59 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/dependabot.yml @@ -0,0 +1,35 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +version: 2 + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "sunday" + commit-message: + prefix: "[chore] : " + groups: + actions: + patterns: + - "*" + + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + day: "sunday" + commit-message: + prefix: "[chore] : " + groups: + go: + patterns: + - "*" + applies-to: "version-updates" + go-security: + patterns: + - "*" + applies-to: "security-updates" + \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/pull_request_template.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/pull_request_template.md new file mode 100644 index 0000000..877c03e --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/pull_request_template.md @@ -0,0 +1,12 @@ + +## Description + + + +## Related Issue + + + +## How Has This Been Tested? + + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/actionlint.yml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/actionlint.yml new file mode 100644 index 0000000..d1e3a20 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/actionlint.yml @@ -0,0 +1,19 @@ +name: actionlint + +on: + push: + paths: + - .github/** + +permissions: + contents: read + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: "Check GitHub workflow files" + uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest + with: + args: -color \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/pr-gofmt.yaml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/pr-gofmt.yaml new file mode 100644 index 0000000..7740621 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/pr-gofmt.yaml @@ -0,0 +1,23 @@ +name: Go format check +on: + pull_request: + types: ['opened', 'synchronize'] + +jobs: + run-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + with: + go-version-file: ./.go-version + + - name: Run go format + run: |- + files=$(gofmt -s -l .) + if [ -n "$files" ]; then + echo >&2 "The following file(s) are not gofmt compliant:" + echo >&2 "$files" + exit 1 + fi diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/pr-unit-tests.yaml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/pr-unit-tests.yaml new file mode 100644 index 0000000..cf628da --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.github/workflows/pr-unit-tests.yaml @@ -0,0 +1,37 @@ +name: Unit tests +on: + pull_request: + types: ['opened', 'synchronize'] + +jobs: + run-tests: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ['1.24', '1.23'] + steps: + - name: Checkout Code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - name: Setup Go + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + with: + go-version: ${{matrix.go-version}} + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 + + - name: Run unit tests and generate coverage report + run: make test + + - name: Upload coverage report + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + path: coverage.out + name: Coverage-report-${{matrix.go-version}} + + - name: Display coverage test + run: go tool cover -func=coverage.out + + - name: Build Go + run: go build ./... diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.gitignore b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.gitignore new file mode 100644 index 0000000..4e309e0 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.gitignore @@ -0,0 +1,4 @@ +.idea/ +*.iml +*.test +.vscode/ \ No newline at end of file diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.go-version b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.go-version new file mode 100644 index 0000000..a1b6e17 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.go-version @@ -0,0 +1 @@ +1.23 diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.golangci.yml b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.golangci.yml new file mode 100644 index 0000000..6afa968 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/.golangci.yml @@ -0,0 +1,28 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +version: "2" +linters: + default: none + enable: + - errcheck + - govet + - staticcheck + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/CHANGELOG.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/CHANGELOG.md new file mode 100644 index 0000000..68a627c --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/CHANGELOG.md @@ -0,0 +1,33 @@ +## 0.7.7 (May 30, 2024) + +BUG FIXES: + +- client: avoid potentially leaking URL-embedded basic authentication credentials in logs (#158) + +## 0.7.6 (May 9, 2024) + +ENHANCEMENTS: + +- client: support a `RetryPrepare` function for modifying the request before retrying (#216) +- client: support HTTP-date values for `Retry-After` header value (#138) +- client: avoid reading entire body when the body is a `*bytes.Reader` (#197) + +BUG FIXES: + +- client: fix a broken check for invalid server certificate in go 1.20+ (#210) + +## 0.7.5 (Nov 8, 2023) + +BUG FIXES: + +- client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections (#207) + +## 0.7.4 (Jun 6, 2023) + +BUG FIXES: + +- client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 (#194) + +## 0.7.3 (May 15, 2023) + +Initial release diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/CODEOWNERS b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/CODEOWNERS new file mode 100644 index 0000000..6f07517 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/CODEOWNERS @@ -0,0 +1,13 @@ +# Each line is a file pattern followed by one or more owners. +# More on CODEOWNERS files: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners + +# Default owner +* @hashicorp/go-retryablehttp-maintainers + +# Add override rules below. Each line is a file/folder pattern followed by one or more owners. +# Being an owner means those groups or individuals will be added as reviewers to PRs affecting +# those areas of the code. +# Examples: +# /docs/ @docs-team +# *.js @js-team +# *.go @go-team diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/LICENSE new file mode 100644 index 0000000..f4f97ee --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/LICENSE @@ -0,0 +1,365 @@ +Copyright (c) 2015 HashiCorp, Inc. + +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/Makefile b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/Makefile new file mode 100644 index 0000000..07b85a1 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/Makefile @@ -0,0 +1,11 @@ +default: test + +test: + go vet ./... + go test -v -race ./... -coverprofile=coverage.out + +updatedeps: + go get -f -t -u ./... + go get -f -u ./... + +.PHONY: default test updatedeps diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/README.md b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/README.md new file mode 100644 index 0000000..145a62f --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/README.md @@ -0,0 +1,62 @@ +go-retryablehttp +================ + +[![Build Status](http://img.shields.io/travis/hashicorp/go-retryablehttp.svg?style=flat-square)][travis] +[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] + +[travis]: http://travis-ci.org/hashicorp/go-retryablehttp +[godocs]: http://godoc.org/github.com/hashicorp/go-retryablehttp + +The `retryablehttp` package provides a familiar HTTP client interface with +automatic retries and exponential backoff. It is a thin wrapper over the +standard `net/http` client library and exposes nearly the same public API. This +makes `retryablehttp` very easy to drop into existing programs. + +`retryablehttp` performs automatic retries under certain conditions. Mainly, if +an error is returned by the client (connection errors, etc.), or if a 500-range +response code is received (except 501), then a retry is invoked after a wait +period. Otherwise, the response is returned and left to the caller to +interpret. + +The main difference from `net/http` is that requests which take a request body +(POST/PUT et. al) can have the body provided in a number of ways (some more or +less efficient) that allow "rewinding" the request body if the initial request +fails so that the full request can be attempted again. See the +[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp) for more +details. + +Version 0.6.0 and before are compatible with Go prior to 1.12. From 0.6.1 onward, Go 1.12+ is required. +From 0.6.7 onward, Go 1.13+ is required. + +Example Use +=========== + +Using this library should look almost identical to what you would do with +`net/http`. The most simple example of a GET request is shown below: + +```go +resp, err := retryablehttp.Get("/foo") +if err != nil { + panic(err) +} +``` + +The returned response object is an `*http.Response`, the same thing you would +usually get from `net/http`. Had the request failed one or more times, the above +call would block and retry with exponential backoff. + +## Getting a stdlib `*http.Client` with retries + +It's possible to convert a `*retryablehttp.Client` directly to a `*http.Client`. +This makes use of retryablehttp broadly applicable with minimal effort. Simply +configure a `*retryablehttp.Client` as you wish, and then call `StandardClient()`: + +```go +retryClient := retryablehttp.NewClient() +retryClient.RetryMax = 10 + +standardClient := retryClient.StandardClient() // *http.Client +``` + +For more usage and examples see the +[pkg.go.dev](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp). diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/cert_error_go119.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/cert_error_go119.go new file mode 100644 index 0000000..b2b27e8 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/cert_error_go119.go @@ -0,0 +1,14 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +//go:build !go1.20 +// +build !go1.20 + +package retryablehttp + +import "crypto/x509" + +func isCertError(err error) bool { + _, ok := err.(x509.UnknownAuthorityError) + return ok +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/cert_error_go120.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/cert_error_go120.go new file mode 100644 index 0000000..a3cd315 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/cert_error_go120.go @@ -0,0 +1,14 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +//go:build go1.20 +// +build go1.20 + +package retryablehttp + +import "crypto/tls" + +func isCertError(err error) bool { + _, ok := err.(*tls.CertificateVerificationError) + return ok +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/client.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/client.go new file mode 100644 index 0000000..a9301c7 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/client.go @@ -0,0 +1,938 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Package retryablehttp provides a familiar HTTP client interface with +// automatic retries and exponential backoff. It is a thin wrapper over the +// standard net/http client library and exposes nearly the same public API. +// This makes retryablehttp very easy to drop into existing programs. +// +// retryablehttp performs automatic retries under certain conditions. Mainly, if +// an error is returned by the client (connection errors etc), or if a 500-range +// response is received, then a retry is invoked. Otherwise, the response is +// returned and left to the caller to interpret. +// +// Requests which take a request body should provide a non-nil function +// parameter. The best choice is to provide either a function satisfying +// ReaderFunc which provides multiple io.Readers in an efficient manner, a +// *bytes.Buffer (the underlying raw byte slice will be used) or a raw byte +// slice. As it is a reference type, and we will wrap it as needed by readers, +// we can efficiently re-use the request body without needing to copy it. If an +// io.Reader (such as a *bytes.Reader) is provided, the full body will be read +// prior to the first request, and will be efficiently re-used for any retries. +// ReadSeeker can be used, but some users have observed occasional data races +// between the net/http library and the Seek functionality of some +// implementations of ReadSeeker, so should be avoided if possible. +package retryablehttp + +import ( + "bytes" + "context" + "fmt" + "io" + "log" + "math" + "math/rand" + "net/http" + "net/url" + "os" + "regexp" + "strconv" + "strings" + "sync" + "time" + + cleanhttp "github.com/hashicorp/go-cleanhttp" +) + +var ( + // Default retry configuration + defaultRetryWaitMin = 1 * time.Second + defaultRetryWaitMax = 30 * time.Second + defaultRetryMax = 4 + + // defaultLogger is the logger provided with defaultClient + defaultLogger = log.New(os.Stderr, "", log.LstdFlags) + + // defaultClient is used for performing requests without explicitly making + // a new client. It is purposely private to avoid modifications. + defaultClient = NewClient() + + // We need to consume response bodies to maintain http connections, but + // limit the size we consume to respReadLimit. + respReadLimit = int64(4096) + + // timeNow sets the function that returns the current time. + // This defaults to time.Now. Changes to this should only be done in tests. + timeNow = time.Now + + // A regular expression to match the error returned by net/http when the + // configured number of redirects is exhausted. This error isn't typed + // specifically so we resort to matching on the error string. + redirectsErrorRe = regexp.MustCompile(`stopped after \d+ redirects\z`) + + // A regular expression to match the error returned by net/http when the + // scheme specified in the URL is invalid. This error isn't typed + // specifically so we resort to matching on the error string. + schemeErrorRe = regexp.MustCompile(`unsupported protocol scheme`) + + // A regular expression to match the error returned by net/http when a + // request header or value is invalid. This error isn't typed + // specifically so we resort to matching on the error string. + invalidHeaderErrorRe = regexp.MustCompile(`invalid header`) + + // A regular expression to match the error returned by net/http when the + // TLS certificate is not trusted. This error isn't typed + // specifically so we resort to matching on the error string. + notTrustedErrorRe = regexp.MustCompile(`certificate is not trusted`) +) + +// ReaderFunc is the type of function that can be given natively to NewRequest +type ReaderFunc func() (io.Reader, error) + +// ResponseHandlerFunc is a type of function that takes in a Response, and does something with it. +// The ResponseHandlerFunc is called when the HTTP client successfully receives a response and the +// CheckRetry function indicates that a retry of the base request is not necessary. +// If an error is returned from this function, the CheckRetry policy will be used to determine +// whether to retry the whole request (including this handler). +// +// Make sure to check status codes! Even if the request was completed it may have a non-2xx status code. +// +// The response body is not automatically closed. It must be closed either by the ResponseHandlerFunc or +// by the caller out-of-band. Failure to do so will result in a memory leak. +type ResponseHandlerFunc func(*http.Response) error + +// LenReader is an interface implemented by many in-memory io.Reader's. Used +// for automatically sending the right Content-Length header when possible. +type LenReader interface { + Len() int +} + +// Request wraps the metadata needed to create HTTP requests. +type Request struct { + // body is a seekable reader over the request body payload. This is + // used to rewind the request data in between retries. + body ReaderFunc + + responseHandler ResponseHandlerFunc + + // Embed an HTTP request directly. This makes a *Request act exactly + // like an *http.Request so that all meta methods are supported. + *http.Request +} + +// WithContext returns wrapped Request with a shallow copy of underlying *http.Request +// with its context changed to ctx. The provided ctx must be non-nil. +func (r *Request) WithContext(ctx context.Context) *Request { + return &Request{ + body: r.body, + responseHandler: r.responseHandler, + Request: r.Request.WithContext(ctx), + } +} + +// SetResponseHandler allows setting the response handler. +func (r *Request) SetResponseHandler(fn ResponseHandlerFunc) { + r.responseHandler = fn +} + +// BodyBytes allows accessing the request body. It is an analogue to +// http.Request's Body variable, but it returns a copy of the underlying data +// rather than consuming it. +// +// This function is not thread-safe; do not call it at the same time as another +// call, or at the same time this request is being used with Client.Do. +func (r *Request) BodyBytes() ([]byte, error) { + if r.body == nil { + return nil, nil + } + body, err := r.body() + if err != nil { + return nil, err + } + buf := new(bytes.Buffer) + _, err = buf.ReadFrom(body) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +// SetBody allows setting the request body. +// +// It is useful if a new body needs to be set without constructing a new Request. +func (r *Request) SetBody(rawBody interface{}) error { + bodyReader, contentLength, err := getBodyReaderAndContentLength(rawBody) + if err != nil { + return err + } + r.body = bodyReader + r.ContentLength = contentLength + if bodyReader != nil { + r.GetBody = func() (io.ReadCloser, error) { + body, err := bodyReader() + if err != nil { + return nil, err + } + if rc, ok := body.(io.ReadCloser); ok { + return rc, nil + } + return io.NopCloser(body), nil + } + } else { + r.GetBody = func() (io.ReadCloser, error) { return http.NoBody, nil } + } + return nil +} + +// WriteTo allows copying the request body into a writer. +// +// It writes data to w until there's no more data to write or +// when an error occurs. The return int64 value is the number of bytes +// written. Any error encountered during the write is also returned. +// The signature matches io.WriterTo interface. +func (r *Request) WriteTo(w io.Writer) (int64, error) { + body, err := r.body() + if err != nil { + return 0, err + } + if c, ok := body.(io.Closer); ok { + defer c.Close() + } + return io.Copy(w, body) +} + +func getBodyReaderAndContentLength(rawBody interface{}) (ReaderFunc, int64, error) { + var bodyReader ReaderFunc + var contentLength int64 + + switch body := rawBody.(type) { + // If they gave us a function already, great! Use it. + case ReaderFunc: + bodyReader = body + tmp, err := body() + if err != nil { + return nil, 0, err + } + if lr, ok := tmp.(LenReader); ok { + contentLength = int64(lr.Len()) + } + if c, ok := tmp.(io.Closer); ok { + c.Close() + } + + case func() (io.Reader, error): + bodyReader = body + tmp, err := body() + if err != nil { + return nil, 0, err + } + if lr, ok := tmp.(LenReader); ok { + contentLength = int64(lr.Len()) + } + if c, ok := tmp.(io.Closer); ok { + c.Close() + } + + // If a regular byte slice, we can read it over and over via new + // readers + case []byte: + buf := body + bodyReader = func() (io.Reader, error) { + return bytes.NewReader(buf), nil + } + contentLength = int64(len(buf)) + + // If a bytes.Buffer we can read the underlying byte slice over and + // over + case *bytes.Buffer: + buf := body + bodyReader = func() (io.Reader, error) { + return bytes.NewReader(buf.Bytes()), nil + } + contentLength = int64(buf.Len()) + + // We prioritize *bytes.Reader here because we don't really want to + // deal with it seeking so want it to match here instead of the + // io.ReadSeeker case. + case *bytes.Reader: + snapshot := *body + bodyReader = func() (io.Reader, error) { + r := snapshot + return &r, nil + } + contentLength = int64(body.Len()) + + // Compat case + case io.ReadSeeker: + raw := body + bodyReader = func() (io.Reader, error) { + _, err := raw.Seek(0, 0) + return io.NopCloser(raw), err + } + if lr, ok := raw.(LenReader); ok { + contentLength = int64(lr.Len()) + } + + // Read all in so we can reset + case io.Reader: + buf, err := io.ReadAll(body) + if err != nil { + return nil, 0, err + } + if len(buf) == 0 { + bodyReader = func() (io.Reader, error) { + return http.NoBody, nil + } + contentLength = 0 + } else { + bodyReader = func() (io.Reader, error) { + return bytes.NewReader(buf), nil + } + contentLength = int64(len(buf)) + } + + // No body provided, nothing to do + case nil: + + // Unrecognized type + default: + return nil, 0, fmt.Errorf("cannot handle type %T", rawBody) + } + return bodyReader, contentLength, nil +} + +// FromRequest wraps an http.Request in a retryablehttp.Request +func FromRequest(r *http.Request) (*Request, error) { + bodyReader, _, err := getBodyReaderAndContentLength(r.Body) + if err != nil { + return nil, err + } + // Could assert contentLength == r.ContentLength + return &Request{body: bodyReader, Request: r}, nil +} + +// NewRequest creates a new wrapped request. +func NewRequest(method, url string, rawBody interface{}) (*Request, error) { + return NewRequestWithContext(context.Background(), method, url, rawBody) +} + +// NewRequestWithContext creates a new wrapped request with the provided context. +// +// The context controls the entire lifetime of a request and its response: +// obtaining a connection, sending the request, and reading the response headers and body. +func NewRequestWithContext(ctx context.Context, method, url string, rawBody interface{}) (*Request, error) { + httpReq, err := http.NewRequestWithContext(ctx, method, url, nil) + if err != nil { + return nil, err + } + + req := &Request{ + Request: httpReq, + } + if err := req.SetBody(rawBody); err != nil { + return nil, err + } + + return req, nil +} + +// Logger interface allows to use other loggers than +// standard log.Logger. +type Logger interface { + Printf(string, ...interface{}) +} + +// LeveledLogger is an interface that can be implemented by any logger or a +// logger wrapper to provide leveled logging. The methods accept a message +// string and a variadic number of key-value pairs. For log.Printf style +// formatting where message string contains a format specifier, use Logger +// interface. +type LeveledLogger interface { + Error(msg string, keysAndValues ...interface{}) + Info(msg string, keysAndValues ...interface{}) + Debug(msg string, keysAndValues ...interface{}) + Warn(msg string, keysAndValues ...interface{}) +} + +// hookLogger adapts an LeveledLogger to Logger for use by the existing hook functions +// without changing the API. +type hookLogger struct { + LeveledLogger +} + +func (h hookLogger) Printf(s string, args ...interface{}) { + h.Info(fmt.Sprintf(s, args...)) +} + +// RequestLogHook allows a function to run before each retry. The HTTP +// request which will be made, and the retry number (0 for the initial +// request) are available to users. The internal logger is exposed to +// consumers. +type RequestLogHook func(Logger, *http.Request, int) + +// ResponseLogHook is like RequestLogHook, but allows running a function +// on each HTTP response. This function will be invoked at the end of +// every HTTP request executed, regardless of whether a subsequent retry +// needs to be performed or not. If the response body is read or closed +// from this method, this will affect the response returned from Do(). +type ResponseLogHook func(Logger, *http.Response) + +// CheckRetry specifies a policy for handling retries. It is called +// following each request with the response and error values returned by +// the http.Client. If CheckRetry returns false, the Client stops retrying +// and returns the response to the caller. If CheckRetry returns an error, +// that error value is returned in lieu of the error from the request. The +// Client will close any response body when retrying, but if the retry is +// aborted it is up to the CheckRetry callback to properly close any +// response body before returning. +type CheckRetry func(ctx context.Context, resp *http.Response, err error) (bool, error) + +// Backoff specifies a policy for how long to wait between retries. +// It is called after a failing request to determine the amount of time +// that should pass before trying again. +type Backoff func(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration + +// ErrorHandler is called if retries are expired, containing the last status +// from the http library. If not specified, default behavior for the library is +// to close the body and return an error indicating how many tries were +// attempted. If overriding this, be sure to close the body if needed. +type ErrorHandler func(resp *http.Response, err error, numTries int) (*http.Response, error) + +// PrepareRetry is called before retry operation. It can be used for example to re-sign the request +type PrepareRetry func(req *http.Request) error + +// Client is used to make HTTP requests. It adds additional functionality +// like automatic retries to tolerate minor outages. +type Client struct { + HTTPClient *http.Client // Internal HTTP client. + Logger interface{} // Customer logger instance. Can be either Logger or LeveledLogger + + RetryWaitMin time.Duration // Minimum time to wait + RetryWaitMax time.Duration // Maximum time to wait + RetryMax int // Maximum number of retries + + // RequestLogHook allows a user-supplied function to be called + // before each retry. + RequestLogHook RequestLogHook + + // ResponseLogHook allows a user-supplied function to be called + // with the response from each HTTP request executed. + ResponseLogHook ResponseLogHook + + // CheckRetry specifies the policy for handling retries, and is called + // after each request. The default policy is DefaultRetryPolicy. + CheckRetry CheckRetry + + // Backoff specifies the policy for how long to wait between retries + Backoff Backoff + + // ErrorHandler specifies the custom error handler to use, if any + ErrorHandler ErrorHandler + + // PrepareRetry can prepare the request for retry operation, for example re-sign it + PrepareRetry PrepareRetry + + loggerInit sync.Once + clientInit sync.Once +} + +// NewClient creates a new Client with default settings. +func NewClient() *Client { + return &Client{ + HTTPClient: cleanhttp.DefaultPooledClient(), + Logger: defaultLogger, + RetryWaitMin: defaultRetryWaitMin, + RetryWaitMax: defaultRetryWaitMax, + RetryMax: defaultRetryMax, + CheckRetry: DefaultRetryPolicy, + Backoff: DefaultBackoff, + } +} + +func (c *Client) logger() interface{} { + c.loggerInit.Do(func() { + if c.Logger == nil { + return + } + + switch c.Logger.(type) { + case Logger, LeveledLogger: + // ok + default: + // This should happen in dev when they are setting Logger and work on code, not in prod. + panic(fmt.Sprintf("invalid logger type passed, must be Logger or LeveledLogger, was %T", c.Logger)) + } + }) + + return c.Logger +} + +// DefaultRetryPolicy provides a default callback for Client.CheckRetry, which +// will retry on connection errors and server errors. +func DefaultRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) { + // do not retry on context.Canceled or context.DeadlineExceeded + if ctx.Err() != nil { + return false, ctx.Err() + } + + // don't propagate other errors + shouldRetry, _ := baseRetryPolicy(resp, err) + return shouldRetry, nil +} + +// ErrorPropagatedRetryPolicy is the same as DefaultRetryPolicy, except it +// propagates errors back instead of returning nil. This allows you to inspect +// why it decided to retry or not. +func ErrorPropagatedRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) { + // do not retry on context.Canceled or context.DeadlineExceeded + if ctx.Err() != nil { + return false, ctx.Err() + } + + return baseRetryPolicy(resp, err) +} + +func baseRetryPolicy(resp *http.Response, err error) (bool, error) { + if err != nil { + if v, ok := err.(*url.Error); ok { + // Don't retry if the error was due to too many redirects. + if redirectsErrorRe.MatchString(v.Error()) { + return false, v + } + + // Don't retry if the error was due to an invalid protocol scheme. + if schemeErrorRe.MatchString(v.Error()) { + return false, v + } + + // Don't retry if the error was due to an invalid header. + if invalidHeaderErrorRe.MatchString(v.Error()) { + return false, v + } + + // Don't retry if the error was due to TLS cert verification failure. + if notTrustedErrorRe.MatchString(v.Error()) { + return false, v + } + if isCertError(v.Err) { + return false, v + } + } + + // The error is likely recoverable so retry. + return true, nil + } + + // 429 Too Many Requests is recoverable. Sometimes the server puts + // a Retry-After response header to indicate when the server is + // available to start processing request from client. + if resp.StatusCode == http.StatusTooManyRequests { + return true, nil + } + + // Check the response code. We retry on 500-range responses to allow + // the server time to recover, as 500's are typically not permanent + // errors and may relate to outages on the server side. This will catch + // invalid response codes as well, like 0 and 999. + if resp.StatusCode == 0 || (resp.StatusCode >= 500 && resp.StatusCode != http.StatusNotImplemented) { + return true, fmt.Errorf("unexpected HTTP status %s", resp.Status) + } + + return false, nil +} + +// DefaultBackoff provides a default callback for Client.Backoff which +// will perform exponential backoff based on the attempt number and limited +// by the provided minimum and maximum durations. +// +// It also tries to parse Retry-After response header when a http.StatusTooManyRequests +// (HTTP Code 429) is found in the resp parameter. Hence it will return the number of +// seconds the server states it may be ready to process more requests from this client. +func DefaultBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration { + if resp != nil { + if resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode == http.StatusServiceUnavailable { + if sleep, ok := parseRetryAfterHeader(resp.Header["Retry-After"]); ok { + return sleep + } + } + } + + mult := math.Pow(2, float64(attemptNum)) * float64(min) + sleep := time.Duration(mult) + if float64(sleep) != mult || sleep > max { + sleep = max + } + return sleep +} + +// parseRetryAfterHeader parses the Retry-After header and returns the +// delay duration according to the spec: https://httpwg.org/specs/rfc7231.html#header.retry-after +// The bool returned will be true if the header was successfully parsed. +// Otherwise, the header was either not present, or was not parseable according to the spec. +// +// Retry-After headers come in two flavors: Seconds or HTTP-Date +// +// Examples: +// * Retry-After: Fri, 31 Dec 1999 23:59:59 GMT +// * Retry-After: 120 +func parseRetryAfterHeader(headers []string) (time.Duration, bool) { + if len(headers) == 0 || headers[0] == "" { + return 0, false + } + header := headers[0] + // Retry-After: 120 + if sleep, err := strconv.ParseInt(header, 10, 64); err == nil { + if sleep < 0 { // a negative sleep doesn't make sense + return 0, false + } + return time.Second * time.Duration(sleep), true + } + + // Retry-After: Fri, 31 Dec 1999 23:59:59 GMT + retryTime, err := time.Parse(time.RFC1123, header) + if err != nil { + return 0, false + } + if until := retryTime.Sub(timeNow()); until > 0 { + return until, true + } + // date is in the past + return 0, true +} + +// LinearJitterBackoff provides a callback for Client.Backoff which will +// perform linear backoff based on the attempt number and with jitter to +// prevent a thundering herd. +// +// min and max here are *not* absolute values. The number to be multiplied by +// the attempt number will be chosen at random from between them, thus they are +// bounding the jitter. +// +// For instance: +// * To get strictly linear backoff of one second increasing each retry, set +// both to one second (1s, 2s, 3s, 4s, ...) +// * To get a small amount of jitter centered around one second increasing each +// retry, set to around one second, such as a min of 800ms and max of 1200ms +// (892ms, 2102ms, 2945ms, 4312ms, ...) +// * To get extreme jitter, set to a very wide spread, such as a min of 100ms +// and a max of 20s (15382ms, 292ms, 51321ms, 35234ms, ...) +func LinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration { + // attemptNum always starts at zero but we want to start at 1 for multiplication + attemptNum++ + + if max <= min { + // Unclear what to do here, or they are the same, so return min * + // attemptNum + return min * time.Duration(attemptNum) + } + + // Seed rand; doing this every time is fine + source := rand.New(rand.NewSource(int64(time.Now().Nanosecond()))) + + // Pick a random number that lies somewhere between the min and max and + // multiply by the attemptNum. attemptNum starts at zero so we always + // increment here. We first get a random percentage, then apply that to the + // difference between min and max, and add to min. + jitter := source.Float64() * float64(max-min) + jitterMin := int64(jitter) + int64(min) + return time.Duration(jitterMin * int64(attemptNum)) +} + +// RateLimitLinearJitterBackoff wraps the retryablehttp.LinearJitterBackoff. +// It first checks if the response status code is http.StatusTooManyRequests +// (HTTP Code 429) or http.StatusServiceUnavailable (HTTP Code 503). If it is +// and the response contains a Retry-After response header, it will wait the +// amount of time specified by the header. Otherwise, this calls +// LinearJitterBackoff. +func RateLimitLinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration { + if resp != nil { + if resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode == http.StatusServiceUnavailable { + if sleep, ok := parseRetryAfterHeader(resp.Header["Retry-After"]); ok { + return sleep + } + } + } + return LinearJitterBackoff(min, max, attemptNum, resp) +} + +// PassthroughErrorHandler is an ErrorHandler that directly passes through the +// values from the net/http library for the final request. The body is not +// closed. +func PassthroughErrorHandler(resp *http.Response, err error, _ int) (*http.Response, error) { + return resp, err +} + +// Do wraps calling an HTTP method with retries. +func (c *Client) Do(req *Request) (*http.Response, error) { + c.clientInit.Do(func() { + if c.HTTPClient == nil { + c.HTTPClient = cleanhttp.DefaultPooledClient() + } + }) + + logger := c.logger() + + if logger != nil { + switch v := logger.(type) { + case LeveledLogger: + v.Debug("performing request", "method", req.Method, "url", redactURL(req.URL)) + case Logger: + v.Printf("[DEBUG] %s %s", req.Method, redactURL(req.URL)) + } + } + + var resp *http.Response + var attempt int + var shouldRetry bool + var doErr, respErr, checkErr, prepareErr error + + for i := 0; ; i++ { + doErr, respErr, prepareErr = nil, nil, nil + attempt++ + + // Always rewind the request body when non-nil. + if req.body != nil { + body, err := req.body() + if err != nil { + c.HTTPClient.CloseIdleConnections() + return resp, err + } + if c, ok := body.(io.ReadCloser); ok { + req.Body = c + } else { + req.Body = io.NopCloser(body) + } + } + + if c.RequestLogHook != nil { + switch v := logger.(type) { + case LeveledLogger: + c.RequestLogHook(hookLogger{v}, req.Request, i) + case Logger: + c.RequestLogHook(v, req.Request, i) + default: + c.RequestLogHook(nil, req.Request, i) + } + } + + // Attempt the request + resp, doErr = c.HTTPClient.Do(req.Request) + + // Check if we should continue with retries. + shouldRetry, checkErr = c.CheckRetry(req.Context(), resp, doErr) + if !shouldRetry && doErr == nil && req.responseHandler != nil { + respErr = req.responseHandler(resp) + shouldRetry, checkErr = c.CheckRetry(req.Context(), resp, respErr) + } + + err := doErr + if respErr != nil { + err = respErr + } + if err != nil { + switch v := logger.(type) { + case LeveledLogger: + v.Error("request failed", "error", err, "method", req.Method, "url", redactURL(req.URL)) + case Logger: + v.Printf("[ERR] %s %s request failed: %v", req.Method, redactURL(req.URL), err) + } + } else { + // Call this here to maintain the behavior of logging all requests, + // even if CheckRetry signals to stop. + if c.ResponseLogHook != nil { + // Call the response logger function if provided. + switch v := logger.(type) { + case LeveledLogger: + c.ResponseLogHook(hookLogger{v}, resp) + case Logger: + c.ResponseLogHook(v, resp) + default: + c.ResponseLogHook(nil, resp) + } + } + } + + if !shouldRetry { + break + } + + // We do this before drainBody because there's no need for the I/O if + // we're breaking out + remain := c.RetryMax - i + if remain <= 0 { + break + } + + // We're going to retry, consume any response to reuse the connection. + if doErr == nil { + c.drainBody(resp.Body) + } + + wait := c.Backoff(c.RetryWaitMin, c.RetryWaitMax, i, resp) + if logger != nil { + desc := fmt.Sprintf("%s %s", req.Method, redactURL(req.URL)) + if resp != nil { + desc = fmt.Sprintf("%s (status: %d)", desc, resp.StatusCode) + } + switch v := logger.(type) { + case LeveledLogger: + v.Warn("retrying request", "request", desc, "timeout", wait, "remaining", remain) + case Logger: + v.Printf("[WARN] %s: retrying in %s (%d left)", desc, wait, remain) + } + } + timer := time.NewTimer(wait) + select { + case <-req.Context().Done(): + timer.Stop() + c.HTTPClient.CloseIdleConnections() + return nil, req.Context().Err() + case <-timer.C: + } + + // Make shallow copy of http Request so that we can modify its body + // without racing against the closeBody call in persistConn.writeLoop. + httpreq := *req.Request + req.Request = &httpreq + + if c.PrepareRetry != nil { + if err := c.PrepareRetry(req.Request); err != nil { + prepareErr = err + break + } + } + } + + // this is the closest we have to success criteria + if doErr == nil && respErr == nil && checkErr == nil && prepareErr == nil && !shouldRetry { + return resp, nil + } + + defer c.HTTPClient.CloseIdleConnections() + + var err error + if prepareErr != nil { + err = prepareErr + } else if checkErr != nil { + err = checkErr + } else if respErr != nil { + err = respErr + } else { + err = doErr + } + + if c.ErrorHandler != nil { + return c.ErrorHandler(resp, err, attempt) + } + + // By default, we close the response body and return an error without + // returning the response + if resp != nil { + c.drainBody(resp.Body) + } + + // this means CheckRetry thought the request was a failure, but didn't + // communicate why + if err == nil { + return nil, fmt.Errorf("%s %s giving up after %d attempt(s)", + req.Method, redactURL(req.URL), attempt) + } + + return nil, fmt.Errorf("%s %s giving up after %d attempt(s): %w", + req.Method, redactURL(req.URL), attempt, err) +} + +// Try to read the response body so we can reuse this connection. +func (c *Client) drainBody(body io.ReadCloser) { + defer body.Close() + _, err := io.Copy(io.Discard, io.LimitReader(body, respReadLimit)) + if err != nil { + if c.logger() != nil { + switch v := c.logger().(type) { + case LeveledLogger: + v.Error("error reading response body", "error", err) + case Logger: + v.Printf("[ERR] error reading response body: %v", err) + } + } + } +} + +// Get is a shortcut for doing a GET request without making a new client. +func Get(url string) (*http.Response, error) { + return defaultClient.Get(url) +} + +// Get is a convenience helper for doing simple GET requests. +func (c *Client) Get(url string) (*http.Response, error) { + req, err := NewRequest("GET", url, nil) + if err != nil { + return nil, err + } + return c.Do(req) +} + +// Head is a shortcut for doing a HEAD request without making a new client. +func Head(url string) (*http.Response, error) { + return defaultClient.Head(url) +} + +// Head is a convenience method for doing simple HEAD requests. +func (c *Client) Head(url string) (*http.Response, error) { + req, err := NewRequest("HEAD", url, nil) + if err != nil { + return nil, err + } + return c.Do(req) +} + +// Post is a shortcut for doing a POST request without making a new client. +// The bodyType parameter sets the "Content-Type" header of the request. +func Post(url, bodyType string, body interface{}) (*http.Response, error) { + return defaultClient.Post(url, bodyType, body) +} + +// Post is a convenience method for doing simple POST requests. +// The bodyType parameter sets the "Content-Type" header of the request. +func (c *Client) Post(url, bodyType string, body interface{}) (*http.Response, error) { + req, err := NewRequest("POST", url, body) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", bodyType) + return c.Do(req) +} + +// PostForm is a shortcut to perform a POST with form data without creating +// a new client. +func PostForm(url string, data url.Values) (*http.Response, error) { + return defaultClient.PostForm(url, data) +} + +// PostForm is a convenience method for doing simple POST operations using +// pre-filled url.Values form data. +func (c *Client) PostForm(url string, data url.Values) (*http.Response, error) { + return c.Post(url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) +} + +// StandardClient returns a stdlib *http.Client with a custom Transport, which +// shims in a *retryablehttp.Client for added retries. +func (c *Client) StandardClient() *http.Client { + return &http.Client{ + Transport: &RoundTripper{Client: c}, + } +} + +// Taken from url.URL#Redacted() which was introduced in go 1.15. +// We can switch to using it directly if we'll bump the minimum required go version. +func redactURL(u *url.URL) string { + if u == nil { + return "" + } + + ru := *u + if _, has := ru.User.Password(); has { + ru.User = url.UserPassword(ru.User.Username(), "xxxxx") + } + return ru.String() +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/client_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/client_test.go new file mode 100644 index 0000000..8c5c783 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/client_test.go @@ -0,0 +1,1405 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package retryablehttp + +import ( + "bytes" + "context" + "errors" + "fmt" + "io" + "net" + "net/http" + "net/http/httptest" + "net/http/httputil" + "net/url" + "strconv" + "strings" + "sync/atomic" + "testing" + "time" + + "github.com/hashicorp/go-hclog" +) + +func TestRequest(t *testing.T) { + // Fails on invalid request + _, err := NewRequest("GET", "://foo", nil) + if err == nil { + t.Fatalf("should error") + } + + // Works with no request body + _, err = NewRequest("GET", "http://foo", nil) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Works with request body + body := bytes.NewReader([]byte("yo")) + req, err := NewRequest("GET", "/", body) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Request allows typical HTTP request forming methods + req.Header.Set("X-Test", "foo") + if v, ok := req.Header["X-Test"]; !ok || len(v) != 1 || v[0] != "foo" { + t.Fatalf("bad headers: %v", req.Header) + } + + // Sets the Content-Length automatically for LenReaders + if req.ContentLength != 2 { + t.Fatalf("bad ContentLength: %d", req.ContentLength) + } +} + +func TestFromRequest(t *testing.T) { + // Works with no request body + httpReq, err := http.NewRequest("GET", "http://foo", nil) + if err != nil { + t.Fatalf("err: %v", err) + } + _, err = FromRequest(httpReq) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Works with request body + body := bytes.NewReader([]byte("yo")) + httpReq, err = http.NewRequest("GET", "/", body) + if err != nil { + t.Fatalf("err: %v", err) + } + req, err := FromRequest(httpReq) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Preserves headers + httpReq.Header.Set("X-Test", "foo") + if v, ok := req.Header["X-Test"]; !ok || len(v) != 1 || v[0] != "foo" { + t.Fatalf("bad headers: %v", req.Header) + } + + // Preserves the Content-Length automatically for LenReaders + if req.ContentLength != 2 { + t.Fatalf("bad ContentLength: %d", req.ContentLength) + } +} + +// Since normal ways we would generate a Reader have special cases, use a +// custom type here +type custReader struct { + val string + pos int +} + +func (c *custReader) Read(p []byte) (n int, err error) { + if c.val == "" { + c.val = "hello" + } + if c.pos >= len(c.val) { + return 0, io.EOF + } + var i int + for i = 0; i < len(p) && i+c.pos < len(c.val); i++ { + p[i] = c.val[i+c.pos] + } + c.pos += i + return i, nil +} + +func TestClient_Do(t *testing.T) { + testBytes := []byte("hello") + // Native func + testClientDo(t, ReaderFunc(func() (io.Reader, error) { + return bytes.NewReader(testBytes), nil + })) + // Native func, different Go type + testClientDo(t, func() (io.Reader, error) { + return bytes.NewReader(testBytes), nil + }) + // []byte + testClientDo(t, testBytes) + // *bytes.Buffer + testClientDo(t, bytes.NewBuffer(testBytes)) + // *bytes.Reader + testClientDo(t, bytes.NewReader(testBytes)) + // io.ReadSeeker + testClientDo(t, strings.NewReader(string(testBytes))) + // io.Reader + testClientDo(t, &custReader{}) +} + +func testClientDo(t *testing.T, body interface{}) { + // Create a request + req, err := NewRequest("PUT", "http://127.0.0.1:28934/v1/foo", body) + if err != nil { + t.Fatalf("err: %v", err) + } + req.Header.Set("foo", "bar") + + // Track the number of times the logging hook was called + retryCount := -1 + + // Create the client. Use short retry windows. + client := NewClient() + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 50 * time.Millisecond + client.RetryMax = 50 + client.RequestLogHook = func(logger Logger, req *http.Request, retryNumber int) { + retryCount = retryNumber + + if logger != client.Logger { + t.Fatalf("Client logger was not passed to logging hook") + } + + dumpBytes, err := httputil.DumpRequestOut(req, false) + if err != nil { + t.Fatal("Dumping requests failed") + } + + dumpString := string(dumpBytes) + if !strings.Contains(dumpString, "PUT /v1/foo") { + t.Fatalf("Bad request dump:\n%s", dumpString) + } + } + + // Send the request + var resp *http.Response + doneCh := make(chan struct{}) + errCh := make(chan error, 1) + go func() { + defer close(doneCh) + defer close(errCh) + var err error + resp, err = client.Do(req) + errCh <- err + }() + + select { + case <-doneCh: + t.Fatalf("should retry on error") + case <-time.After(200 * time.Millisecond): + // Client should still be retrying due to connection failure. + } + + // Create the mock handler. First we return a 500-range response to ensure + // that we power through and keep retrying in the face of recoverable + // errors. + code := int64(500) + handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // Check the request details + if r.Method != "PUT" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/v1/foo" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + + // Check the headers + if v := r.Header.Get("foo"); v != "bar" { + t.Fatalf("bad header: expect foo=bar, got foo=%v", v) + } + + // Check the payload + body, err := io.ReadAll(r.Body) + if err != nil { + t.Fatalf("err: %s", err) + } + expected := []byte("hello") + if !bytes.Equal(body, expected) { + t.Fatalf("bad: %v", body) + } + + w.WriteHeader(int(atomic.LoadInt64(&code))) + }) + + // Create a test server + list, err := net.Listen("tcp", ":28934") + if err != nil { + t.Fatalf("err: %v", err) + } + defer list.Close() + errors := make(chan error, 1) + go func() { + err := http.Serve(list, handler) + if err != nil { + errors <- err + return + } + }() + + // Wait again + select { + case <-doneCh: + t.Fatalf("should retry on 500-range") + case <-time.After(200 * time.Millisecond): + // Client should still be retrying due to 500's. + } + + // Start returning 200's + atomic.StoreInt64(&code, 200) + + // Wait again + select { + case <-doneCh: + case <-time.After(time.Second): + t.Fatalf("timed out") + } + + if resp.StatusCode != 200 { + t.Fatalf("exected 200, got: %d", resp.StatusCode) + } + + if retryCount < 0 { + t.Fatal("request log hook was not called") + } + + err = <-errCh + if err != nil { + t.Fatalf("err: %v", err) + } +} + +func TestClient_Do_WithResponseHandler(t *testing.T) { + // Create the client. Use short retry windows so we fail faster. + client := NewClient() + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 10 * time.Millisecond + client.RetryMax = 2 + + var checks int + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + checks++ + if err != nil && strings.Contains(err.Error(), "nonretryable") { + return false, nil + } + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + var shouldSucceed bool + tests := []struct { + name string + handler ResponseHandlerFunc + expectedChecks int // often 2x number of attempts since we check twice + err string + }{ + { + name: "nil handler", + handler: nil, + expectedChecks: 1, + }, + { + name: "handler always succeeds", + handler: func(*http.Response) error { + return nil + }, + expectedChecks: 2, + }, + { + name: "handler always fails in a retryable way", + handler: func(*http.Response) error { + return errors.New("retryable failure") + }, + expectedChecks: 6, + }, + { + name: "handler always fails in a nonretryable way", + handler: func(*http.Response) error { + return errors.New("nonretryable failure") + }, + expectedChecks: 2, + }, + { + name: "handler succeeds on second attempt", + handler: func(*http.Response) error { + if shouldSucceed { + return nil + } + shouldSucceed = true + return errors.New("retryable failure") + }, + expectedChecks: 4, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + checks = 0 + shouldSucceed = false + // Create the request + req, err := NewRequest("GET", ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + req.SetResponseHandler(tt.handler) + + // Send the request. + _, err = client.Do(req) + if err != nil && !strings.Contains(err.Error(), tt.err) { + t.Fatalf("error does not match expectation, expected: %s, got: %s", tt.err, err.Error()) + } + if err == nil && tt.err != "" { + t.Fatalf("no error, expected: %s", tt.err) + } + + if checks != tt.expectedChecks { + t.Fatalf("expected %d attempts, got %d attempts", tt.expectedChecks, checks) + } + }) + } +} + +func TestClient_Do_WithPrepareRetry(t *testing.T) { + // Create the client. Use short retry windows so we fail faster. + client := NewClient() + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 10 * time.Millisecond + client.RetryMax = 2 + + var checks int + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + checks++ + if err != nil && strings.Contains(err.Error(), "nonretryable") { + return false, nil + } + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + var prepareChecks int + client.PrepareRetry = func(req *http.Request) error { + prepareChecks++ + req.Header.Set("foo", strconv.Itoa(prepareChecks)) + return nil + } + + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + var shouldSucceed bool + tests := []struct { + name string + handler ResponseHandlerFunc + expectedChecks int // often 2x number of attempts since we check twice + expectedPrepareChecks int + err string + }{ + { + name: "nil handler", + handler: nil, + expectedChecks: 1, + expectedPrepareChecks: 0, + }, + { + name: "handler always succeeds", + handler: func(*http.Response) error { + return nil + }, + expectedChecks: 2, + expectedPrepareChecks: 0, + }, + { + name: "handler always fails in a retryable way", + handler: func(*http.Response) error { + return errors.New("retryable failure") + }, + expectedChecks: 6, + expectedPrepareChecks: 2, + }, + { + name: "handler always fails in a nonretryable way", + handler: func(*http.Response) error { + return errors.New("nonretryable failure") + }, + expectedChecks: 2, + expectedPrepareChecks: 0, + }, + { + name: "handler succeeds on second attempt", + handler: func(*http.Response) error { + if shouldSucceed { + return nil + } + shouldSucceed = true + return errors.New("retryable failure") + }, + expectedChecks: 4, + expectedPrepareChecks: 1, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + checks = 0 + prepareChecks = 0 + shouldSucceed = false + // Create the request + req, err := NewRequest("GET", ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + req.SetResponseHandler(tt.handler) + + // Send the request. + _, err = client.Do(req) + if err != nil && !strings.Contains(err.Error(), tt.err) { + t.Fatalf("error does not match expectation, expected: %s, got: %s", tt.err, err.Error()) + } + if err == nil && tt.err != "" { + t.Fatalf("no error, expected: %s", tt.err) + } + + if checks != tt.expectedChecks { + t.Fatalf("expected %d attempts, got %d attempts", tt.expectedChecks, checks) + } + + if prepareChecks != tt.expectedPrepareChecks { + t.Fatalf("expected %d attempts of prepare check, got %d attempts", tt.expectedPrepareChecks, prepareChecks) + } + header := req.Header.Get("foo") + if tt.expectedPrepareChecks == 0 && header != "" { + t.Fatalf("expected no changes to request header 'foo', but got '%s'", header) + } + expectedHeader := strconv.Itoa(tt.expectedPrepareChecks) + if tt.expectedPrepareChecks != 0 && header != expectedHeader { + t.Fatalf("expected changes in request header 'foo' '%s', but got '%s'", expectedHeader, header) + } + + }) + } +} + +func TestClient_Do_fails(t *testing.T) { + // Mock server which always responds 500. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(500) + })) + defer ts.Close() + + serverUrlWithBasicAuth, err := url.Parse(ts.URL) + if err != nil { + t.Fatalf("failed parsing test server url: %s", ts.URL) + } + serverUrlWithBasicAuth.User = url.UserPassword("user", "pasten") + + tests := []struct { + url string + name string + cr CheckRetry + err string + }{ + { + url: ts.URL, + name: "default_retry_policy", + cr: DefaultRetryPolicy, + err: "giving up after 3 attempt(s)", + }, + { + url: serverUrlWithBasicAuth.String(), + name: "default_retry_policy_url_with_basic_auth", + cr: DefaultRetryPolicy, + err: redactURL(serverUrlWithBasicAuth) + " giving up after 3 attempt(s)", + }, + { + url: ts.URL, + name: "error_propagated_retry_policy", + cr: ErrorPropagatedRetryPolicy, + err: "giving up after 3 attempt(s): unexpected HTTP status 500 Internal Server Error", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Create the client. Use short retry windows so we fail faster. + client := NewClient() + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 10 * time.Millisecond + client.CheckRetry = tt.cr + client.RetryMax = 2 + + // Create the request + req, err := NewRequest("POST", tt.url, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Send the request. + _, err = client.Do(req) + if err == nil || !strings.HasSuffix(err.Error(), tt.err) { + t.Fatalf("expected %#v, got: %#v", tt.err, err) + } + }) + } +} + +func TestClient_Get(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + w.WriteHeader(200) + })) + defer ts.Close() + + // Make the request. + resp, err := NewClient().Get(ts.URL + "/foo/bar") + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() +} + +func TestClient_RequestLogHook(t *testing.T) { + t.Run("RequestLogHook successfully called with default Logger", func(t *testing.T) { + testClientRequestLogHook(t, defaultLogger) + }) + t.Run("RequestLogHook successfully called with nil Logger", func(t *testing.T) { + testClientRequestLogHook(t, nil) + }) + t.Run("RequestLogHook successfully called with nil typed Logger", func(t *testing.T) { + testClientRequestLogHook(t, Logger(nil)) + }) + t.Run("RequestLogHook successfully called with nil typed LeveledLogger", func(t *testing.T) { + testClientRequestLogHook(t, LeveledLogger(nil)) + }) +} + +func testClientRequestLogHook(t *testing.T, logger interface{}) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + w.WriteHeader(200) + })) + defer ts.Close() + + retries := -1 + testURIPath := "/foo/bar" + + client := NewClient() + client.Logger = logger + client.RequestLogHook = func(logger Logger, req *http.Request, retry int) { + retries = retry + + if logger != client.Logger { + t.Fatalf("Client logger was not passed to logging hook") + } + + dumpBytes, err := httputil.DumpRequestOut(req, false) + if err != nil { + t.Fatal("Dumping requests failed") + } + + dumpString := string(dumpBytes) + if !strings.Contains(dumpString, "GET "+testURIPath) { + t.Fatalf("Bad request dump:\n%s", dumpString) + } + } + + // Make the request. + resp, err := client.Get(ts.URL + testURIPath) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() + + if retries < 0 { + t.Fatal("Logging hook was not called") + } +} + +func TestClient_ResponseLogHook(t *testing.T) { + t.Run("ResponseLogHook successfully called with hclog Logger", func(t *testing.T) { + buf := new(bytes.Buffer) + l := hclog.New(&hclog.LoggerOptions{ + Output: buf, + }) + testClientResponseLogHook(t, l, buf) + }) + t.Run("ResponseLogHook successfully called with nil Logger", func(t *testing.T) { + buf := new(bytes.Buffer) + testClientResponseLogHook(t, nil, buf) + }) + t.Run("ResponseLogHook successfully called with nil typed Logger", func(t *testing.T) { + buf := new(bytes.Buffer) + testClientResponseLogHook(t, Logger(nil), buf) + }) + t.Run("ResponseLogHook successfully called with nil typed LeveledLogger", func(t *testing.T) { + buf := new(bytes.Buffer) + testClientResponseLogHook(t, LeveledLogger(nil), buf) + }) +} + +func testClientResponseLogHook(t *testing.T, l interface{}, buf *bytes.Buffer) { + passAfter := time.Now().Add(100 * time.Millisecond) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if time.Now().After(passAfter) { + w.WriteHeader(200) + if _, err := w.Write([]byte("test_200_body")); err != nil { + t.Fatalf("failed to write: %v", err) + } + } else { + w.WriteHeader(500) + if _, err := w.Write([]byte("test_500_body")); err != nil { + t.Fatalf("failed to write: %v", err) + } + } + })) + defer ts.Close() + + client := NewClient() + + client.Logger = l + client.RetryWaitMin = 10 * time.Millisecond + client.RetryWaitMax = 10 * time.Millisecond + client.RetryMax = 15 + client.ResponseLogHook = func(logger Logger, resp *http.Response) { + if resp.StatusCode == 200 { + successLog := "test_log_pass" + // Log something when we get a 200 + if logger != nil { + logger.Printf(successLog) + } else { + buf.WriteString(successLog) + } + } else { + // Log the response body when we get a 500 + body, err := io.ReadAll(resp.Body) + if err != nil { + t.Fatalf("err: %v", err) + } + failLog := string(body) + if logger != nil { + logger.Printf(failLog) + } else { + buf.WriteString(failLog) + } + } + } + + // Perform the request. Exits when we finally get a 200. + resp, err := client.Get(ts.URL) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Make sure we can read the response body still, since we did not + // read or close it from the response log hook. + body, err := io.ReadAll(resp.Body) + if err != nil { + t.Fatalf("err: %v", err) + } + if string(body) != "test_200_body" { + t.Fatalf("expect %q, got %q", "test_200_body", string(body)) + } + + // Make sure we wrote to the logger on callbacks. + out := buf.String() + if !strings.Contains(out, "test_log_pass") { + t.Fatalf("expect response callback on 200: %q", out) + } + if !strings.Contains(out, "test_500_body") { + t.Fatalf("expect response callback on 500: %q", out) + } +} + +func TestClient_NewRequestWithContext(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + r, err := NewRequestWithContext(ctx, http.MethodGet, "/abc", nil) + if err != nil { + t.Fatalf("err: %v", err) + } + if r.Context() != ctx { + t.Fatal("Context must be set") + } +} + +func TestClient_RequestWithContext(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + if _, err := w.Write([]byte("test_200_body")); err != nil { + t.Fatalf("failed to write: %v", err) + } + })) + defer ts.Close() + + req, err := NewRequest(http.MethodGet, ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + ctx, cancel := context.WithCancel(req.Context()) + reqCtx := req.WithContext(ctx) + if reqCtx == req { + t.Fatal("WithContext must return a new Request object") + } + + client := NewClient() + + called := 0 + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + called++ + return DefaultRetryPolicy(reqCtx.Context(), resp, err) + } + + cancel() + _, err = client.Do(reqCtx) + + if called != 1 { + t.Fatalf("CheckRetry called %d times, expected 1", called) + } + + e := fmt.Sprintf("GET %s giving up after 1 attempt(s): %s", ts.URL, context.Canceled.Error()) + + if err.Error() != e { + t.Fatalf("Expected err to contain %s, got: %v", e, err) + } +} + +func TestClient_CheckRetry(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Error(w, "test_500_body", http.StatusInternalServerError) + })) + defer ts.Close() + + client := NewClient() + + retryErr := errors.New("retryError") + called := 0 + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + if called < 1 { + called++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + return false, retryErr + } + + // CheckRetry should return our retryErr value and stop the retry loop. + _, err := client.Get(ts.URL) + + if called != 1 { + t.Fatalf("CheckRetry called %d times, expected 1", called) + } + + if err.Error() != fmt.Sprintf("GET %s giving up after 2 attempt(s): retryError", ts.URL) { + t.Fatalf("Expected retryError, got:%v", err) + } +} + +func testStaticTime(t *testing.T) { + timeNow = func() time.Time { + now, err := time.Parse(time.RFC1123, "Fri, 31 Dec 1999 23:59:57 GMT") + if err != nil { + panic(err) + } + return now + } + t.Cleanup(func() { + timeNow = time.Now + }) +} + +func TestParseRetryAfterHeader(t *testing.T) { + testStaticTime(t) + tests := []struct { + name string + headers []string + sleep time.Duration + ok bool + }{ + {"seconds", []string{"2"}, time.Second * 2, true}, + {"date", []string{"Fri, 31 Dec 1999 23:59:59 GMT"}, time.Second * 2, true}, + {"past-date", []string{"Fri, 31 Dec 1999 23:59:00 GMT"}, 0, true}, + {"nil", nil, 0, false}, + {"two-headers", []string{"2", "3"}, time.Second * 2, true}, + {"empty", []string{""}, 0, false}, + {"negative", []string{"-2"}, 0, false}, + {"bad-date", []string{"Fri, 32 Dec 1999 23:59:59 GMT"}, 0, false}, + {"bad-date-format", []string{"badbadbad"}, 0, false}, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + sleep, ok := parseRetryAfterHeader(test.headers) + if ok != test.ok { + t.Fatalf("expected ok=%t, got ok=%t", test.ok, ok) + } + if sleep != test.sleep { + t.Fatalf("expected sleep=%v, got sleep=%v", test.sleep, sleep) + } + }) + } +} + +func TestClient_DefaultBackoff(t *testing.T) { + testStaticTime(t) + tests := []struct { + name string + code int + retryHeader string + }{ + {"http_429_seconds", http.StatusTooManyRequests, "2"}, + {"http_429_date", http.StatusTooManyRequests, "Fri, 31 Dec 1999 23:59:59 GMT"}, + {"http_503_seconds", http.StatusServiceUnavailable, "2"}, + {"http_503_date", http.StatusServiceUnavailable, "Fri, 31 Dec 1999 23:59:59 GMT"}, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Retry-After", test.retryHeader) + http.Error(w, fmt.Sprintf("test_%d_body", test.code), test.code) + })) + defer ts.Close() + + client := NewClient() + + var retryAfter time.Duration + retryable := false + + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + retryable, _ = DefaultRetryPolicy(context.Background(), resp, err) + retryAfter = DefaultBackoff(client.RetryWaitMin, client.RetryWaitMax, 1, resp) + return false, nil + } + + _, err := client.Get(ts.URL) + if err != nil { + t.Fatalf("expected no errors since retryable") + } + + if !retryable { + t.Fatal("Since the error is recoverable, the default policy shall return true") + } + + if retryAfter != 2*time.Second { + t.Fatalf("The header Retry-After specified 2 seconds, and shall not be %d seconds", retryAfter/time.Second) + } + }) + } +} + +func TestClient_DefaultRetryPolicy_TLS(t *testing.T) { + ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + attempts := 0 + client := NewClient() + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + attempts++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + _, err := client.Get(ts.URL) + if err == nil { + t.Fatalf("expected x509 error, got nil") + } + if attempts != 1 { + t.Fatalf("expected 1 attempt, got %d", attempts) + } +} + +func TestClient_DefaultRetryPolicy_redirects(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, "/", http.StatusFound) + })) + defer ts.Close() + + attempts := 0 + client := NewClient() + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + attempts++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + _, err := client.Get(ts.URL) + if err == nil { + t.Fatalf("expected redirect error, got nil") + } + if attempts != 1 { + t.Fatalf("expected 1 attempt, got %d", attempts) + } +} + +func TestClient_DefaultRetryPolicy_invalidscheme(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + attempts := 0 + client := NewClient() + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + attempts++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + url := strings.Replace(ts.URL, "http", "ftp", 1) + _, err := client.Get(url) + if err == nil { + t.Fatalf("expected scheme error, got nil") + } + if attempts != 1 { + t.Fatalf("expected 1 attempt, got %d", attempts) + } +} + +func TestClient_DefaultRetryPolicy_invalidheadername(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + attempts := 0 + client := NewClient() + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + attempts++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + req, err := http.NewRequest(http.MethodGet, ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + req.Header.Set("Header-Name-\033", "header value") + _, err = client.StandardClient().Do(req) + if err == nil { + t.Fatalf("expected header error, got nil") + } + if attempts != 1 { + t.Fatalf("expected 1 attempt, got %d", attempts) + } +} + +func TestClient_DefaultRetryPolicy_invalidheadervalue(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + attempts := 0 + client := NewClient() + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + attempts++ + return DefaultRetryPolicy(context.TODO(), resp, err) + } + + req, err := http.NewRequest(http.MethodGet, ts.URL, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + req.Header.Set("Header-Name", "bad header value \033") + _, err = client.StandardClient().Do(req) + if err == nil { + t.Fatalf("expected header value error, got nil") + } + if attempts != 1 { + t.Fatalf("expected 1 attempt, got %d", attempts) + } +} + +func TestClient_CheckRetryStop(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Error(w, "test_500_body", http.StatusInternalServerError) + })) + defer ts.Close() + + client := NewClient() + + // Verify that this stops retries on the first try, with no errors from the client. + called := 0 + client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + called++ + return false, nil + } + + _, err := client.Get(ts.URL) + + if called != 1 { + t.Fatalf("CheckRetry called %d times, expected 1", called) + } + + if err != nil { + t.Fatalf("Expected no error, got:%v", err) + } +} + +func TestClient_Head(t *testing.T) { + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "HEAD" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + w.WriteHeader(200) + })) + defer ts.Close() + + // Make the request. + resp, err := NewClient().Head(ts.URL + "/foo/bar") + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() +} + +func TestClient_Post(t *testing.T) { + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + if ct := r.Header.Get("Content-Type"); ct != "application/json" { + t.Fatalf("bad content-type: %s", ct) + } + + // Check the payload + body, err := io.ReadAll(r.Body) + if err != nil { + t.Fatalf("err: %s", err) + } + expected := []byte(`{"hello":"world"}`) + if !bytes.Equal(body, expected) { + t.Fatalf("bad: %v", body) + } + + w.WriteHeader(200) + })) + defer ts.Close() + + // Make the request. + resp, err := NewClient().Post( + ts.URL+"/foo/bar", + "application/json", + strings.NewReader(`{"hello":"world"}`)) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() +} + +func TestClient_PostForm(t *testing.T) { + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Fatalf("bad method: %s", r.Method) + } + if r.RequestURI != "/foo/bar" { + t.Fatalf("bad uri: %s", r.RequestURI) + } + if ct := r.Header.Get("Content-Type"); ct != "application/x-www-form-urlencoded" { + t.Fatalf("bad content-type: %s", ct) + } + + // Check the payload + body, err := io.ReadAll(r.Body) + if err != nil { + t.Fatalf("err: %s", err) + } + expected := []byte(`hello=world`) + if !bytes.Equal(body, expected) { + t.Fatalf("bad: %v", body) + } + + w.WriteHeader(200) + })) + defer ts.Close() + + // Create the form data. + form, err := url.ParseQuery("hello=world") + if err != nil { + t.Fatalf("err: %v", err) + } + + // Make the request. + resp, err := NewClient().PostForm(ts.URL+"/foo/bar", form) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() +} + +func TestBackoff_RateLimitLinearJitterBackoff(t *testing.T) { + testCases := []struct { + name string + min time.Duration + max time.Duration + headers http.Header + responseCode int + expect time.Duration + }{ + { + name: "429 no retry header", + min: time.Second, + max: time.Second, + headers: http.Header{}, + responseCode: http.StatusTooManyRequests, + expect: time.Second, + }, + { + name: "503 no retry header", + min: time.Second, + max: time.Second, + headers: http.Header{}, + responseCode: http.StatusServiceUnavailable, + expect: time.Second, + }, + { + name: "429 retry header", + min: time.Second, + max: time.Second, + headers: http.Header{ + "Retry-After": []string{"2"}, + }, + responseCode: http.StatusTooManyRequests, + expect: 2 * time.Second, + }, + { + name: "503 retry header", + min: time.Second, + max: time.Second, + headers: http.Header{ + "Retry-After": []string{"2"}, + }, + responseCode: http.StatusServiceUnavailable, + expect: 2 * time.Second, + }, + { + name: "502 ignore retry header", + min: time.Second, + max: time.Second, + headers: http.Header{ + "Retry-After": []string{"2"}, + }, + responseCode: http.StatusBadGateway, + expect: time.Second, + }, + { + name: "502 no retry header", + min: time.Second, + max: time.Second, + headers: http.Header{}, + responseCode: http.StatusBadGateway, + expect: time.Second, + }, + { + name: "429 retry header with jitter", + min: time.Second, + max: 5 * time.Second, + headers: http.Header{ + "Retry-After": []string{"2"}, + }, + responseCode: http.StatusTooManyRequests, + expect: 2 * time.Second, + }, + { + name: "429 retry header less than min", + min: 5 * time.Second, + max: 10 * time.Second, + headers: http.Header{ + "Retry-After": []string{"2"}, + }, + responseCode: http.StatusTooManyRequests, + expect: 2 * time.Second, + }, + { + name: "429 retry header in range", + min: time.Second, + max: 10 * time.Second, + headers: http.Header{ + "Retry-After": []string{"2"}, + }, + responseCode: http.StatusTooManyRequests, + expect: 2 * time.Second, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + got := RateLimitLinearJitterBackoff(tc.min, tc.max, 0, &http.Response{ + StatusCode: tc.responseCode, + Header: tc.headers, + }) + if got != tc.expect { + t.Fatalf("expected %s, got %s", tc.expect, got) + } + }) + } +} + +func TestBackoff(t *testing.T) { + type tcase struct { + min time.Duration + max time.Duration + i int + expect time.Duration + } + cases := []tcase{ + { + time.Second, + 5 * time.Minute, + 0, + time.Second, + }, + { + time.Second, + 5 * time.Minute, + 1, + 2 * time.Second, + }, + { + time.Second, + 5 * time.Minute, + 2, + 4 * time.Second, + }, + { + time.Second, + 5 * time.Minute, + 3, + 8 * time.Second, + }, + { + time.Second, + 5 * time.Minute, + 63, + 5 * time.Minute, + }, + { + time.Second, + 5 * time.Minute, + 128, + 5 * time.Minute, + }, + } + + for _, tc := range cases { + if v := DefaultBackoff(tc.min, tc.max, tc.i, nil); v != tc.expect { + t.Fatalf("bad: %#v -> %s", tc, v) + } + } +} + +func TestClient_BackoffCustom(t *testing.T) { + var retries int32 + + client := NewClient() + client.Backoff = func(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration { + atomic.AddInt32(&retries, 1) + return time.Millisecond * 1 + } + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if atomic.LoadInt32(&retries) == int32(client.RetryMax) { + w.WriteHeader(200) + return + } + w.WriteHeader(500) + })) + defer ts.Close() + + // Make the request. + resp, err := client.Get(ts.URL + "/foo/bar") + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() + if retries != int32(client.RetryMax) { + t.Fatalf("expected retries: %d != %d", client.RetryMax, retries) + } +} + +func TestClient_StandardClient(t *testing.T) { + // Create a retryable HTTP client. + client := NewClient() + + // Get a standard client. + standard := client.StandardClient() + + // Ensure the underlying retrying client is set properly. + if v := standard.Transport.(*RoundTripper).Client; v != client { + t.Fatalf("expected %v, got %v", client, v) + } +} + +func TestClient_RedirectWithBody(t *testing.T) { + var redirects int32 + // Mock server which always responds 200. + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.RequestURI { + case "/redirect": + w.Header().Set("Location", "/target") + w.WriteHeader(http.StatusTemporaryRedirect) + case "/target": + atomic.AddInt32(&redirects, 1) + w.WriteHeader(http.StatusCreated) + default: + t.Fatalf("bad uri: %s", r.RequestURI) + } + })) + defer ts.Close() + + client := NewClient() + client.RequestLogHook = func(logger Logger, req *http.Request, retryNumber int) { + if _, err := req.GetBody(); err != nil { + t.Fatalf("unexpected error with GetBody: %v", err) + } + } + // create a request with a body + req, err := NewRequest(http.MethodPost, ts.URL+"/redirect", strings.NewReader(`{"foo":"bar"}`)) + if err != nil { + t.Fatalf("err: %v", err) + } + + resp, err := client.Do(req) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() + + if resp.StatusCode != http.StatusCreated { + t.Fatalf("expected status code 201, got: %d", resp.StatusCode) + } + + // now one without a body + if err := req.SetBody(nil); err != nil { + t.Fatalf("err: %v", err) + } + + resp, err = client.Do(req) + if err != nil { + t.Fatalf("err: %v", err) + } + resp.Body.Close() + + if resp.StatusCode != http.StatusCreated { + t.Fatalf("expected status code 201, got: %d", resp.StatusCode) + } + + if atomic.LoadInt32(&redirects) != 2 { + t.Fatalf("Expected the client to be redirected 2 times, got: %d", atomic.LoadInt32(&redirects)) + } +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/go.mod b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/go.mod new file mode 100644 index 0000000..78fafd3 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/go.mod @@ -0,0 +1,15 @@ +module github.com/suzuki-shunsuke/go-retryablehttp + +require ( + github.com/hashicorp/go-cleanhttp v0.5.2 + github.com/hashicorp/go-hclog v1.6.3 +) + +require ( + github.com/fatih/color v1.16.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + golang.org/x/sys v0.20.0 // indirect +) + +go 1.23 diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/go.sum b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/go.sum new file mode 100644 index 0000000..a5da2ce --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/go.sum @@ -0,0 +1,36 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/roundtripper.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/roundtripper.go new file mode 100644 index 0000000..8c407ad --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/roundtripper.go @@ -0,0 +1,55 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package retryablehttp + +import ( + "errors" + "net/http" + "net/url" + "sync" +) + +// RoundTripper implements the http.RoundTripper interface, using a retrying +// HTTP client to execute requests. +// +// It is important to note that retryablehttp doesn't always act exactly as a +// RoundTripper should. This is highly dependent on the retryable client's +// configuration. +type RoundTripper struct { + // The client to use during requests. If nil, the default retryablehttp + // client and settings will be used. + Client *Client + + // once ensures that the logic to initialize the default client runs at + // most once, in a single thread. + once sync.Once +} + +// init initializes the underlying retryable client. +func (rt *RoundTripper) init() { + if rt.Client == nil { + rt.Client = NewClient() + } +} + +// RoundTrip satisfies the http.RoundTripper interface. +func (rt *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + rt.once.Do(rt.init) + + // Convert the request to be retryable. + retryableReq, err := FromRequest(req) + if err != nil { + return nil, err + } + + // Execute the request. + resp, err := rt.Client.Do(retryableReq) + // If we got an error returned by standard library's `Do` method, unwrap it + // otherwise we will wind up erroneously re-nesting the error. + if _, ok := err.(*url.Error); ok { + return resp, errors.Unwrap(err) + } + + return resp, err +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/roundtripper_test.go b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/roundtripper_test.go new file mode 100644 index 0000000..8d468c9 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/go-retryablehttp/roundtripper_test.go @@ -0,0 +1,146 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package retryablehttp + +import ( + "context" + "errors" + "io" + "net" + "net/http" + "net/http/httptest" + "net/url" + "reflect" + "sync/atomic" + "testing" +) + +func TestRoundTripper_implements(t *testing.T) { + // Compile-time proof of interface satisfaction. + var _ http.RoundTripper = &RoundTripper{} +} + +func TestRoundTripper_init(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + })) + defer ts.Close() + + // Start with a new empty RoundTripper. + rt := &RoundTripper{} + + // RoundTrip once. + req, _ := http.NewRequest("GET", ts.URL, nil) + if _, err := rt.RoundTrip(req); err != nil { + t.Fatal(err) + } + + // Check that the Client was initialized. + if rt.Client == nil { + t.Fatal("expected rt.Client to be initialized") + } + + // Save the Client for later comparison. + initialClient := rt.Client + + // RoundTrip again. + req, _ = http.NewRequest("GET", ts.URL, nil) + if _, err := rt.RoundTrip(req); err != nil { + t.Fatal(err) + } + + // Check that the underlying Client is unchanged. + if rt.Client != initialClient { + t.Fatalf("expected %v, got %v", initialClient, rt.Client) + } +} + +func TestRoundTripper_RoundTrip(t *testing.T) { + var reqCount int32 = 0 + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + reqNo := atomic.AddInt32(&reqCount, 1) + if reqNo < 3 { + w.WriteHeader(404) + } else { + w.WriteHeader(200) + if _, err := w.Write([]byte("success!")); err != nil { + t.Fatalf("failed to write: %v", err) + } + } + })) + defer ts.Close() + + // Make a client with some custom settings to verify they are used. + retryClient := NewClient() + retryClient.CheckRetry = func(_ context.Context, resp *http.Response, _ error) (bool, error) { + return resp.StatusCode == 404, nil + } + + // Get the standard client and execute the request. + client := retryClient.StandardClient() + resp, err := client.Get(ts.URL) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + // Check the response to ensure the client behaved as expected. + if resp.StatusCode != 200 { + t.Fatalf("expected 200, got %d", resp.StatusCode) + } + if v, err := io.ReadAll(resp.Body); err != nil { + t.Fatal(err) + } else if string(v) != "success!" { + t.Fatalf("expected %q, got %q", "success!", v) + } +} + +func TestRoundTripper_TransportFailureErrorHandling(t *testing.T) { + // Make a client with some custom settings to verify they are used. + retryClient := NewClient() + retryClient.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) { + if err != nil { + return true, err + } + + return false, nil + } + + retryClient.ErrorHandler = PassthroughErrorHandler + + expectedError := &url.Error{ + Op: "Get", + URL: "http://999.999.999.999:999/", + Err: &net.OpError{ + Op: "dial", + Net: "tcp", + Err: &net.DNSError{ + Name: "999.999.999.999", + Err: "no such host", + IsNotFound: true, + }, + }, + } + + // Get the standard client and execute the request. + client := retryClient.StandardClient() + _, err := client.Get("http://999.999.999.999:999/") + + // assert expectations + if !reflect.DeepEqual(expectedError, normalizeError(err)) { + t.Fatalf("expected %q, got %q", expectedError, err) + } +} + +func normalizeError(err error) error { + var dnsError *net.DNSError + + if errors.As(err, &dnsError) { + // this field is populated with the DNS server on on CI, but not locally + dnsError.Server = "" + } + + return err +} diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/slog-error/slogerr/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/slog-error/slogerr/LICENSE new file mode 100644 index 0000000..72a1c34 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/slog-error/slogerr/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/slog-util/slogutil/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/slog-util/slogutil/LICENSE new file mode 100644 index 0000000..d91a478 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/slog-util/slogutil/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/urfave-cli-v3-util/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/urfave-cli-v3-util/LICENSE new file mode 100644 index 0000000..d91a478 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/suzuki-shunsuke/urfave-cli-v3-util/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Shunsuke Suzuki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ulikunitz/xz/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ulikunitz/xz/LICENSE new file mode 100644 index 0000000..8a7f087 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/ulikunitz/xz/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2014-2022 Ulrich Kunitz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* My name, Ulrich Kunitz, may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/urfave/cli/v3/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/urfave/cli/v3/LICENSE new file mode 100644 index 0000000..a23fc53 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/urfave/cli/v3/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 urfave/cli maintainers + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/wk8/go-ordered-map/v2/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/wk8/go-ordered-map/v2/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/wk8/go-ordered-map/v2/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/zalando/go-keyring/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/zalando/go-keyring/LICENSE new file mode 100644 index 0000000..1c494f9 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/github.com/zalando/go-keyring/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zalando SE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v2/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v2/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v2/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v2/NOTICE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v2/NOTICE new file mode 100644 index 0000000..866d74a --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v2/NOTICE @@ -0,0 +1,13 @@ +Copyright 2011-2016 Canonical Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v3/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v3/LICENSE new file mode 100644 index 0000000..2683e4b --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v3/LICENSE @@ -0,0 +1,50 @@ + +This project is covered by two different licenses: MIT and Apache. + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v3/NOTICE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v3/NOTICE new file mode 100644 index 0000000..866d74a --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go.yaml.in/yaml/v3/NOTICE @@ -0,0 +1,13 @@ +Copyright 2011-2016 Canonical Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go/LICENSE new file mode 100644 index 0000000..2a7cf70 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go4.org/readerutil/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go4.org/readerutil/LICENSE new file mode 100644 index 0000000..8f71f43 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/go4.org/readerutil/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/crypto/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/crypto/LICENSE new file mode 100644 index 0000000..2a7cf70 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/crypto/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/oauth2/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..2a7cf70 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/sync/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/sync/LICENSE new file mode 100644 index 0000000..2a7cf70 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/sync/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/sys/unix/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/sys/unix/LICENSE new file mode 100644 index 0000000..2a7cf70 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/sys/unix/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/term/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/term/LICENSE new file mode 100644 index 0000000..2a7cf70 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/term/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/text/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/text/LICENSE new file mode 100644 index 0000000..2a7cf70 --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/golang.org/x/text/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/gopkg.in/yaml.v3/LICENSE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/gopkg.in/yaml.v3/LICENSE new file mode 100644 index 0000000..2683e4b --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/gopkg.in/yaml.v3/LICENSE @@ -0,0 +1,50 @@ + +This project is covered by two different licenses: MIT and Apache. + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/gopkg.in/yaml.v3/NOTICE b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/gopkg.in/yaml.v3/NOTICE new file mode 100644 index 0000000..866d74a --- /dev/null +++ b/.local/share/mise/installs/aqua/2.57.1/third_party_licenses/gopkg.in/yaml.v3/NOTICE @@ -0,0 +1,13 @@ +Copyright 2011-2016 Canonical Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/.local/share/mise/installs/aqua/latest b/.local/share/mise/installs/aqua/latest new file mode 120000 index 0000000..52690f3 --- /dev/null +++ b/.local/share/mise/installs/aqua/latest @@ -0,0 +1 @@ +./2.57.1 \ No newline at end of file diff --git a/.local/share/mise/shims/aqua b/.local/share/mise/shims/aqua new file mode 120000 index 0000000..ed6007b --- /dev/null +++ b/.local/share/mise/shims/aqua @@ -0,0 +1 @@ +/opt/homebrew/bin/mise \ No newline at end of file diff --git a/.local/share/zinit/completions/_fast-theme b/.local/share/zinit/completions/_fast-theme new file mode 120000 index 0000000..add1d49 --- /dev/null +++ b/.local/share/zinit/completions/_fast-theme @@ -0,0 +1 @@ +/Users/andrew/dotfiles/.local/share/zinit/plugins/zdharma-continuum---fast-syntax-highlighting/_fast-theme \ No newline at end of file diff --git a/.local/share/zinit/completions/_zinit b/.local/share/zinit/completions/_zinit new file mode 120000 index 0000000..177aac5 --- /dev/null +++ b/.local/share/zinit/completions/_zinit @@ -0,0 +1 @@ +/Users/andrew/.local/share/zinit/plugins/_local---zinit/_zinit \ No newline at end of file diff --git a/.local/share/zinit/plugins/_local---zinit/_zinit b/.local/share/zinit/plugins/_local---zinit/_zinit new file mode 120000 index 0000000..ee117dd --- /dev/null +++ b/.local/share/zinit/plugins/_local---zinit/_zinit @@ -0,0 +1 @@ +/Users/andrew/.local/share/zinit/zinit.git/_zinit \ No newline at end of file diff --git a/.local/share/zinit/plugins/junegunn---fzf b/.local/share/zinit/plugins/junegunn---fzf new file mode 160000 index 0000000..57695b0 --- /dev/null +++ b/.local/share/zinit/plugins/junegunn---fzf @@ -0,0 +1 @@ +Subproject commit 57695b03098c7ea0a707584378e84a3a3124527f diff --git a/.local/share/zinit/plugins/zdharma-continuum---fast-syntax-highlighting b/.local/share/zinit/plugins/zdharma-continuum---fast-syntax-highlighting new file mode 160000 index 0000000..3d574cc --- /dev/null +++ b/.local/share/zinit/plugins/zdharma-continuum---fast-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit 3d574ccf48804b10dca52625df13da5edae7f553 diff --git a/.local/share/zinit/plugins/zsh-users---zsh-autosuggestions b/.local/share/zinit/plugins/zsh-users---zsh-autosuggestions new file mode 160000 index 0000000..85919cd --- /dev/null +++ b/.local/share/zinit/plugins/zsh-users---zsh-autosuggestions @@ -0,0 +1 @@ +Subproject commit 85919cd1ffa7d2d5412f6d3fe437ebdbeeec4fc5 diff --git a/.local/share/zinit/polaris/man/man1/zinit.1 b/.local/share/zinit/polaris/man/man1/zinit.1 new file mode 100644 index 0000000..a8f3d81 --- /dev/null +++ b/.local/share/zinit/polaris/man/man1/zinit.1 @@ -0,0 +1,1754 @@ +'\" t +.\" Automatically generated by Pandoc 2.14.1 +.\" +.TH "" "" "" "" "" +.hy +.PP +[IMAGE: MIT License (https://img.shields.io/badge/license-MIT-blue.svg)] +[IMAGE: image (https://img.shields.io/github/tag/zdharma-continuum/zinit.svg)] (https://github.com/zdharma-continuum/zinit/releases) +[IMAGE: Join the chat at +https://matrix.to/#/#zdharma-continuum_community:gitter.im (https://badges.gitter.im/zdharma-continuum/zinit.svg)] (https://gitter.im/zdharma-continuum/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +.RS +.PP +\f[B]Note\f[R]: The original author (https://github.com/psprint) of +zinit deleted the \f[C]zdharma\f[R] organization randomly. +.PP +This is a reliable fork / place for the continuation of the project. +.PP +\[u1F6A7] For migration instructions please refer to this wiki +entry (https://github.com/zdharma-continuum/zinit/wiki/%F0%9F%9A%9A-Migration-to-zdharma-continuum) +.RE +.PP +\f[B]Table of Contents\f[R] \f[I]generated with +DocToc (https://github.com/thlorenz/doctoc)\f[R] +.IP \[bu] 2 +News +.IP \[bu] 2 +Zinit +.IP \[bu] 2 +Zinit Wiki +.IP \[bu] 2 +Quick Start +.RS 2 +.IP \[bu] 2 +Install +.RS 2 +.IP \[bu] 2 +Automatic Installation (Recommended) +.IP \[bu] 2 +Manual Installation +.RE +.IP \[bu] 2 +Usage +.RS 2 +.IP \[bu] 2 +Introduction +.IP \[bu] 2 +Plugins and snippets +.IP \[bu] 2 +Upgrade Zinit and plugins +.IP \[bu] 2 +Turbo and lucid +.IP \[bu] 2 +Migration +.IP \[bu] 2 +More Examples +.RE +.RE +.IP \[bu] 2 +How to Use +.RS 2 +.IP \[bu] 2 +Ice Modifiers +.RS 2 +.IP \[bu] 2 +Cloning Options +.IP \[bu] 2 +Selection of Files (To Source, \&...) +.IP \[bu] 2 +Conditional Loading +.IP \[bu] 2 +Plugin Output +.IP \[bu] 2 +Completions +.IP \[bu] 2 +Command Execution After Cloning, Updating or Loading +.IP \[bu] 2 +Sticky-Emulation Of Other Shells +.IP \[bu] 2 +Others +.IP \[bu] 2 +Order of Execution +.RE +.IP \[bu] 2 +Zinit Commands +.RS 2 +.IP \[bu] 2 +Help +.IP \[bu] 2 +Loading and Unloading +.IP \[bu] 2 +Completions +.IP \[bu] 2 +Tracking of the Active Session +.IP \[bu] 2 +Reports and Statistics +.IP \[bu] 2 +Compiling +.IP \[bu] 2 +Other +.RE +.IP \[bu] 2 +Updating Zinit and Plugins +.RE +.IP \[bu] 2 +Completions +.RS 2 +.IP \[bu] 2 +Calling \f[C]compinit\f[R] Without Turbo Mode +.IP \[bu] 2 +Calling \f[C]compinit\f[R] With Turbo Mode +.IP \[bu] 2 +Ignoring Compdefs +.IP \[bu] 2 +Disabling System-Wide \f[C]compinit\f[R] Call (Ubuntu) +.RE +.IP \[bu] 2 +Zinit Module +.IP \[bu] 2 +Hints and Tips +.RS 2 +.IP \[bu] 2 +Customizing Paths +.IP \[bu] 2 +Non-GitHub (Local) Plugins +.IP \[bu] 2 +Extending Git +.RE +.IP \[bu] 2 +Supporting +.IP \[bu] 2 +Getting Help and Community +.SH News +.PP +See here +.PP +To see the full history check the changelog. +.SH Zinit +.PP +Zinit is a flexible and fast Zshell plugin manager that will allow you +to install everything from GitHub and other sites. +Its characteristics are: +.IP "1." 3 +Zinit is currently the only plugin manager out there that provides Turbo +mode which yields \f[B]50-80% faster Zsh startup\f[R] (i.e.: the shell +will start up to \f[B]5\f[R] times faster!). +Check out a speed comparison with other popular plugin managers +here (https://github.com/zdharma-continuum/pm-perf-test). +.IP "2." 3 +The plugin manager gives \f[B]reports\f[R] from plugin loadings +describing what \f[B]aliases\f[R], functions, \f[B]bindkeys\f[R], Zle +widgets, zstyles, \f[B]completions\f[R], variables, \f[C]PATH\f[R] and +\f[C]FPATH\f[R] elements a plugin has set up. +This allows to quickly familiarize oneself with a new plugin and +provides rich and easy to digest information which might be helpful on +various occasions. +.IP "3." 3 +Supported is unloading of plugin and ability to list, (un)install and +\f[B]selectively disable\f[R], \f[B]enable\f[R] plugin\[cq]s +completions. +.IP "4." 3 +The plugin manager supports loading Oh My Zsh and Prezto plugins and +libraries, however the implementation isn\[cq]t framework specific and +doesn\[cq]t bloat the plugin manager with such code (more on this topic +can be found on the Wiki, in the +Introduction (https://zdharma-continuum.github.io/zinit/wiki/INTRODUCTION/#oh_my_zsh_prezto)). +.IP "5." 3 +The system does not use \f[C]$FPATH\f[R], loading multiple plugins +doesn\[cq]t clutter \f[C]$FPATH\f[R] with the same number of entries +(e.g.\ \f[C]10\f[R], \f[C]15\f[R] or more). +Code is immune to \f[C]KSH_ARRAYS\f[R] and other options typically +causing compatibility problems. +.IP "6." 3 +Zinit supports special, dedicated \f[B]packages\f[R] that offload the +user from providing long and complex commands. +See the zinit-packages +repository (https://github.com/zdharma-continuum/zinit-packages) for a +growing, complete list of Zinit packages and the Wiki +page (https://zdharma-continuum.github.io/zinit/wiki/Zinit-Packages/) +for an article about the feature. +.IP "7." 3 +Also, specialized Zinit extensions \[em] called \f[B]annexes\f[R] \[em] +allow to extend the plugin manager with new commands, URL-preprocessors +(used by e.g.: +zinit-annex-as-monitor (https://github.com/zdharma-continuum/zinit-annex-as-monitor) +annex), post-install and post-update hooks and much more. +See the zdharma-continuum (https://github.com/zdharma-continuum) +organization for a growing, complete list of available Zinit extensions +and refer to the Wiki +article (https://zdharma-continuum.github.io/zinit/wiki/Annexes/) for an +introduction on creating your own annex. +.SH Zinit Wiki +.PP +The information in this README is complemented by the Zinit +Wiki (https://zdharma-continuum.github.io/zinit/wiki/). +The README is an introductory overview of Zinit while the Wiki gives a +complete information with examples. +Make sure to read it to get the most out of Zinit. +.SH Quick Start +.SS Install +.SS Automatic Installation (Recommended) +.PP +The easiest way to install Zinit is to execute: +.IP +.nf +\f[C] +sh -c \[dq]$(curl -fsSL https://git.io/zinit-install)\[dq] +\f[R] +.fi +.PP +This will install Zinit in \f[C]\[ti]/.local/share/zinit/zinit.git\f[R]. +\f[C].zshrc\f[R] will be updated with three lines of code that will be +added to the bottom. +The lines will be sourcing \f[C]zinit.zsh\f[R] and setting up completion +for command \f[C]zinit\f[R]. +.PP +After installing and reloading the shell compile Zinit with +\f[C]zinit self-update\f[R]. +.SS Manual Installation +.PP +To manually install Zinit clone the repo to +e.g.\ \f[C]\[ti]/.local/share/zinit/zinit.git\f[R]: +.IP +.nf +\f[C] +ZINIT_HOME=\[dq]${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git\[dq] +mkdir -p \[dq]$(dirname $ZINIT_HOME)\[dq] +git clone https://github.com/zdharma-continuum/zinit.git \[dq]$ZINIT_HOME\[dq] +\f[R] +.fi +.PP +and source \f[C]zinit.zsh\f[R] from your \f[C].zshrc\f[R] (above +compinit (http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Initialization)): +.IP +.nf +\f[C] +ZINIT_HOME=\[dq]${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git\[dq] +source \[dq]${ZINIT_HOME}/zinit.zsh\[dq] +\f[R] +.fi +.PP +If you place the \f[C]source\f[R] below \f[C]compinit\f[R], then add +those two lines after the \f[C]source\f[R]: +.IP +.nf +\f[C] +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit +\f[R] +.fi +.PP +Various paths can be customized, see section Customizing Paths. +.PP +After installing and reloading the shell compile Zinit with +\f[C]zinit self-update\f[R]. +.SS Usage +.SS Introduction +.PP +Click here to read the introduction to +Zinit (https://zdharma-continuum.github.io/zinit/wiki/INTRODUCTION/). +It explains basic usage and some of the more unique features of Zinit +such as the Turbo mode. +If you\[cq]re new to Zinit we highly recommend you read it at least +once. +.SS Plugins and snippets +.PP +Plugins can be loaded using \f[C]load\f[R] or \f[C]light\f[R]. +.IP +.nf +\f[C] +zinit load # Load with reporting/investigating. +zinit light # Load without reporting/investigating. +\f[R] +.fi +.PP +If you want to source local or remote files (using direct URL), you can +do so with \f[C]snippet\f[R]. +.IP +.nf +\f[C] +zinit snippet +\f[R] +.fi +.PP +Such lines should be added to \f[C].zshrc\f[R]. +Snippets are cached locally, use \f[C]-f\f[R] option to download a fresh +version of a snippet, or \f[C]zinit update {URL}\f[R]. +Can also use \f[C]zinit update --all\f[R] to update all snippets (and +plugins). +.PP +\f[B]Example\f[R] +.IP +.nf +\f[C] +# Plugin history-search-multi-word loaded with investigating. +zinit load zdharma-continuum/history-search-multi-word + +# Two regular plugins loaded without investigating. +zinit light zsh-users/zsh-autosuggestions +zinit light zdharma-continuum/fast-syntax-highlighting + +# Snippet +zinit snippet https://gist.githubusercontent.com/hightemp/5071909/raw/ +\f[R] +.fi +.PP +\f[B]Prompt(Theme) Example\f[R] +.PP +This is powerlevel10k (https://github.com/romkatv/powerlevel10k), +pure (https://github.com/sindresorhus/pure), +starship (https://github.com/starship/starship) sample: +.IP +.nf +\f[C] +# Load powerlevel10k theme +zinit ice depth\[dq]1\[dq] # git clone depth +zinit light romkatv/powerlevel10k + +# Load pure theme +zinit ice pick\[dq]async.zsh\[dq] src\[dq]pure.zsh\[dq] # with zsh-async library that\[aq]s bundled with it. +zinit light sindresorhus/pure + +# Load starship theme +zinit ice as\[dq]command\[dq] from\[dq]gh-r\[dq] \[rs] # \[ga]starship\[ga] binary as command, from github release + atclone\[dq]./starship init zsh > init.zsh; ./starship completions zsh > _starship\[dq] \[rs] # starship setup at clone(create init.zsh, completion) + atpull\[dq]%atclone\[dq] src\[dq]init.zsh\[dq] # pull behavior same as clone, source init.zsh +zinit light starship/starship +\f[R] +.fi +.SS Upgrade Zinit and plugins +.PP +Zinit can be updated to \f[C]self-update\f[R] and plugins to +\f[C]update\f[R]. +.IP +.nf +\f[C] +# Self update +zinit self-update + +# Plugin update +zinit update + +# Plugin parallel update +zinit update --parallel + +# Increase the number of jobs in a concurrent-set to 40 +zinit update --parallel 40 +\f[R] +.fi +.SS Turbo and lucid +.PP +Turbo and lucid are the most used options. +Turbo Mode +.PP +Turbo mode is the key to performance. +It can be loaded asynchronously, which makes a huge difference when the +amount of plugins increases. +.PP +Usually used as \f[C]zinit ice wait\[dq]\[dq]\f[R], let\[cq]s +use the previous example: +.IP +.nf +\f[C] +zinit ice wait # wait is same wait\[dq]0\[dq] +zinit load zdharma-continuum/history-search-multi-word + +zinit ice wait\[dq]2\[dq] # load after 2 seconds +zinit load zdharma-continuum/history-search-multi-word + +zinit ice wait # also be used in \[ga]light\[ga] and \[ga]snippet\[ga] +zinit snippet https://gist.githubusercontent.com/hightemp/5071909/raw/ +\f[R] +.fi +Lucid +.PP +Turbo mode is verbose, so you need an option for quiet. +.PP +You can use with \f[C]lucid\f[R]: +.IP +.nf +\f[C] +zinit ice wait lucid +zinit load zdharma-continuum/history-search-multi-word +\f[R] +.fi +.PP +\f[B]\f[BI]F&A:\f[B]\f[R] What is \f[C]ice\f[R]? +.PP +\f[C]ice\f[R] is zinit\[cq]s option command. +The option melts like ice and is used only once. +(more: Ice Modifiers) +.SS Migration +Migration from Oh-My-ZSH +.PP +\f[B]Basic\f[R] +.IP +.nf +\f[C] +zinit snippet # Raw Syntax with URL +zinit snippet OMZ:: # Shorthand OMZ/ (https://github.com/ohmyzsh/ohmyzsh/raw/master/) +zinit snippet OMZL:: # Shorthand OMZ/lib/ +zinit snippet OMZT:: # Shorthand OMZ/themes/ +zinit snippet OMZP:: # Shorthand OMZ/plugins/ +\f[R] +.fi +.PP +\f[B]Library\f[R] +.PP +Importing the +clipboard (https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh) +and +termsupport (https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/termsupport.zsh) +Oh-My-Zsh Library Sample: +.IP +.nf +\f[C] +# Raw Syntax +zinit snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh +zinit snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/termsupport.zsh + +# OMZ Shorthand Syntax +zinit snippet OMZ::lib/clipboard.zsh +zinit snippet OMZ::lib/termsupport.zsh + +# OMZL Shorthand Syntax +zinit snippet OMZL::clipboard.zsh +zinit snippet OMZL::termsupport.zsh +\f[R] +.fi +.PP +\f[B]Theme\f[R] +.PP +To use \f[B]themes\f[R] created for Oh My Zsh you might want to first +source the \f[C]git\f[R] library there. +.PP +Then you can use the themes as snippets +(\f[C]zinit snippet \f[R]). +Some themes require not only Oh My Zsh\[cq]s Git \f[B]library\f[R], but +also Git \f[B]plugin\f[R] (error about \f[C]current_branch\f[R] may +appear). +Load this Git-plugin as single-file snippet directly from OMZ. +.PP +Most themes require \f[C]promptsubst\f[R] option +(\f[C]setopt promptsubst\f[R] in \f[C]zshrc\f[R]), if it isn\[cq]t set, +then prompt will appear as something like: +\f[C]... $(build_prompt) ...\f[R]. +.PP +You might want to suppress completions provided by the git plugin by +issuing \f[C]zinit cdclear -q\f[R] (\f[C]-q\f[R] is for quiet) +\[en]\ see below \f[B]Ignoring Compdefs\f[R]. +.PP +To summarize: +.IP +.nf +\f[C] +## Oh My Zsh Setting +ZSH_THEME=\[dq]robbyrussell\[dq] + +## Zinit Setting +# Must Load OMZ Git library +zinit snippet OMZL::git.zsh + +# Load Git plugin from OMZ +zinit snippet OMZP::git +zinit cdclear -q # <- forget completions provided up to this moment + +setopt promptsubst + +# Load Prompt +zinit snippet OMZT::robbyrussell +\f[R] +.fi +.PP +External Theme Sample: +NicoSantangelo/Alpharized (https://github.com/nicosantangelo/Alpharized) +.IP +.nf +\f[C] +## Oh My Zsh Setting +ZSH_THEME=\[dq]alpharized\[dq] + +## Zinit Setting +# Must Load OMZ Git library +zinit snippet OMZL::git.zsh + +# Load Git plugin from OMZ +zinit snippet OMZP::git +zinit cdclear -q # <- forget completions provided up to this moment + +setopt promptsubst + +# Load Prompt +zinit light NicoSantangelo/Alpharized +\f[R] +.fi +.PP +\f[B]\f[BI]F&A:\f[B]\f[R] Error occurs when loading OMZ\[cq]s theme. +.PP +If the \f[C]git\f[R] library will not be loaded, then similar to +following errors will be appearing: +.IP +.nf +\f[C] +\&........:1: command not found: git_prompt_status +\&........:1: command not found: git_prompt_short_sha +\f[R] +.fi +.PP +\f[B]Plugin\f[R] +.PP +If it consists of a single file, you can just load it. +.IP +.nf +\f[C] +## Oh-My-Zsh Setting +plugins=( + git + dotenv + rake + rbenv + ruby +) + +## Zinit Setting +zinit snippet OMZP::git +zinit snippet OMZP::dotenv +zinit snippet OMZP::rake +zinit snippet OMZP::rbenv +zinit snippet OMZP::ruby +\f[R] +.fi +.PP +Use \f[C]zinit ice svn\f[R] if multiple files require an entire +subdirectory. +Like +gitfast (https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gitfast), +osx (https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/osx): +.IP +.nf +\f[C] +zinit ice svn +zinit snippet OMZP::gitfast + +zinit ice svn +zinit snippet OMZP::osx +\f[R] +.fi +.PP +Use \f[C]zinit ice as\[dq]completion\[dq]\f[R] to directly add single +file completion snippets. +Like +docker (https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker), +fd (https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fd): +.IP +.nf +\f[C] +zinit ice as\[dq]completion\[dq] +zinit snippet OMZP::docker/_docker + +zinit ice as\[dq]completion\[dq] +zinit snippet OMZP::fd/_fd +\f[R] +.fi +.PP +You can see an extended explanation of Oh-My-Zsh setup in the +Wiki (https://zdharma-continuum.github.io/zinit/wiki/Example-Oh-My-Zsh-setup/) +Migration from Prezto +.PP +\f[B]Basic\f[R] +.IP +.nf +\f[C] +zinit snippet # Raw Syntax with URL +zinit snippet PZT:: # Shorthand PZT/ (https://github.com/sorin-ionescu/prezto/tree/master/) +zinit snippet PZTM:: # Shorthand PZT/modules/ +\f[R] +.fi +.PP +\f[B]Modules\f[R] +.PP +Importing the +environment (https://github.com/sorin-ionescu/prezto/tree/master/modules/environment) +and +terminal (https://github.com/sorin-ionescu/prezto/tree/master/modules/terminal) +Prezto Modules Sample: +.IP +.nf +\f[C] +## Prezto Setting +zstyle \[aq]:prezto:load\[aq] pmodule \[aq]environment\[aq] \[aq]terminal\[aq] + +## Zinit Setting +# Raw Syntax +zinit snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/environment/init.zsh +zinit snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/terminal/init.zsh + +# PZT Shorthand Syntax +zinit snippet PZT::modules/environment +zinit snippet PZT::modules/terminal + +# PZTM Shorthand Syntax +zinit snippet PZTM::environment +zinit snippet PZTM::terminal +\f[R] +.fi +.PP +Use \f[C]zinit ice svn\f[R] if multiple files require an entire +subdirectory. +Like +docker (https://github.com/sorin-ionescu/prezto/tree/master/modules/docker), +git (https://github.com/sorin-ionescu/prezto/tree/master/modules/git): +.IP +.nf +\f[C] +zinit ice svn +zinit snippet PZTM::docker + +zinit ice svn +zinit snippet PZTM::git +\f[R] +.fi +.PP +Use \f[C]zinit ice as\[dq]null\[dq]\f[R] if don\[cq]t exist +\f[C]*.plugin.zsh\f[R], \f[C]init.zsh\f[R], \f[C]*.zsh-theme*\f[R] files +in module. +Like +archive (https://github.com/sorin-ionescu/prezto/tree/master/modules/archive): +.IP +.nf +\f[C] +zinit ice svn as\[dq]null\[dq] +zinit snippet PZTM::archive +\f[R] +.fi +.PP +Use \f[C]zinit ice atclone\[dq]git clone \[dq]\f[R] if +module have external module. +Like +completion (https://github.com/sorin-ionescu/prezto/tree/master/modules/completion): +.IP +.nf +\f[C] +zplugin ice svn blockf \[rs] # use blockf to prevent any unnecessary additions to fpath, as zinit manages fpath + atclone\[dq]git clone --recursive https://github.com/zsh-users/zsh-completions.git external\[dq] +zplugin snippet PZTM::completion +\f[R] +.fi +.PP +\f[B]\f[BI]F&A:\f[B]\f[R] What is \f[C]zstyle\f[R]? +.PP +Read +zstyle (http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fzutil-Module) +doc (more: What does \f[C]zstyle\f[R] +do? (https://unix.stackexchange.com/questions/214657/what-does-zstyle-do)). +Migration from Zgen +.PP +\f[B]Oh My Zsh\f[R] +.PP +More reference: check \f[B]Migration from Oh-My-ZSH\f[R] +.IP +.nf +\f[C] +# Load ohmyzsh base +zgen oh-my-zsh +zinit snippet OMZL:: + +# Load ohmyzsh plugins +zgen oh-my-zsh +zinit snippet OMZ:: +\f[R] +.fi +.PP +\f[B]Prezto\f[R] +.PP +More reference: check \f[B]Migration from Prezto\f[R] +.IP +.nf +\f[C] +# Load Prezto +zgen prezto +zinit snippet PZTM:: # environment terminal editor history directory spectrum utility completion prompt + +# Load prezto plugins +zgen prezto +zinit snippet PZTM:: + +# Load a repo as Prezto plugins +zgen pmodule +zinit ice ver\[dq]\[dq] +zinit load + +# Set prezto options +zgen prezto