diff --git a/Makefile b/Makefile index 81b3c640e..12edcdec9 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ CIRRUS_CLI ?= v0.165.2 # renovate: datasource=github-releases depName=actions/runner GITHUB_RUNNER ?= 2.334.0 # renovate: datasource=gitlab-releases depName=gitlab-org/gitlab-runner -GITLAB_RUNNER ?= 19.0.0 +GITLAB_RUNNER ?= 19.0.1 # renovate: datasource=github-releases depName=open-telemetry/opentelemetry-collector-releases OTELCOL_VERSION ?= 0.151.0 diff --git a/go.mod b/go.mod index ced02b442..318de17db 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.26.0 replace ( github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 - github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.6 + github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.3 ) @@ -25,13 +25,13 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.7.0 - github.com/IBM/go-sdk-core/v5 v5.21.2 + github.com/IBM/go-sdk-core/v5 v5.21.3 github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3 - github.com/aws/aws-sdk-go-v2 v1.41.7 - github.com/aws/aws-sdk-go-v2/config v1.32.18 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.304.0 + github.com/aws/aws-sdk-go-v2 v1.41.9 + github.com/aws/aws-sdk-go-v2/config v1.32.20 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.304.2 github.com/aws/aws-sdk-go-v2/service/s3 v1.101.0 - github.com/aws/aws-sdk-go-v2/service/sts v1.42.1 + github.com/aws/aws-sdk-go-v2/service/sts v1.42.3 github.com/pulumi/pulumi-aws-native/sdk v1.66.0 github.com/pulumi/pulumi-aws/sdk/v7 v7.30.0 github.com/pulumi/pulumi-awsx/sdk/v3 v3.5.0 @@ -59,11 +59,11 @@ require ( ) require ( - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.24 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.15 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.23 // indirect - github.com/aws/aws-sdk-go-v2/service/pricing v1.42.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.11 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.26 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.18 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.25 // indirect + github.com/aws/aws-sdk-go-v2/service/pricing v1.42.2 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/evertras/bubble-table v0.19.2 // indirect github.com/hashicorp/hcl/v2 v2.24.0 // indirect @@ -87,16 +87,16 @@ require ( github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.19.17 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.23 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23 // indirect - github.com/aws/aws-sdk-go-v2/service/signin v1.0.11 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.30.17 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.0 // indirect - github.com/aws/smithy-go v1.25.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.19.19 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.25 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.25 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.25 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.10 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.25 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.1.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.30.19 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.2 // indirect + github.com/aws/smithy-go v1.26.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -118,15 +118,15 @@ require ( github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.25.0 // indirect + github.com/go-openapi/analysis v0.25.1 // indirect github.com/go-openapi/errors v0.22.7 // indirect github.com/go-openapi/jsonpointer v0.23.1 // indirect - github.com/go-openapi/jsonreference v0.21.5 // indirect + github.com/go-openapi/jsonreference v0.21.6 // indirect github.com/go-openapi/loads v0.23.3 // indirect github.com/go-openapi/runtime v0.31.0 // indirect github.com/go-openapi/runtime/server-middleware v0.30.0 // indirect github.com/go-openapi/spec v0.22.4 // indirect - github.com/go-openapi/strfmt v0.26.2 // indirect + github.com/go-openapi/strfmt v0.26.3 // indirect github.com/go-openapi/swag v0.26.0 // indirect github.com/go-openapi/swag/cmdutils v0.26.0 // indirect github.com/go-openapi/swag/conv v0.26.0 // indirect @@ -139,7 +139,7 @@ require ( github.com/go-openapi/swag/stringutils v0.26.0 // indirect github.com/go-openapi/swag/typeutils v0.26.0 // indirect github.com/go-openapi/swag/yamlutils v0.26.0 // indirect - github.com/go-openapi/validate v0.25.2 // indirect + github.com/go-openapi/validate v0.25.3 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/golang-jwt/jwt/v5 v5.3.1 // indirect github.com/golang/glog v1.2.5 // indirect @@ -171,7 +171,7 @@ require ( github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.24.0 // indirect - github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.17 // indirect + github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.18 // indirect github.com/pulumi/pulumi-docker/sdk/v4 v4.5.8 // indirect github.com/sagikazarmark/locafero v0.12.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect @@ -218,7 +218,7 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/ProtonMail/go-crypto v1.4.1 // indirect github.com/aws/aws-sdk-go-v2/service/ecs v1.80.0 - github.com/aws/aws-sdk-go-v2/service/iam v1.53.10 + github.com/aws/aws-sdk-go-v2/service/iam v1.53.12 github.com/blang/semver v3.5.1+incompatible // indirect github.com/cheggaaa/pb v1.0.29 // indirect github.com/djherbis/times v1.6.0 // indirect @@ -226,7 +226,7 @@ require ( github.com/fsnotify/fsnotify v1.10.1 // indirect github.com/go-git/go-billy/v5 v5.9.0 // indirect github.com/go-git/go-git/v5 v5.19.1 // indirect - github.com/go-playground/validator/v10 v10.30.2 + github.com/go-playground/validator/v10 v10.30.3 github.com/gogo/protobuf v1.3.2 // indirect github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -234,7 +234,7 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/kevinburke/ssh_config v1.6.0 // indirect - github.com/mattn/go-runewidth v0.0.23 // indirect + github.com/mattn/go-runewidth v0.0.24 // indirect github.com/mitchellh/go-ps v1.0.0 // indirect github.com/nxadm/tail v1.4.11 // indirect github.com/opentracing/basictracer-go v1.1.0 // indirect diff --git a/go.sum b/go.sum index 34163f0aa..243ece2c4 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/IBM-Cloud/power-go-client v1.15.0 h1:bXkcx9DlhCmNr9w2xHI9lpzjkfM7uLVviaQGDAg0U50= github.com/IBM-Cloud/power-go-client v1.15.0/go.mod h1:UTyMxybFDj0xHNalAIC5qfRZs16gOSDzPFfUOWnRD64= -github.com/IBM/go-sdk-core/v5 v5.21.2 h1:mJ5QbLPOm4g5qhZiVB6wbSllfpeUExftGoyPek2hk4M= -github.com/IBM/go-sdk-core/v5 v5.21.2/go.mod h1:ngpMgwkjur1VNUjqn11LPk3o5eCyOCRbcfg/0YAY7Hc= +github.com/IBM/go-sdk-core/v5 v5.21.3 h1:5HVPZu3aOdPHkqUGdyrmpuh8I/X+sdyog6HSLzahfHQ= +github.com/IBM/go-sdk-core/v5 v5.21.3/go.mod h1:cZJMMEImJkIXCd61kHeDFtjbdDpXq4ua4ITrwpBYdWs= github.com/IBM/platform-services-go-sdk v0.97.4 h1:UiHTDanRY+Laydss68GFLHqoOy4l7VCj0dBNFgdGlYU= github.com/IBM/platform-services-go-sdk v0.97.4/go.mod h1:t93mozFmKrxexnKNdx2gNOtEI9Wd62dKAVffQYm0vRM= github.com/IBM/vpc-go-sdk v0.83.2 h1:RLMha7+buktU9hrhvAMF2QRHIvxaAsuU14W6akybJqs= @@ -65,50 +65,50 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3 h1:13qtG4reL2+2UiCm2U7gM9QJthDO8hPPzvn7hTjHask= github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3/go.mod h1:wdlMRtz9G4IO6H1yZPsqfGBxR8E6B/bdxHlGkls4kGQ= -github.com/aws/aws-sdk-go-v2 v1.41.7 h1:DWpAJt66FmnnaRIOT/8ASTucrvuDPZASqhhLey6tLY8= -github.com/aws/aws-sdk-go-v2 v1.41.7/go.mod h1:4LAfZOPHNVNQEckOACQx60Y8pSRjIkNZQz1w92xpMJc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10 h1:gx1AwW1Iyk9Z9dD9F4akX5gnN3QZwUB20GGKH/I+Rho= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10/go.mod h1:qqY157uZoqm5OXq/amuaBJyC9hgBCBQnsaWnPe905GY= -github.com/aws/aws-sdk-go-v2/config v1.32.18 h1:Hcia46bxhGgF3BaSnG8nSNCWmqTK6bj9xN9/FJ3WK6Q= -github.com/aws/aws-sdk-go-v2/config v1.32.18/go.mod h1:zEjCAYmxqDadH1WX8CdBvmLKhUEUVFgKRQG38zjDmrY= -github.com/aws/aws-sdk-go-v2/credentials v1.19.17 h1:gP2nkGsS+KMvF/jfFz2Vv2qiiOqWKyPACSzPsqHgoW8= -github.com/aws/aws-sdk-go-v2/credentials v1.19.17/go.mod h1:Bsew3S/moG5iT77giPj1q8wb/s0RE5/QfH+ASjYtuQc= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.23 h1:UuSfcORqNSz/ey3VPRS8TcVH2Ikf0/sC+Hdj400QI6U= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.23/go.mod h1:+G/OSGiOFnSOkYloKj/9M35s74LgVAdJBSD5lsFfqKg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23 h1:GpT/TrnBYuE5gan2cZbTtvP+JlHsutdmlV2YfEyNde0= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23/go.mod h1:xYWD6BS9ywC5bS3sz9Xh04whO/hzK2plt2Zkyrp4JuA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23 h1:bpd8vxhlQi2r1hiueOw02f/duEPTMK59Q4QMAoTTtTo= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23/go.mod h1:15DfR2nw+CRHIk0tqNyifu3G1YdAOy68RftkhMDDwYk= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.24 h1:OQqn11BtaYv1WLUowvcA30MpzIu8Ti4pcLPIIyoKZrA= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.24/go.mod h1:X5ZJyfwVrWA96GzPmUCWFQaEARPR7gCrpq2E92PJwAE= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.304.0 h1:wZthLlYdKxBo7NpWLbl0A/8DB/QNDB+8RJa9WboK9Q0= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.304.0/go.mod h1:Y95W0Hm6FYLPa6o0hbnJ+sWgmdc4ifcLFjGkdobWVhY= +github.com/aws/aws-sdk-go-v2 v1.41.9 h1:/rYeyO2+HrMztAmxAq9++XJtFMqSIpSsNA0yDGALYq4= +github.com/aws/aws-sdk-go-v2 v1.41.9/go.mod h1:+HsoOEX80qAVUitj1A2DhCNTjmb3edVyuDypb6LNEeo= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.11 h1:h5+3VT69KUBK24grGuuA5saDJTj2IIjLb9au668Fo5I= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.11/go.mod h1:dnakxebH6UwFvcvujL0LVggYQ8nEvBGjU4G/V79Nv94= +github.com/aws/aws-sdk-go-v2/config v1.32.20 h1:8VMDnWc/kEzxsI/1ngGM9mG81a8IGmIHD8KLcYGwagc= +github.com/aws/aws-sdk-go-v2/config v1.32.20/go.mod h1:PuwEpciweIXGULWeOeSTXtSbH4CW9mWdWrhdCKQI1sM= +github.com/aws/aws-sdk-go-v2/credentials v1.19.19 h1:yuFzSV1U0aRNYCQGVaTY2zW2M/L93pYHnXnrJUphYhU= +github.com/aws/aws-sdk-go-v2/credentials v1.19.19/go.mod h1:7y63L1kGzeoDlJaQ3Z578KrnmfBut96JjvJUzGwR+YE= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.25 h1:0w6dCiO8iez+YKwRhRBlL1CH/E3GTfdkuzrwj1by8vo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.25/go.mod h1:9FDWUothyr5RCRAHc45XOiVCzUR8n/IhCYX+uVqw6vk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.25 h1:Uii3frf9ztec/ABM2/FSH9/z7PLzxfpG8h4RpkUFflQ= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.25/go.mod h1:G6kntsA2GorAxDPbap6xgB2F+amSLUF8GJTi7PUoX44= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.25 h1:r1+/l6m+WaUJF9HISEsNOLHSNj5EXYQxK8VX6Cz9NlA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.25/go.mod h1:cKf+D+NMDK1LndD7BowHbBZPgR9V0/5HubH0PFWvA+c= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.26 h1:A1PmWU2zfkIm9EyFlJncFXL4W4phML+h8KjltUsCvNQ= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.26/go.mod h1:dY4MRzXEizrD4hqtpKvWVGPX7QleSGGVY+EBolo1RmM= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.304.2 h1:puQq1j5XHH/zaeAJS8ngKUaBAlg70VStCvhwH69Vr4o= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.304.2/go.mod h1:BmEhUktSbAPK6oedmAp9w/j4Yaa2WqTmNTQ4ovydhX4= github.com/aws/aws-sdk-go-v2/service/ecs v1.80.0 h1:orZYOYtvYU7A45XTWC/UchWSkkdWjOyXi8MYksnmQf0= github.com/aws/aws-sdk-go-v2/service/ecs v1.80.0/go.mod h1:TIKZ9zIFS6W2k9FeW+r5sGVnlxp+aUt9oQ/St3Suj1o= -github.com/aws/aws-sdk-go-v2/service/iam v1.53.10 h1:kcN3I3llO7VwIY5w3Pc5FmEonpsr23Ou7Cwk4qf7dik= -github.com/aws/aws-sdk-go-v2/service/iam v1.53.10/go.mod h1:1vkJzjCYC3byO0kIrBqLPzvZpuvYhPXkuyARs6E7tM4= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9 h1:FLudkZLt5ci0ozzgkVo8BJGwvqNaZbTWb3UcucAateA= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9/go.mod h1:w7wZ/s9qK7c8g4al+UyoF1Sp/Z45UwMGcqIzLWVQHWk= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.15 h1:ieLCO1JxUWuxTZ1cRd0GAaeX7O6cIxnwk7tc1LsQhC4= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.15/go.mod h1:e3IzZvQ3kAWNykvE0Tr0RDZCMFInMvhku3qNpcIQXhM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23 h1:pbrxO/kuIwgEsOPLkaHu0O+m4fNgLU8B3vxQ+72jTPw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23/go.mod h1:/CMNUqoj46HpS3MNRDEDIwcgEnrtZlKRaHNaHxIFpNA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.23 h1:03xatSQO4+AM1lTAbnRg5OK528EUg744nW7F73U8DKw= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.23/go.mod h1:M8l3mwgx5ToK7wot2sBBce/ojzgnPzZXUV445gTSyE8= -github.com/aws/aws-sdk-go-v2/service/pricing v1.42.0 h1:SsLM4EzFcuoHCTOnoldpRLUnJQJ/6/UfxwW33atxrwA= -github.com/aws/aws-sdk-go-v2/service/pricing v1.42.0/go.mod h1:zXv2YjVkSugNoBHG8WrHHNqCyTFplsE8B8hCAV9riRA= +github.com/aws/aws-sdk-go-v2/service/iam v1.53.12 h1:nmWprhv80J825VaeJLIoLymyPbYOTqlKH8OqjLlWDG0= +github.com/aws/aws-sdk-go-v2/service/iam v1.53.12/go.mod h1:nLv8xEWcYrOTFwomMo1ItTUFuG1HNjvU6ZaX0ZDB1BU= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.10 h1:d5/908OJ4bXg8lyjeMPvXetEKqoDoLi5Owy1zNue3yg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.10/go.mod h1:a57l7Hwh+FWI+we50g5NPJHYUKeJKfXbc4w8SyXu8Ig= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.18 h1:W/EyPFl9A5rXrtoilfwHYEvzHER+K4SpBPtMXi24Mos= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.18/go.mod h1:UG50K+pvd/uy6xExbobg0rjqFBFZe6I3l75EPDZw4tg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.25 h1:dD3dhHNglpd98gs72my22Ndqi1hqQGllFFg1F+twfxg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.25/go.mod h1:0yAbjPfd64gG7mj85RW+fMEYdfBgCRZw8g/oWcL1pjc= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.25 h1:2pQEbwf+/6EDbiit/GcBE2K4IUpMZymaA0kOz3xK978= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.25/go.mod h1:KvT6NCcQ0EZ+ZkVRrlBMt04Po3ok23YELEp7WimhLhM= +github.com/aws/aws-sdk-go-v2/service/pricing v1.42.2 h1:qLe0KpIqzUuBQk6iV7oiOGW/EEWLs87uTP/xNKpfe88= +github.com/aws/aws-sdk-go-v2/service/pricing v1.42.2/go.mod h1:aciuNKM3vUImiRzhEquRAAfetzdIKAdbEIL3cTm1XE4= github.com/aws/aws-sdk-go-v2/service/s3 v1.101.0 h1:etqBTKY581iwLL/H/S2sVgk3C9lAsTJFeXWFDsDcWOU= github.com/aws/aws-sdk-go-v2/service/s3 v1.101.0/go.mod h1:L2dcoOgS2VSgbPLvpak2NyUPsO1TBN7M45Z4H7DlRc4= -github.com/aws/aws-sdk-go-v2/service/signin v1.0.11 h1:TdJ+HdzOBhU8+iVAOGUTU63VXopcumCOF1paFulHWZc= -github.com/aws/aws-sdk-go-v2/service/signin v1.0.11/go.mod h1:R82ZRExE/nheo0N+T8zHPcLRTcH8MGsnR3BiVGX0TwI= -github.com/aws/aws-sdk-go-v2/service/sso v1.30.17 h1:7byT8HUWrgoRp6sXjxtZwgOKfhss5fW6SkLBtqzgRoE= -github.com/aws/aws-sdk-go-v2/service/sso v1.30.17/go.mod h1:xNWknVi4Ezm1vg1QsB/5EWpAJURq22uqd38U8qKvOJc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.0 h1:nDARhv/oF55bcxF7rCI/4PDxOKnVXVWwDuDwCs2I2SQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.0/go.mod h1:4vIRDq+CJB2xFAXZ+YgGUTiEft7oAQlhIs71xcSeuVg= -github.com/aws/aws-sdk-go-v2/service/sts v1.42.1 h1:F/M5Y9I3nwr2IEpshZgh1GeHpOItExNM9L1euNuh/fk= -github.com/aws/aws-sdk-go-v2/service/sts v1.42.1/go.mod h1:mTNxImtovCOEEuD65mKW7DCsL+2gjEH+RPEAexAzAio= -github.com/aws/smithy-go v1.25.1 h1:J8ERsGSU7d+aCmdQur5Txg6bVoYelvQJgtZehD12GkI= -github.com/aws/smithy-go v1.25.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/aws-sdk-go-v2/service/signin v1.1.1 h1:1VwbP3qMNfxUDEXWki4rCE5iA+44VA1lokTz9HasGzw= +github.com/aws/aws-sdk-go-v2/service/signin v1.1.1/go.mod h1:vUtyoSj0OPji3kjIVSc/GlKuWEiL33f/WFxl6dmpy/A= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.19 h1:N6pIsdFOW1Kd9S4KyFKXdGRBojPPxkP32+uHFWLv4Hc= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.19/go.mod h1:3gt5WJArFooNmyLONS+h/R4J+o86II8du38IgCwj9dE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.2 h1:hc+lBYiiTr8Zk4MTzIsQ92MeDWCIDvWGmzKUWOaBcOg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.2/go.mod h1:hU6fqB3OJA6/ePheD47LQnxvjYk6br6PtQxs+Q9ojvk= +github.com/aws/aws-sdk-go-v2/service/sts v1.42.3 h1:ErklX/7uhSbkAAeyQD/Y1OoQ9hO3SJXQNEgksORW3Js= +github.com/aws/aws-sdk-go-v2/service/sts v1.42.3/go.mod h1:ULe4HCzfKPiR6R3HEurE3b1upEkuk8AkMrOKtaOxKO8= +github.com/aws/smithy-go v1.26.0 h1:9ouqbi+NyKP7fV3Te7UElCwdAb6Y8uk7LGwPE5tVe/s= +github.com/aws/smithy-go v1.26.0/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o= @@ -203,14 +203,14 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.25.0 h1:EnjAq1yO8wEO9HbPmY8vLPEIkdZuuFhCAKBPvCB7bCs= -github.com/go-openapi/analysis v0.25.0/go.mod h1:5WFTRE43WLkPG9r9OtlMfqkkvUTYLVVCIxLlEpyF8kE= +github.com/go-openapi/analysis v0.25.1 h1:We0FXVvCY5XNSb8GrE+k+wsgkUqTJqnkqsVAC9EGdrM= +github.com/go-openapi/analysis v0.25.1/go.mod h1:/S7h3rOOTHDGoPwyyjTGQpGeLKxWecr8QWSBdE68UgM= github.com/go-openapi/errors v0.22.7 h1:JLFBGC0Apwdzw3484MmBqspjPbwa2SHvpDm0u5aGhUA= github.com/go-openapi/errors v0.22.7/go.mod h1://QW6SD9OsWtH6gHllUCddOXDL0tk0ZGNYHwsw4sW3w= github.com/go-openapi/jsonpointer v0.23.1 h1:1HBACs7XIwR2RcmItfdSFlALhGbe6S92p0ry4d1GWg4= github.com/go-openapi/jsonpointer v0.23.1/go.mod h1:iWRmZTrGn7XwYhtPt/fvdSFj1OfNBngqRT2UG3BxSqY= -github.com/go-openapi/jsonreference v0.21.5 h1:6uCGVXU/aNF13AQNggxfysJ+5ZcU4nEAe+pJyVWRdiE= -github.com/go-openapi/jsonreference v0.21.5/go.mod h1:u25Bw85sX4E2jzFodh1FOKMTZLcfifd1Q+iKKOUxExw= +github.com/go-openapi/jsonreference v0.21.6 h1:NZ5nGfnaM1n4I43Xjm1e5/M2GjOwQwndQz22uhxwD+Y= +github.com/go-openapi/jsonreference v0.21.6/go.mod h1:xzbgtQ3ZbWxvET3AxdzCJlJt6vkovbf+IfSPJjD0tUY= github.com/go-openapi/loads v0.23.3 h1:g5Xap1JfwKkUnZdn+S0L3SzBDpcTIYzZ5Qaag0YDkKQ= github.com/go-openapi/loads v0.23.3/go.mod h1:NOH07zLajXo8y55hom0omlHWDVVvCwBM/S+csCK8LqA= github.com/go-openapi/runtime v0.31.0 h1:vhmlo1LMjGXYTlYB0eFm0tTVuAidDHtmrL1nAABzUCg= @@ -219,8 +219,8 @@ github.com/go-openapi/runtime/server-middleware v0.30.0 h1:8rPoJ/xv7JL8BsovaqboK github.com/go-openapi/runtime/server-middleware v0.30.0/go.mod h1:OYNT/TxNvB/VK5oe4htM2jDTwlEXuejVJmu0DVZfAMs= github.com/go-openapi/spec v0.22.4 h1:4pxGjipMKu0FzFiu/DPwN3CTBRlVM2yLf/YTWorYfDQ= github.com/go-openapi/spec v0.22.4/go.mod h1:WQ6Ai0VPWMZgMT4XySjlRIE6GP1bGQOtEThn3gcWLtQ= -github.com/go-openapi/strfmt v0.26.2 h1:ysjheCh4i1rmFEo2LanhELDNucNzfWTZhUDKgWWPaFM= -github.com/go-openapi/strfmt v0.26.2/go.mod h1:fXh1e449cyUn2NYuz+wb3wARBUdMl7qPEZwX00nqivY= +github.com/go-openapi/strfmt v0.26.3 h1:rzmslHarJgBbf2qfGge+X3htclQfmXqBZMm0Too0HhU= +github.com/go-openapi/strfmt v0.26.3/go.mod h1:a5nsUw0oRpQzZeOwx8bi6cKbzFZslpbCKt1LEot+KnQ= github.com/go-openapi/swag v0.26.0 h1:GVDXCmfvhfu1BxiHo8/FA+BbKmhecHnG3varjON5/RI= github.com/go-openapi/swag v0.26.0/go.mod h1:82g3193sZJRbocs7bNCqGfIgq8pkuwVwCfhKIRlEQF0= github.com/go-openapi/swag/cmdutils v0.26.0 h1:iowihOcvq7y4egO8cOq0dmfohz6wfeQ63U1EnuhO2TU= @@ -249,18 +249,18 @@ github.com/go-openapi/swag/yamlutils v0.26.0 h1:H7O8l/8NJJQ/oiReEN+oMpnGMyt8G0hl github.com/go-openapi/swag/yamlutils v0.26.0/go.mod h1:1evKEGAtP37Pkwcc7EWMF0hedX0/x3Rkvei2wtG/TbU= github.com/go-openapi/testify/enable/yaml/v2 v2.5.0 h1:3hZD1fwydvCx/cc1R2uYNQirHqf2s6lqpKV3FcNTURA= github.com/go-openapi/testify/enable/yaml/v2 v2.5.0/go.mod h1:TvDZKBH7ZbMaF3EqH2AwTvNQCmzyZq8K1agRjf1B+Nk= -github.com/go-openapi/testify/v2 v2.5.0 h1:UOCr63aAsMIDydZbZGqo5Ev01D4eydItRbekDuZMJLw= -github.com/go-openapi/testify/v2 v2.5.0/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= -github.com/go-openapi/validate v0.25.2 h1:12NsfLAwGegqbGWr2CnvT65X/Q2USJipmJ9b7xDJZz0= -github.com/go-openapi/validate v0.25.2/go.mod h1:Pgl1LpPPGFnZ+ys4/hTlDiRYQdI1ocKypgE+8Q8BLfY= +github.com/go-openapi/testify/v2 v2.5.1 h1:TMdhCaw8fUNraVSf3Omoob1dO/AzBfhtFAPW0an6sBo= +github.com/go-openapi/testify/v2 v2.5.1/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= +github.com/go-openapi/validate v0.25.3 h1:4nzAIavcJ7WveHK2+V1UAkZK3kWcjzxZCzjfZAfavKs= +github.com/go-openapi/validate v0.25.3/go.mod h1:GemfuGMyYpIaBoKpX3z8sLywrmxpzWVOoJ7R0VeAVuk= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.30.2 h1:JiFIMtSSHb2/XBUbWM4i/MpeQm9ZK2xqPNk8vgvu5JQ= -github.com/go-playground/validator/v10 v10.30.2/go.mod h1:mAf2pIOVXjTEBrwUMGKkCWKKPs9NheYGabeB04txQSc= +github.com/go-playground/validator/v10 v10.30.3 h1:4MU6YkEwx7GbcPJOZxrtbu+QfF3pJLJuaYTeAH0DYy8= +github.com/go-playground/validator/v10 v10.30.3/go.mod h1:4Axh7oCNGcoGkqLoE4YWt6n20mcEIsPRlB7vPk3lpyc= github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= @@ -345,8 +345,8 @@ github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2J github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw= -github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU= +github.com/mattn/go-runewidth v0.0.24/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= @@ -432,8 +432,8 @@ github.com/pulumi/pulumi-azure-native-sdk/v3 v3.18.0 h1:stWEc+bQf7V6Qc1NYDuoUNJA github.com/pulumi/pulumi-azure-native-sdk/v3 v3.18.0/go.mod h1:wgsFRstMxKSnIyav7GRRTn6mvKO6rmu/cOTDr+0eqPU= github.com/pulumi/pulumi-command/sdk v1.2.1 h1:mAziZ91a/9U+5IjZH5Skcar80OSmpBSYljeQNRblTWQ= github.com/pulumi/pulumi-command/sdk v1.2.1/go.mod h1:hQxv9DXg6bFjcd9BEiNdMImQ/V1rnC9D115q5VXYNps= -github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.17 h1:XSz9LZ4Q0267DW09I1DLoJhLXWzSeR0uH4/hD3owGT4= -github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.17/go.mod h1:QgbLZb1Cd1yiX9GsIaZCRuFL/0ortNfUgsp/vx5YTws= +github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.18 h1:emkSEfjXfz7i2vNDi43WTqABhP9TY2mQnO2zdL683hw= +github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.18/go.mod h1:BriBqoV2I/58/AZy4/4oJfoiJYX7Nf/NxsAmGXDgvgo= github.com/pulumi/pulumi-docker/sdk/v4 v4.5.8 h1:rik9L2SIpsoDenY51MkogR6GWgu/0Sy/XmyQmKWNUqU= github.com/pulumi/pulumi-docker/sdk/v4 v4.5.8/go.mod h1:eph7BPNPkEIIK882/Ll4dbeHl5wZEc/UvTcUW0CK1UY= github.com/pulumi/pulumi-gitlab/sdk/v8 v8.11.0 h1:nR406lhXeltZVfLXH8E4J5JetflNZePBgXz2eyHT7RM= diff --git a/tools/go.mod b/tools/go.mod index f7e82eeee..f94dc86ba 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -4,7 +4,7 @@ go 1.25.7 replace ( github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 - github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.6 + github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.3 ) @@ -81,7 +81,7 @@ require ( github.com/breml/bidichk v0.3.3 // indirect github.com/breml/errchkjson v0.4.1 // indirect github.com/butuzov/ireturn v0.4.1 // indirect - github.com/butuzov/mirror v1.3.0 // indirect + github.com/butuzov/mirror v1.3.3 // indirect github.com/catenacyber/perfsprint v0.10.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.4 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -133,7 +133,7 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jgautheron/goconst v1.10.1 // indirect + github.com/jgautheron/goconst v1.10.2 // indirect github.com/jjti/go-spancheck v0.6.5 // indirect github.com/julz/importas v0.2.0 // indirect github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect @@ -156,9 +156,9 @@ require ( github.com/maratori/testableexamples v1.0.1 // indirect github.com/maratori/testpackage v1.1.2 // indirect github.com/matoous/godox v1.1.0 // indirect - github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-colorable v0.1.15 // indirect github.com/mattn/go-isatty v0.0.22 // indirect - github.com/mattn/go-runewidth v0.0.23 // indirect + github.com/mattn/go-runewidth v0.0.24 // indirect github.com/mgechev/revive v1.15.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/moricho/tparallel v0.3.2 // indirect diff --git a/tools/go.sum b/tools/go.sum index f08a1daaa..39cf6437f 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -76,8 +76,8 @@ github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDw github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s= github.com/butuzov/ireturn v0.4.1 h1:vWb3NO4t77iku/sjCQ/2pHTQeOmxEhjIriJqRLg1Y+I= github.com/butuzov/ireturn v0.4.1/go.mod h1:q+DXKzTDV5guNuXLnIab9fKXizTn2miZHLhxH7V/GB4= -github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc= -github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI= +github.com/butuzov/mirror v1.3.3 h1:v0RsWBhfFc1RQqE/f3sHpSttKDtodFn0gFmtYyD4/hA= +github.com/butuzov/mirror v1.3.3/go.mod h1:h9BzzwYnTiHO0GzgvaTqIg7VSsOUhdIv51cHFFBmX1w= github.com/catenacyber/perfsprint v0.10.1 h1:u7Riei30bk46XsG8nknMhKLXG9BcXz3+3tl/WpKm0PQ= github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc= github.com/ccojocar/zxcvbn-go v1.0.4 h1:FWnCIRMXPj43ukfX000kvBZvV6raSxakYr1nzyNrUcc= @@ -231,8 +231,8 @@ github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUq github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jgautheron/goconst v1.10.1 h1:UTbfKFk39rs2mDGf8dCIluulmOwKdRkFp/45jfBmyLs= -github.com/jgautheron/goconst v1.10.1/go.mod h1:0p+wv1lFOiUr0IlNNT1nrm6+8DB8u2sU6KHGzFRXHDc= +github.com/jgautheron/goconst v1.10.2 h1:0wFg/DbpYB0ChoP94qUM+SuQpqj5oCzPEqAil5dV8Pg= +github.com/jgautheron/goconst v1.10.2/go.mod h1:0p+wv1lFOiUr0IlNNT1nrm6+8DB8u2sU6KHGzFRXHDc= github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8= github.com/jjti/go-spancheck v0.6.5/go.mod h1:aEogkeatBrbYsyW6y5TgDfihCulDYciL1B7rG2vSsrU= github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ= @@ -283,12 +283,12 @@ github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4= github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= -github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-colorable v0.1.15 h1:+u9SLTRGnXv73cEsnsmoZBom+dMU88B2M0aDcWy0/jY= +github.com/mattn/go-colorable v0.1.15/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4= github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= -github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw= -github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU= +github.com/mattn/go-runewidth v0.0.24/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/mgechev/revive v1.15.0 h1:vJ0HzSBzfNyPbHKolgiFjHxLek9KUijhqh42yGoqZ8Q= github.com/mgechev/revive v1.15.0/go.mod h1:LlAKO3QQe9OJ0pVZzI2GPa8CbXGZ/9lNpCGvK4T/a8A= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= diff --git a/tools/vendor/github.com/butuzov/mirror/.editorconfig b/tools/vendor/github.com/butuzov/mirror/.editorconfig index 4d9c20d8d..69350a46e 100644 --- a/tools/vendor/github.com/butuzov/mirror/.editorconfig +++ b/tools/vendor/github.com/butuzov/mirror/.editorconfig @@ -16,9 +16,6 @@ trim_trailing_whitespace = true # no extra sapces at the end of lines indent_style = tab indent_size = 2 -[{Makefile,makefile}] # CMake -indent_style = tab - [*.md] # Markdown trim_trailing_whitespace = true max_line_length = 100 diff --git a/tools/vendor/github.com/butuzov/mirror/.golangci.yaml b/tools/vendor/github.com/butuzov/mirror/.golangci.yaml new file mode 100644 index 000000000..34fd5ece8 --- /dev/null +++ b/tools/vendor/github.com/butuzov/mirror/.golangci.yaml @@ -0,0 +1,26 @@ +version: "2" + +linters: + enable: + - nolintlint + - testifylint + settings: + nolintlint: + require-specific: true + allow-unused: false + exclusions: + presets: + - comments + - common-false-positives + - std-error-handling + +formatters: + enable: + - gci + - gofumpt + settings: + gci: + sections: + - standard + - default + - prefix(github.com/butuzov/mirror) diff --git a/tools/vendor/github.com/butuzov/mirror/Makefile b/tools/vendor/github.com/butuzov/mirror/Makefile deleted file mode 100644 index dab6f160a..000000000 --- a/tools/vendor/github.com/butuzov/mirror/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -# --- Required ---------------------------------------------------------------- -export PATH := $(PWD)/bin:$(PATH) # ./bin to $PATH -export SHELL := bash # Default Shell - -define install_go_bin - @ which $(1) 2>&1 1>/dev/null || GOBIN=$(PWD)/bin go install $(2) -endef - -.DEFAULT_GOAL := help - -# Generate Artifacts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -generate: ## Generate Assets - $(MAKE) generate-tests - $(MAKE) generate-mirror-table - -generate-tests: ## Generates Assets at testdata - go run ./cmd/internal/tests/ "$(PWD)/testdata" - -generate-mirror-table: ## Generate Asset MIRROR_FUNCS.md - go run ./cmd/internal/mirror-table/ > "$(PWD)/MIRROR_FUNCS.md" - - -# Build Artifacts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -build: ## Build binary - @ go build -trimpath -ldflags="-w -s" -o bin/mirror ./cmd/mirror/ - -build-race: ## Build binary with race flag - @ go build -race -trimpath -ldflags="-w -s" -o bin/mirror ./cmd/mirror/ - -install: ## Installs binary - @ go install -trimpath -v -ldflags="-w -s" ./cmd/mirror - -# Run Tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -tests: ## Run Tests (Summary) - @ go test -v -count=1 -race \ - -failfast \ - -parallel=2 \ - -timeout=1m \ - -covermode=atomic \ - -coverprofile=coverage.cov ./... - -tests-summary: ## Run Tests, but shows summary -tests-summary: bin/tparse - @ go test -v -count=1 -race \ - -failfast \ - -parallel=2 \ - -timeout=1m \ - -covermode=atomic \ - -coverprofile=coverage.cov --json ./... | tparse -all - -# Linter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -lints: ## Run golangci-lint -lints: bin/golangci-lint -lints: - golangci-lint run --no-config ./... --exclude-dirs "^(cmd|testdata)" - - -cover: ## Run Coverage - @ go tool cover -html=coverage.cov - -# Other ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -test-release: bin/goreleaser - goreleaser release --help - goreleaser release --skip=publish --skip=validate --clean - -# Install ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -bin/tparse: ## Installs tparse@v0.13.2 (if not exists) -bin/tparse: INSTALL_URL=github.com/mfridman/tparse@v0.13.2 -bin/tparse: - $(call install_go_bin, tparse, $(INSTALL_URL)) - -bin/golangci-lint: ## Installs golangci-lint@v1.62.0 (if not exists) -bin/golangci-lint: INSTALL_URL=github.com/golangci/golangci-lint@v1.62.0 -bin/golangci-lint: - $(call install_go_bin, golangci-lint, $(INSTALL_URL)) - -bin/goreleaser: ## Installs goreleaser@v1.24.0 (if not exists) -bin/goreleaser: INSTALL_URL=github.com/goreleaser/goreleaser@v1.24.0 -bin/goreleaser: - $(call install_go_bin, goreleaser, $(INSTALL_URL)) - -# Help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -help: dep-gawk - @ echo "==============================================================================" - @ echo " Makefile: github.com/butuzov/mirror " - @ echo "==============================================================================" - @ cat $(MAKEFILE_LIST) | \ - grep -E '^# ~~~ .*? [~]+$$|^[a-zA-Z0-9_-]+:.*?## .*$$' | \ - gawk '{if ( $$1=="#" ) { \ - match($$0, /^# ~~~ (.+?) [~]+$$/, a);\ - {print "\n", a[1], ""}\ - } else { \ - match($$0, /^([a-zA-Z/_-]+):.*?## (.*)$$/, a); \ - {printf " - \033[32m%-20s\033[0m %s\n", a[1], a[2]} \ - }}' - @ echo "" - - -# Helper Methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -dep-gawk: - @ if [ -z "$(shell command -v gawk)" ]; then \ - if [ -x /usr/local/bin/brew ]; then $(MAKE) _brew_gawk_install; exit 0; fi; \ - if [ -x /usr/bin/apt-get ]; then $(MAKE) _ubuntu_gawk_install; exit 0; fi; \ - if [ -x /usr/bin/yum ]; then $(MAKE) _centos_gawk_install; exit 0; fi; \ - if [ -x /sbin/apk ]; then $(MAKE) _alpine_gawk_install; exit 0; fi; \ - echo "GNU Awk Required.";\ - exit 1; \ - fi - -_brew_gawk_install: - @ echo "Installing gawk using brew... " - @ brew install gawk --quiet - @ echo "done" - -_ubuntu_gawk_install: - @ echo "Installing gawk using apt-get... " - @ apt-get -q install gawk -y - @ echo "done" - -_alpine_gawk_install: - @ echo "Installing gawk using yum... " - @ apk add --update --no-cache gawk - @ echo "done" - -_centos_gawk_install: - @ echo "Installing gawk using yum... " - @ yum install -q -y gawk; - @ echo "done" diff --git a/tools/vendor/github.com/butuzov/mirror/Taskfile.yml b/tools/vendor/github.com/butuzov/mirror/Taskfile.yml index 4bc7cfeda..6f933af5e 100644 --- a/tools/vendor/github.com/butuzov/mirror/Taskfile.yml +++ b/tools/vendor/github.com/butuzov/mirror/Taskfile.yml @@ -1,4 +1,4 @@ -version: '3' +version: "3" tasks: default: task --list-all @@ -7,41 +7,56 @@ tasks: watcher: desc: watcher sources: - - ./**/*.go + - ./**/*.go method: timestamp cmds: - - task: lints - - task: test-summary - - task: build-race + - task: lints + - task: test-summary + - task: build-race # Generating assets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ generate: desc: Generate Assets sources: - - ./checkers_*.go - - ./cmd/internal/**/*.go + - ./checkers_*.go + - ./cmd/internal/**/*.go method: timestamp cmds: - - task generate-mirror-table - - task generate-tests + - task generate-mirror-table + - task generate-tests generate-mirror-table: desc: Generates Assets at testdata - cmd: make generate-mirror-table + cmd: go run ./cmd/internal/mirror-table/ > ./MIRROR_FUNCS.md generate-tests: desc: Generate Asset MIRROR_FUNCS.md - cmd: make generate-tests + cmd: go run ./cmd/internal/tests/ ./testdata # Run Tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tests: desc: Run Tests - cmd: make tests + cmd: | + go test -v -count=1 -race \ + -failfast \ + -parallel=2 \ + -timeout=1m \ + -covermode=atomic \ + -coverpkg $(go list ./... | grep -v -E "cmd" | tr "\n" ",") \ + -coverprofile=coverage.cov ./... + ignore_error: true test-summary: desc: Run Tests (Summary) - cmd: make tests-summary + cmd: | + go test -v -count=1 -race \ + -failfast \ + -parallel=2 \ + -timeout=1m \ + -covermode=atomic \ + -coverpkg $(go list ./... | grep -v -E "cmd" | tr "\n" ",") \ + -coverprofile=coverage.cov --json ./... | tparse -all ignore_error: true testcase: go test -v -failfast -count=1 -run "TestAll/{{ .Case }}" ./... @@ -49,25 +64,24 @@ tasks: # Build Artifacts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ build: desc: Build binary - cmd: make build + cmd: go build -trimpath -ldflags="-w -s" -o bin/mirror ./cmd/mirror/ build-race: desc: Build binary with race flag - cmd: make build-race + cmd: go build -race -trimpath -ldflags="-w -s" -o bin/mirror ./cmd/mirror/ install: desc: Install binary - cmd: make install + cmd: go install -trimpath -v -ldflags="-w -s" ./cmd/mirror # Linter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - lints: - cmd: make lints + lints: golangci-lint run --no-config ./... # Other cover: desc: Run Coverage - cmd: make cover + cmd: go tool cover -html=coverage.cov test-release: desc: Testing Release - cmd: make test-release + cmd: goreleaser release --snapshot --clean diff --git a/tools/vendor/github.com/butuzov/mirror/analyzer.go b/tools/vendor/github.com/butuzov/mirror/analyzer.go index b15019ce1..aab819252 100644 --- a/tools/vendor/github.com/butuzov/mirror/analyzer.go +++ b/tools/vendor/github.com/butuzov/mirror/analyzer.go @@ -5,11 +5,11 @@ import ( "go/ast" "strings" - "github.com/butuzov/mirror/internal/checker" - "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/inspect" "golang.org/x/tools/go/ast/inspector" + + "github.com/butuzov/mirror/internal/checker" ) func NewAnalyzer() *analysis.Analyzer { diff --git a/tools/vendor/github.com/butuzov/mirror/internal/checker/checker.go b/tools/vendor/github.com/butuzov/mirror/internal/checker/checker.go index fb9ba4172..2b1b94545 100644 --- a/tools/vendor/github.com/butuzov/mirror/internal/checker/checker.go +++ b/tools/vendor/github.com/butuzov/mirror/internal/checker/checker.go @@ -109,7 +109,7 @@ func (c *Checker) callConverts(ce *ast.CallExpr) bool { // register violations. func (c *Checker) register(violations []Violation) { - for _, v := range violations { // nolint: gocritic + for _, v := range violations { //nolint: gocritic c.Violations = append(c.Violations, v) if len(v.Struct) > 0 { c.registerIdxPer(v.Package + "." + v.Struct) @@ -141,7 +141,7 @@ func WrapType(info *types.Info) func(node ast.Expr) string { func WrapPrint(fSet *token.FileSet) func(ast.Node) []byte { return func(node ast.Node) []byte { var buf bytes.Buffer - printer.Fprint(&buf, fSet, node) + _ = printer.Fprint(&buf, fSet, node) return buf.Bytes() } } diff --git a/tools/vendor/github.com/butuzov/mirror/internal/checker/violation.go b/tools/vendor/github.com/butuzov/mirror/internal/checker/violation.go index c2c149208..1bb6ffe27 100644 --- a/tools/vendor/github.com/butuzov/mirror/internal/checker/violation.go +++ b/tools/vendor/github.com/butuzov/mirror/internal/checker/violation.go @@ -104,9 +104,9 @@ func (v *Violation) suggest(fSet *token.FileSet) []byte { buf.WriteByte('(') for idx := range v.callExpr.Args { if arg, ok := v.arguments[idx]; ok { - printer.Fprint(&buf, fSet, arg) + _ = printer.Fprint(&buf, fSet, arg) } else { - printer.Fprint(&buf, fSet, v.callExpr.Args[idx]) + _ = printer.Fprint(&buf, fSet, v.callExpr.Args[idx]) } if idx != len(v.callExpr.Args)-1 { @@ -126,7 +126,7 @@ func (v *Violation) Diagnostic(fSet *token.FileSet) analysis.Diagnostic { } var buf bytes.Buffer - printer.Fprint(&buf, fSet, v.callExpr) + _ = printer.Fprint(&buf, fSet, v.callExpr) noNl := bytes.IndexByte(buf.Bytes(), '\n') < 0 // Struct based fix. @@ -177,7 +177,7 @@ func (v *Violation) Issue(fSet *token.FileSet) GolangIssue { // original expression (useful for debug & required for replace) var buf bytes.Buffer - printer.Fprint(&buf, fSet, v.callExpr) + _ = printer.Fprint(&buf, fSet, v.callExpr) issue.Original = buf.String() noNl := strings.IndexByte(issue.Original, '\n') < 0 diff --git a/tools/vendor/github.com/butuzov/mirror/readme.md b/tools/vendor/github.com/butuzov/mirror/readme.md index f5cfa47a6..b34ca11c0 100644 --- a/tools/vendor/github.com/butuzov/mirror/readme.md +++ b/tools/vendor/github.com/butuzov/mirror/readme.md @@ -1,14 +1,25 @@ -# `mirror` [![Stand with Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://u24.gov.ua/) [![Code Coverage](https://coveralls.io/repos/github/butuzov/mirror/badge.svg?branch=main)](https://coveralls.io/github/butuzov/mirror?branch=main) [![build status](https://github.com/butuzov/mirror/actions/workflows/main.yaml/badge.svg?branch=main)]() +# `mirror` [![Stand with Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://u24.gov.ua/) [![Code Coverage](https://coveralls.io/repos/github/butuzov/mirror/badge.svg?branch=main)](https://coveralls.io/github/butuzov/mirror?branch=main) [![build status](https://github.com/butuzov/mirror/actions/workflows/main.yaml/badge.svg?branch=main)]() [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg)](http://www.opensource.org/licenses/MIT) -`mirror` suggests use of alternative functions/methods in order to gain performance boosts by avoiding unnecessary `[]byte/string` conversion calls. See [MIRROR_FUNCS.md](MIRROR_FUNCS.md) list of mirror functions you can use in go's stdlib. +Use right mirror functions for string/[]byte performance bust --- [![United 24](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-personal-page.svg)](https://u24.gov.ua/) -[![Help Oleg Butuzov](https://raw.githubusercontent.com/butuzov/butuzov/main/personal.svg)](https://github.com/butuzov) --- +`mirror` suggests use of alternative functions/methods in order to gain performance boosts by avoiding unnecessary `[]byte/string` conversion calls. See [MIRROR_FUNCS.md](MIRROR_FUNCS.md) list of mirror functions you can use in go's stdlib. + +## Install + +``` +go install github.com/butuzov/mirror/cmd/mirror@latest +``` + +### `golangci-lint` + +`golangci-lint` supports `mirror` since `v1.53.0` + ## Linter Use Cases ### `github.com/argoproj/argo-cd` @@ -33,16 +44,6 @@ func IsValidHostname(hostname string, fqdn bool) bool { } ``` -## Install - -``` -go install github.com/butuzov/mirror/cmd/mirror@latest -``` - -### `golangci-lint` -`golangci-lint` supports `mirror` since `v1.53.0` - - ## How to use You run `mirror` with [`go vet`](https://pkg.go.dev/cmd/vet): @@ -56,6 +57,7 @@ pkg/common/net/ssl/ssl.go:166:3: avoid allocations with (*os.File).WriteString ``` Can be called directly: + ``` mirror ./... # https://github.com/cosmtrek/air @@ -89,33 +91,33 @@ util/cert/cert.go:82:10: avoid allocations with (*regexp.Regexp).MatchString (mi - You can add checks for `_test.go` files with cli option `--with-tests` ### `golangci-lint` - With `golangci-lint` tests are checked by default and can be can be turned off by using the regular `golangci-lint` ways to do it: - - - flag `--tests` (e.g. `--tests=false`) - - flag `--skip-files` (e.g. `--skip-files="_test.go"`) - - yaml configuration `run.skip-files`: - ```yaml - run: - skip-files: - - '(.+)_test\.go' - ``` - - yaml configuration `issues.exclude-rules`: - ```yaml - issues: - exclude-rules: - - path: '(.+)_test\.go' - linters: - - mirror - ``` +With `golangci-lint` tests are checked by default and can be can be turned off by using the regular `golangci-lint` ways to do it: + +- flag `--tests` (e.g. `--tests=false`) +- flag `--skip-files` (e.g. `--skip-files="_test.go"`) +- yaml configuration `run.skip-files`: + ```yaml + run: + skip-files: + - '(.+)_test\.go' + ``` +- yaml configuration `issues.exclude-rules`: + ```yaml + issues: + exclude-rules: + - path: '(.+)_test\.go' + linters: + - mirror + ``` ## Contributing ```shell # Update Assets (testdata/(strings|bytes|os|utf8|maphash|regexp|bufio).go) -(task|make) generate +task generate # Run Tests -(task|make) tests +task tests # Lint Code -(task|make) lints +task lints ``` diff --git a/tools/vendor/github.com/jgautheron/goconst/README.md b/tools/vendor/github.com/jgautheron/goconst/README.md index b08d7b7d1..2b31154a3 100644 --- a/tools/vendor/github.com/jgautheron/goconst/README.md +++ b/tools/vendor/github.com/jgautheron/goconst/README.md @@ -32,21 +32,22 @@ Usage: Flags: - -ignore exclude files matching the given regular expression - -ignore-strings exclude strings matching the given regular expression - -ignore-tests exclude tests from the search (default: true) - -min-occurrences report from how many occurrences (default: 2) - -min-length only report strings with the minimum given length (default: 3) - -match-constant look for existing constants matching the strings - -find-duplicates look for constants with identical values - -eval-const-expr enable evaluation of constant expressions (e.g., Prefix + "suffix") - -ignore-calls ignore string literals in calls to these functions (comma separated) - -numbers search also for duplicated numbers - -min minimum value, only works with -numbers - -max maximum value, only works with -numbers - -output output formatting (text or json) - -set-exit-status Set exit status to 2 if any issues are found - -grouped print single line per match, only works with -output text + -ignore exclude files matching the given regular expression + -ignore-strings exclude strings matching the given regular expression + -ignore-tests exclude tests from the search (default: true) + -min-occurrences report from how many occurrences (default: 2) + -min-length only report strings with the minimum given length (default: 3) + -match-constant look for existing constants matching the strings + -find-duplicates look for constants with identical values + -eval-const-expr enable evaluation of constant expressions (e.g., Prefix + "suffix") + -ignore-calls ignore string literals in calls to these functions (comma separated) + -ignore-composite-literals ignore string literals inside composite literals + -numbers search also for duplicated numbers + -min minimum value, only works with -numbers + -max maximum value, only works with -numbers + -output output formatting (text or json) + -set-exit-status Set exit status to 2 if any issues are found + -grouped print single line per match, only works with -output text Examples: diff --git a/tools/vendor/github.com/jgautheron/goconst/api.go b/tools/vendor/github.com/jgautheron/goconst/api.go index 8a9cfbb60..88982a9fb 100644 --- a/tools/vendor/github.com/jgautheron/goconst/api.go +++ b/tools/vendor/github.com/jgautheron/goconst/api.go @@ -281,21 +281,11 @@ func RunWithConfig(files []*ast.File, fset *token.FileSet, typeInfo *types.Info, if p.findDuplicates { p.constMutex.RLock() - stringKeys = make([]string, 0, len(p.consts)) - - for str := range p.consts { - if len(p.consts[str]) > 1 { - stringKeys = append(stringKeys, str) - } - } - - sort.Strings(stringKeys) - // Report an issue for every duplicated const within the same scope. // Test and non-test constants are compared independently so that a // test constant is never flagged as duplicate of a production one. - for _, str := range stringKeys { - allConsts := p.consts[str] + for _, group := range duplicateConstGroups(p.consts) { + allConsts := group.consts var nonTestConsts, testConsts []ConstType for _, cst := range allConsts { @@ -311,7 +301,7 @@ func RunWithConfig(files []*ast.File, fset *token.FileSet, typeInfo *types.Info, for i := 1; i < len(scopeConsts); i++ { issueBuffer = append(issueBuffer, Issue{ Pos: scopeConsts[i].Position, - Str: str, + Str: group.displayValue, DuplicateConst: scopeConsts[0].Name, DuplicatePos: scopeConsts[0].Position, }) @@ -354,3 +344,41 @@ func sortConstants(consts []ConstType) { return lessPosition(consts[i].Position, consts[j].Position) }) } + +type duplicateConstGroup struct { + displayValue string + consts []ConstType +} + +func duplicateConstGroups(consts Constants) []duplicateConstGroup { + groups := make(map[string]duplicateConstGroup, len(consts)) + for displayValue, values := range consts { + for _, cst := range values { + key := cst.ValueKey() + if key == "" { + key = displayValue + } + + group := groups[key] + if group.displayValue == "" || displayValue < group.displayValue { + group.displayValue = displayValue + } + group.consts = append(group.consts, cst) + groups[key] = group + } + } + + keys := make([]string, 0, len(groups)) + for key, group := range groups { + if len(group.consts) > 1 { + keys = append(keys, key) + } + } + sort.Strings(keys) + + result := make([]duplicateConstGroup, 0, len(keys)) + for _, key := range keys { + result = append(result, groups[key]) + } + return result +} diff --git a/tools/vendor/github.com/jgautheron/goconst/parser.go b/tools/vendor/github.com/jgautheron/goconst/parser.go index fca43279c..62327c2b1 100644 --- a/tools/vendor/github.com/jgautheron/goconst/parser.go +++ b/tools/vendor/github.com/jgautheron/goconst/parser.go @@ -327,6 +327,7 @@ func (p *Parser) parseTreeConcurrent(rootPath string, recursive bool) (Strings, // run type checker info := &types.Info{ Types: make(map[ast.Expr]types.TypeAndValue), + Defs: make(map[*ast.Ident]types.Object), } chkConfig := &types.Config{ @@ -438,6 +439,7 @@ func (p *Parser) parseTreeConcurrent(rootPath string, recursive bool) (Strings, // Type checking must be performed serially to avoid data races. info := &types.Info{ Types: make(map[ast.Expr]types.TypeAndValue), + Defs: make(map[*ast.Ident]types.Object), } chkConfig := &types.Config{ @@ -684,6 +686,7 @@ func (p *Parser) parseTreeBatched(rootPath string, recursive bool) (Strings, Con // Type check -- must be processed serially to avoid data races info := &types.Info{ Types: make(map[ast.Expr]types.TypeAndValue), + Defs: make(map[*ast.Ident]types.Object), } chkConfig := &types.Config{ @@ -874,6 +877,13 @@ type ConstType struct { // Interned strings to reduce memory usage Name string packageName string + valueKey string +} + +// ValueKey returns the internal comparison key used to distinguish constants +// whose display values may be approximate, such as high-precision numbers. +func (c ConstType) ValueKey() string { + return c.valueKey } // ExtendedPos extends token.Position with package information. diff --git a/tools/vendor/github.com/jgautheron/goconst/visitor.go b/tools/vendor/github.com/jgautheron/goconst/visitor.go index ca929cf56..31c80a718 100644 --- a/tools/vendor/github.com/jgautheron/goconst/visitor.go +++ b/tools/vendor/github.com/jgautheron/goconst/visitor.go @@ -43,21 +43,42 @@ func (v *treeVisitor) Visit(node ast.Node) ast.Visitor { for _, spec := range t.Specs { val := spec.(*ast.ValueSpec) + if v.typeInfo != nil && v.p.evalConstExpressions { + if len(v.typeInfo.Defs) > 0 { + addedFromDefs := false + for _, name := range val.Names { + obj, ok := v.typeInfo.Defs[name].(*types.Const) + if !ok || obj.Val() == nil || !v.isSupportedKind(obj.Val().Kind()) { + continue + } + + displayValue, valueKey := constValueStrings(obj.Val()) + v.addConst(name.Name, displayValue, name.Pos(), valueKey) + addedFromDefs = true + } + if addedFromDefs || len(val.Values) == 0 { + continue + } + } + } + for i, str := range val.Values { if v.typeInfo != nil && v.p.evalConstExpressions { typedVal, ok := v.typeInfo.Types[str] - if !ok || !v.isSupportedKind(typedVal.Value.Kind()) { + if !ok || typedVal.Value == nil || !v.isSupportedKind(typedVal.Value.Kind()) { continue } - v.addConst(val.Names[i].Name, typedVal.Value.String(), str.Pos()) - } else { - lit, ok := str.(*ast.BasicLit) - if !ok || !v.isSupported(lit.Kind) { - continue - } - v.addConst(val.Names[i].Name, lit.Value, val.Names[i].Pos()) + displayValue, valueKey := constValueStrings(typedVal.Value) + v.addConst(val.Names[i].Name, displayValue, str.Pos(), valueKey) + continue + } + + lit, ok := str.(*ast.BasicLit) + if !ok || !v.isSupported(lit.Kind) { + continue } + v.addConst(val.Names[i].Name, lit.Value, val.Names[i].Pos()) } } @@ -130,6 +151,13 @@ func (v *treeVisitor) Visit(node ast.Node) ast.Visitor { return v } +func constValueStrings(val constant.Value) (string, string) { + if val.Kind() == constant.String { + return val.ExactString(), "string:" + constant.StringVal(val) + } + return val.String(), val.Kind().String() + ":" + val.ExactString() +} + func (v *treeVisitor) addCompositeLiteralElement(node ast.Expr) { if lit, ok := node.(*ast.BasicLit); ok && v.isSupported(lit.Kind) { v.addString(lit.Value, lit.Pos(), CompositeLit) @@ -245,7 +273,7 @@ func (v *treeVisitor) addString(str string, pos token.Pos, typ Type) { } // addConst adds a const in the map along with its position in the tree. -func (v *treeVisitor) addConst(name string, val string, pos token.Pos) { +func (v *treeVisitor) addConst(name string, val string, pos token.Pos, valueKey ...string) { // Early filtering using the same criteria as for strings var unquotedVal string if strings.HasPrefix(val, `"`) || strings.HasPrefix(val, "`") { @@ -280,6 +308,10 @@ func (v *treeVisitor) addConst(name string, val string, pos token.Pos) { internedVal := InternString(unquotedVal) internedName := InternString(name) internedPkg := InternString(v.packageName) + internedKey := internedVal + if len(valueKey) > 0 && valueKey[0] != "" { + internedKey = InternString(valueKey[0]) + } // Lock to safely update the shared map v.p.constMutex.Lock() @@ -292,6 +324,7 @@ func (v *treeVisitor) addConst(name string, val string, pos token.Pos) { v.p.consts[internedVal] = append(v.p.consts[internedVal], ConstType{ Name: internedName, packageName: internedPkg, + valueKey: internedKey, Position: v.fileSet.Position(pos), }) } diff --git a/tools/vendor/github.com/mattn/go-colorable/colorable_windows.go b/tools/vendor/github.com/mattn/go-colorable/colorable_windows.go index 2df7b8598..426a409ca 100644 --- a/tools/vendor/github.com/mattn/go-colorable/colorable_windows.go +++ b/tools/vendor/github.com/mattn/go-colorable/colorable_windows.go @@ -5,13 +5,13 @@ package colorable import ( "bytes" + syscall "golang.org/x/sys/windows" "io" "math" "os" "strconv" "strings" "sync" - syscall "golang.org/x/sys/windows" "unsafe" "github.com/mattn/go-isatty" @@ -93,6 +93,7 @@ type writer struct { handle syscall.Handle althandle syscall.Handle oldattr word + curattr word oldpos coord rest bytes.Buffer mutex sync.Mutex @@ -112,7 +113,7 @@ func NewColorable(file *os.File) io.Writer { var csbi consoleScreenBufferInfo handle := syscall.Handle(file.Fd()) procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - return &writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} + return &writer{out: file, handle: handle, oldattr: csbi.attributes, curattr: csbi.attributes, oldpos: coord{0, 0}} } return file } @@ -438,7 +439,11 @@ func (w *writer) Write(data []byte) (n int, err error) { w.mutex.Lock() defer w.mutex.Unlock() var csbi consoleScreenBufferInfo - procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) + + if w.rest.Len() == 0 && bytes.IndexByte(data, 0x1b) == -1 { + w.out.Write(data) + return len(data), nil + } handle := w.handle @@ -517,7 +522,7 @@ loop: w.rest.Reset() break } - buf.Write([]byte(string(c))) + buf.WriteByte(c) } if m == 0 { break loop @@ -678,11 +683,11 @@ loop: procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) case 'm': - procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) - attr := csbi.attributes + attr := w.curattr cs := buf.String() if cs == "" { procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(w.oldattr)) + w.curattr = w.oldattr continue } token := strings.Split(cs, ";") @@ -814,9 +819,12 @@ loop: attr |= backgroundBlue } } - procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(attr)) } } + if attr != w.curattr { + procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(attr)) + w.curattr = attr + } case 'h': var ci consoleCursorInfo cs := buf.String() @@ -834,6 +842,8 @@ loop: w.althandle = syscall.Handle(h) if w.althandle != 0 { handle = w.althandle + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + w.curattr = csbi.attributes } } } @@ -853,6 +863,8 @@ loop: syscall.CloseHandle(w.althandle) w.althandle = 0 handle = w.handle + procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) + w.curattr = csbi.attributes } } case 's': diff --git a/tools/vendor/github.com/mattn/go-runewidth/SECURITY.md b/tools/vendor/github.com/mattn/go-runewidth/SECURITY.md new file mode 100644 index 000000000..a6898ee70 --- /dev/null +++ b/tools/vendor/github.com/mattn/go-runewidth/SECURITY.md @@ -0,0 +1,25 @@ +# Security Policy + +## Supported Versions + +The following versions of go-runewidth are currently supported with +security updates. + +| Version | Supported | +| -------- | ------------------ | +| 0.0.23 | :white_check_mark: | +| < 0.0.23 | :x: | + +## Reporting a Vulnerability + +If you discover a security vulnerability in go-runewidth, please report it +privately via GitHub's "Report a vulnerability" feature on the Security tab +of the repository (https://github.com/mattn/go-runewidth/security), or by +emailing the maintainer at mattn.jp@gmail.com. + +Please include a description of the issue, reproduction steps, and the +affected version. You can expect an initial response within one week. If +the vulnerability is accepted, a fix will be prepared and a new release +will be published; you will be credited in the release notes unless you +request otherwise. If the report is declined, you will receive an +explanation of the reasoning. diff --git a/tools/vendor/github.com/mattn/go-runewidth/runewidth.go b/tools/vendor/github.com/mattn/go-runewidth/runewidth.go index f6c005822..6b958fdd4 100644 --- a/tools/vendor/github.com/mattn/go-runewidth/runewidth.go +++ b/tools/vendor/github.com/mattn/go-runewidth/runewidth.go @@ -2,6 +2,7 @@ package runewidth import ( "os" + "sort" "strings" "unicode/utf8" @@ -25,13 +26,19 @@ var ( ) var ( - zerowidth table // combining + nonprint merged for faster zero-width lookup - widewidth table // ambiguous + doublewidth merged for EA path + zerowidth table // combining + nonprint merged for faster zero-width lookup + widewidth table // ambiguous + doublewidth merged for EA path + eastAsianWidth widthTable + eastAsianWidth0 [0x300]byte ) func init() { zerowidth = mergeIntervals(combining, nonprint) widewidth = mergeIntervals(ambiguous, doublewidth) + eastAsianWidth = makeWidthTable(zerowidth, widewidth) + for r := range eastAsianWidth0 { + eastAsianWidth0[r] = byte(runeWidthEastAsian(rune(r))) + } handleEnv() } @@ -90,6 +97,14 @@ type interval struct { type table []interval +type widthInterval struct { + first rune + last rune + width byte +} + +type widthTable []widthInterval + func inTable(r rune, t table) bool { if r < t[0].first { return false @@ -116,6 +131,71 @@ func inTable(r rune, t table) bool { return false } +func makeWidthTable(zero, two table) widthTable { + wt := make(widthTable, 0, len(zero)+len(two)) + zi := 0 + for _, iv := range two { + start := iv.first + for zi < len(zero) && zero[zi].last < start { + zi++ + } + for i := zi; i < len(zero) && zero[i].first <= iv.last; i++ { + if start < zero[i].first { + wt = append(wt, widthInterval{start, zero[i].first - 1, 2}) + } + if start <= zero[i].last { + start = zero[i].last + 1 + } + if start > iv.last { + break + } + } + if start <= iv.last { + wt = append(wt, widthInterval{start, iv.last, 2}) + } + } + for _, iv := range zero { + wt = append(wt, widthInterval{iv.first, iv.last, 0}) + } + sort.Slice(wt, func(i, j int) bool { + return wt[i].first < wt[j].first + }) + return wt +} + +func inWidthTable(r rune, t widthTable) (int, bool) { + if r < t[0].first { + return 0, false + } + if r > t[len(t)-1].last { + return 0, false + } + + bot := 0 + top := len(t) - 1 + for top >= bot { + mid := (bot + top) >> 1 + + switch { + case t[mid].last < r: + bot = mid + 1 + case t[mid].first > r: + top = mid - 1 + default: + return int(t[mid].width), true + } + } + + return 0, false +} + +func runeWidthEastAsian(r rune) int { + if w, ok := inWidthTable(r, eastAsianWidth); ok { + return w + } + return 1 +} + var private = table{ {0x00E000, 0x00F8FF}, {0x0F0000, 0x0FFFFD}, {0x100000, 0x10FFFD}, } @@ -153,34 +233,35 @@ func (c *Condition) RuneWidth(r rune) int { } // optimized version, verified by TestRuneWidthChecksums() if !c.EastAsianWidth { - switch { - case r < 0x20: + if r < 0x20 { return 0 - case (r >= 0x7F && r <= 0x9F) || r == 0xAD: // nonprint - return 0 - case r < 0x300: - return 1 - case inTable(r, zerowidth): + } + if (r >= 0x7F && r <= 0x9F) || r == 0xAD { // nonprint return 0 - case inTable(r, doublewidth): - return 2 - default: + } + if r < 0x300 { return 1 } - } else { switch { case inTable(r, zerowidth): return 0 - case inTable(r, narrow): - return 1 - case inTable(r, widewidth): - return 2 - case !c.StrictEmojiNeutral && inTable(r, emoji): + case inTable(r, doublewidth): return 2 default: return 1 } } + + if r < 0x300 { + return int(eastAsianWidth0[r]) + } + if w, ok := inWidthTable(r, eastAsianWidth); ok { + return w + } + if !c.StrictEmojiNeutral && inTable(r, emoji) { + return 2 + } + return 1 } // CreateLUT will create an in-memory lookup table of 557056 bytes for faster operation. @@ -206,6 +287,13 @@ func (c *Condition) CreateLUT() { // StringWidth return width as you can see func (c *Condition) StringWidth(s string) (width int) { + if len(s) == 1 { + b := s[0] + if b < 0x20 || b == 0x7F { + return 0 + } + return 1 + } if len(s) > 0 && len(s) <= utf8.UTFMax { r, size := utf8.DecodeRuneInString(s) if size == len(s) { @@ -213,15 +301,19 @@ func (c *Condition) StringWidth(s string) (width int) { } } // ASCII fast path: no grapheme clustering needed for pure ASCII - if isAllASCII(s) { - for i := 0; i < len(s); i++ { - b := s[i] - if b >= 0x20 && b != 0x7F { - width++ - } + for i := 0; i < len(s); i++ { + b := s[i] + if b >= 0x80 { + goto graphemes + } + if b >= 0x20 && b != 0x7F { + width++ } - return } + return + +graphemes: + width = 0 g := graphemes.FromString(s) for g.Next() { var chWidth int @@ -236,15 +328,6 @@ func (c *Condition) StringWidth(s string) (width int) { return } -func isAllASCII(s string) bool { - for i := 0; i < len(s); i++ { - if s[i] >= 0x80 { - return false - } - } - return true -} - // Truncate return string truncated with w cells func (c *Condition) Truncate(s string, w int, tail string) string { if c.StringWidth(s) <= w { diff --git a/tools/vendor/modules.txt b/tools/vendor/modules.txt index c9476c997..7d532c704 100644 --- a/tools/vendor/modules.txt +++ b/tools/vendor/modules.txt @@ -135,8 +135,8 @@ github.com/breml/errchkjson github.com/butuzov/ireturn/analyzer github.com/butuzov/ireturn/analyzer/internal/config github.com/butuzov/ireturn/analyzer/internal/types -# github.com/butuzov/mirror v1.3.0 -## explicit; go 1.19 +# github.com/butuzov/mirror v1.3.3 +## explicit; go 1.25.0 github.com/butuzov/mirror github.com/butuzov/mirror/internal/checker # github.com/catenacyber/perfsprint v0.10.1 @@ -563,7 +563,7 @@ github.com/hexops/gotextdiff/span # github.com/inconshreveable/mousetrap v1.1.0 ## explicit; go 1.18 github.com/inconshreveable/mousetrap -# github.com/jgautheron/goconst v1.10.1 +# github.com/jgautheron/goconst v1.10.2 ## explicit; go 1.23 github.com/jgautheron/goconst # github.com/jjti/go-spancheck v0.6.5 @@ -640,13 +640,13 @@ github.com/maratori/testpackage/pkg/testpackage # github.com/matoous/godox v1.1.0 ## explicit; go 1.18 github.com/matoous/godox -# github.com/mattn/go-colorable v0.1.14 +# github.com/mattn/go-colorable v0.1.15 ## explicit; go 1.18 github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.22 ## explicit; go 1.21 github.com/mattn/go-isatty -# github.com/mattn/go-runewidth v0.0.23 +# github.com/mattn/go-runewidth v0.0.24 ## explicit; go 1.20 github.com/mattn/go-runewidth # github.com/mgechev/revive v1.15.0 @@ -1334,5 +1334,5 @@ mvdan.cc/gofumpt/internal/version ## explicit; go 1.24.0 mvdan.cc/unparam/check # github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 -# github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.6 +# github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 # github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.3 diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go index 2fe9feb7b..16d55512c 100644 --- a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go +++ b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go @@ -15,4 +15,4 @@ package core // limitations under the License. // Version of the SDK -const __VERSION__ = "5.21.2" +const __VERSION__ = "5.21.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go index 3219517da..372b15124 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go @@ -204,6 +204,10 @@ type Config struct { // when constructing clients for specific services. Each callback function receives the service ID // and the service's Options struct, allowing for dynamic configuration based on the service. ServiceOptions []func(string, any) + + // Controls whether the SDK restricts file permissions on credential + // cache files it creates. + RestrictFilePermissions RestrictFilePermissions } // NewConfig returns a new Config pointer that can be chained with builder diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index e589f6156..3c59b29e7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.41.7" +const goModuleVersion = "1.41.9" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md index 4eebedc3b..3f0694fda 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.7.11 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. + # v1.7.10 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go index 84a7e483f..0fc592f8c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go @@ -3,4 +3,4 @@ package eventstream // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.7.10" +const goModuleVersion = "1.7.11" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/restrict_file_permissions.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/restrict_file_permissions.go new file mode 100644 index 000000000..6360b657b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/restrict_file_permissions.go @@ -0,0 +1,21 @@ +package aws + +// RestrictFilePermissions controls whether the SDK restricts file permissions +// on credential cache files it creates. +type RestrictFilePermissions string + +const ( + // RestrictFilePermissionsUnset indicates the setting has not been + // configured. + RestrictFilePermissionsUnset RestrictFilePermissions = "" + + // RestrictFilePermissionsUserReadWrite sets file permissions to owner + // read/write only (0600) and directory permissions to owner only (0700) + // when creating new cache files and directories on Unix. This is the + // default behavior. + RestrictFilePermissionsUserReadWrite RestrictFilePermissions = "user_read_write" + + // RestrictFilePermissionsUnrestricted does not set any file or directory + // permissions, relying on the system's default umask. + RestrictFilePermissionsUnrestricted RestrictFilePermissions = "unrestricted" +) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index a977899a4..5fed89811 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,13 @@ +# v1.32.20 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.19 (2026-05-28) + +* **Bug Fix**: Adds support for AWS_RESTRICT_FILE_PERMISSIONS for env and in-code config. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.32.18 (2026-05-22) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go index 498a668a3..c6a6365a3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go @@ -96,6 +96,8 @@ var defaultAWSConfigResolvers = []awsConfigResolver{ // Sets the ServiceOptions if present in LoadOptions resolveServiceOptions, + + resolveRestrictFilePermissions, } // A Config represents a generic configuration value or set of values. This type diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go index e932c63df..f0619ce85 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go @@ -87,6 +87,8 @@ const ( awsResponseChecksumValidation = "AWS_RESPONSE_CHECKSUM_VALIDATION" awsAuthSchemePreferenceEnv = "AWS_AUTH_SCHEME_PREFERENCE" + + awsRestrictFilePermissionsEnv = "AWS_RESTRICT_FILE_PERMISSIONS" ) var ( @@ -309,6 +311,10 @@ type EnvConfig struct { // Priority list of preferred auth scheme names (e.g. sigv4a). AuthSchemePreference []string + + // Controls whether the SDK restricts file permissions on credential + // cache files it creates. + RestrictFilePermissions aws.RestrictFilePermissions } // loadEnvConfig reads configuration values from the OS's environment variables. @@ -422,6 +428,10 @@ func NewEnvConfig() (EnvConfig, error) { cfg.AuthSchemePreference = toAuthSchemePreferenceList(os.Getenv(awsAuthSchemePreferenceEnv)) + if err := setRestrictFilePermissionsFromEnvVal(&cfg.RestrictFilePermissions, []string{awsRestrictFilePermissionsEnv}); err != nil { + return cfg, err + } + return cfg, nil } @@ -930,3 +940,27 @@ func (c EnvConfig) getAuthSchemePreference() ([]string, bool) { } return nil, false } + +func (c EnvConfig) getRestrictFilePermissions(context.Context) (aws.RestrictFilePermissions, bool, error) { + return c.RestrictFilePermissions, len(c.RestrictFilePermissions) > 0, nil +} + +func setRestrictFilePermissionsFromEnvVal(m *aws.RestrictFilePermissions, keys []string) error { + for _, k := range keys { + value := os.Getenv(k) + if len(value) == 0 { + continue + } + + switch strings.ToLower(value) { + case "user_read_write": + *m = aws.RestrictFilePermissionsUserReadWrite + case "unrestricted": + *m = aws.RestrictFilePermissionsUnrestricted + default: + return fmt.Errorf("invalid value for environment variable, %s=%s, must be user_read_write/unrestricted", k, value) + } + break + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index 36b7e501c..0f69bcd8b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.32.18" +const goModuleVersion = "1.32.20" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go index 7cb5a1365..843ea6b7d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go @@ -240,6 +240,10 @@ type LoadOptions struct { // when constructing clients for specific services. Each callback function receives the service ID // and the service's Options struct, allowing for dynamic configuration based on the service. ServiceOptions []func(string, any) + + // Controls whether the SDK restricts file permissions on credential + // cache files it creates. + RestrictFilePermissions aws.RestrictFilePermissions } func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) { @@ -1353,3 +1357,15 @@ func (o LoadOptions) getAuthSchemePreference() ([]string, bool) { } return nil, false } + +func (o LoadOptions) getRestrictFilePermissions(context.Context) (aws.RestrictFilePermissions, bool, error) { + return o.RestrictFilePermissions, len(o.RestrictFilePermissions) > 0, nil +} + +// WithRestrictFilePermissions sets the RestrictFilePermissions mode on config. +func WithRestrictFilePermissions(m aws.RestrictFilePermissions) LoadOptionsFunc { + return func(o *LoadOptions) error { + o.RestrictFilePermissions = m + return nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go index 553124971..deabd29c8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go @@ -784,3 +784,19 @@ func getServiceOptions(ctx context.Context, configs configs) (v []func(string, a } return v, found, err } + +type restrictFilePermissionsProvider interface { + getRestrictFilePermissions(context.Context) (aws.RestrictFilePermissions, bool, error) +} + +func getRestrictFilePermissions(ctx context.Context, configs configs) (value aws.RestrictFilePermissions, found bool, err error) { + for _, cfg := range configs { + if p, ok := cfg.(restrictFilePermissionsProvider); ok { + value, found, err = p.getRestrictFilePermissions(ctx) + if err != nil || found { + break + } + } + } + return +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go index a71c105d9..b6796fc87 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go @@ -442,3 +442,17 @@ func resolveServiceOptions(ctx context.Context, cfg *aws.Config, configs configs cfg.ServiceOptions = serviceOptions return nil } + +func resolveRestrictFilePermissions(ctx context.Context, cfg *aws.Config, configs configs) error { + m, found, err := getRestrictFilePermissions(ctx, configs) + if err != nil { + return err + } + + if !found { + m = aws.RestrictFilePermissionsUserReadWrite + } + + cfg.RestrictFilePermissions = m + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go index 4f8c324e0..fc9d47b8a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go @@ -640,6 +640,7 @@ func resolveLoginCredentials(ctx context.Context, cfg *aws.Config, sharedCfg *Sh svc := signin.NewFromConfig(*cfg) provider := logincreds.New(svc, tokenPath, func(o *logincreds.Options) { o.CredentialSources = getCredentialSources(ctx) + o.RestrictPermissions = cfg.RestrictFilePermissions != aws.RestrictFilePermissionsUnrestricted }) cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, provider) if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 1eda74ea7..87c87690a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,13 @@ +# v1.19.19 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.18 (2026-05-28) + +* **Bug Fix**: Create new login cache files with 0600 on Unix platforms. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.19.17 (2026-05-22) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index cfabb14a6..0bf0937d6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.19.17" +const goModuleVersion = "1.19.19" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/file.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/file.go index 6cd5281d4..a9dbe540e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/file.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/file.go @@ -9,6 +9,6 @@ var openFile func(string) (io.ReadCloser, error) = func(name string) (io.ReadClo return os.Open(name) } -var createFile func(string) (io.WriteCloser, error) = func(name string) (io.WriteCloser, error) { - return os.Create(name) +var createFile func(string, os.FileMode) (io.WriteCloser, error) = func(name string, mode os.FileMode) (io.WriteCloser, error) { + return os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go index 3e6357b87..1ca2a586b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go @@ -42,6 +42,10 @@ type Options struct { // The path to the cached login token. CachedTokenFilepath string + // Whether to restrict file permissions on newly-written cache files. + // When true, files are created with 0600 on Unix. + RestrictPermissions bool + // The chain of providers that was used to create this provider. // // These values are for reporting purposes and are not meant to be set up @@ -145,7 +149,15 @@ func (p *Provider) saveToken(token *loginToken) error { return err } - f, err := createFile(p.options.CachedTokenFilepath) + mode := os.FileMode(0666) // matches that used by os.Create + if p.options.RestrictPermissions { + mode = 0600 + } + + // createFile DOES NOT re-create the file with new permissions if it + // already exists, so in that scenario any existing permissions are + // preserved + f, err := createFile(p.options.CachedTokenFilepath, mode) if err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md index e17294549..8a90d8521 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.18.25 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.24 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.18.23 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go index 7f59387ed..7f28da5a4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.23" +const goModuleVersion = "1.18.25" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 0990a4143..9671c1f93 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.4.25 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.24 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.23 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 05a8d3e7b..f43155858 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.23" +const goModuleVersion = "1.4.25" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 49577e3e9..5998f71d0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,12 @@ +# v2.7.25 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.24 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.7.23 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 1e92900a1..9a68f4717 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.7.23" +const goModuleVersion = "2.7.25" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md index e1e3c23a7..ef18fa7bc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.4.26 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.25 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.24 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go index 455cb74e1..a537d6e0a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go @@ -3,4 +3,4 @@ package v4a // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.24" +const goModuleVersion = "1.4.26" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md index 1780f73cb..619c7a514 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.304.2 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.304.1 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.304.0 (2026-05-22) * **Feature**: The ModifyInstanceAttribute API now supports modification of EnclaveOptions for the instance as a typed parameter. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/auth.go index 498f4036e..4d69970c6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/auth.go @@ -184,7 +184,7 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) } for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { + if !matchSchemeID(scheme.SchemeID(), option.SchemeID) { continue } @@ -197,6 +197,16 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) return nil, false } +func matchSchemeID(registered, option string) bool { + if registered == option { + return true + } + if i := strings.LastIndex(registered, "#"); i != -1 { + return registered[i+1:] == option + } + return false +} + func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { byPriority := make([]*smithyauth.Option, 0, len(options)) for _, prefName := range preferred { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go index 3dfd228eb..0d9fe0675 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go @@ -230,6 +230,8 @@ func bindRegion(region string) (*string, error) { return aws.String(endpoints.MapFIPSRegion(region)), nil } +var _ = rulesfn.StringSlice(nil) + // EndpointParameters provides the parameters that influence how endpoints are // resolved. type EndpointParameters struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go index 5063a2c75..22e21e88f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go @@ -3,4 +3,4 @@ package ec2 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.304.0" +const goModuleVersion = "1.304.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md index 9f29d3520..df548e342 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.53.12 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.11 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.53.10 (2026-05-01) * **Documentation**: Added guidance for CreateOpenIDConnectProvider to include multiple thumbprints when OIDC discovery and JWKS endpoints use different hosts or certificates diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go index 933038a6a..95a711253 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go @@ -184,7 +184,7 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) } for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { + if !matchSchemeID(scheme.SchemeID(), option.SchemeID) { continue } @@ -197,6 +197,16 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) return nil, false } +func matchSchemeID(registered, option string) bool { + if registered == option { + return true + } + if i := strings.LastIndex(registered, "#"); i != -1 { + return registered[i+1:] == option + } + return false +} + func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { byPriority := make([]*smithyauth.Option, 0, len(options)) for _, prefName := range preferred { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go index 803ed8955..69e664d22 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go @@ -230,6 +230,8 @@ func bindRegion(region string) (*string, error) { return aws.String(endpoints.MapFIPSRegion(region)), nil } +var _ = rulesfn.StringSlice(nil) + // EndpointParameters provides the parameters that influence how endpoints are // resolved. type EndpointParameters struct { @@ -295,17 +297,6 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -382,7 +373,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") @@ -413,7 +404,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") @@ -444,7 +435,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "cn-north-1") @@ -475,7 +466,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "cn-north-1") @@ -506,7 +497,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") @@ -537,7 +528,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") @@ -568,7 +559,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") @@ -599,7 +590,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") @@ -630,7 +621,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") @@ -661,7 +652,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") @@ -692,7 +683,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") @@ -723,7 +714,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") @@ -754,7 +745,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "eu-isoe-west-1") @@ -785,7 +776,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1") @@ -816,7 +807,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, "eusc-de-east-1") @@ -853,7 +844,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) @@ -891,7 +882,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) @@ -928,7 +919,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) @@ -962,7 +953,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningRegion(&sp, _PartitionResult.ImplicitGlobalRegion) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go index de99cfe6a..fc9465a7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go @@ -3,4 +3,4 @@ package iam // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.53.10" +const goModuleVersion = "1.53.12" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md index cf6c5e091..be7b96d87 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.13.10 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. + # v1.13.9 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go index e14507070..8593d3561 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go @@ -3,4 +3,4 @@ package acceptencoding // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.9" +const goModuleVersion = "1.13.10" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md index f3442de4b..a52c115ba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.9.18 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.17 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.16 (2026-05-27) + +* No change notes available for this release. + # v1.9.15 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/algorithms.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/algorithms.go index dab97fb22..cbaab3fee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/algorithms.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/algorithms.go @@ -4,6 +4,7 @@ import ( "crypto/md5" "crypto/sha1" "crypto/sha256" + "crypto/sha512" "encoding/base64" "encoding/hex" "fmt" @@ -34,6 +35,9 @@ const ( // AlgorithmCRC64NVME represents CRC64NVME hash algorithm AlgorithmCRC64NVME Algorithm = "CRC64NVME" + + // AlgorithmSHA512 represents SHA512 hash algorithm + AlgorithmSHA512 Algorithm = "SHA512" ) // inverted NVME polynomial as required by crc64.MakeTable @@ -45,6 +49,7 @@ var supportedAlgorithms = []Algorithm{ AlgorithmSHA1, AlgorithmSHA256, AlgorithmCRC64NVME, + AlgorithmSHA512, } func (a Algorithm) String() string { return string(a) } @@ -99,6 +104,8 @@ func NewAlgorithmHash(v Algorithm) (hash.Hash, error) { return crc32.New(crc32.MakeTable(crc32.Castagnoli)), nil case AlgorithmCRC64NVME: return crc64.New(crc64.MakeTable(crc64NVME)), nil + case AlgorithmSHA512: + return sha512.New(), nil default: return nil, fmt.Errorf("unknown checksum algorithm, %v", v) } @@ -118,6 +125,8 @@ func AlgorithmChecksumLength(v Algorithm) (int, error) { return crc32.Size, nil case AlgorithmCRC64NVME: return crc64.Size, nil + case AlgorithmSHA512: + return sha512.Size, nil default: return 0, fmt.Errorf("unknown checksum algorithm, %v", v) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go index 7fa714cfb..a38321394 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go @@ -3,4 +3,4 @@ package checksum // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.9.15" +const goModuleVersion = "1.9.18" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md index 96adad526..7cb5e53c8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.13.25 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.24 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.13.23 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go index 5737e9c0c..58c0777a8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.23" +const goModuleVersion = "1.13.25" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md index 329570ad1..0d6022bc1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.19.25 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.24 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.19.23 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go index 6652be7f2..9cdec7b8d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go @@ -3,4 +3,4 @@ package s3shared // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.19.23" +const goModuleVersion = "1.19.25" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md index 5644601ad..9f65900c8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.42.2 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.1 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.42.0 (2026-05-21) * **Feature**: Adding new BDD representation of endpoint ruleset diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/auth.go index 157a0382f..7f559b1e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/auth.go @@ -184,7 +184,7 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) } for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { + if !matchSchemeID(scheme.SchemeID(), option.SchemeID) { continue } @@ -197,6 +197,16 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) return nil, false } +func matchSchemeID(registered, option string) bool { + if registered == option { + return true + } + if i := strings.LastIndex(registered, "#"); i != -1 { + return registered[i+1:] == option + } + return false +} + func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { byPriority := make([]*smithyauth.Option, 0, len(options)) for _, prefName := range preferred { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/endpoints.go index 1c7f7b49b..3a14c01f6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/endpoints.go @@ -230,6 +230,8 @@ func bindRegion(region string) (*string, error) { return aws.String(endpoints.MapFIPSRegion(region)), nil } +var _ = rulesfn.StringSlice(nil) + // EndpointParameters provides the parameters that influence how endpoints are // resolved. type EndpointParameters struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go index 8b56fa3d7..4a30ac3d6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go @@ -3,4 +3,4 @@ package pricing // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.42.0" +const goModuleVersion = "1.42.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md index 253e03596..d033a73d6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md @@ -1,3 +1,13 @@ +# v1.1.1 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.1.0 (2026-05-28) + +* **Feature**: Adding new BDD representation of endpoint ruleset +* **Dependency Update**: Updated to the latest SDK module versions + # v1.0.11 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/auth.go index cf6b36504..c98762629 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/auth.go @@ -190,7 +190,7 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) } for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { + if !matchSchemeID(scheme.SchemeID(), option.SchemeID) { continue } @@ -203,6 +203,16 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) return nil, false } +func matchSchemeID(registered, option string) bool { + if registered == option { + return true + } + if i := strings.LastIndex(registered, "#"); i != -1 { + return registered[i+1:] == option + } + return false +} + func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { byPriority := make([]*smithyauth.Option, 0, len(options)) for _, prefName := range preferred { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go index db2e6a62a..639250128 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go @@ -14,6 +14,7 @@ import ( internalendpoints "github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints" smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/bdd" "github.com/aws/smithy-go/endpoints/private/rulesfn" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" @@ -229,6 +230,8 @@ func bindRegion(region string) (*string, error) { return aws.String(endpoints.MapFIPSRegion(region)), nil } +var _ = rulesfn.StringSlice(nil) + // EndpointParameters provides the parameters that influence how endpoints are // resolved. type EndpointParameters struct { @@ -294,21 +297,193 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } -type stringSlice []string +const bddRoot int32 = 2 -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } +var bddNodes = [48]int32{ + -1, 1, -1, 0, 15, 3, 1, 4, 100000014, 2, 5, 100000014, 3, 11, 6, 4, 10, 7, 7, 100000004, 8, 8, 100000005, 9, 9, 100000006, 100000013, 5, 100000011, 100000012, 4, 13, 12, 6, 100000009, 100000010, 5, 14, 100000008, 6, 100000007, 100000008, 3, 100000001, 16, 4, 100000002, 100000003} + +type conditionContext struct { + PartitionResult *awsrulesfn.PartitionConfig +} - v := s[i] - return &v +func evalCondition(idx int, params *EndpointParameters, c *conditionContext) bool { + switch idx { + case 0: + return params.Endpoint != nil + case 1: + return params.Region != nil + case 2: + if v := awsrulesfn.GetPartition(*params.Region); v != nil { + c.PartitionResult = v + return true + } + return false + case 3: + return *params.UseFIPS == true + case 4: + return *params.UseDualStack == true + case 5: + return c.PartitionResult.SupportsDualStack == true + case 6: + return c.PartitionResult.SupportsFIPS == true + case 7: + return c.PartitionResult.Name == "aws" + case 8: + return c.PartitionResult.Name == "aws-cn" + case 9: + return c.PartitionResult.Name == "aws-us-gov" + } + return false +} + +func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (smithyendpoints.Endpoint, error) { + switch idx { + case 0: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint resolution failed: no matching rule") + case 1: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + case 2: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + case 3: + uriString := *params.Endpoint + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 4: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.aws.amazon.com") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 5: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.amazonaws.cn") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 6: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.amazonaws-us-gov.com") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 7: + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin-fips.") + out.WriteString(*params.Region) + out.WriteString(".") + out.WriteString(c.PartitionResult.DualStackDnsSuffix) + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 8: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") + case 9: + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin-fips.") + out.WriteString(*params.Region) + out.WriteString(".") + out.WriteString(c.PartitionResult.DnsSuffix) + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 10: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") + case 11: + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin.") + out.WriteString(*params.Region) + out.WriteString(".") + out.WriteString(c.PartitionResult.DualStackDnsSuffix) + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 12: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") + case 13: + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin.") + out.WriteString(*params.Region) + out.WriteString(".") + out.WriteString(c.PartitionResult.DnsSuffix) + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 14: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") + } + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, invalid result index: %d", idx) } // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. ResolveEndpoint(ctx context.Context, params EndpointParameters) ( smithyendpoints.Endpoint, error, ) @@ -332,206 +507,12 @@ func (r *resolver) ResolveEndpoint( if err = params.ValidateRequired(); err != nil { return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) } - _UseDualStack := *params.UseDualStack - _ = _UseDualStack - _UseFIPS := *params.UseFIPS - _ = _UseFIPS - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _PartitionResult.Name == "aws" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := func() string { - var out strings.Builder - out.WriteString("https://") - out.WriteString(_Region) - out.WriteString(".signin.aws.amazon.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - } - if _PartitionResult.Name == "aws-cn" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := func() string { - var out strings.Builder - out.WriteString("https://") - out.WriteString(_Region) - out.WriteString(".signin.amazonaws.cn") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - } - if _PartitionResult.Name == "aws-us-gov" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := func() string { - var out strings.Builder - out.WriteString("https://") - out.WriteString(_Region) - out.WriteString(".signin.amazonaws-us-gov.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - } - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://signin-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _UseDualStack == false { - if _PartitionResult.SupportsFIPS == true { - uriString := func() string { - var out strings.Builder - out.WriteString("https://signin-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - } - if _UseFIPS == false { - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://signin.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://signin.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") + c := &conditionContext{} + ref := bdd.Evaluate(bddNodes[:], bddRoot, func(idx int) bool { + return evalCondition(idx, ¶ms, c) + }) + return resolveResult(ref, ¶ms, c) } type endpointParamsBinder interface { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go index eba7ad777..b4964612f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go @@ -3,4 +3,4 @@ package signin // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.0.11" +const goModuleVersion = "1.1.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md index 26c80a2c2..edaa8dae2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.30.19 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.18 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.30.17 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go index c658615fd..a17cf6ee9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go @@ -208,7 +208,7 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) } for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { + if !matchSchemeID(scheme.SchemeID(), option.SchemeID) { continue } @@ -221,6 +221,16 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) return nil, false } +func matchSchemeID(registered, option string) bool { + if registered == option { + return true + } + if i := strings.LastIndex(registered, "#"); i != -1 { + return registered[i+1:] == option + } + return false +} + func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { byPriority := make([]*smithyauth.Option, 0, len(options)) for _, prefName := range preferred { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go index 551f05974..3b6c90212 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go @@ -229,6 +229,8 @@ func bindRegion(region string) (*string, error) { return aws.String(endpoints.MapFIPSRegion(region)), nil } +var _ = rulesfn.StringSlice(nil) + // EndpointParameters provides the parameters that influence how endpoints are // resolved. type EndpointParameters struct { @@ -294,17 +296,6 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go index 9d12dd55b..9545cdffa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go @@ -3,4 +3,4 @@ package sso // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.30.17" +const goModuleVersion = "1.30.19" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md index 33082c0e5..3cdae3e38 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.36.2 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.1 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.36.0 (2026-05-22) * **Feature**: Adding new BDD representation of endpoint ruleset diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go index 5f253df30..2ceab3e1b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go @@ -202,7 +202,7 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) } for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { + if !matchSchemeID(scheme.SchemeID(), option.SchemeID) { continue } @@ -215,6 +215,16 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) return nil, false } +func matchSchemeID(registered, option string) bool { + if registered == option { + return true + } + if i := strings.LastIndex(registered, "#"); i != -1 { + return registered[i+1:] == option + } + return false +} + func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { byPriority := make([]*smithyauth.Option, 0, len(options)) for _, prefName := range preferred { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go index 083453356..1bc32925d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go @@ -230,6 +230,8 @@ func bindRegion(region string) (*string, error) { return aws.String(endpoints.MapFIPSRegion(region)), nil } +var _ = rulesfn.StringSlice(nil) + // EndpointParameters provides the parameters that influence how endpoints are // resolved. type EndpointParameters struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go index f94dbeb9b..6ab509bf7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go @@ -3,4 +3,4 @@ package ssooidc // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.36.0" +const goModuleVersion = "1.36.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index 199f7a79c..6e9988262 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.42.3 (2026-05-29) + +* **Dependency Update**: Update to smithy-go v1.26.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.2 (2026-05-28) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.42.1 (2026-04-29) * **Dependency Update**: Update to smithy-go v1.25.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go index 71c5db38b..5fe4c6012 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go @@ -206,7 +206,7 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) } for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { + if !matchSchemeID(scheme.SchemeID(), option.SchemeID) { continue } @@ -219,6 +219,16 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) return nil, false } +func matchSchemeID(registered, option string) bool { + if registered == option { + return true + } + if i := strings.LastIndex(registered, "#"); i != -1 { + return registered[i+1:] == option + } + return false +} + func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { byPriority := make([]*smithyauth.Option, 0, len(options)) for _, prefName := range preferred { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go index c8f9526c7..8a6532926 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go @@ -230,6 +230,8 @@ func bindRegion(region string) (*string, error) { return aws.String(endpoints.MapFIPSRegion(region)), nil } +var _ = rulesfn.StringSlice(nil) + // EndpointParameters provides the parameters that influence how endpoints are // resolved. type EndpointParameters struct { @@ -312,17 +314,6 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -382,7 +373,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -412,7 +403,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -442,7 +433,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -472,7 +463,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -502,7 +493,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -532,7 +523,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -562,7 +553,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -592,7 +583,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -622,7 +613,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -652,7 +643,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -682,7 +673,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -712,7 +703,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -742,7 +733,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -772,7 +763,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -802,7 +793,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -832,7 +823,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -868,7 +859,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") @@ -1022,7 +1013,7 @@ func (r *resolver) ResolveEndpoint( var out smithy.Properties smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ { - SchemeID: "aws.auth#sigv4", + SchemeID: "sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties smithyhttp.SetSigV4SigningName(&sp, "sts") diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index bdd6a15d8..7c54f96c9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.42.1" +const goModuleVersion = "1.42.3" diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index b9cd114ed..7fc37ff89 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,12 @@ +# Release (2026-05-27) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.26.0 + * **Feature**: Add StringSlice to endpoint rulesfn. + # Release (2026-04-23) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/string_slice.go b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/string_slice.go new file mode 100644 index 000000000..7a82fcd94 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/string_slice.go @@ -0,0 +1,18 @@ +package rulesfn + +// StringSlice is a string slice with a negative-index-aware Get method for use +// in endpoint rule evaluation. +type StringSlice []string + +// Get returns a pointer to the string at index i, or nil if the index is out +// of bounds. Negative indices count from the end of the slice. +func (s StringSlice) Get(i int) *string { + if i < 0 { + i = len(s) + i + } + if i < 0 || i >= len(s) { + return nil + } + v := s[i] + return &v +} diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index a1e928754..bf309b96c 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.25.1" +const goModuleVersion = "1.26.0" diff --git a/vendor/github.com/go-openapi/analysis/.gitignore b/vendor/github.com/go-openapi/analysis/.gitignore index d8f4186fe..20c4e0fa0 100644 --- a/vendor/github.com/go-openapi/analysis/.gitignore +++ b/vendor/github.com/go-openapi/analysis/.gitignore @@ -3,3 +3,5 @@ .idea .env .mcp.json +go.work.sum +.worktrees diff --git a/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md b/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md index 2f85f1c05..193e4602c 100644 --- a/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md @@ -4,24 +4,31 @@ | Total Contributors | Total Contributions | | --- | --- | -| 15 | 207 | +| 22 | 266 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | -| @fredbi | 104 | | -| @casualjim | 70 | | +| @fredbi | 126 | | +| @casualjim | 91 | | | @keramix | 9 | | | @youyuanwu | 8 | | -| @msample | 3 | | +| @wjase | 7 | | | @kul-amr | 3 | | +| @schafle | 3 | | +| @msample | 3 | | | @mbohlool | 2 | | -| @Copilot | 1 | | -| @danielfbm | 1 | | -| @gregmarr | 1 | | -| @guillemj | 1 | | -| @knweiss | 1 | | -| @tklauser | 1 | | -| @cuishuang | 1 | | +| @zmay2030 | 2 | | | @ujjwalsh | 1 | | +| @itengfei | 1 | | +| @nrnrk | 1 | | +| @cuishuang | 1 | | +| @tklauser | 1 | | +| @Shimizu1111 | 1 | | +| @thaJeztah | 1 | | +| @knweiss | 1 | | +| @guillemj | 1 | | +| @gregmarr | 1 | | +| @danielfbm | 1 | | +| @Copilot | 1 | | _this file was generated by the [Contributors GitHub Action](https://github.com/github-community-projects/contributors)_ diff --git a/vendor/github.com/go-openapi/analysis/README.md b/vendor/github.com/go-openapi/analysis/README.md index 82c782fcd..e4e308659 100644 --- a/vendor/github.com/go-openapi/analysis/README.md +++ b/vendor/github.com/go-openapi/analysis/README.md @@ -12,7 +12,7 @@ --- -A foundational library to analyze an OAI specification document for easier reasoning about the content. +A foundational library to analyze, diff, flatten, merge, and fix OAI specification documents for easier reasoning about the content. ## Announcements @@ -38,6 +38,7 @@ go get github.com/go-openapi/analysis * An analyzer providing methods to walk the functional content of a specification * A spec flattener producing a self-contained document bundle, while preserving `$ref`s +* A spec differ ("diff") to compare two specs and report structural and compatibility changes * A spec merger ("mixin") to merge several spec documents into a primary spec * A spec "fixer" ensuring that response descriptions are non empty diff --git a/vendor/github.com/go-openapi/analysis/analyzer.go b/vendor/github.com/go-openapi/analysis/analyzer.go index 1c91b8c55..c24811aae 100644 --- a/vendor/github.com/go-openapi/analysis/analyzer.go +++ b/vendor/github.com/go-openapi/analysis/analyzer.go @@ -145,19 +145,27 @@ type Spec struct { enums enumAnalysis allSchemas map[string]SchemaRef allOfs map[string]SchemaRef + mangler mangling.NameMangler } // New takes a swagger spec object and returns an analyzed spec document. // The analyzed document contains a number of indices that make it easier to // reason about semantics of a swagger specification for use in code generation // or validation etc. -func New(doc *spec.Swagger) *Spec { +func New(doc *spec.Swagger, opts ...Option) *Spec { + o := &analyzerOptions{} + for _, opt := range opts { + opt(o) + } + a := &Spec{ spec: doc, references: referenceAnalysis{}, patterns: patternAnalysis{}, enums: enumAnalysis{}, + mangler: mangling.NewNameMangler(o.manglerOpts...), } + a.reset() a.initialize() @@ -288,20 +296,6 @@ func (s *Spec) ProducesFor(operation *spec.Operation) []string { return s.structMapKeys(prod) } -func mapKeyFromParam(param *spec.Parameter) string { - return fmt.Sprintf("%s#%s", param.In, fieldNameFromParam(param)) -} - -func fieldNameFromParam(param *spec.Parameter) string { - // TODO: this should be x-go-name - if nm, ok := param.Extensions.GetString("go-name"); ok { - return nm - } - mangler := mangling.NewNameMangler() - - return mangler.ToGoName(param.Name) -} - // ErrorOnParamFunc is a callback function to be invoked // whenever an error is encountered while resolving references // on parameters. @@ -651,6 +645,19 @@ func (s *Spec) AllEnums() map[string][]any { return cloneEnumMap(s.enums.allEnums) } +func (s *Spec) mapKeyFromParam(param *spec.Parameter) string { + return fmt.Sprintf("%s#%s", param.In, s.fieldNameFromParam(param)) +} + +func (s *Spec) fieldNameFromParam(param *spec.Parameter) string { + // TODO: this should be x-go-name + if nm, ok := param.Extensions.GetString("go-name"); ok { + return nm + } + + return s.mangler.ToGoName(param.Name) +} + func (s *Spec) structMapKeys(mp map[string]struct{}) []string { if len(mp) == 0 { return nil @@ -668,7 +675,7 @@ func (s *Spec) paramsAsMap(parameters []spec.Parameter, res map[string]spec.Para for _, param := range parameters { pr := param if pr.Ref.String() == "" { - res[mapKeyFromParam(&pr)] = pr + res[s.mapKeyFromParam(&pr)] = pr continue } @@ -699,7 +706,7 @@ func (s *Spec) paramsAsMap(parameters []spec.Parameter, res map[string]spec.Para } pr = objAsParam - res[mapKeyFromParam(&pr)] = pr + res[s.mapKeyFromParam(&pr)] = pr } } diff --git a/vendor/github.com/go-openapi/analysis/flatten.go b/vendor/github.com/go-openapi/analysis/flatten.go index d7ee0064b..1e5016664 100644 --- a/vendor/github.com/go-openapi/analysis/flatten.go +++ b/vendor/github.com/go-openapi/analysis/flatten.go @@ -554,6 +554,7 @@ func updateRefParents(allRefs map[string]spec.Ref, r *newRef) { } } +//nolint:gocognit,gocyclo,cyclop // legacy from a lot of design choices that led to concentrate the complexity just here. func stripOAIGenForRef(opts *FlattenOpts, k string, r *newRef) (bool, error) { replacedWithComplex := false diff --git a/vendor/github.com/go-openapi/analysis/flatten_name.go b/vendor/github.com/go-openapi/analysis/flatten_name.go index 922cae55c..9d7321718 100644 --- a/vendor/github.com/go-openapi/analysis/flatten_name.go +++ b/vendor/github.com/go-openapi/analysis/flatten_name.go @@ -273,9 +273,9 @@ func mangler(o *FlattenOpts) func(string) string { if o.KeepNames { return func(in string) string { return in } } - mangler := mangling.NewNameMangler() + m := mangling.NewNameMangler(o.ManglerOpts...) - return mangler.ToJSONName + return m.ToJSONName } func nameFromRef(ref spec.Ref, o *FlattenOpts) string { diff --git a/vendor/github.com/go-openapi/analysis/flatten_options.go b/vendor/github.com/go-openapi/analysis/flatten_options.go index 23a57ea1a..0984941fd 100644 --- a/vendor/github.com/go-openapi/analysis/flatten_options.go +++ b/vendor/github.com/go-openapi/analysis/flatten_options.go @@ -7,6 +7,7 @@ import ( "log" "github.com/go-openapi/spec" + "github.com/go-openapi/swag/mangling" ) // FlattenOpts configuration for flattening a swagger specification. @@ -24,12 +25,13 @@ type FlattenOpts struct { BasePath string // The location of the root document for this spec to resolve relative $ref // Flattening options - Expand bool // When true, skip flattening the spec and expand it instead (if Minimal is false) - Minimal bool // When true, do not decompose complex structures such as allOf - Verbose bool // enable some reporting on possible name conflicts detected - RemoveUnused bool // When true, remove unused parameters, responses and definitions after expansion/flattening - ContinueOnError bool // Continue when spec expansion issues are found - KeepNames bool // Do not attempt to jsonify names from references when flattening + Expand bool // When true, skip flattening the spec and expand it instead (if Minimal is false) + Minimal bool // When true, do not decompose complex structures such as allOf + Verbose bool // enable some reporting on possible name conflicts detected + RemoveUnused bool // When true, remove unused parameters, responses and definitions after expansion/flattening + ContinueOnError bool // Continue when spec expansion issues are found + KeepNames bool // Do not attempt to jsonify names from references when flattening + ManglerOpts []mangling.Option // Options for the name mangler used to jsonify names /* Extra keys */ _ struct{} // require keys diff --git a/vendor/github.com/go-openapi/analysis/go.work.sum b/vendor/github.com/go-openapi/analysis/go.work.sum deleted file mode 100644 index 899a68976..000000000 --- a/vendor/github.com/go-openapi/analysis/go.work.sum +++ /dev/null @@ -1,47 +0,0 @@ -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30 h1:BHT1/DKsYDGkUgQ2jmMaozVcdk+sVfz0+1ZJq4zkWgw= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= -go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= -golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= -golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= -golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= -golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= -golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= -golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= -golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= -golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= -golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= -golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= -golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= -golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= -golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= -golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= -golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 h1:bTLqdHv7xrGlFbvf5/TXNxy/iUwwdkjhqQTJDjW7aj0= -golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4/go.mod h1:g5NllXBEermZrmR51cJDQxmJUHUOfRAaNyWBM+R+548= -golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= -golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= -golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= -golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= -golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A= -golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= -golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= -golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= -golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= -golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= diff --git a/vendor/github.com/go-openapi/analysis/mixin.go b/vendor/github.com/go-openapi/analysis/mixin.go index a7a9306cb..ab15644f6 100644 --- a/vendor/github.com/go-openapi/analysis/mixin.go +++ b/vendor/github.com/go-openapi/analysis/mixin.go @@ -11,37 +11,66 @@ import ( "github.com/go-openapi/spec" ) -// Mixin modifies the primary swagger spec by adding the paths and -// definitions from the mixin specs. Top level parameters and -// responses from the mixins are also carried over. Operation id -// collisions are avoided by appending "Mixin" but only if -// needed. +// Mixin merges one or more Swagger 2.0 documents into a primary document. // -// The following parts of primary are subject to merge, filling empty details +// # Argument order and precedence // -// - Info +// The first argument is the primary spec, which Mixin modifies in place. +// Subsequent arguments are mixins, listed in decreasing order of priority. +// On any collision, the primary always wins; among mixins, the earliest one +// wins. +// +// Example: given a primary spec with host "a.example.com" and a mixin with +// host "b.example.com", the merged result keeps "a.example.com" (primary +// wins, the mixin value is dropped). Given a primary without a host and a +// mixin with host "b.example.com", the merged result uses "b.example.com" +// (the mixin fills in the empty field on the primary). +// +// # What gets merged +// +// Top-level scalar fields on the primary are filled from the first mixin +// that provides them, but only if the primary's value is the zero value: +// +// - Info (including the nested Contact and License) // - BasePath // - Host // - ExternalDocs // -// Consider calling [FixEmptyResponseDescriptions]() on the modified primary -// if you read them from storage and they are valid to start with. +// Map and slice fields are merged entry by entry. This covers: +// +// - paths, definitions, parameters, responses +// - securityDefinitions, security, tags +// - top-level and Info extensions +// +// Duplicate keys (or equal security requirements, or equal tag names) are +// skipped with a warning; warnings are returned as a slice and intended to +// be inspected by the caller (e.g. compared to an expected collision count +// in build scripts). +// +// Schemes, consumes and produces are merged as the union of distinct +// values. Duplicates there are silently dropped, no warning is emitted. +// +// Operation id collisions are auto-resolved by appending "Mixin" to the +// mixin operation id (N is the mixin index), so the merged spec keeps +// unique operation ids. +// +// # Notes and limitations // -// Entries in "paths", "definitions", "parameters" and "responses" are -// added to the primary in the order of the given mixins. If the entry -// already exists in primary it is skipped with a warning message. +// Consider calling [FixEmptyResponseDescriptions] on the modified primary +// if you read responses from storage and they are valid to start with. // -// The count of skipped entries (from collisions) is returned so any -// deviation from the number expected can flag a warning in your build -// scripts. Carefully review the collisions before accepting them; -// consider renaming things if possible. +// No key normalization takes place. Ensure paths, type names, etc. are +// canonical if your downstream tools rely on normalized forms. // -// No key normalization takes place (paths, type defs, -// etc). Ensure they are canonical if your downstream tools do -// key normalization of any form. +// YAML anchors (& / *) are resolved by the YAML parser before Mixin sees +// the document, so they are not preserved in the merged output, and they +// cannot be shared across input files. Use $ref for cross-file reuse. See +// https://goswagger.io/go-swagger/faq/faq_swagger/#does-swagger-mixin-preserve-yaml-anchors // -// Merging schemes ([http], https), and consumers/producers do not account for -// collisions. +// The order of paths and definitions in the merged output is alphabetical: +// the underlying spec model stores them as Go maps, which serialize with +// sorted keys. Source-file order is not preserved. See +// https://goswagger.io/go-swagger/faq/faq_swagger/#can-i-control-the-path-or-operation-order-in-swagger-mixin-output func Mixin(primary *spec.Swagger, mixins ...*spec.Swagger) []string { skipped := make([]string, 0, len(mixins)) opIDs := getOpIDs(primary) diff --git a/vendor/github.com/go-openapi/analysis/options.go b/vendor/github.com/go-openapi/analysis/options.go new file mode 100644 index 000000000..b46cd2ca6 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/options.go @@ -0,0 +1,21 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +package analysis + +import "github.com/go-openapi/swag/mangling" + +// Option configures the behavior of a new [Spec] analyzer. +type Option func(*analyzerOptions) + +type analyzerOptions struct { + manglerOpts []mangling.Option +} + +// WithManglerOptions sets the name mangler options used when building +// Go identifiers from specification names (e.g. parameter names). +func WithManglerOptions(opts ...mangling.Option) Option { + return func(o *analyzerOptions) { + o.manglerOpts = append(o.manglerOpts, opts...) + } +} diff --git a/vendor/github.com/go-openapi/jsonreference/.gitignore b/vendor/github.com/go-openapi/jsonreference/.gitignore index 885dc27ab..d8f4186fe 100644 --- a/vendor/github.com/go-openapi/jsonreference/.gitignore +++ b/vendor/github.com/go-openapi/jsonreference/.gitignore @@ -3,4 +3,3 @@ .idea .env .mcp.json -.claude/ diff --git a/vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.md b/vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.md index 7faeb83a7..3cfbca6a6 100644 --- a/vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.md @@ -4,18 +4,18 @@ | Total Contributors | Total Contributions | | --- | --- | -| 9 | 73 | +| 9 | 79 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | -| @fredbi | 36 | https://github.com/go-openapi/jsonreference/commits?author=fredbi | -| @casualjim | 25 | https://github.com/go-openapi/jsonreference/commits?author=casualjim | -| @youyuanwu | 5 | https://github.com/go-openapi/jsonreference/commits?author=youyuanwu | -| @olivierlemasle | 2 | https://github.com/go-openapi/jsonreference/commits?author=olivierlemasle | -| @apelisse | 1 | https://github.com/go-openapi/jsonreference/commits?author=apelisse | -| @gbjk | 1 | https://github.com/go-openapi/jsonreference/commits?author=gbjk | -| @honza | 1 | https://github.com/go-openapi/jsonreference/commits?author=honza | -| @Neo2308 | 1 | https://github.com/go-openapi/jsonreference/commits?author=Neo2308 | -| @erraggy | 1 | https://github.com/go-openapi/jsonreference/commits?author=erraggy | +| @fredbi | 42 | | +| @casualjim | 25 | | +| @youyuanwu | 5 | | +| @olivierlemasle | 2 | | +| @apelisse | 1 | | +| @gbjk | 1 | | +| @honza | 1 | | +| @Neo2308 | 1 | | +| @erraggy | 1 | | - _this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_ + _this file was generated by the [Contributors GitHub Action](https://github.com/github-community-projects/contributors)_ diff --git a/vendor/github.com/go-openapi/jsonreference/README.md b/vendor/github.com/go-openapi/jsonreference/README.md index adea16061..43d05b050 100644 --- a/vendor/github.com/go-openapi/jsonreference/README.md +++ b/vendor/github.com/go-openapi/jsonreference/README.md @@ -14,15 +14,9 @@ An implementation of JSON Reference for golang. + ## Status @@ -74,9 +68,9 @@ on top of which it has been built. ## Other documentation * [All-time contributors](./CONTRIBUTORS.md) -* [Contributing guidelines](.github/CONTRIBUTING.md) -* [Maintainers documentation](docs/MAINTAINERS.md) -* [Code style](docs/STYLE.md) +* [Contributing guidelines][contributing-doc-site] +* [Maintainers documentation][maintainers-doc-site] +* [Code style][style-doc-site] ## Cutting a new release @@ -115,7 +109,7 @@ Maintainers can cut a new release by either: [slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM [slack-url]: https://goswagger.slack.com/archives/C04R30YMU [discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue -[discord-url]: https://discord.gg/twZ9BwT3 +[discord-url]: https://discord.gg/FfnFYaC3k5 [license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg @@ -125,3 +119,7 @@ Maintainers can cut a new release by either: [goversion-url]: https://github.com/go-openapi/jsonreference/blob/master/go.mod [top-badge]: https://img.shields.io/github/languages/top/go-openapi/jsonreference [commits-badge]: https://img.shields.io/github/commits-since/go-openapi/jsonreference/latest + +[contributing-doc-site]: https://go-openapi.github.io/doc-site/contributing/contributing/index.html +[maintainers-doc-site]: https://go-openapi.github.io/doc-site/maintainers/index.html +[style-doc-site]: https://go-openapi.github.io/doc-site/contributing/style/index.html diff --git a/vendor/github.com/go-openapi/strfmt/CONTRIBUTORS.md b/vendor/github.com/go-openapi/strfmt/CONTRIBUTORS.md index a5d5ed6e6..b6d62d76e 100644 --- a/vendor/github.com/go-openapi/strfmt/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/strfmt/CONTRIBUTORS.md @@ -4,12 +4,12 @@ | Total Contributors | Total Contributions | | --- | --- | -| 40 | 231 | +| 40 | 234 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | | @casualjim | 88 | | -| @fredbi | 63 | | +| @fredbi | 66 | | | @youyuanwu | 13 | | | @jlambatl | 9 | | | @GlenDC | 5 | | diff --git a/vendor/github.com/go-openapi/validate/CONTRIBUTORS.md b/vendor/github.com/go-openapi/validate/CONTRIBUTORS.md index 7b79b765d..46da8797d 100644 --- a/vendor/github.com/go-openapi/validate/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/validate/CONTRIBUTORS.md @@ -4,12 +4,12 @@ | Total Contributors | Total Contributions | | --- | --- | -| 31 | 295 | +| 31 | 302 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | | @casualjim | 169 | | -| @fredbi | 58 | | +| @fredbi | 65 | | | @sttts | 11 | | | @youyuanwu | 9 | | | @keramix | 8 | | @@ -40,4 +40,4 @@ | @dadgar | 1 | | | @elakito | 1 | | - _this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_ + _this file was generated by the [Contributors GitHub Action](https://github.com/github-community-projects/contributors)_ diff --git a/vendor/github.com/go-openapi/validate/README.md b/vendor/github.com/go-openapi/validate/README.md index fec42b7c6..17bd03b60 100644 --- a/vendor/github.com/go-openapi/validate/README.md +++ b/vendor/github.com/go-openapi/validate/README.md @@ -112,7 +112,7 @@ Maintainers can cut a new release by either: [slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM [slack-url]: https://goswagger.slack.com/archives/C04R30YMU [discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue -[discord-url]: https://discord.gg/twZ9BwT3 +[discord-url]: https://discord.gg/FfnFYaC3k5 [license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg diff --git a/vendor/github.com/go-playground/validator/v10/.gitignore b/vendor/github.com/go-playground/validator/v10/.gitignore index 6305e5290..347072e38 100644 --- a/vendor/github.com/go-playground/validator/v10/.gitignore +++ b/vendor/github.com/go-playground/validator/v10/.gitignore @@ -30,3 +30,4 @@ _testmain.go cover.html README.html .idea +.claude/ diff --git a/vendor/github.com/go-playground/validator/v10/.golangci.yaml b/vendor/github.com/go-playground/validator/v10/.golangci.yaml index 96337d6ca..e69d817be 100644 --- a/vendor/github.com/go-playground/validator/v10/.golangci.yaml +++ b/vendor/github.com/go-playground/validator/v10/.golangci.yaml @@ -53,3 +53,8 @@ linters: - varnamelen - wrapcheck - wsl + - gomodguard + settings: + govet: + disable: + - inline diff --git a/vendor/github.com/go-playground/validator/v10/CLAUDE.md b/vendor/github.com/go-playground/validator/v10/CLAUDE.md new file mode 100644 index 000000000..ac6b6d77d --- /dev/null +++ b/vendor/github.com/go-playground/validator/v10/CLAUDE.md @@ -0,0 +1,78 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Repository + +`github.com/go-playground/validator/v10` — struct and field validation library based on struct tags. The module path ends in `/v10`; changes must preserve v10 API compatibility. Contributions require test coverage (see `.github/CONTRIBUTING.md`). + +## Commands + +```bash +make test # go test -cover -race ./... +make lint # installs golangci-lint v2.0.2 if missing, then runs it +make bench # go test -run=NONE -bench=. -benchmem ./... + +# Single test / subtest +go test -run TestName ./... +go test -run TestName/subtest_name ./... + +# Single benchmark +go test -run=NONE -bench=BenchmarkFieldSuccess -benchmem ./... +``` + +Tests live alongside source in the package root (`validator_test.go`, `benchmarks_test.go`); run them from the repo root. Non-standard validators and translations are separate packages (`./non-standard/validators`, `./translations/...`) and are included by `./...`. + +## Architecture + +The library compiles validation tags into cached execution plans, then runs them against values via reflection. Understanding three layers is enough to be productive: + +### 1. Registration & configuration — [validator_instance.go](validator_instance.go) +`Validate` is the singleton entry point. It holds: +- `validations` — tag → `FuncCtx` (the validator functions) +- `aliases` — shorthand tag → expanded tag expression +- `customFuncs` — `reflect.Type` → value extractor (for types like `sql.NullString` or anything implementing the `Valuer` interface, see [doc.go](doc.go)) +- `structLevelFuncs` — struct-level validators +- `tagCache` and `structCache` — parsed-tag and parsed-struct caches (critical for performance; `Validate` is thread-safe and must be used as a singleton) + +Options live in [options.go](options.go) (`WithRequiredStructEnabled`, `WithPrivateFieldValidation`, etc.). `WithRequiredStructEnabled` is the forward-compatible default users should adopt before v11. + +### 2. Baked-in validators — [baked_in.go](baked_in.go) +All built-in tags (`required`, `email`, `uuid`, `oneof`, `gt`, cross-field `eqfield`, etc.) are registered here as `Func`/`FuncCtx` receiving a `FieldLevel` (see [field_level.go](field_level.go)). `restrictedTags` enumerates names that cannot be overridden. Cross-field validators resolve the other field via `fl.GetStructFieldOK*` against the parent struct captured in the execution context. + +Adjacent data tables: +- [regexes.go](regexes.go), [postcode_regexes.go](postcode_regexes.go) — compiled regexps used by validators +- [country_codes.go](country_codes.go), [currency_codes.go](currency_codes.go), [language_codes.go](language_codes.go) — lookup tables + +When adding a new tag: register it in `bakedInValidators` in [baked_in.go](baked_in.go), add its description to the table in [README.md](README.md), and add tests in [validator_test.go](validator_test.go). + +### 3. Execution — [validator.go](validator.go) + [cache.go](cache.go) +- [cache.go](cache.go) parses struct tags into `cField` and `cTag` linked lists once per type and stores them in `structCache`/`tagCache`. `cTag.typeof` (`typeDefault`, `typeOmitEmpty`, `typeDive`, `typeStructOnly`, `typeOr`, etc.) tells the executor what to do. +- [validator.go](validator.go) contains the per-call `validate` struct (pooled via `sync.Pool`) and the `validateStruct` / `traverseField` mutual recursion. `ns`/`actualNs` are the accumulated dotted namespaces used in error paths; `dive`, `keys`, `endkeys` push/pop through slices/maps. + +Public entry points live on `Validate`: `Struct`, `StructCtx`, `StructPartial`, `StructExcept`, `StructFiltered`, `Var`, `VarWithValue`, and their `Ctx` variants. + +### Errors +[errors.go](errors.go) defines `ValidationErrors` (a `[]FieldError`) and `InvalidValidationError`. Per [README.md](README.md) and [doc.go](doc.go), callers type-assert `err.(validator.ValidationErrors)` after checking `err != nil`. Only `InvalidValidationError` signals misuse (e.g. passing a non-struct to `Struct`). + +### Struct-level & field-level custom validators +[struct_level.go](struct_level.go) and [field_level.go](field_level.go) define the contexts passed to user-registered functions. Struct-level validators report errors via `StructLevel.ReportError` / `ReportValidationErrors` — they operate on the whole struct instead of a single field. + +### Translations — [translations.go](translations.go) + [translations/](translations/) +Each locale under `translations/` registers a human-readable message per tag against a `ut.Translator`. `FieldError.Translate(trans)` consumes the registered `TranslationFunc`. When adding a new tag with a translation, add an entry in each locale package — translations are parallel packages, not a single table. + +### Non-standard validators — [non-standard/validators/](non-standard/validators/) +Opt-in validators (`NotBlank`) users register manually. Keep niche or opinionated validators here rather than expanding `baked_in.go`. + +## Performance-sensitive areas + +Validation is on the hot path for many users. When touching [cache.go](cache.go), [validator.go](validator.go), or `baked_in.go` hot functions: +- Avoid allocations in the success path — several baked-in validators and the executor reuse pooled buffers (`validate.misc`, `str1`, `str2`). +- Benchmarks in [benchmarks_test.go](benchmarks_test.go) gate regressions; run `make bench` before and after significant changes and include results in the PR if they move. + +## Conventions + +- Go module minimum version is pinned in [go.mod](go.mod); don't lower it. +- Don't introduce new top-level exported types without need — most extension happens through `Register*` methods on `Validate`. +- `restrictedTags` (in [baked_in.go](baked_in.go)) is intentionally a denylist for aliases and registrations; adding a tag with one of those names will break the parser. +- Examples live under `_examples/` (underscore prefix excludes them from the module build). Keep them runnable as standalone `main` packages. diff --git a/vendor/github.com/go-playground/validator/v10/README.md b/vendor/github.com/go-playground/validator/v10/README.md index 9b0a995eb..8462d2114 100644 --- a/vendor/github.com/go-playground/validator/v10/README.md +++ b/vendor/github.com/go-playground/validator/v10/README.md @@ -51,7 +51,8 @@ Validator returns only InvalidValidationError for bad validation input, nil or V ```go err := validate.Struct(mystruct) -validationErrors := err.(validator.ValidationErrors) +var validationErrors validator.ValidationErrors +errors.As(err, &validationErrors) ``` Usage and documentation @@ -128,6 +129,7 @@ validate := validator.New(validator.WithRequiredStructEnabled()) | url | URL String | | http_url | HTTP(s) URL String | | https_url | HTTPS-only URL String | +| origin | Web origin (URL with HTTP(S) scheme and host, but no path/query/fragment) | | url_encoded | URL Encoded | | urn_rfc2141 | Urn RFC 2141 String | @@ -169,6 +171,7 @@ validate := validator.New(validator.WithRequiredStructEnabled()) | bic_iso_9362_2014 | Business Identifier Code (ISO 9362:2014) | | bic | Business Identifier Code (ISO 9362:2022) | | bcp47_language_tag | Language tag (BCP 47) | +| bcp47_strict_language_tag | Language tag (BCP 47), strictly following RFC 5646 | | btc_addr | Bitcoin Address | | btc_addr_bech32 | Bitcoin Bech32 Address (segwit) | | credit_card | Credit Card Number | @@ -222,7 +225,7 @@ validate := validator.New(validator.WithRequiredStructEnabled()) | sha384 | SHA384 hash | | sha512 | SHA512 hash | | ripemd128 | RIPEMD-128 hash | -| ripemd128 | RIPEMD-160 hash | +| ripemd160 | RIPEMD-160 hash | | tiger128 | TIGER128 hash | | tiger160 | TIGER160 hash | | tiger192 | TIGER192 hash | @@ -250,11 +253,13 @@ validate := validator.New(validator.WithRequiredStructEnabled()) | file | Existing File | | filepath | File Path | | image | Image | +| mimetype | MIME Type | | isdefault | Is Default | | len | Length | | max | Maximum | | min | Minimum | | oneof | One Of | +| noneof | None Of | | required | Required | | required_if | Required If | | required_unless | Required Unless | diff --git a/vendor/github.com/go-playground/validator/v10/baked_in.go b/vendor/github.com/go-playground/validator/v10/baked_in.go index ec273a90e..679729a5f 100644 --- a/vendor/github.com/go-playground/validator/v10/baked_in.go +++ b/vendor/github.com/go-playground/validator/v10/baked_in.go @@ -3,7 +3,6 @@ package validator import ( "bufio" "bytes" - "cmp" "context" "crypto/sha256" "encoding/hex" @@ -16,7 +15,9 @@ import ( "net/url" "os" "reflect" + "regexp" "runtime" + "slices" "strconv" "strings" "sync" @@ -141,6 +142,7 @@ var ( "http_url": isHttpURL, "https_url": isHttpsURL, "uri": isURI, + "origin": isOrigin, "urn_rfc2141": isUrnRFC2141, // RFC 2141 "file": isFile, "filepath": isFilePath, @@ -159,6 +161,7 @@ var ( "startsnotwith": startsNotWith, "endsnotwith": endsNotWith, "image": isImage, + "mimetype": isMIMEType, "isbn": isISBN, "isbn10": isISBN10, "isbn13": isISBN13, @@ -217,6 +220,8 @@ var ( "unique": isUnique, "oneof": isOneOf, "oneofci": isOneOfCI, + "noneof": isNoneOf, + "noneofci": isNoneOfCI, "html": isHTML, "html_encoded": isHTMLEncoded, "url_encoded": isURLEncoded, @@ -240,6 +245,7 @@ var ( "iso4217": isIso4217, "iso4217_numeric": isIso4217Numeric, "bcp47_language_tag": isBCP47LanguageTag, + "bcp47_strict_language_tag": isBCP47StrictLanguageTag, "postcode_iso3166_alpha2": isPostcodeByIso3166Alpha2, "postcode_iso3166_alpha2_field": isPostcodeByIso3166Alpha2Field, "bic_iso_9362_2014": isIsoBic2014Format, @@ -261,6 +267,33 @@ var ( var ( oneofValsCache = map[string][]string{} oneofValsCacheRWLock = sync.RWMutex{} + + // BCP47 language tag + // according to https://www.rfc-editor.org/rfc/bcp/bcp47.txt + bcp47LanguageTagRe = regexp.MustCompile(strings.Join([]string{ + // group 1: + `^(`, + // irregular + `en-gb-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|`, + `sgn-be-fr|sgn-be-nl|sgn-ch-de|`, + // regular + `art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang|`, + // privateuse + `x-[a-z0-9]{1,8}`, + `)$`, + + `|`, + + // langtag + `^`, + `((?:[a-z]{2,3}(?:-[a-z]{3}){0,3})|[a-z]{4}|[a-z]{5,8})`, // group 2: language + `(?:-([a-z]{4}))?`, // group 3: script + `(?:-([a-z]{2}|[0-9]{3}))?`, // group 4: region + `(?:-((?:[a-z0-9]{5,8}|[0-9][a-z0-9]{3})(?:-(?:[a-z0-9]{5,8}|[0-9][a-z0-9]{3}))*))?`, // group 5: variant + `(?:-((?:[a-wyz0-9](?:-[a-z0-9]{2,8})+)(?:-(?:[a-wyz0-9](?:-[a-z0-9]{2,8})+))*))?`, // group 6: extension + `(?:-x(?:-[a-z0-9]{1,8})+)?`, + `$`, + }, "")) ) func parseOneOfParam2(s string) []string { @@ -307,12 +340,8 @@ func isOneOf(fl FieldLevel) bool { default: panic(fmt.Sprintf("Bad field type %s", field.Type())) } - for i := 0; i < len(vals); i++ { - if vals[i] == v { - return true - } - } - return false + + return slices.Contains(vals, v) } // isOneOfCI is the validation function for validating if the current field's value is one of the provided string values (case insensitive). @@ -323,13 +352,20 @@ func isOneOfCI(fl FieldLevel) bool { if field.Kind() != reflect.String { panic(fmt.Sprintf("Bad field type %s", field.Type())) } - v := field.String() - for _, val := range vals { - if strings.EqualFold(val, v) { - return true - } - } - return false + + return slices.ContainsFunc(vals, func(val string) bool { + return strings.EqualFold(val, field.String()) + }) +} + +// isNoneOf validates that the current field's value is not one of the provided string or integer values +func isNoneOf(fl FieldLevel) bool { + return !isOneOf(fl) +} + +// isNoneOfCI validates that the current field's value is not one of the provided string values (case insensitive) +func isNoneOfCI(fl FieldLevel) bool { + return !isOneOfCI(fl) } // isUnique is the validation function for validating if each array|slice|map value is unique @@ -1526,6 +1562,64 @@ func isURI(fl FieldLevel) bool { panic(fmt.Sprintf("Bad field type %s", field.Type())) } +// isOrigin checks if a field value is a valid web origin URL with HTTP(S) scheme and host defined, but no path, query, or fragment. +func isOrigin(fl FieldLevel) bool { + field := fl.Field() + + if field.Kind() == reflect.String { + s := field.String() + + if len(s) == 0 { + return false + } + + // Fragments with empty content ("#") are not detectable after parse and + // u.Fragment will be empty even if # is present in the URL. + if strings.Contains(s, "#") { + return false + } + + u, err := url.Parse(s) + if err != nil { + return false + } + + if u.Scheme != "http" && u.Scheme != "https" { + return false + } + + if u.Path != "" || u.RawQuery != "" || u.ForceQuery || u.Fragment != "" { + return false + } + + if u.User != nil { + return false + } + + hostname := u.Hostname() + if hostname == "" { + return false + } + if net.ParseIP(hostname) == nil && !hostnameRegexRFC1123().MatchString(hostname) { + return false + } + + portStr := u.Port() + if portStr != "" { + // Port 0 is reserved (RFC 6335) and has no valid use as an origin port. + // https://www.rfc-editor.org/rfc/rfc6335.html#section-6 + port, portErr := strconv.ParseUint(portStr, 10, 16) + if portErr != nil || port == 0 { + return false + } + } + + return true + } + + panic(fmt.Sprintf("Bad field type %s", field.Type())) +} + // isURL is the validation function for validating if the current field's value is a valid URL. func isURL(fl FieldLevel) bool { field := fl.Field() @@ -1635,6 +1729,63 @@ func isFile(fl FieldLevel) bool { panic(fmt.Sprintf("Bad field type %s", field.Type())) } +func detectFileMIMEType(field reflect.Value) (string, bool) { + switch field.Kind() { + case reflect.String: + filePath := field.String() + fileInfo, err := os.Stat(filePath) + if err != nil || fileInfo.IsDir() { + return "", false + } + + file, err := os.Open(filePath) + if err != nil { + return "", false + } + defer func() { + _ = file.Close() + }() + + mime, err := mimetype.DetectReader(file) + if err != nil { + return "", false + } + + return mime.String(), true + } + + panic(fmt.Sprintf("Bad field type %s", field.Type())) +} + +func matchesMIMEType(mime, expected string) bool { + expectedType, expectedSubtype, ok := strings.Cut(strings.TrimSpace(expected), "/") + if !ok || expectedType == "" || expectedSubtype == "" { + return false + } + + mimeType, mimeSubtype, ok := strings.Cut(mime, "/") + if !ok || mimeType == "" || mimeSubtype == "" { + return false + } + + if expectedSubtype == "*" { + return mimeType == expectedType + } + + return mimeType == expectedType && mimeSubtype == expectedSubtype +} + +// isMIMEType is the validation function for validating if the current field's value contains the path to a file +// whose detected MIME type matches the provided validator param in the form type/subtype or type/*. +func isMIMEType(fl FieldLevel) bool { + mime, ok := detectFileMIMEType(fl.Field()) + if !ok { + return false + } + + return matchesMIMEType(mime, fl.Param()) +} + // isImage is the validation function for validating if the current field's value contains the path to a valid image file func isImage(fl FieldLevel) bool { mimetypes := map[string]bool{ @@ -1663,39 +1814,14 @@ func isImage(fl FieldLevel) bool { "image/x-xpixmap": true, "image/x-xwindowdump": true, } - field := fl.Field() - - switch field.Kind() { - case reflect.String: - filePath := field.String() - fileInfo, err := os.Stat(filePath) - if err != nil { - return false - } - - if fileInfo.IsDir() { - return false - } - - file, err := os.Open(filePath) - if err != nil { - return false - } - defer func() { - _ = file.Close() - }() - - mime, err := mimetype.DetectReader(file) - if err != nil { - return false - } - if _, ok := mimetypes[mime.String()]; ok { - return true - } + mime, ok := detectFileMIMEType(fl.Field()) + if !ok { + return false } - panic(fmt.Sprintf("Bad field type %s", field.Type())) + _, ok = mimetypes[mime] + return ok } // isFilePath is the validation function for validating if the current field's value is a valid file path. @@ -3081,6 +3207,150 @@ func isBCP47LanguageTag(fl FieldLevel) bool { panic(fmt.Sprintf("Bad field type %s", field.Type())) } +// isBCP47StrictLanguageTag is the validation function for validating if the current field's value is a valid BCP 47 language tag +// according to https://www.rfc-editor.org/rfc/bcp/bcp47.txt +func isBCP47StrictLanguageTag(fl FieldLevel) bool { + field := fl.Field() + + if field.Kind() != reflect.String { + panic(fmt.Sprintf("Bad field type %s", field.Type())) + } + + lower := strings.ToLower(field.String()) + lowerTagDash := lower + "-" + + m := bcp47LanguageTagRe.FindStringSubmatch(lower) + if m == nil { + return false + } + + grandfatheredOrPrivateuse := m[1] + lang := m[2] + script := m[3] + region := m[4] + variant := m[5] + extension := m[6] + + if grandfatheredOrPrivateuse != "" { + return true + } + + // language = 2*3ALPHA ; shortest ISO 639 code + // ["-" extlang] ; sometimes followed by + // ; extended language subtags + // / 4ALPHA ; or reserved for future use + // / 5*8ALPHA ; or registered language subtag + switch n := len(lang); { + // 2*3ALPHA "-" extlang + case strings.Contains(lang, "-"): + parts := strings.Split(lang, "-") + + baseLang := parts[0] + base, err := language.ParseBase(baseLang) + if err != nil { + return false + } + // base.String() normalizes the base to the shortest code + // for the language + if base.String() != baseLang { + return false + } + + for _, e := range parts[1:] { + prefixes, ok := iana_subtag_registry_extlangs[e] + if !ok { + return false + } + + if len(prefixes) > 0 { + found := false + for _, p := range prefixes { + if strings.HasPrefix(lowerTagDash, p) { + found = true + break + } + } + if !found { + return false + } + } + } + // 2*3ALPHA ; shortest ISO 639 code + case n <= 3: + base, err := language.ParseBase(lang) + if err != nil { + return false + } + + // base.String() normalizes the base to the shortest code + // for the language + if base.String() != lang { + return false + } + // 4ALPHA ; or reserved for future use + case n == 4: + return false + // 5*8ALPHA ; or registered language subtag + default: + // registered language subtag with 5+ characters. + // As of today there aren't any. + // https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry + return false + } + + // script = 4ALPHA ; ISO 15924 code + if script != "" { + _, err := language.ParseScript(script) + if err != nil { + return false + } + } + + // region = 2ALPHA ; ISO 3166-1 code + // 3DIGIT ; UN M.49 code + if region != "" { + if len(region) == 2 { + _, err := language.ParseRegion(region) + if err != nil { + return false + } + } else { + // Can't use language.ParseRegion() here because not all + // UN M.49 region codes are allowed, just the subset present + // in the IANA subtag registry. + _, ok := iana_subtag_registry_m49_codes[region] + if !ok { + return false + } + } + } + + // variant = 5*8alphanum ; registered variants + // / (DIGIT 3alphanum) + if variant != "" { + for v := range strings.SplitSeq(variant, "-") { + _, err := language.ParseVariant(v) + if err != nil { + return false + } + + _, ok := iana_subtag_registry_variants[v] + if !ok { + return false + } + } + } + + if extension != "" { + _, err := language.ParseExtension(extension) + if err != nil { + return false + } + } + + return true +} + // isIsoBic2014Format is the validation function for validating if the current field's value is a valid Business Identifier Code (SWIFT code), defined in ISO 9362 2014 func isIsoBic2014Format(fl FieldLevel) bool { bicString := fl.Field().String() @@ -3235,59 +3505,9 @@ func isEIN(fl FieldLevel) bool { return einRegex().MatchString(field.String()) } -func isValidateFn(fl FieldLevel) bool { - const defaultParam = `Validate` - - field := fl.Field() - validateFn := cmp.Or(fl.Param(), defaultParam) - - ok, err := tryCallValidateFn(field, validateFn) - if err != nil { - return false - } - - return ok -} - var ( errMethodNotFound = errors.New(`method not found`) errMethodReturnNoValues = errors.New(`method return o values (void)`) errMethodReturnInvalidType = errors.New(`method should return invalid type`) ) -func tryCallValidateFn(field reflect.Value, validateFn string) (bool, error) { - method := field.MethodByName(validateFn) - if field.CanAddr() && !method.IsValid() { - method = field.Addr().MethodByName(validateFn) - } - - if !method.IsValid() { - return false, fmt.Errorf("unable to call %q on type %q: %w", - validateFn, field.Type().String(), errMethodNotFound) - } - - returnValues := method.Call([]reflect.Value{}) - if len(returnValues) == 0 { - return false, fmt.Errorf("unable to use result of method %q on type %q: %w", - validateFn, field.Type().String(), errMethodReturnNoValues) - } - - firstReturnValue := returnValues[0] - - switch firstReturnValue.Kind() { - case reflect.Bool: - return firstReturnValue.Bool(), nil - case reflect.Interface: - errorType := reflect.TypeOf((*error)(nil)).Elem() - - if firstReturnValue.Type().Implements(errorType) { - return firstReturnValue.IsNil(), nil - } - - return false, fmt.Errorf("unable to use result of method %q on type %q: %w (got interface %v expect error)", - validateFn, field.Type().String(), errMethodReturnInvalidType, firstReturnValue.Type().String()) - default: - return false, fmt.Errorf("unable to use result of method %q on type %q: %w (got %v expect error or bool)", - validateFn, field.Type().String(), errMethodReturnInvalidType, firstReturnValue.Type().String()) - } -} diff --git a/vendor/github.com/go-playground/validator/v10/cache.go b/vendor/github.com/go-playground/validator/v10/cache.go index ab7ffd47f..b8052aa25 100644 --- a/vendor/github.com/go-playground/validator/v10/cache.go +++ b/vendor/github.com/go-playground/validator/v10/cache.go @@ -144,7 +144,7 @@ func (v *Validate) extractStructCache(current reflect.Value, sName string) *cStr if v.hasTagNameFunc { name := v.tagNameFunc(fld) - if len(name) > 0 { + if len(name) > 0 || v.omitBlankFieldNames { customName = name } } diff --git a/vendor/github.com/go-playground/validator/v10/country_codes.go b/vendor/github.com/go-playground/validator/v10/country_codes.go index a9330c808..f208e9366 100644 --- a/vendor/github.com/go-playground/validator/v10/country_codes.go +++ b/vendor/github.com/go-playground/validator/v10/country_codes.go @@ -1175,3 +1175,15 @@ var iso3166_2 = map[string]struct{}{ "ZW-BU": {}, "ZW-HA": {}, "ZW-MA": {}, "ZW-MC": {}, "ZW-ME": {}, "ZW-MI": {}, "ZW-MN": {}, "ZW-MS": {}, "ZW-MV": {}, "ZW-MW": {}, } + +// Subset of UN M.49 region codes present in the IANA Language Subtag Registry: +// https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry +var iana_subtag_registry_m49_codes = map[string]struct{}{ + "001": {}, "002": {}, "003": {}, "005": {}, "009": {}, + "011": {}, "013": {}, "014": {}, "015": {}, "017": {}, + "018": {}, "019": {}, "021": {}, "029": {}, "030": {}, + "034": {}, "035": {}, "039": {}, "053": {}, "054": {}, + "057": {}, "061": {}, "142": {}, "143": {}, "145": {}, + "150": {}, "151": {}, "154": {}, "155": {}, "202": {}, + "419": {}, +} diff --git a/vendor/github.com/go-playground/validator/v10/doc.go b/vendor/github.com/go-playground/validator/v10/doc.go index dab05beec..7b1fd078b 100644 --- a/vendor/github.com/go-playground/validator/v10/doc.go +++ b/vendor/github.com/go-playground/validator/v10/doc.go @@ -184,6 +184,12 @@ so the above will become excludesall=0x7C Field `validate:"excludesall=0x7C"` // GOOD! Use the UTF-8 hex representation. } +# Build tags + +The library provides a build tag for build size optimizations. If you are not using +`validateFn` you can add the `validator_novalidatefn` build tag to enabled better dead +code elimination. With this build tag, any usage of `validateFn` tags will panic. + # Baked In Validators and Tags Here is a list of the current built in validators: @@ -546,6 +552,24 @@ Works the same as oneof but is case insensitive and therefore only accepts strin Usage: oneofci=red green oneofci='red green' 'blue yellow' +# None Of + +For strings, ints, and uints, noneof will ensure that the value is not one of +the values in the parameter. The parameter should be a list of values separated by whitespace. +Values may be strings or numbers. To inversely match strings with spaces in them, include the target string between single quotes. +Kind of like an 'enum'. + + Usage: noneof=red green + noneof='red green' 'blue yellow' + noneof=5 7 9 + + +# None Of Case Insensitive +Works the same as noneof but is case insensitive and therefore only accepts strings. + + Usage: noneofci=red green + noneofci='red green' 'blue yellow' + # Greater Than For numbers, this will ensure that the value is greater than the @@ -969,6 +993,16 @@ This is done using os.Stat and github.com/gabriel-vasile/mimetype Usage: image +# MIME type path + +This validates that a string value contains a valid file path and that +the file exists on the machine and matches the provided MIME type in the +form type/subtype or type/*. +This is done using os.Stat and github.com/gabriel-vasile/mimetype + + Usage: mimetype=image/png + Usage: mimetype=image/* + # File Path This validates that a string value contains a valid file path but does not @@ -1442,6 +1476,14 @@ More information on https://pkg.go.dev/golang.org/x/text/language Usage: bcp47_language_tag +# BCP 47 Strict Language Tag + +This validates that a string value is a valid BCP 47 language tag strictly following RFC 5646 rules, +unlike language.Parse which also accepts Unicode extensions. +see https://www.rfc-editor.org/rfc/bcp/bcp47.txt + + Usage: bcp47_strict_language_tag + BIC (SWIFT code - 2022 standard) This validates that a string value is a valid Business Identifier Code (SWIFT code), defined in ISO 9362:2022. diff --git a/vendor/github.com/go-playground/validator/v10/language_codes.go b/vendor/github.com/go-playground/validator/v10/language_codes.go new file mode 100644 index 000000000..16cda6c32 --- /dev/null +++ b/vendor/github.com/go-playground/validator/v10/language_codes.go @@ -0,0 +1,403 @@ +package validator + +// Type: variant and their associated primary language prefixes from the +// IANA Language Subtag Registry: +// https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry +var iana_subtag_registry_variants = map[string][]string{ + "1606nict": {"frm"}, + "1694acad": {"fr"}, + "1901": {"de"}, + "1959acad": {"be"}, + "1994": {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, + "1996": {"de"}, + "abl1943": {"pt-BR"}, + "akhmimic": {"cop"}, + "akuapem": {"tw"}, + "alalc97": {}, + "aluku": {"djk"}, + "anpezo": {"lld"}, + "ao1990": {"pt", "gl"}, + "aranes": {"oc"}, + "arevela": {"hy"}, + "arevmda": {"hy"}, + "arkaika": {"eo"}, + "asante": {"tw"}, + "auvern": {"oc"}, + "baku1926": {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, + "balanka": {"blo"}, + "barla": {"kea"}, + "basiceng": {"en"}, + "bauddha": {"sa"}, + "bciav": {"zbl"}, + "bcizbl": {"zbl"}, + "biscayan": {"eu"}, + "biske": {"sl-rozaj"}, + "blasl": {"ase", "sgn-ase"}, + "bohairic": {"cop"}, + "bohoric": {"sl"}, + "boont": {"en"}, + "bornholm": {"da"}, + "cisaup": {"oc"}, + "colb1945": {"pt"}, + "cornu": {"en"}, + "creiss": {"oc"}, + "dajnko": {"sl"}, + "ekavsk": {"sr", "sr-Latn", "sr-Cyrl"}, + "emodeng": {"en"}, + "fascia": {"lld"}, + "fayyumic": {"cop"}, + "fodom": {"lld"}, + "fonipa": {}, + "fonkirsh": {}, + "fonnapa": {}, + "fonupa": {}, + "fonxsamp": {}, + "gallo": {"fr"}, + "gascon": {"oc"}, + "gherd": {"lld"}, + "grclass": {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, + "grital": {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, + "grmistr": {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, + "hanoi": {"vi"}, + "hepburn": {"ja-Latn"}, + "heploc": {"ja-Latn-hepburn"}, + "hognorsk": {"nn"}, + "hsistemo": {"eo"}, + "huett": {"vi"}, + "ijekavsk": {"sr", "sr-Latn", "sr-Cyrl"}, + "itihasa": {"sa"}, + "ivanchov": {"bg"}, + "jauer": {"rm"}, + "jyutping": {"yue"}, + "kkcor": {"kw"}, + "kleinsch": {"kl", "kl-tunumiit"}, + "kociewie": {"pl"}, + "kscor": {"kw"}, + "laukika": {"sa"}, + "leidentr": {"egy"}, + "lemosin": {"oc"}, + "lengadoc": {"oc"}, + "lipaw": {"sl-rozaj"}, + "ltg1929": {"ltg"}, + "ltg2007": {"ltg"}, + "luna1918": {"ru"}, + "lycopol": {"cop"}, + "mdcegyp": {"egy"}, + "mdctrans": {"egy"}, + "mesokem": {"cop"}, + "metelko": {"sl"}, + "monoton": {"el"}, + "ndyuka": {"djk"}, + "nedis": {"sl"}, + "newfound": {"en-CA"}, + "nicard": {"oc"}, + "njiva": {"sl-rozaj"}, + "nulik": {"vo"}, + "osojs": {"sl-rozaj"}, + "oxendict": {"en"}, + "pahawh2": {"mww", "hnj"}, + "pahawh3": {"mww", "hnj"}, + "pahawh4": {"mww", "hnj"}, + "pamaka": {"djk"}, + "peano": {"la"}, + "pehoeji": {"nan-Latn"}, + "petr1708": {"ru"}, + "pinyin": {"zh-Latn", "bo-Latn"}, + "polyton": {"el"}, + "provenc": {"oc"}, + "puter": {"rm"}, + "rigik": {"vo"}, + "rozaj": {"sl"}, + "rumgr": {"rm"}, + "sahidic": {"cop"}, + "saigon": {"vi"}, + "scotland": {"en"}, + "scouse": {"en"}, + "simple": {}, + "solba": {"sl-rozaj"}, + "sotav": {"kea"}, + "spanglis": {"en", "es"}, + "surmiran": {"rm"}, + "sursilv": {"rm"}, + "sutsilv": {"rm"}, + "synnejyl": {"da"}, + "tailo": {"nan-Latn"}, + "tarask": {"be"}, + "tongyong": {"zh-Latn"}, + "tunumiit": {"kl"}, + "uccor": {"kw"}, + "ucrcor": {"kw"}, + "ulster": {"sco"}, + "unifon": {"en", "hup", "kyh", "tol", "yur"}, + "vaidika": {"sa"}, + "valbadia": {"lld"}, + "valencia": {"ca"}, + "vallader": {"rm"}, + "vecdruka": {"lv"}, + "viennese": {"de"}, + "vivaraup": {"oc"}, + "wadegile": {"zh-Latn"}, + "xsistemo": {"eo"}, +} + +// Type: extlang and their associated primary language prefixes from the +// IANA Language Subtag Registry: +// https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry +var iana_subtag_registry_extlangs = map[string][]string{ + "aao": {"ar"}, + "abh": {"ar"}, + "abv": {"ar"}, + "acm": {"ar"}, + "acq": {"ar"}, + "acw": {"ar"}, + "acx": {"ar"}, + "acy": {"ar"}, + "adf": {"ar"}, + "ads": {"sgn"}, + "aeb": {"ar"}, + "aec": {"ar"}, + "aed": {"sgn"}, + "aen": {"sgn"}, + "afb": {"ar"}, + "afg": {"sgn"}, + "ajp": {"ar"}, + "ajs": {"sgn"}, + "apc": {"ar"}, + "apd": {"ar"}, + "arb": {"ar"}, + "arq": {"ar"}, + "ars": {"ar"}, + "ary": {"ar"}, + "arz": {"ar"}, + "ase": {"sgn"}, + "asf": {"sgn"}, + "asp": {"sgn"}, + "asq": {"sgn"}, + "asw": {"sgn"}, + "auz": {"ar"}, + "avl": {"ar"}, + "ayh": {"ar"}, + "ayl": {"ar"}, + "ayn": {"ar"}, + "ayp": {"ar"}, + "bbz": {"ar"}, + "bfi": {"sgn"}, + "bfk": {"sgn"}, + "bjn": {"ms"}, + "bog": {"sgn"}, + "bqn": {"sgn"}, + "bqy": {"sgn"}, + "btj": {"ms"}, + "bve": {"ms"}, + "bvl": {"sgn"}, + "bvu": {"ms"}, + "bzs": {"sgn"}, + "cdo": {"zh"}, + "cds": {"sgn"}, + "cjy": {"zh"}, + "cmn": {"zh"}, + "cnp": {"zh"}, + "coa": {"ms"}, + "cpx": {"zh"}, + "csc": {"sgn"}, + "csd": {"sgn"}, + "cse": {"sgn"}, + "csf": {"sgn"}, + "csg": {"sgn"}, + "csl": {"sgn"}, + "csn": {"sgn"}, + "csp": {"zh"}, + "csq": {"sgn"}, + "csr": {"sgn"}, + "csx": {"sgn"}, + "czh": {"zh"}, + "czo": {"zh"}, + "doq": {"sgn"}, + "dse": {"sgn"}, + "dsl": {"sgn"}, + "dsz": {"sgn"}, + "dup": {"ms"}, + "ecs": {"sgn"}, + "ehs": {"sgn"}, + "esl": {"sgn"}, + "esn": {"sgn"}, + "eso": {"sgn"}, + "eth": {"sgn"}, + "fcs": {"sgn"}, + "fse": {"sgn"}, + "fsl": {"sgn"}, + "fss": {"sgn"}, + "gan": {"zh"}, + "gds": {"sgn"}, + "gom": {"kok"}, + "gse": {"sgn"}, + "gsg": {"sgn"}, + "gsm": {"sgn"}, + "gss": {"sgn"}, + "gus": {"sgn"}, + "hab": {"sgn"}, + "haf": {"sgn"}, + "hak": {"zh"}, + "hds": {"sgn"}, + "hji": {"ms"}, + "hks": {"sgn"}, + "hnm": {"zh"}, + "hos": {"sgn"}, + "hps": {"sgn"}, + "hsh": {"sgn"}, + "hsl": {"sgn"}, + "hsn": {"zh"}, + "icl": {"sgn"}, + "iks": {"sgn"}, + "ils": {"sgn"}, + "inl": {"sgn"}, + "ins": {"sgn"}, + "ise": {"sgn"}, + "isg": {"sgn"}, + "isr": {"sgn"}, + "jak": {"ms"}, + "jax": {"ms"}, + "jcs": {"sgn"}, + "jhs": {"sgn"}, + "jks": {"sgn"}, + "jls": {"sgn"}, + "jos": {"sgn"}, + "jsl": {"sgn"}, + "jus": {"sgn"}, + "kgi": {"sgn"}, + "knn": {"kok"}, + "kvb": {"ms"}, + "kvk": {"sgn"}, + "kvr": {"ms"}, + "kxd": {"ms"}, + "lbs": {"sgn"}, + "lce": {"ms"}, + "lcf": {"ms"}, + "lgs": {"sgn"}, + "liw": {"ms"}, + "lls": {"sgn"}, + "lsb": {"sgn"}, + "lsc": {"sgn"}, + "lsg": {"sgn"}, + "lsl": {"sgn"}, + "lsn": {"sgn"}, + "lso": {"sgn"}, + "lsp": {"sgn"}, + "lst": {"sgn"}, + "lsv": {"sgn"}, + "lsw": {"sgn"}, + "lsy": {"sgn"}, + "ltg": {"lv"}, + "luh": {"zh"}, + "lvs": {"lv"}, + "lws": {"sgn"}, + "lzh": {"zh"}, + "max": {"ms"}, + "mdl": {"sgn"}, + "meo": {"ms"}, + "mfa": {"ms"}, + "mfb": {"ms"}, + "mfs": {"sgn"}, + "min": {"ms"}, + "mnp": {"zh"}, + "mqg": {"ms"}, + "mre": {"sgn"}, + "msd": {"sgn"}, + "msi": {"ms"}, + "msr": {"sgn"}, + "mui": {"ms"}, + "mzc": {"sgn"}, + "mzg": {"sgn"}, + "mzy": {"sgn"}, + "nan": {"zh"}, + "nbs": {"sgn"}, + "ncs": {"sgn"}, + "nsi": {"sgn"}, + "nsl": {"sgn"}, + "nsp": {"sgn"}, + "nsr": {"sgn"}, + "nzs": {"sgn"}, + "okl": {"sgn"}, + "orn": {"ms"}, + "ors": {"ms"}, + "pel": {"ms"}, + "pga": {"ar"}, + "pgz": {"sgn"}, + "pks": {"sgn"}, + "prl": {"sgn"}, + "prz": {"sgn"}, + "psc": {"sgn"}, + "psd": {"sgn"}, + "pse": {"ms"}, + "psg": {"sgn"}, + "psl": {"sgn"}, + "pso": {"sgn"}, + "psp": {"sgn"}, + "psr": {"sgn"}, + "pys": {"sgn"}, + "rib": {"sgn"}, + "rms": {"sgn"}, + "rnb": {"sgn"}, + "rsi": {"sgn"}, + "rsl": {"sgn"}, + "rsm": {"sgn"}, + "rsn": {"sgn"}, + "sdl": {"sgn"}, + "sfb": {"sgn"}, + "sfs": {"sgn"}, + "sgg": {"sgn"}, + "sgx": {"sgn"}, + "shu": {"ar"}, + "sjc": {"zh"}, + "slf": {"sgn"}, + "sls": {"sgn"}, + "sqk": {"sgn"}, + "sqs": {"sgn"}, + "sqx": {"sgn"}, + "ssh": {"ar"}, + "ssp": {"sgn"}, + "ssr": {"sgn"}, + "svk": {"sgn"}, + "swc": {"sw"}, + "swh": {"sw"}, + "swl": {"sgn"}, + "syy": {"sgn"}, + "szs": {"sgn"}, + "tmw": {"ms"}, + "tse": {"sgn"}, + "tsm": {"sgn"}, + "tsq": {"sgn"}, + "tss": {"sgn"}, + "tsy": {"sgn"}, + "tza": {"sgn"}, + "ugn": {"sgn"}, + "ugy": {"sgn"}, + "ukl": {"sgn"}, + "uks": {"sgn"}, + "urk": {"ms"}, + "uzn": {"uz"}, + "uzs": {"uz"}, + "vgt": {"sgn"}, + "vkk": {"ms"}, + "vkt": {"ms"}, + "vsi": {"sgn"}, + "vsl": {"sgn"}, + "vsv": {"sgn"}, + "wbs": {"sgn"}, + "wuu": {"zh"}, + "xki": {"sgn"}, + "xml": {"sgn"}, + "xmm": {"ms"}, + "xms": {"sgn"}, + "yds": {"sgn"}, + "ygs": {"sgn"}, + "yhs": {"sgn"}, + "ysl": {"sgn"}, + "ysm": {"sgn"}, + "yue": {"zh"}, + "zib": {"sgn"}, + "zlm": {"ms"}, + "zmi": {"ms"}, + "zsl": {"sgn"}, + "zsm": {"ms"}, +} diff --git a/vendor/github.com/go-playground/validator/v10/no_validate_fn.go b/vendor/github.com/go-playground/validator/v10/no_validate_fn.go new file mode 100644 index 000000000..603af531b --- /dev/null +++ b/vendor/github.com/go-playground/validator/v10/no_validate_fn.go @@ -0,0 +1,60 @@ +//go:build !validator_novalidatefn + +package validator + +import ( + "cmp" + "fmt" + "reflect" +) + +func isValidateFn(fl FieldLevel) bool { + const defaultParam = `Validate` + + field := fl.Field() + validateFn := cmp.Or(fl.Param(), defaultParam) + + ok, err := tryCallValidateFn(field, validateFn) + if err != nil { + return false + } + + return ok +} + +func tryCallValidateFn(field reflect.Value, validateFn string) (bool, error) { + method := field.MethodByName(validateFn) + if field.CanAddr() && !method.IsValid() { + method = field.Addr().MethodByName(validateFn) + } + + if !method.IsValid() { + return false, fmt.Errorf("unable to call %q on type %q: %w", + validateFn, field.Type().String(), errMethodNotFound) + } + + returnValues := method.Call([]reflect.Value{}) + if len(returnValues) == 0 { + return false, fmt.Errorf("unable to use result of method %q on type %q: %w", + validateFn, field.Type().String(), errMethodReturnNoValues) + } + + firstReturnValue := returnValues[0] + + switch firstReturnValue.Kind() { + case reflect.Bool: + return firstReturnValue.Bool(), nil + case reflect.Interface: + errorType := reflect.TypeOf((*error)(nil)).Elem() + + if firstReturnValue.Type().Implements(errorType) { + return firstReturnValue.IsNil(), nil + } + + return false, fmt.Errorf("unable to use result of method %q on type %q: %w (got interface %v expect error)", + validateFn, field.Type().String(), errMethodReturnInvalidType, firstReturnValue.Type().String()) + default: + return false, fmt.Errorf("unable to use result of method %q on type %q: %w (got %v expect error or bool)", + validateFn, field.Type().String(), errMethodReturnInvalidType, firstReturnValue.Type().String()) + } +} diff --git a/vendor/github.com/go-playground/validator/v10/options.go b/vendor/github.com/go-playground/validator/v10/options.go index 86a0db218..2178d3864 100644 --- a/vendor/github.com/go-playground/validator/v10/options.go +++ b/vendor/github.com/go-playground/validator/v10/options.go @@ -24,3 +24,17 @@ func WithPrivateFieldValidation() Option { v.privateFieldValidation = true } } + +// WithTagNameFuncBlankOmit makes a blank return from a RegisterTagNameFunc omit +// the field from the error namespace instead of silently falling back to the +// struct field name. +// +// This was made opt-in behaviour to maintain backward compatibility with +// existing callers that rely on the fallback for error namespaces. +// +// It is recommended you enable this as it will be the default behaviour in v11+. +func WithTagNameFuncBlankOmit() Option { + return func(v *Validate) { + v.omitBlankFieldNames = true + } +} diff --git a/vendor/github.com/go-playground/validator/v10/regexes.go b/vendor/github.com/go-playground/validator/v10/regexes.go index 8f527433e..20c03b841 100644 --- a/vendor/github.com/go-playground/validator/v10/regexes.go +++ b/vendor/github.com/go-playground/validator/v10/regexes.go @@ -33,7 +33,7 @@ const ( uUID3RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" uUID4RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" uUID5RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - uUIDRegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" + uUIDRegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" uUID3RFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-3[0-9a-fA-F]{3}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" uUID4RFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" uUID5RFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-5[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" @@ -56,12 +56,12 @@ const ( latitudeRegexString = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" longitudeRegexString = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" sSNRegexString = `^[0-9]{3}[ -]?(0[1-9]|[1-9][0-9])[ -]?([1-9][0-9]{3}|[0-9][1-9][0-9]{2}|[0-9]{2}[1-9][0-9]|[0-9]{3}[1-9])$` - hostnameRegexStringRFC952 = `^[a-zA-Z]([a-zA-Z0-9\-]+[\.]?)*[a-zA-Z0-9]$` // https://tools.ietf.org/html/rfc952 - hostnameRegexStringRFC1123 = `^([a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62}){1}(\.[a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62})*?$` // accepts hostname starting with a digit https://tools.ietf.org/html/rfc1123 + hostnameRegexStringRFC952 = `^[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$` // https://tools.ietf.org/html/rfc952 + hostnameRegexStringRFC1123 = `^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$` // accepts hostname starting with a digit https://tools.ietf.org/html/rfc1123 fqdnRegexStringRFC1123 = `^([a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62})(\.[a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62})*?(\.[a-zA-Z]{1}[a-zA-Z0-9-]{0,62})\.?$` // same as hostnameRegexStringRFC1123 but must contain a non numerical TLD (possibly ending with '.') - btcAddressRegexString = `^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$` // bitcoin address - btcAddressUpperRegexStringBech32 = `^BC1[02-9AC-HJ-NP-Z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32 - btcAddressLowerRegexStringBech32 = `^bc1[02-9ac-hj-np-z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32 + btcAddressRegexString = `^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$` // bitcoin address + btcAddressUpperRegexStringBech32 = `^BC1[02-9AC-HJ-NP-Z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32 + btcAddressLowerRegexStringBech32 = `^bc1[02-9ac-hj-np-z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32 ethAddressRegexString = `^0x[0-9a-fA-F]{40}$` ethAddressUpperRegexString = `^0x[0-9A-F]{40}$` ethAddressLowerRegexString = `^0x[0-9a-f]{40}$` @@ -77,7 +77,7 @@ const ( cveRegexString = `^CVE-(1999|2\d{3})-(0[^0]\d{2}|0\d[^0]\d{1}|0\d{2}[^0]|[1-9]{1}\d{3,})$` // CVE Format Id https://cve.mitre.org/cve/identifiers/syntaxchange.html mongodbIdRegexString = "^[a-f\\d]{24}$" mongodbConnStringRegexString = "^mongodb(\\+srv)?:\\/\\/(([a-zA-Z\\d]+):([a-zA-Z\\d$:\\/?#\\[\\]@]+)@)?(([a-z\\d.-]+)(:[\\d]+)?)((,(([a-z\\d.-]+)(:(\\d+))?))*)?(\\/[a-zA-Z-_]{1,64})?(\\?(([a-zA-Z]+)=([a-zA-Z\\d]+))(&(([a-zA-Z\\d]+)=([a-zA-Z\\d]+))?)*)?$" - cronRegexString = `(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|((\*|\d+)(\/|-)\d+)|\d+|\*) ?){5,7})` + cronRegexString = `^((@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|(([A-Za-z0-9*?][A-Za-z0-9*?/,#L-]+|[*?0-9])( +([A-Za-z0-9*?][A-Za-z0-9*?/,#L-]+|[*?0-9])){4,6}))$` spicedbIDRegexString = `^(([a-zA-Z0-9/_|\-=+]{1,})|\*)$` spicedbPermissionRegexString = "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$" spicedbTypeRegexString = "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$" diff --git a/vendor/github.com/go-playground/validator/v10/validate_fn.go b/vendor/github.com/go-playground/validator/v10/validate_fn.go new file mode 100644 index 000000000..ec874bea9 --- /dev/null +++ b/vendor/github.com/go-playground/validator/v10/validate_fn.go @@ -0,0 +1,7 @@ +//go:build validator_novalidatefn + +package validator + +func isValidateFn(fl FieldLevel) bool { + panic("validateFn is not supported with 'no-validate-fn' tag") +} diff --git a/vendor/github.com/go-playground/validator/v10/validator.go b/vendor/github.com/go-playground/validator/v10/validator.go index 995b0e19a..4779608db 100644 --- a/vendor/github.com/go-playground/validator/v10/validator.go +++ b/vendor/github.com/go-playground/validator/v10/validator.go @@ -116,7 +116,7 @@ func (v *validate) traverseField(ctx context.Context, parent reflect.Value, curr if ct.hasTag { if kind == reflect.Invalid { - v.str1 = string(append(ns, cf.altName...)) + v.str1 = appendAltName(ns, cf.altName) if v.v.hasTagNameFunc { v.str2 = string(append(structNs, cf.name...)) } else { @@ -138,7 +138,7 @@ func (v *validate) traverseField(ctx context.Context, parent reflect.Value, curr return } - v.str1 = string(append(ns, cf.altName...)) + v.str1 = appendAltName(ns, cf.altName) if v.v.hasTagNameFunc { v.str2 = string(append(structNs, cf.name...)) } else { @@ -192,7 +192,9 @@ OUTER: // VarWithField - this allows for validating against each field within the struct against a specific value // pretty handy in certain situations if len(cf.name) > 0 { - ns = append(append(ns, cf.altName...), '.') + if len(cf.altName) > 0 { + ns = append(append(ns, cf.altName...), '.') + } structNs = append(append(structNs, cf.name...), '.') } @@ -212,7 +214,9 @@ OUTER: // VarWithField - this allows for validating against each field within the struct against a specific value // pretty handy in certain situations if len(cf.name) > 0 { - ns = append(append(ns, cf.altName...), '.') + if len(cf.altName) > 0 { + ns = append(append(ns, cf.altName...), '.') + } structNs = append(append(structNs, cf.name...), '.') } @@ -409,7 +413,7 @@ OUTER: if ct.isBlockEnd || ct.next == nil { // if we get here, no valid 'or' value and no more tags - v.str1 = string(append(ns, cf.altName...)) + v.str1 = appendAltName(ns, cf.altName) if v.v.hasTagNameFunc { v.str2 = string(append(structNs, cf.name...)) @@ -468,7 +472,7 @@ OUTER: v.ct = ct if !ct.fn(ctx, v) { - v.str1 = string(append(ns, cf.altName...)) + v.str1 = appendAltName(ns, cf.altName) if v.v.hasTagNameFunc { v.str2 = string(append(structNs, cf.name...)) @@ -499,6 +503,16 @@ OUTER: } } +func appendAltName(ns []byte, altName string) string { + if len(altName) > 0 { + return string(append(ns, altName...)) + } + if n := len(ns); n > 0 && ns[n-1] == '.' { + return string(ns[:n-1]) + } + return string(ns) +} + func getValue(val reflect.Value) interface{} { if val.CanInterface() { return val.Interface() diff --git a/vendor/github.com/go-playground/validator/v10/validator_instance.go b/vendor/github.com/go-playground/validator/v10/validator_instance.go index 5ba64e5ba..320cce66a 100644 --- a/vendor/github.com/go-playground/validator/v10/validator_instance.go +++ b/vendor/github.com/go-playground/validator/v10/validator_instance.go @@ -68,7 +68,7 @@ type FilterFunc func(ns []byte) bool // CustomTypeFunc allows for overriding or adding custom field type handler functions // field = field value of the type to return a value to be validated -// example Valuer from sql drive see https://golang.org/src/database/sql/driver/types.go?s=1210:1293#L29 +// example Valuer from sql driver see https://golang.org/src/database/sql/driver/types.go?s=1210:1293#L29 type CustomTypeFunc func(field reflect.Value) interface{} // TagNameFunc allows for adding of a custom tag name parser @@ -96,6 +96,7 @@ type Validate struct { hasTagNameFunc bool requiredStructEnabled bool privateFieldValidation bool + omitBlankFieldNames bool } // New returns a new instance of 'validate' with sane defaults. @@ -428,7 +429,7 @@ func (v *Validate) StructFilteredCtx(ctx context.Context, s interface{}, fn Filt } // StructPartial validates the fields passed in only, ignoring all others. -// Fields may be provided in a namespaced fashion relative to the struct provided +// Fields may be provided in a namespaced fashion relative to the struct provided // eg. NestedStruct.Field or NestedArrayField[0].Struct.Name // // It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. @@ -439,7 +440,7 @@ func (v *Validate) StructPartial(s interface{}, fields ...string) error { // StructPartialCtx validates the fields passed in only, ignoring all others and allows passing of contextual // validation information via context.Context -// Fields may be provided in a namespaced fashion relative to the struct provided +// Fields may be provided in a namespaced fashion relative to the struct provided // eg. NestedStruct.Field or NestedArrayField[0].Struct.Name // // It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. @@ -514,7 +515,7 @@ func (v *Validate) StructPartialCtx(ctx context.Context, s interface{}, fields . } // StructExcept validates all fields except the ones passed in. -// Fields may be provided in a namespaced fashion relative to the struct provided +// Fields may be provided in a namespaced fashion relative to the struct provided // i.e. NestedStruct.Field or NestedArrayField[0].Struct.Name // // It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. @@ -525,7 +526,7 @@ func (v *Validate) StructExcept(s interface{}, fields ...string) error { // StructExceptCtx validates all fields except the ones passed in and allows passing of contextual // validation information via context.Context -// Fields may be provided in a namespaced fashion relative to the struct provided +// Fields may be provided in a namespaced fashion relative to the struct provided // i.e. NestedStruct.Field or NestedArrayField[0].Struct.Name // // It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. diff --git a/vendor/github.com/mattn/go-runewidth/SECURITY.md b/vendor/github.com/mattn/go-runewidth/SECURITY.md new file mode 100644 index 000000000..a6898ee70 --- /dev/null +++ b/vendor/github.com/mattn/go-runewidth/SECURITY.md @@ -0,0 +1,25 @@ +# Security Policy + +## Supported Versions + +The following versions of go-runewidth are currently supported with +security updates. + +| Version | Supported | +| -------- | ------------------ | +| 0.0.23 | :white_check_mark: | +| < 0.0.23 | :x: | + +## Reporting a Vulnerability + +If you discover a security vulnerability in go-runewidth, please report it +privately via GitHub's "Report a vulnerability" feature on the Security tab +of the repository (https://github.com/mattn/go-runewidth/security), or by +emailing the maintainer at mattn.jp@gmail.com. + +Please include a description of the issue, reproduction steps, and the +affected version. You can expect an initial response within one week. If +the vulnerability is accepted, a fix will be prepared and a new release +will be published; you will be credited in the release notes unless you +request otherwise. If the report is declined, you will receive an +explanation of the reasoning. diff --git a/vendor/github.com/mattn/go-runewidth/runewidth.go b/vendor/github.com/mattn/go-runewidth/runewidth.go index f6c005822..6b958fdd4 100644 --- a/vendor/github.com/mattn/go-runewidth/runewidth.go +++ b/vendor/github.com/mattn/go-runewidth/runewidth.go @@ -2,6 +2,7 @@ package runewidth import ( "os" + "sort" "strings" "unicode/utf8" @@ -25,13 +26,19 @@ var ( ) var ( - zerowidth table // combining + nonprint merged for faster zero-width lookup - widewidth table // ambiguous + doublewidth merged for EA path + zerowidth table // combining + nonprint merged for faster zero-width lookup + widewidth table // ambiguous + doublewidth merged for EA path + eastAsianWidth widthTable + eastAsianWidth0 [0x300]byte ) func init() { zerowidth = mergeIntervals(combining, nonprint) widewidth = mergeIntervals(ambiguous, doublewidth) + eastAsianWidth = makeWidthTable(zerowidth, widewidth) + for r := range eastAsianWidth0 { + eastAsianWidth0[r] = byte(runeWidthEastAsian(rune(r))) + } handleEnv() } @@ -90,6 +97,14 @@ type interval struct { type table []interval +type widthInterval struct { + first rune + last rune + width byte +} + +type widthTable []widthInterval + func inTable(r rune, t table) bool { if r < t[0].first { return false @@ -116,6 +131,71 @@ func inTable(r rune, t table) bool { return false } +func makeWidthTable(zero, two table) widthTable { + wt := make(widthTable, 0, len(zero)+len(two)) + zi := 0 + for _, iv := range two { + start := iv.first + for zi < len(zero) && zero[zi].last < start { + zi++ + } + for i := zi; i < len(zero) && zero[i].first <= iv.last; i++ { + if start < zero[i].first { + wt = append(wt, widthInterval{start, zero[i].first - 1, 2}) + } + if start <= zero[i].last { + start = zero[i].last + 1 + } + if start > iv.last { + break + } + } + if start <= iv.last { + wt = append(wt, widthInterval{start, iv.last, 2}) + } + } + for _, iv := range zero { + wt = append(wt, widthInterval{iv.first, iv.last, 0}) + } + sort.Slice(wt, func(i, j int) bool { + return wt[i].first < wt[j].first + }) + return wt +} + +func inWidthTable(r rune, t widthTable) (int, bool) { + if r < t[0].first { + return 0, false + } + if r > t[len(t)-1].last { + return 0, false + } + + bot := 0 + top := len(t) - 1 + for top >= bot { + mid := (bot + top) >> 1 + + switch { + case t[mid].last < r: + bot = mid + 1 + case t[mid].first > r: + top = mid - 1 + default: + return int(t[mid].width), true + } + } + + return 0, false +} + +func runeWidthEastAsian(r rune) int { + if w, ok := inWidthTable(r, eastAsianWidth); ok { + return w + } + return 1 +} + var private = table{ {0x00E000, 0x00F8FF}, {0x0F0000, 0x0FFFFD}, {0x100000, 0x10FFFD}, } @@ -153,34 +233,35 @@ func (c *Condition) RuneWidth(r rune) int { } // optimized version, verified by TestRuneWidthChecksums() if !c.EastAsianWidth { - switch { - case r < 0x20: + if r < 0x20 { return 0 - case (r >= 0x7F && r <= 0x9F) || r == 0xAD: // nonprint - return 0 - case r < 0x300: - return 1 - case inTable(r, zerowidth): + } + if (r >= 0x7F && r <= 0x9F) || r == 0xAD { // nonprint return 0 - case inTable(r, doublewidth): - return 2 - default: + } + if r < 0x300 { return 1 } - } else { switch { case inTable(r, zerowidth): return 0 - case inTable(r, narrow): - return 1 - case inTable(r, widewidth): - return 2 - case !c.StrictEmojiNeutral && inTable(r, emoji): + case inTable(r, doublewidth): return 2 default: return 1 } } + + if r < 0x300 { + return int(eastAsianWidth0[r]) + } + if w, ok := inWidthTable(r, eastAsianWidth); ok { + return w + } + if !c.StrictEmojiNeutral && inTable(r, emoji) { + return 2 + } + return 1 } // CreateLUT will create an in-memory lookup table of 557056 bytes for faster operation. @@ -206,6 +287,13 @@ func (c *Condition) CreateLUT() { // StringWidth return width as you can see func (c *Condition) StringWidth(s string) (width int) { + if len(s) == 1 { + b := s[0] + if b < 0x20 || b == 0x7F { + return 0 + } + return 1 + } if len(s) > 0 && len(s) <= utf8.UTFMax { r, size := utf8.DecodeRuneInString(s) if size == len(s) { @@ -213,15 +301,19 @@ func (c *Condition) StringWidth(s string) (width int) { } } // ASCII fast path: no grapheme clustering needed for pure ASCII - if isAllASCII(s) { - for i := 0; i < len(s); i++ { - b := s[i] - if b >= 0x20 && b != 0x7F { - width++ - } + for i := 0; i < len(s); i++ { + b := s[i] + if b >= 0x80 { + goto graphemes + } + if b >= 0x20 && b != 0x7F { + width++ } - return } + return + +graphemes: + width = 0 g := graphemes.FromString(s) for g.Next() { var chWidth int @@ -236,15 +328,6 @@ func (c *Condition) StringWidth(s string) (width int) { return } -func isAllASCII(s string) bool { - for i := 0; i < len(s); i++ { - if s[i] >= 0x80 { - return false - } - } - return true -} - // Truncate return string truncated with w cells func (c *Condition) Truncate(s string, w int, tail string) string { if c.StringWidth(s) <= w { diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go index 7c2fb340b..8002d6743 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go @@ -124,7 +124,7 @@ import ( // // "fmt" // -// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr" +// "github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecr" // "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // @@ -234,7 +234,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// image, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ // Context: &dockerbuild.BuildContextArgs{ // Location: pulumi.String("app"), // }, @@ -253,7 +253,7 @@ import ( // if err != nil { // return err // } -// ctx.Export("ref", myImage.Ref) +// ctx.Export("ref", image.Ref) // return nil // }) // } diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go index 888507620..6646e9c9d 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("0.0.17") + version := semver.MustParse("0.0.18") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } @@ -176,7 +176,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - version := semver.MustParse("0.0.17") + version := semver.MustParse("0.0.18") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json index 773ad7b4d..5fd8c9353 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "docker-build", - "version": "0.0.17" + "version": "0.0.18" } diff --git a/vendor/modules.txt b/vendor/modules.txt index 016e2325c..cb58bf351 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -171,8 +171,8 @@ github.com/IBM-Cloud/power-go-client/power/client/storage_types github.com/IBM-Cloud/power-go-client/power/client/swagger_spec github.com/IBM-Cloud/power-go-client/power/client/workspaces github.com/IBM-Cloud/power-go-client/power/models -# github.com/IBM/go-sdk-core/v5 v5.21.2 -## explicit; go 1.24.0 +# github.com/IBM/go-sdk-core/v5 v5.21.3 +## explicit; go 1.25.0 github.com/IBM/go-sdk-core/v5/core # github.com/IBM/platform-services-go-sdk v0.97.4 ## explicit; go 1.25.0 @@ -231,7 +231,7 @@ github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector/outputs github.com/aws/amazon-ec2-instance-selector/v3/pkg/sorter -# github.com/aws/aws-sdk-go-v2 v1.41.7 +# github.com/aws/aws-sdk-go-v2 v1.41.9 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/arn @@ -258,15 +258,15 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10 +# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.11 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi -# github.com/aws/aws-sdk-go-v2/config v1.32.18 +# github.com/aws/aws-sdk-go-v2/config v1.32.20 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/config github.com/aws/aws-sdk-go-v2/config/internal/ini -# github.com/aws/aws-sdk-go-v2/credentials v1.19.17 +# github.com/aws/aws-sdk-go-v2/credentials v1.19.19 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds @@ -276,22 +276,22 @@ github.com/aws/aws-sdk-go-v2/credentials/logincreds github.com/aws/aws-sdk-go-v2/credentials/processcreds github.com/aws/aws-sdk-go-v2/credentials/ssocreds github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.23 +# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.25 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.23 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.25 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.23 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.25 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.24 +# github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.26 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/v4a github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 -# github.com/aws/aws-sdk-go-v2/service/ec2 v1.304.0 +# github.com/aws/aws-sdk-go-v2/service/ec2 v1.304.2 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints @@ -303,26 +303,26 @@ github.com/aws/aws-sdk-go-v2/service/ecs/document github.com/aws/aws-sdk-go-v2/service/ecs/internal/document github.com/aws/aws-sdk-go-v2/service/ecs/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ecs/types -# github.com/aws/aws-sdk-go-v2/service/iam v1.53.10 +# github.com/aws/aws-sdk-go-v2/service/iam v1.53.12 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/iam github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints github.com/aws/aws-sdk-go-v2/service/iam/types -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9 +# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.10 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.15 +# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.18 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/checksum -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.23 +# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.25 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.23 +# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.25 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/s3shared github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config -# github.com/aws/aws-sdk-go-v2/service/pricing v1.42.0 +# github.com/aws/aws-sdk-go-v2/service/pricing v1.42.2 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/pricing github.com/aws/aws-sdk-go-v2/service/pricing/internal/endpoints @@ -334,27 +334,27 @@ github.com/aws/aws-sdk-go-v2/service/s3/internal/arn github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints github.com/aws/aws-sdk-go-v2/service/s3/types -# github.com/aws/aws-sdk-go-v2/service/signin v1.0.11 +# github.com/aws/aws-sdk-go-v2/service/signin v1.1.1 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/signin github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints github.com/aws/aws-sdk-go-v2/service/signin/types -# github.com/aws/aws-sdk-go-v2/service/sso v1.30.17 +# github.com/aws/aws-sdk-go-v2/service/sso v1.30.19 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types -# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.0 +# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.2 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.42.1 +# github.com/aws/aws-sdk-go-v2/service/sts v1.42.3 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.25.1 +# github.com/aws/smithy-go v1.26.0 ## explicit; go 1.24 github.com/aws/smithy-go github.com/aws/smithy-go/auth @@ -569,7 +569,7 @@ github.com/go-logr/logr/funcr # github.com/go-logr/stdr v1.2.2 ## explicit; go 1.16 github.com/go-logr/stdr -# github.com/go-openapi/analysis v0.25.0 +# github.com/go-openapi/analysis v0.25.1 ## explicit; go 1.25.0 github.com/go-openapi/analysis github.com/go-openapi/analysis/internal/debug @@ -584,8 +584,8 @@ github.com/go-openapi/errors # github.com/go-openapi/jsonpointer v0.23.1 ## explicit; go 1.25.0 github.com/go-openapi/jsonpointer -# github.com/go-openapi/jsonreference v0.21.5 -## explicit; go 1.24.0 +# github.com/go-openapi/jsonreference v0.21.6 +## explicit; go 1.25.0 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal # github.com/go-openapi/loads v0.23.3 @@ -611,7 +611,7 @@ github.com/go-openapi/runtime/server-middleware/negotiate/header # github.com/go-openapi/spec v0.22.4 ## explicit; go 1.24.0 github.com/go-openapi/spec -# github.com/go-openapi/strfmt v0.26.2 +# github.com/go-openapi/strfmt v0.26.3 ## explicit; go 1.25.0 github.com/go-openapi/strfmt github.com/go-openapi/strfmt/internal/bsonlite @@ -654,8 +654,8 @@ github.com/go-openapi/swag/typeutils # github.com/go-openapi/swag/yamlutils v0.26.0 ## explicit; go 1.25.0 github.com/go-openapi/swag/yamlutils -# github.com/go-openapi/validate v0.25.2 -## explicit; go 1.24.0 +# github.com/go-openapi/validate v0.25.3 +## explicit; go 1.25.0 github.com/go-openapi/validate # github.com/go-playground/locales v0.14.1 ## explicit; go 1.17 @@ -664,7 +664,7 @@ github.com/go-playground/locales/currency # github.com/go-playground/universal-translator v0.18.1 ## explicit; go 1.18 github.com/go-playground/universal-translator -# github.com/go-playground/validator/v10 v10.30.2 +# github.com/go-playground/validator/v10 v10.30.3 ## explicit; go 1.25.0 github.com/go-playground/validator/v10 # github.com/go-viper/mapstructure/v2 v2.5.0 @@ -766,7 +766,7 @@ github.com/mattn/go-isatty # github.com/mattn/go-localereader v0.0.1 ## explicit github.com/mattn/go-localereader -# github.com/mattn/go-runewidth v0.0.23 +# github.com/mattn/go-runewidth v0.0.24 ## explicit; go 1.20 github.com/mattn/go-runewidth # github.com/mitchellh/go-homedir v1.1.0 @@ -920,7 +920,7 @@ github.com/pulumi/pulumi-azure-native-sdk/v3/utilities ## explicit; go 1.24.7 github.com/pulumi/pulumi-command/sdk/go/command/internal github.com/pulumi/pulumi-command/sdk/go/command/remote -# github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.17 +# github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.18 ## explicit; go 1.25.8 github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal @@ -1606,5 +1606,5 @@ sigs.k8s.io/structured-merge-diff/v6/value sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 # github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 -# github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.6 +# github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 # github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.3