renovate 40.0.0-next.9 → 40.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/decrypt/legacy.js +0 -1
- package/dist/config/decrypt/legacy.js.map +1 -1
- package/dist/config/decrypt.d.ts +3 -1
- package/dist/config/decrypt.js +56 -13
- package/dist/config/decrypt.js.map +1 -1
- package/dist/config/global.js +0 -1
- package/dist/config/global.js.map +1 -1
- package/dist/config/migrate-validate.js +3 -2
- package/dist/config/migrate-validate.js.map +1 -1
- package/dist/config/migration.js +2 -1
- package/dist/config/migration.js.map +1 -1
- package/dist/config/migrations/custom/rebase-stale-prs-migration.js +1 -1
- package/dist/config/migrations/custom/rebase-stale-prs-migration.js.map +1 -1
- package/dist/config/migrations/migrations-service.js +3 -2
- package/dist/config/migrations/migrations-service.js.map +1 -1
- package/dist/config/options/index.js +18 -11
- package/dist/config/options/index.js.map +1 -1
- package/dist/config/parse.js +2 -2
- package/dist/config/parse.js.map +1 -1
- package/dist/config/presets/common.js +1 -0
- package/dist/config/presets/common.js.map +1 -1
- package/dist/config/presets/gitea/index.js +0 -1
- package/dist/config/presets/gitea/index.js.map +1 -1
- package/dist/config/presets/github/index.js +4 -2
- package/dist/config/presets/github/index.js.map +1 -1
- package/dist/config/presets/gitlab/index.js +1 -1
- package/dist/config/presets/gitlab/index.js.map +1 -1
- package/dist/config/presets/http/index.js +2 -2
- package/dist/config/presets/http/index.js.map +1 -1
- package/dist/config/presets/index.js +0 -7
- package/dist/config/presets/index.js.map +1 -1
- package/dist/config/presets/internal/custom-managers.js +18 -4
- package/dist/config/presets/internal/custom-managers.js.map +1 -1
- package/dist/config/presets/internal/group.js +30 -1
- package/dist/config/presets/internal/group.js.map +1 -1
- package/dist/config/presets/internal/index.js +1 -3
- package/dist/config/presets/internal/index.js.map +1 -1
- package/dist/config/presets/internal/workarounds.js +1 -0
- package/dist/config/presets/internal/workarounds.js.map +1 -1
- package/dist/config/presets/npm/index.js +4 -1
- package/dist/config/presets/npm/index.js.map +1 -1
- package/dist/config/presets/parse.js +2 -1
- package/dist/config/presets/parse.js.map +1 -1
- package/dist/config/schema.d.ts +2 -2
- package/dist/config/types.d.ts +4 -2
- package/dist/config/types.js.map +1 -1
- package/dist/config/validation.js +3 -5
- package/dist/config/validation.js.map +1 -1
- package/dist/config-validator.js +0 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/constants/category.js +0 -1
- package/dist/constants/category.js.map +1 -1
- package/dist/constants/platforms.js +5 -1
- package/dist/constants/platforms.js.map +1 -1
- package/dist/data/monorepo.json +9 -2
- package/dist/data/replacements.json +13 -0
- package/dist/data/source-urls.json +1 -0
- package/dist/data-files.generated.js +2 -2
- package/dist/data-files.generated.js.map +1 -1
- package/dist/instrumentation/index.js +39 -15
- package/dist/instrumentation/index.js.map +1 -1
- package/dist/instrumentation/utils.js +1 -1
- package/dist/instrumentation/utils.js.map +1 -1
- package/dist/logger/cmd-serializer.js +0 -1
- package/dist/logger/cmd-serializer.js.map +1 -1
- package/dist/logger/config-serializer.js +0 -1
- package/dist/logger/config-serializer.js.map +1 -1
- package/dist/logger/index.js +1 -4
- package/dist/logger/index.js.map +1 -1
- package/dist/logger/once.js +4 -2
- package/dist/logger/once.js.map +1 -1
- package/dist/logger/pretty-stdout.js +0 -1
- package/dist/logger/pretty-stdout.js.map +1 -1
- package/dist/logger/renovate-logger.js +1 -1
- package/dist/logger/renovate-logger.js.map +1 -1
- package/dist/logger/utils.js +5 -10
- package/dist/logger/utils.js.map +1 -1
- package/dist/modules/datasource/api.js +4 -0
- package/dist/modules/datasource/api.js.map +1 -1
- package/dist/modules/datasource/artifactory/index.js +1 -2
- package/dist/modules/datasource/artifactory/index.js.map +1 -1
- package/dist/modules/datasource/aws-eks-addon/index.d.ts +11 -0
- package/dist/modules/datasource/aws-eks-addon/index.js +75 -0
- package/dist/modules/datasource/aws-eks-addon/index.js.map +1 -0
- package/dist/modules/datasource/aws-eks-addon/schema.d.ts +40 -0
- package/dist/modules/datasource/aws-eks-addon/schema.js +31 -0
- package/dist/modules/datasource/aws-eks-addon/schema.js.map +1 -0
- package/dist/modules/datasource/aws-machine-image/index.js +6 -5
- package/dist/modules/datasource/aws-machine-image/index.js.map +1 -1
- package/dist/modules/datasource/azure-pipelines-tasks/index.js +15 -1
- package/dist/modules/datasource/azure-pipelines-tasks/index.js.map +1 -1
- package/dist/modules/datasource/azure-pipelines-tasks/schema.d.ts +24 -0
- package/dist/modules/datasource/azure-pipelines-tasks/schema.js +3 -0
- package/dist/modules/datasource/azure-pipelines-tasks/schema.js.map +1 -1
- package/dist/modules/datasource/bazel/index.js +18 -2
- package/dist/modules/datasource/bazel/index.js.map +1 -1
- package/dist/modules/datasource/bazel/schema.d.ts +1 -0
- package/dist/modules/datasource/bazel/schema.js.map +1 -1
- package/dist/modules/datasource/bitbucket-server-tags/index.d.ts +19 -0
- package/dist/modules/datasource/bitbucket-server-tags/index.js +133 -0
- package/dist/modules/datasource/bitbucket-server-tags/index.js.map +1 -0
- package/dist/modules/datasource/bitbucket-server-tags/schema.d.ts +28 -0
- package/dist/modules/datasource/bitbucket-server-tags/schema.js +13 -0
- package/dist/modules/datasource/bitbucket-server-tags/schema.js.map +1 -0
- package/dist/modules/datasource/bitrise/index.js +1 -1
- package/dist/modules/datasource/bitrise/index.js.map +1 -1
- package/dist/modules/datasource/cdnjs/schema.d.ts +2 -2
- package/dist/modules/datasource/conda/index.js +18 -1
- package/dist/modules/datasource/conda/index.js.map +1 -1
- package/dist/modules/datasource/conda/prefix-dev.d.ts +3 -0
- package/dist/modules/datasource/conda/prefix-dev.js +81 -0
- package/dist/modules/datasource/conda/prefix-dev.js.map +1 -0
- package/dist/modules/datasource/conda/schema/prefix-dev.d.ts +189 -0
- package/dist/modules/datasource/conda/schema/prefix-dev.js +31 -0
- package/dist/modules/datasource/conda/schema/prefix-dev.js.map +1 -0
- package/dist/modules/datasource/conda/types.d.ts +1 -20
- package/dist/modules/datasource/conda/types.js.map +1 -1
- package/dist/modules/datasource/cpan/index.js +2 -4
- package/dist/modules/datasource/cpan/index.js.map +1 -1
- package/dist/modules/datasource/crate/index.js +3 -3
- package/dist/modules/datasource/crate/index.js.map +1 -1
- package/dist/modules/datasource/custom/formats/html.js +1 -1
- package/dist/modules/datasource/custom/formats/html.js.map +1 -1
- package/dist/modules/datasource/custom/formats/yaml.js +1 -1
- package/dist/modules/datasource/custom/formats/yaml.js.map +1 -1
- package/dist/modules/datasource/custom/index.js +4 -2
- package/dist/modules/datasource/custom/index.js.map +1 -1
- package/dist/modules/datasource/custom/schema.d.ts +22 -22
- package/dist/modules/datasource/custom/utils.js +1 -0
- package/dist/modules/datasource/custom/utils.js.map +1 -1
- package/dist/modules/datasource/dart/index.js +1 -1
- package/dist/modules/datasource/dart/index.js.map +1 -1
- package/dist/modules/datasource/dart-version/index.js +1 -1
- package/dist/modules/datasource/dart-version/index.js.map +1 -1
- package/dist/modules/datasource/datasource.js +0 -1
- package/dist/modules/datasource/datasource.js.map +1 -1
- package/dist/modules/datasource/deb/index.d.ts +4 -5
- package/dist/modules/datasource/deb/index.js +10 -11
- package/dist/modules/datasource/deb/index.js.map +1 -1
- package/dist/modules/datasource/deb/url.d.ts +3 -3
- package/dist/modules/datasource/deb/url.js +17 -13
- package/dist/modules/datasource/deb/url.js.map +1 -1
- package/dist/modules/datasource/deno/index.js +1 -1
- package/dist/modules/datasource/deno/index.js.map +1 -1
- package/dist/modules/datasource/deno/schema.d.ts +1 -1
- package/dist/modules/datasource/devbox/index.js +0 -1
- package/dist/modules/datasource/devbox/index.js.map +1 -1
- package/dist/modules/datasource/docker/common.js +5 -2
- package/dist/modules/datasource/docker/common.js.map +1 -1
- package/dist/modules/datasource/docker/index.js +8 -6
- package/dist/modules/datasource/docker/index.js.map +1 -1
- package/dist/modules/datasource/docker/schema.d.ts +77 -101
- package/dist/modules/datasource/docker/schema.js +2 -1
- package/dist/modules/datasource/docker/schema.js.map +1 -1
- package/dist/modules/datasource/flutter-version/index.js +1 -1
- package/dist/modules/datasource/flutter-version/index.js.map +1 -1
- package/dist/modules/datasource/galaxy/schema.d.ts +1 -1
- package/dist/modules/datasource/galaxy-collection/schema.d.ts +8 -8
- package/dist/modules/datasource/git-refs/index.js +1 -1
- package/dist/modules/datasource/git-refs/index.js.map +1 -1
- package/dist/modules/datasource/gitea-releases/schema.d.ts +6 -6
- package/dist/modules/datasource/gitea-tags/schema.d.ts +4 -4
- package/dist/modules/datasource/github-release-attachments/index.js +2 -2
- package/dist/modules/datasource/github-release-attachments/index.js.map +1 -1
- package/dist/modules/datasource/github-runners/index.js +2 -2
- package/dist/modules/datasource/github-runners/index.js.map +1 -1
- package/dist/modules/datasource/github-tags/index.js +4 -1
- package/dist/modules/datasource/github-tags/index.js.map +1 -1
- package/dist/modules/datasource/gitlab-packages/index.js +1 -1
- package/dist/modules/datasource/gitlab-packages/index.js.map +1 -1
- package/dist/modules/datasource/gitlab-releases/index.js +1 -3
- package/dist/modules/datasource/gitlab-releases/index.js.map +1 -1
- package/dist/modules/datasource/go/base.js +1 -1
- package/dist/modules/datasource/go/base.js.map +1 -1
- package/dist/modules/datasource/go/index.js +1 -1
- package/dist/modules/datasource/go/index.js.map +1 -1
- package/dist/modules/datasource/go/releases-direct.js +7 -4
- package/dist/modules/datasource/go/releases-direct.js.map +1 -1
- package/dist/modules/datasource/go/releases-goproxy.js +1 -1
- package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
- package/dist/modules/datasource/golang-version/index.js +2 -2
- package/dist/modules/datasource/golang-version/index.js.map +1 -1
- package/dist/modules/datasource/gradle-version/index.js +1 -1
- package/dist/modules/datasource/gradle-version/index.js.map +1 -1
- package/dist/modules/datasource/helm/index.js +1 -1
- package/dist/modules/datasource/helm/index.js.map +1 -1
- package/dist/modules/datasource/hex/index.js +1 -1
- package/dist/modules/datasource/hex/index.js.map +1 -1
- package/dist/modules/datasource/hex/schema.d.ts +11 -11
- package/dist/modules/datasource/hexpm-bob/index.js +1 -1
- package/dist/modules/datasource/hexpm-bob/index.js.map +1 -1
- package/dist/modules/datasource/index.js +46 -5
- package/dist/modules/datasource/index.js.map +1 -1
- package/dist/modules/datasource/java-version/index.js +0 -1
- package/dist/modules/datasource/java-version/index.js.map +1 -1
- package/dist/modules/datasource/jenkins-plugins/index.js +1 -1
- package/dist/modules/datasource/jenkins-plugins/index.js.map +1 -1
- package/dist/modules/datasource/maven/index.d.ts +2 -2
- package/dist/modules/datasource/maven/index.js +56 -33
- package/dist/modules/datasource/maven/index.js.map +1 -1
- package/dist/modules/datasource/maven/types.d.ts +7 -6
- package/dist/modules/datasource/maven/types.js.map +1 -1
- package/dist/modules/datasource/maven/util.d.ts +4 -5
- package/dist/modules/datasource/maven/util.js +94 -157
- package/dist/modules/datasource/maven/util.js.map +1 -1
- package/dist/modules/datasource/metadata.js +9 -1
- package/dist/modules/datasource/metadata.js.map +1 -1
- package/dist/modules/datasource/node-version/index.js +1 -1
- package/dist/modules/datasource/node-version/index.js.map +1 -1
- package/dist/modules/datasource/npm/get.d.ts +0 -1
- package/dist/modules/datasource/npm/get.js +14 -68
- package/dist/modules/datasource/npm/get.js.map +1 -1
- package/dist/modules/datasource/npm/index.js +1 -1
- package/dist/modules/datasource/npm/index.js.map +1 -1
- package/dist/modules/datasource/npm/npmrc.js +1 -1
- package/dist/modules/datasource/npm/npmrc.js.map +1 -1
- package/dist/modules/datasource/npm/types.d.ts +0 -8
- package/dist/modules/datasource/npm/types.js.map +1 -1
- package/dist/modules/datasource/nuget/index.js +1 -1
- package/dist/modules/datasource/nuget/index.js.map +1 -1
- package/dist/modules/datasource/nuget/v2.js +1 -1
- package/dist/modules/datasource/nuget/v2.js.map +1 -1
- package/dist/modules/datasource/nuget/v3.js +8 -6
- package/dist/modules/datasource/nuget/v3.js.map +1 -1
- package/dist/modules/datasource/orb/index.js +1 -1
- package/dist/modules/datasource/orb/index.js.map +1 -1
- package/dist/modules/datasource/packagist/index.js +2 -2
- package/dist/modules/datasource/packagist/index.js.map +1 -1
- package/dist/modules/datasource/packagist/schema.d.ts +32 -32
- package/dist/modules/datasource/pod/index.js +2 -2
- package/dist/modules/datasource/pod/index.js.map +1 -1
- package/dist/modules/datasource/postprocess-release.js +1 -1
- package/dist/modules/datasource/postprocess-release.js.map +1 -1
- package/dist/modules/datasource/pypi/index.js +1 -1
- package/dist/modules/datasource/pypi/index.js.map +1 -1
- package/dist/modules/datasource/python-version/index.js +1 -1
- package/dist/modules/datasource/python-version/index.js.map +1 -1
- package/dist/modules/datasource/repology/index.js +1 -1
- package/dist/modules/datasource/repology/index.js.map +1 -1
- package/dist/modules/datasource/ruby-version/index.js +1 -1
- package/dist/modules/datasource/ruby-version/index.js.map +1 -1
- package/dist/modules/datasource/rubygems/index.js +2 -2
- package/dist/modules/datasource/rubygems/index.js.map +1 -1
- package/dist/modules/datasource/rubygems/versions-endpoint-cache.js +2 -2
- package/dist/modules/datasource/rubygems/versions-endpoint-cache.js.map +1 -1
- package/dist/modules/datasource/sbt-package/index.js +1 -1
- package/dist/modules/datasource/sbt-package/index.js.map +1 -1
- package/dist/modules/datasource/sbt-plugin/index.js +1 -1
- package/dist/modules/datasource/sbt-plugin/index.js.map +1 -1
- package/dist/modules/datasource/schema.d.ts +4 -4
- package/dist/modules/datasource/terraform-module/index.js +1 -1
- package/dist/modules/datasource/terraform-module/index.js.map +1 -1
- package/dist/modules/datasource/terraform-provider/index.js +2 -3
- package/dist/modules/datasource/terraform-provider/index.js.map +1 -1
- package/dist/modules/datasource/types.d.ts +2 -0
- package/dist/modules/datasource/types.js.map +1 -1
- package/dist/modules/manager/api.js +2 -0
- package/dist/modules/manager/api.js.map +1 -1
- package/dist/modules/manager/argocd/extract.js +1 -1
- package/dist/modules/manager/argocd/extract.js.map +1 -1
- package/dist/modules/manager/argocd/schema.d.ts +22 -22
- package/dist/modules/manager/asdf/upgradeable-tooling.js +94 -0
- package/dist/modules/manager/asdf/upgradeable-tooling.js.map +1 -1
- package/dist/modules/manager/azure-pipelines/schema.d.ts +32 -32
- package/dist/modules/manager/batect/schema.d.ts +4 -4
- package/dist/modules/manager/batect-wrapper/artifacts.js +1 -1
- package/dist/modules/manager/batect-wrapper/artifacts.js.map +1 -1
- package/dist/modules/manager/bazel/rules/docker.d.ts +6 -6
- package/dist/modules/manager/bazel/rules/git.d.ts +10 -10
- package/dist/modules/manager/bazel/rules/git.js +9 -2
- package/dist/modules/manager/bazel/rules/git.js.map +1 -1
- package/dist/modules/manager/bazel/rules/go.d.ts +5 -5
- package/dist/modules/manager/bazel/rules/maven.d.ts +7 -7
- package/dist/modules/manager/bazel/rules/oci.d.ts +6 -6
- package/dist/modules/manager/bazel-module/parser/fragments.d.ts +40 -40
- package/dist/modules/manager/bazel-module/parser/maven.d.ts +44 -90
- package/dist/modules/manager/bazel-module/parser/oci.d.ts +19 -42
- package/dist/modules/manager/bazel-module/rules.d.ts +50 -160
- package/dist/modules/manager/buildpacks/extract.d.ts +6 -1
- package/dist/modules/manager/buildpacks/extract.js +24 -14
- package/dist/modules/manager/buildpacks/extract.js.map +1 -1
- package/dist/modules/manager/bun/artifacts.js +0 -1
- package/dist/modules/manager/bun/artifacts.js.map +1 -1
- package/dist/modules/manager/bun/extract.d.ts +1 -0
- package/dist/modules/manager/bun/extract.js +53 -27
- package/dist/modules/manager/bun/extract.js.map +1 -1
- package/dist/modules/manager/bun/index.js +1 -1
- package/dist/modules/manager/bun/index.js.map +1 -1
- package/dist/modules/manager/bun/utils.d.ts +2 -0
- package/dist/modules/manager/bun/utils.js +22 -0
- package/dist/modules/manager/bun/utils.js.map +1 -0
- package/dist/modules/manager/bundler/artifacts.js +0 -1
- package/dist/modules/manager/bundler/artifacts.js.map +1 -1
- package/dist/modules/manager/bundler/extract.js +2 -1
- package/dist/modules/manager/bundler/extract.js.map +1 -1
- package/dist/modules/manager/cake/index.js +4 -2
- package/dist/modules/manager/cake/index.js.map +1 -1
- package/dist/modules/manager/cargo/artifacts.js +5 -7
- package/dist/modules/manager/cargo/artifacts.js.map +1 -1
- package/dist/modules/manager/cargo/schema.d.ts +166 -166
- package/dist/modules/manager/circleci/extract.js +21 -30
- package/dist/modules/manager/circleci/extract.js.map +1 -1
- package/dist/modules/manager/circleci/schema.d.ts +33 -144
- package/dist/modules/manager/circleci/schema.js +21 -17
- package/dist/modules/manager/circleci/schema.js.map +1 -1
- package/dist/modules/manager/cocoapods/artifacts.js +1 -2
- package/dist/modules/manager/cocoapods/artifacts.js.map +1 -1
- package/dist/modules/manager/composer/artifacts.js +1 -2
- package/dist/modules/manager/composer/artifacts.js.map +1 -1
- package/dist/modules/manager/composer/schema.d.ts +32 -34
- package/dist/modules/manager/composer/schema.js +1 -1
- package/dist/modules/manager/composer/schema.js.map +1 -1
- package/dist/modules/manager/composer/utils.d.ts +1 -0
- package/dist/modules/manager/composer/utils.js +18 -6
- package/dist/modules/manager/composer/utils.js.map +1 -1
- package/dist/modules/manager/conan/artifacts.d.ts +2 -0
- package/dist/modules/manager/conan/artifacts.js +76 -0
- package/dist/modules/manager/conan/artifacts.js.map +1 -0
- package/dist/modules/manager/conan/index.d.ts +2 -0
- package/dist/modules/manager/conan/index.js +4 -1
- package/dist/modules/manager/conan/index.js.map +1 -1
- package/dist/modules/manager/copier/artifacts.js +0 -1
- package/dist/modules/manager/copier/artifacts.js.map +1 -1
- package/dist/modules/manager/crossplane/schema.d.ts +2 -2
- package/dist/modules/manager/custom/jsonata/schema.d.ts +21 -21
- package/dist/modules/manager/custom/regex/index.js +2 -0
- package/dist/modules/manager/custom/regex/index.js.map +1 -1
- package/dist/modules/manager/deps-edn/extract.js +2 -1
- package/dist/modules/manager/deps-edn/extract.js.map +1 -1
- package/dist/modules/manager/devbox/artifacts.d.ts +1 -1
- package/dist/modules/manager/devbox/artifacts.js +35 -11
- package/dist/modules/manager/devbox/artifacts.js.map +1 -1
- package/dist/modules/manager/devbox/schema.js +1 -1
- package/dist/modules/manager/devbox/schema.js.map +1 -1
- package/dist/modules/manager/devcontainer/extract.js +43 -1
- package/dist/modules/manager/devcontainer/extract.js.map +1 -1
- package/dist/modules/manager/devcontainer/index.js +11 -1
- package/dist/modules/manager/devcontainer/index.js.map +1 -1
- package/dist/modules/manager/devcontainer/schema.d.ts +7 -3
- package/dist/modules/manager/devcontainer/schema.js +3 -1
- package/dist/modules/manager/devcontainer/schema.js.map +1 -1
- package/dist/modules/manager/docker-compose/schema.d.ts +6 -6
- package/dist/modules/manager/dockerfile/extract.js +2 -6
- package/dist/modules/manager/dockerfile/extract.js.map +1 -1
- package/dist/modules/manager/fingerprint.generated.js +86 -85
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/fleet/schema.d.ts +4 -4
- package/dist/modules/manager/flux/artifacts.js +0 -1
- package/dist/modules/manager/flux/artifacts.js.map +1 -1
- package/dist/modules/manager/flux/extract.js +27 -24
- package/dist/modules/manager/flux/extract.js.map +1 -1
- package/dist/modules/manager/flux/schema.d.ts +130 -154
- package/dist/modules/manager/github-actions/extract.js +60 -39
- package/dist/modules/manager/github-actions/extract.js.map +1 -1
- package/dist/modules/manager/github-actions/schema.d.ts +66 -0
- package/dist/modules/manager/github-actions/schema.js +38 -0
- package/dist/modules/manager/github-actions/schema.js.map +1 -0
- package/dist/modules/manager/gitlabci/extract.d.ts +1 -5
- package/dist/modules/manager/gitlabci/extract.js +27 -126
- package/dist/modules/manager/gitlabci/extract.js.map +1 -1
- package/dist/modules/manager/gitlabci/schema.d.ts +55 -0
- package/dist/modules/manager/gitlabci/schema.js +63 -0
- package/dist/modules/manager/gitlabci/schema.js.map +1 -0
- package/dist/modules/manager/gitlabci-include/extract.js +6 -54
- package/dist/modules/manager/gitlabci-include/extract.js.map +1 -1
- package/dist/modules/manager/gitlabci-include/schema.d.ts +13 -0
- package/dist/modules/manager/gitlabci-include/schema.js +46 -0
- package/dist/modules/manager/gitlabci-include/schema.js.map +1 -0
- package/dist/modules/manager/glasskube/schema.d.ts +8 -8
- package/dist/modules/manager/gomod/artifacts-extra.js +12 -4
- package/dist/modules/manager/gomod/artifacts-extra.js.map +1 -1
- package/dist/modules/manager/gomod/artifacts.js +24 -10
- package/dist/modules/manager/gomod/artifacts.js.map +1 -1
- package/dist/modules/manager/gomod/extract.js +23 -0
- package/dist/modules/manager/gomod/extract.js.map +1 -1
- package/dist/modules/manager/gomod/line-parser.js +16 -0
- package/dist/modules/manager/gomod/line-parser.js.map +1 -1
- package/dist/modules/manager/gomod/update.js +5 -3
- package/dist/modules/manager/gomod/update.js.map +1 -1
- package/dist/modules/manager/gradle/artifacts.js +0 -1
- package/dist/modules/manager/gradle/artifacts.js.map +1 -1
- package/dist/modules/manager/gradle/extract/catalog.js +1 -1
- package/dist/modules/manager/gradle/extract/catalog.js.map +1 -1
- package/dist/modules/manager/gradle/extract.js +8 -13
- package/dist/modules/manager/gradle/extract.js.map +1 -1
- package/dist/modules/manager/gradle/parser/assignments.js +2 -2
- package/dist/modules/manager/gradle/parser/assignments.js.map +1 -1
- package/dist/modules/manager/gradle/parser/handlers.d.ts +1 -2
- package/dist/modules/manager/gradle/parser/handlers.js +17 -24
- package/dist/modules/manager/gradle/parser/handlers.js.map +1 -1
- package/dist/modules/manager/gradle/parser/registry-urls.js +46 -12
- package/dist/modules/manager/gradle/parser/registry-urls.js.map +1 -1
- package/dist/modules/manager/gradle/types.d.ts +1 -0
- package/dist/modules/manager/gradle/types.js.map +1 -1
- package/dist/modules/manager/gradle-wrapper/artifacts.js +1 -2
- package/dist/modules/manager/gradle-wrapper/artifacts.js.map +1 -1
- package/dist/modules/manager/helmfile/artifacts.js +0 -1
- package/dist/modules/manager/helmfile/artifacts.js.map +1 -1
- package/dist/modules/manager/helmfile/extract.js +4 -0
- package/dist/modules/manager/helmfile/extract.js.map +1 -1
- package/dist/modules/manager/helmfile/schema.d.ts +9 -9
- package/dist/modules/manager/helmv3/artifacts.js +0 -1
- package/dist/modules/manager/helmv3/artifacts.js.map +1 -1
- package/dist/modules/manager/helmv3/utils.js +3 -1
- package/dist/modules/manager/helmv3/utils.js.map +1 -1
- package/dist/modules/manager/hermit/artifacts.js +0 -1
- package/dist/modules/manager/hermit/artifacts.js.map +1 -1
- package/dist/modules/manager/homebrew/extract.js +0 -1
- package/dist/modules/manager/homebrew/extract.js.map +1 -1
- package/dist/modules/manager/jsonnet-bundler/artifacts.js +0 -1
- package/dist/modules/manager/jsonnet-bundler/artifacts.js.map +1 -1
- package/dist/modules/manager/kustomize/artifacts.d.ts +2 -0
- package/dist/modules/manager/kustomize/artifacts.js +154 -0
- package/dist/modules/manager/kustomize/artifacts.js.map +1 -0
- package/dist/modules/manager/kustomize/common.d.ts +3 -0
- package/dist/modules/manager/kustomize/common.js +22 -0
- package/dist/modules/manager/kustomize/common.js.map +1 -0
- package/dist/modules/manager/kustomize/index.d.ts +1 -0
- package/dist/modules/manager/kustomize/index.js +3 -1
- package/dist/modules/manager/kustomize/index.js.map +1 -1
- package/dist/modules/manager/kustomize/types.d.ts +4 -0
- package/dist/modules/manager/kustomize/types.js.map +1 -1
- package/dist/modules/manager/maven/extract.d.ts +2 -2
- package/dist/modules/manager/maven/extract.js +14 -9
- package/dist/modules/manager/maven/extract.js.map +1 -1
- package/dist/modules/manager/maven-wrapper/artifacts.js +0 -1
- package/dist/modules/manager/maven-wrapper/artifacts.js.map +1 -1
- package/dist/modules/manager/mise/extract.js +1 -1
- package/dist/modules/manager/mise/extract.js.map +1 -1
- package/dist/modules/manager/mix/artifacts.js +64 -14
- package/dist/modules/manager/mix/artifacts.js.map +1 -1
- package/dist/modules/manager/mix/index.d.ts +1 -0
- package/dist/modules/manager/mix/index.js +2 -1
- package/dist/modules/manager/mix/index.js.map +1 -1
- package/dist/modules/manager/nix/artifacts.js +0 -1
- package/dist/modules/manager/nix/artifacts.js.map +1 -1
- package/dist/modules/manager/nix/extract.js +1 -1
- package/dist/modules/manager/nix/extract.js.map +1 -1
- package/dist/modules/manager/nix/schema.d.ts +20 -20
- package/dist/modules/manager/nix/schema.js +1 -0
- package/dist/modules/manager/nix/schema.js.map +1 -1
- package/dist/modules/manager/npm/artifacts.js +0 -1
- package/dist/modules/manager/npm/artifacts.js.map +1 -1
- package/dist/modules/manager/npm/extract/common/package-file.js +1 -0
- package/dist/modules/manager/npm/extract/common/package-file.js.map +1 -1
- package/dist/modules/manager/npm/extract/yarn.js +2 -2
- package/dist/modules/manager/npm/extract/yarn.js.map +1 -1
- package/dist/modules/manager/npm/post-update/npm.js +0 -1
- package/dist/modules/manager/npm/post-update/npm.js.map +1 -1
- package/dist/modules/manager/npm/post-update/pnpm.js +13 -2
- package/dist/modules/manager/npm/post-update/pnpm.js.map +1 -1
- package/dist/modules/manager/npm/post-update/rules.js +11 -1
- package/dist/modules/manager/npm/post-update/rules.js.map +1 -1
- package/dist/modules/manager/npm/post-update/yarn.js +0 -1
- package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
- package/dist/modules/manager/npm/schema.d.ts +13 -13
- package/dist/modules/manager/npm/update/dependency/index.js +1 -1
- package/dist/modules/manager/npm/update/dependency/index.js.map +1 -1
- package/dist/modules/manager/nuget/artifacts.js +1 -2
- package/dist/modules/manager/nuget/artifacts.js.map +1 -1
- package/dist/modules/manager/nuget/extract.js +21 -18
- package/dist/modules/manager/nuget/extract.js.map +1 -1
- package/dist/modules/manager/nuget/package-tree.js +4 -0
- package/dist/modules/manager/nuget/package-tree.js.map +1 -1
- package/dist/modules/manager/nuget/schema.d.ts +8 -8
- package/dist/modules/manager/nuget/util.js +4 -1
- package/dist/modules/manager/nuget/util.js.map +1 -1
- package/dist/modules/manager/ocb/schema.d.ts +6 -6
- package/dist/modules/manager/pep621/extract.js +19 -3
- package/dist/modules/manager/pep621/extract.js.map +1 -1
- package/dist/modules/manager/pep621/processors/pdm.js +3 -2
- package/dist/modules/manager/pep621/processors/pdm.js.map +1 -1
- package/dist/modules/manager/pep621/processors/uv.js +4 -1
- package/dist/modules/manager/pep621/processors/uv.js.map +1 -1
- package/dist/modules/manager/pep621/schema.d.ts +341 -49
- package/dist/modules/manager/pep621/schema.js +3 -1
- package/dist/modules/manager/pep621/schema.js.map +1 -1
- package/dist/modules/manager/pep621/utils.js +1 -1
- package/dist/modules/manager/pep621/utils.js.map +1 -1
- package/dist/modules/manager/pip-compile/common.js +0 -1
- package/dist/modules/manager/pip-compile/common.js.map +1 -1
- package/dist/modules/manager/pip_requirements/artifacts.js +0 -1
- package/dist/modules/manager/pip_requirements/artifacts.js.map +1 -1
- package/dist/modules/manager/pip_requirements/common.js +2 -6
- package/dist/modules/manager/pip_requirements/common.js.map +1 -1
- package/dist/modules/manager/pipenv/artifacts.js +0 -1
- package/dist/modules/manager/pipenv/artifacts.js.map +1 -1
- package/dist/modules/manager/pixi/artifacts.d.ts +3 -0
- package/dist/modules/manager/pixi/artifacts.js +78 -0
- package/dist/modules/manager/pixi/artifacts.js.map +1 -0
- package/dist/modules/manager/pixi/extract.d.ts +4 -0
- package/dist/modules/manager/pixi/extract.js +131 -0
- package/dist/modules/manager/pixi/extract.js.map +1 -0
- package/dist/modules/manager/pixi/index.d.ts +10 -0
- package/dist/modules/manager/pixi/index.js +20 -0
- package/dist/modules/manager/pixi/index.js.map +1 -0
- package/dist/modules/manager/pixi/schema.d.ts +405 -0
- package/dist/modules/manager/pixi/schema.js +147 -0
- package/dist/modules/manager/pixi/schema.js.map +1 -0
- package/dist/modules/manager/poetry/artifacts.js +3 -4
- package/dist/modules/manager/poetry/artifacts.js.map +1 -1
- package/dist/modules/manager/poetry/extract.js +2 -1
- package/dist/modules/manager/poetry/extract.js.map +1 -1
- package/dist/modules/manager/poetry/schema.d.ts +44 -44
- package/dist/modules/manager/pub/artifacts.js +0 -1
- package/dist/modules/manager/pub/artifacts.js.map +1 -1
- package/dist/modules/manager/pub/schema.d.ts +8 -8
- package/dist/modules/manager/scalafmt/extract.js +1 -1
- package/dist/modules/manager/scalafmt/extract.js.map +1 -1
- package/dist/modules/manager/sveltos/schema.d.ts +30 -42
- package/dist/modules/manager/terraform/lockfile/hash.d.ts +1 -1
- package/dist/modules/manager/terraform/util.js +1 -3
- package/dist/modules/manager/terraform/util.js.map +1 -1
- package/dist/modules/manager/types.d.ts +6 -2
- package/dist/modules/manager/types.js.map +1 -1
- package/dist/modules/manager/vendir/schema.d.ts +7 -7
- package/dist/modules/platform/api.d.ts +1 -1
- package/dist/modules/platform/azure/azure-helper.js +2 -2
- package/dist/modules/platform/azure/azure-helper.js.map +1 -1
- package/dist/modules/platform/azure/index.js +14 -14
- package/dist/modules/platform/azure/index.js.map +1 -1
- package/dist/modules/platform/bitbucket/comments.js +4 -4
- package/dist/modules/platform/bitbucket/comments.js.map +1 -1
- package/dist/modules/platform/bitbucket/index.js +49 -44
- package/dist/modules/platform/bitbucket/index.js.map +1 -1
- package/dist/modules/platform/bitbucket/schema.d.ts +14 -14
- package/dist/modules/platform/bitbucket/utils.js +3 -3
- package/dist/modules/platform/bitbucket/utils.js.map +1 -1
- package/dist/modules/platform/bitbucket-server/index.d.ts +2 -2
- package/dist/modules/platform/bitbucket-server/index.js +81 -81
- package/dist/modules/platform/bitbucket-server/index.js.map +1 -1
- package/dist/modules/platform/bitbucket-server/pr-cache.d.ts +23 -0
- package/dist/modules/platform/bitbucket-server/pr-cache.js +125 -0
- package/dist/modules/platform/bitbucket-server/pr-cache.js.map +1 -0
- package/dist/modules/platform/bitbucket-server/schema.d.ts +76 -0
- package/dist/modules/platform/bitbucket-server/schema.js +15 -1
- package/dist/modules/platform/bitbucket-server/schema.js.map +1 -1
- package/dist/modules/platform/bitbucket-server/types.d.ts +8 -2
- package/dist/modules/platform/bitbucket-server/types.js.map +1 -1
- package/dist/modules/platform/bitbucket-server/utils.d.ts +0 -2
- package/dist/modules/platform/bitbucket-server/utils.js +6 -52
- package/dist/modules/platform/bitbucket-server/utils.js.map +1 -1
- package/dist/modules/platform/codecommit/codecommit-client.js +6 -6
- package/dist/modules/platform/codecommit/codecommit-client.js.map +1 -1
- package/dist/modules/platform/codecommit/index.js +24 -24
- package/dist/modules/platform/codecommit/index.js.map +1 -1
- package/dist/modules/platform/gerrit/client.d.ts +0 -3
- package/dist/modules/platform/gerrit/client.js +20 -29
- package/dist/modules/platform/gerrit/client.js.map +1 -1
- package/dist/modules/platform/gerrit/index.js +0 -6
- package/dist/modules/platform/gerrit/index.js.map +1 -1
- package/dist/modules/platform/gerrit/scm.js +5 -6
- package/dist/modules/platform/gerrit/scm.js.map +1 -1
- package/dist/modules/platform/gerrit/types.d.ts +1 -4
- package/dist/modules/platform/gerrit/types.js.map +1 -1
- package/dist/modules/platform/gerrit/utils.d.ts +3 -2
- package/dist/modules/platform/gerrit/utils.js +4 -8
- package/dist/modules/platform/gerrit/utils.js.map +1 -1
- package/dist/modules/platform/gitea/gitea-helper.d.ts +1 -0
- package/dist/modules/platform/gitea/gitea-helper.js +16 -0
- package/dist/modules/platform/gitea/gitea-helper.js.map +1 -1
- package/dist/modules/platform/gitea/index.js +22 -16
- package/dist/modules/platform/gitea/index.js.map +1 -1
- package/dist/modules/platform/gitea/schema.d.ts +8 -8
- package/dist/modules/platform/gitea/types.d.ts +1 -1
- package/dist/modules/platform/gitea/types.js.map +1 -1
- package/dist/modules/platform/github/common.d.ts +2 -0
- package/dist/modules/platform/github/common.js +16 -0
- package/dist/modules/platform/github/common.js.map +1 -1
- package/dist/modules/platform/github/index.d.ts +1 -1
- package/dist/modules/platform/github/index.js +87 -82
- package/dist/modules/platform/github/index.js.map +1 -1
- package/dist/modules/platform/github/issue.d.ts +18 -18
- package/dist/modules/platform/github/massage-markdown-links.js +2 -2
- package/dist/modules/platform/github/massage-markdown-links.js.map +1 -1
- package/dist/modules/platform/github/pr.js +3 -3
- package/dist/modules/platform/github/pr.js.map +1 -1
- package/dist/modules/platform/github/schema.d.ts +128 -128
- package/dist/modules/platform/github/schema.js +3 -1
- package/dist/modules/platform/github/schema.js.map +1 -1
- package/dist/modules/platform/gitlab/index.js +63 -49
- package/dist/modules/platform/gitlab/index.js.map +1 -1
- package/dist/modules/platform/index.js +0 -1
- package/dist/modules/platform/index.js.map +1 -1
- package/dist/modules/platform/scm.d.ts +1 -1
- package/dist/modules/versioning/api.js +2 -0
- package/dist/modules/versioning/api.js.map +1 -1
- package/dist/modules/versioning/composer/index.js +10 -0
- package/dist/modules/versioning/composer/index.js.map +1 -1
- package/dist/modules/versioning/conda/index.d.ts +41 -0
- package/dist/modules/versioning/conda/index.js +178 -0
- package/dist/modules/versioning/conda/index.js.map +1 -0
- package/dist/modules/versioning/distro.js +1 -3
- package/dist/modules/versioning/distro.js.map +1 -1
- package/dist/modules/versioning/hashicorp/convertor.d.ts +2 -1
- package/dist/modules/versioning/hashicorp/convertor.js +13 -8
- package/dist/modules/versioning/hashicorp/convertor.js.map +1 -1
- package/dist/modules/versioning/hex/index.js +3 -3
- package/dist/modules/versioning/hex/index.js.map +1 -1
- package/dist/modules/versioning/npm/index.js +2 -1
- package/dist/modules/versioning/npm/index.js.map +1 -1
- package/dist/modules/versioning/types.d.ts +4 -0
- package/dist/modules/versioning/types.js.map +1 -1
- package/dist/proxy.js +2 -1
- package/dist/proxy.js.map +1 -1
- package/dist/renovate.js +2 -2
- package/dist/renovate.js.map +1 -1
- package/dist/util/cache/package/redis.js +0 -1
- package/dist/util/cache/package/redis.js.map +1 -1
- package/dist/util/cache/package/types.d.ts +1 -1
- package/dist/util/cache/package/types.js.map +1 -1
- package/dist/util/cache/repository/impl/base.d.ts +1 -1
- package/dist/util/cache/repository/impl/base.js +4 -0
- package/dist/util/cache/repository/impl/base.js.map +1 -1
- package/dist/util/cache/repository/schema.d.ts +4 -4
- package/dist/util/cache/repository/types.d.ts +3 -0
- package/dist/util/cache/repository/types.js.map +1 -1
- package/dist/util/common.d.ts +4 -2
- package/dist/util/common.js +17 -3
- package/dist/util/common.js.map +1 -1
- package/dist/util/env.d.ts +4 -0
- package/dist/util/env.js +22 -0
- package/dist/util/env.js.map +1 -0
- package/dist/util/exec/containerbase.js +19 -14
- package/dist/util/exec/containerbase.js.map +1 -1
- package/dist/util/exec/index.js +5 -2
- package/dist/util/exec/index.js.map +1 -1
- package/dist/util/exec/types.d.ts +0 -2
- package/dist/util/exec/types.js.map +1 -1
- package/dist/util/exec/utils.d.ts +1 -1
- package/dist/util/exec/utils.js +6 -5
- package/dist/util/exec/utils.js.map +1 -1
- package/dist/util/git/auth.js +8 -5
- package/dist/util/git/auth.js.map +1 -1
- package/dist/util/git/author.js +1 -1
- package/dist/util/git/author.js.map +1 -1
- package/dist/util/git/config.js +0 -1
- package/dist/util/git/config.js.map +1 -1
- package/dist/util/git/error.js +4 -2
- package/dist/util/git/error.js.map +1 -1
- package/dist/util/git/index.js +75 -52
- package/dist/util/git/index.js.map +1 -1
- package/dist/util/git/private-key.js +2 -4
- package/dist/util/git/private-key.js.map +1 -1
- package/dist/util/git/types.d.ts +2 -0
- package/dist/util/git/types.js.map +1 -1
- package/dist/util/git/url.js +1 -1
- package/dist/util/git/url.js.map +1 -1
- package/dist/util/github/graphql/datasource-fetcher.js +3 -5
- package/dist/util/github/graphql/datasource-fetcher.js.map +1 -1
- package/dist/util/github/graphql/query-adapters/releases-query-adapter.d.ts +2 -2
- package/dist/util/github/graphql/query-adapters/tags-query-adapter.d.ts +2 -2
- package/dist/util/http/auth.js +0 -1
- package/dist/util/http/auth.js.map +1 -1
- package/dist/util/http/bitbucket-server.d.ts +7 -5
- package/dist/util/http/bitbucket-server.js +26 -23
- package/dist/util/http/bitbucket-server.js.map +1 -1
- package/dist/util/http/bitbucket.d.ts +6 -5
- package/dist/util/http/bitbucket.js +34 -31
- package/dist/util/http/bitbucket.js.map +1 -1
- package/dist/util/http/cache/abstract-http-cache-provider.js +2 -2
- package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
- package/dist/util/http/cache/memory-http-cache-provider.d.ts +10 -0
- package/dist/util/http/cache/memory-http-cache-provider.js +29 -0
- package/dist/util/http/cache/memory-http-cache-provider.js.map +1 -0
- package/dist/util/http/cache/package-http-cache-provider.d.ts +23 -0
- package/dist/util/http/cache/package-http-cache-provider.js +80 -0
- package/dist/util/http/cache/package-http-cache-provider.js.map +1 -0
- package/dist/util/http/cache/schema.d.ts +2 -2
- package/dist/util/http/errors.d.ts +2 -0
- package/dist/util/http/errors.js +8 -0
- package/dist/util/http/errors.js.map +1 -0
- package/dist/util/http/gerrit.d.ts +6 -4
- package/dist/util/http/gerrit.js +11 -12
- package/dist/util/http/gerrit.js.map +1 -1
- package/dist/util/http/gitea.d.ts +5 -4
- package/dist/util/http/gitea.js +14 -13
- package/dist/util/http/gitea.js.map +1 -1
- package/dist/util/http/github.d.ts +14 -8
- package/dist/util/http/github.js +65 -60
- package/dist/util/http/github.js.map +1 -1
- package/dist/util/http/gitlab.d.ts +7 -5
- package/dist/util/http/gitlab.js +58 -46
- package/dist/util/http/gitlab.js.map +1 -1
- package/dist/util/http/got.d.ts +9 -0
- package/dist/util/http/got.js +54 -0
- package/dist/util/http/got.js.map +1 -0
- package/dist/util/http/host-rules.d.ts +2 -1
- package/dist/util/http/host-rules.js +17 -4
- package/dist/util/http/host-rules.js.map +1 -1
- package/dist/util/http/http.d.ts +93 -0
- package/dist/util/http/http.js +346 -0
- package/dist/util/http/http.js.map +1 -0
- package/dist/util/http/index.d.ts +6 -74
- package/dist/util/http/index.js +5 -359
- package/dist/util/http/index.js.map +1 -1
- package/dist/util/http/legacy.js +4 -1
- package/dist/util/http/legacy.js.map +1 -1
- package/dist/util/http/types.d.ts +9 -16
- package/dist/util/http/types.js.map +1 -1
- package/dist/util/schema-utils.d.ts +1 -0
- package/dist/util/schema-utils.js +43 -8
- package/dist/util/schema-utils.js.map +1 -1
- package/dist/util/stats.d.ts +10 -0
- package/dist/util/stats.js +45 -1
- package/dist/util/stats.js.map +1 -1
- package/dist/util/string.d.ts +16 -0
- package/dist/util/string.js +79 -0
- package/dist/util/string.js.map +1 -1
- package/dist/util/toml.d.ts +1 -0
- package/dist/util/toml.js +6 -0
- package/dist/util/toml.js.map +1 -1
- package/dist/util/url.js +3 -8
- package/dist/util/url.js.map +1 -1
- package/dist/util/yaml.js +3 -8
- package/dist/util/yaml.js.map +1 -1
- package/dist/workers/global/autodiscover.js +1 -19
- package/dist/workers/global/autodiscover.js.map +1 -1
- package/dist/workers/global/config/parse/env.js +3 -3
- package/dist/workers/global/config/parse/env.js.map +1 -1
- package/dist/workers/global/config/parse/file.js +18 -8
- package/dist/workers/global/config/parse/file.js.map +1 -1
- package/dist/workers/global/config/parse/host-rules-from-env.js +6 -2
- package/dist/workers/global/config/parse/host-rules-from-env.js.map +1 -1
- package/dist/workers/global/config/parse/index.js +15 -0
- package/dist/workers/global/config/parse/index.js.map +1 -1
- package/dist/workers/global/index.js +4 -2
- package/dist/workers/global/index.js.map +1 -1
- package/dist/workers/repository/cache.js +1 -2
- package/dist/workers/repository/cache.js.map +1 -1
- package/dist/workers/repository/config-migration/branch/migrated-data.js +2 -0
- package/dist/workers/repository/config-migration/branch/migrated-data.js.map +1 -1
- package/dist/workers/repository/index.js +1 -0
- package/dist/workers/repository/index.js.map +1 -1
- package/dist/workers/repository/init/merge.js +6 -3
- package/dist/workers/repository/init/merge.js.map +1 -1
- package/dist/workers/repository/onboarding/pr/config-description.js +3 -1
- package/dist/workers/repository/onboarding/pr/config-description.js.map +1 -1
- package/dist/workers/repository/onboarding/pr/index.js +4 -0
- package/dist/workers/repository/onboarding/pr/index.js.map +1 -1
- package/dist/workers/repository/process/extract-update.js +0 -1
- package/dist/workers/repository/process/extract-update.js.map +1 -1
- package/dist/workers/repository/process/fingerprint-fields.js +0 -1
- package/dist/workers/repository/process/fingerprint-fields.js.map +1 -1
- package/dist/workers/repository/process/libyear.js +2 -2
- package/dist/workers/repository/process/libyear.js.map +1 -1
- package/dist/workers/repository/process/lookup/index.js +15 -4
- package/dist/workers/repository/process/lookup/index.js.map +1 -1
- package/dist/workers/repository/process/lookup/timestamps.d.ts +18 -0
- package/dist/workers/repository/process/lookup/timestamps.js +69 -0
- package/dist/workers/repository/process/lookup/timestamps.js.map +1 -0
- package/dist/workers/repository/process/lookup/types.d.ts +1 -0
- package/dist/workers/repository/process/lookup/types.js.map +1 -1
- package/dist/workers/repository/process/lookup/utils.js +20 -9
- package/dist/workers/repository/process/lookup/utils.js.map +1 -1
- package/dist/workers/repository/process/sort.js +1 -1
- package/dist/workers/repository/process/sort.js.map +1 -1
- package/dist/workers/repository/process/vulnerabilities.js +1 -1
- package/dist/workers/repository/process/vulnerabilities.js.map +1 -1
- package/dist/workers/repository/process/write.js +1 -8
- package/dist/workers/repository/process/write.js.map +1 -1
- package/dist/workers/repository/reconfigure/utils.d.ts +2 -0
- package/dist/workers/repository/reconfigure/utils.js +16 -0
- package/dist/workers/repository/reconfigure/utils.js.map +1 -1
- package/dist/workers/repository/reconfigure/validate.js +6 -17
- package/dist/workers/repository/reconfigure/validate.js.map +1 -1
- package/dist/workers/repository/update/branch/auto-replace.js +25 -5
- package/dist/workers/repository/update/branch/auto-replace.js.map +1 -1
- package/dist/workers/repository/update/branch/commit.js +2 -0
- package/dist/workers/repository/update/branch/commit.js.map +1 -1
- package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +17 -8
- package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js.map +1 -1
- package/dist/workers/repository/update/pr/body/config-description.js +26 -1
- package/dist/workers/repository/update/pr/body/config-description.js.map +1 -1
- package/dist/workers/repository/update/pr/body/index.js +21 -14
- package/dist/workers/repository/update/pr/body/index.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/api.js +8 -6
- package/dist/workers/repository/update/pr/changelog/api.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/bitbucket/index.js +1 -1
- package/dist/workers/repository/update/pr/changelog/bitbucket/index.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.d.ts +3 -0
- package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.js +39 -0
- package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.js.map +1 -0
- package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.d.ts +8 -0
- package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.js +31 -0
- package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.js.map +1 -0
- package/dist/workers/repository/update/pr/changelog/github/index.js +6 -3
- package/dist/workers/repository/update/pr/changelog/github/index.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/gitlab/index.js +1 -1
- package/dist/workers/repository/update/pr/changelog/gitlab/index.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/release-notes.js +12 -8
- package/dist/workers/repository/update/pr/changelog/release-notes.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/source.d.ts +1 -1
- package/dist/workers/repository/update/pr/changelog/source.js +1 -0
- package/dist/workers/repository/update/pr/changelog/source.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/types.d.ts +1 -1
- package/dist/workers/repository/update/pr/changelog/types.js.map +1 -1
- package/dist/workers/repository/update/pr/index.js +2 -4
- package/dist/workers/repository/update/pr/index.js.map +1 -1
- package/dist/workers/repository/updates/flatten.js +8 -4
- package/dist/workers/repository/updates/flatten.js.map +1 -1
- package/dist/workers/repository/updates/generate.js +3 -2
- package/dist/workers/repository/updates/generate.js.map +1 -1
- package/dist/workers/types.d.ts +1 -4
- package/dist/workers/types.js.map +1 -1
- package/package.json +86 -83
- package/renovate-schema.json +25 -10
- package/dist/modules/manager/github-actions/types.d.ts +0 -30
- package/dist/modules/manager/github-actions/types.js +0 -3
- package/dist/modules/manager/github-actions/types.js.map +0 -1
- package/dist/modules/manager/gitlabci/common.d.ts +0 -6
- package/dist/modules/manager/gitlabci/common.js +0 -30
- package/dist/modules/manager/gitlabci/common.js.map +0 -1
- package/dist/modules/manager/gitlabci/types.d.ts +0 -35
- package/dist/modules/manager/gitlabci/types.js +0 -3
- package/dist/modules/manager/gitlabci/types.js.map +0 -1
@@ -0,0 +1,93 @@
|
|
1
|
+
import type { Options, RetryObject } from 'got';
|
2
|
+
import type { SetRequired } from 'type-fest';
|
3
|
+
import type { infer as Infer } from 'zod';
|
4
|
+
import { ZodType } from 'zod';
|
5
|
+
import { type AsyncResult } from '../result';
|
6
|
+
import type { GotOptions, HttpMethod, HttpOptions, HttpResponse, SafeJsonError } from './types';
|
7
|
+
export interface InternalJsonUnsafeOptions<Opts extends HttpOptions = HttpOptions> {
|
8
|
+
url: string | URL;
|
9
|
+
httpOptions?: Opts;
|
10
|
+
}
|
11
|
+
export interface InternalJsonOptions<Opts extends HttpOptions, ResT = unknown, Schema extends ZodType<ResT> = ZodType<ResT>> extends InternalJsonUnsafeOptions<Opts> {
|
12
|
+
schema?: Schema;
|
13
|
+
}
|
14
|
+
export type InternalGotOptions = SetRequired<GotOptions, 'method' | 'context'>;
|
15
|
+
export interface InternalHttpOptions extends HttpOptions {
|
16
|
+
json?: HttpOptions['body'];
|
17
|
+
method?: HttpMethod;
|
18
|
+
parseJson?: Options['parseJson'];
|
19
|
+
}
|
20
|
+
export declare function applyDefaultHeaders(options: Options): void;
|
21
|
+
export declare abstract class HttpBase<JSONOpts extends HttpOptions = HttpOptions, Opts extends HttpOptions = HttpOptions> {
|
22
|
+
protected hostType: string;
|
23
|
+
private readonly options;
|
24
|
+
protected get baseUrl(): string | undefined;
|
25
|
+
constructor(hostType: string, options?: HttpOptions);
|
26
|
+
private request;
|
27
|
+
protected processOptions(_url: URL, _options: InternalHttpOptions): void;
|
28
|
+
protected handleError(_url: string | URL, _httpOptions: HttpOptions, err: Error): never;
|
29
|
+
protected resolveUrl(requestUrl: string | URL, options: HttpOptions | undefined): URL;
|
30
|
+
protected calculateRetryDelay({ computedValue }: RetryObject): number;
|
31
|
+
get(url: string, options?: HttpOptions): Promise<HttpResponse<string | Buffer>>;
|
32
|
+
head(url: string, options?: HttpOptions): Promise<HttpResponse<never>>;
|
33
|
+
getText(url: string | URL, options?: HttpOptions): Promise<HttpResponse<string>>;
|
34
|
+
getBuffer(url: string | URL, options?: HttpOptions): Promise<HttpResponse<Buffer>>;
|
35
|
+
protected requestJsonUnsafe<ResT>(method: HttpMethod, { url, httpOptions: requestOptions }: InternalJsonUnsafeOptions<JSONOpts>): Promise<HttpResponse<ResT>>;
|
36
|
+
private requestJson;
|
37
|
+
private resolveArgs;
|
38
|
+
getPlain(url: string, options?: Opts): Promise<HttpResponse>;
|
39
|
+
/**
|
40
|
+
* @deprecated use `getYaml` instead
|
41
|
+
*/
|
42
|
+
getYamlUnchecked<ResT>(url: string, options?: Opts): Promise<HttpResponse<ResT>>;
|
43
|
+
getYaml<Schema extends ZodType<any, any, any>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
44
|
+
getYaml<Schema extends ZodType<any, any, any>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
45
|
+
getYamlSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT> = ZodType<ResT>>(url: string, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;
|
46
|
+
getYamlSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT> = ZodType<ResT>>(url: string, options: Opts, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;
|
47
|
+
/**
|
48
|
+
* Request JSON and return the response without any validation.
|
49
|
+
*
|
50
|
+
* The usage of this method is discouraged, please use `getJson` instead.
|
51
|
+
*
|
52
|
+
* If you're new to Zod schema validation library:
|
53
|
+
* - consult the [documentation of Zod library](https://github.com/colinhacks/zod?tab=readme-ov-file#basic-usage)
|
54
|
+
* - search the Renovate codebase for 'zod' module usage
|
55
|
+
* - take a look at the `schema-utils.ts` file for Renovate-specific schemas and utilities
|
56
|
+
*/
|
57
|
+
getJsonUnchecked<ResT = unknown>(url: string, options?: JSONOpts): Promise<HttpResponse<ResT>>;
|
58
|
+
/**
|
59
|
+
* Request JSON with a Zod schema for the response,
|
60
|
+
* throwing an error if the response is not valid.
|
61
|
+
*
|
62
|
+
* @param url
|
63
|
+
* @param schema Zod schema for the response
|
64
|
+
*/
|
65
|
+
getJson<Schema extends ZodType<any, any, any>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
66
|
+
getJson<Schema extends ZodType<any, any, any>>(url: string, options: JSONOpts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
67
|
+
/**
|
68
|
+
* Request JSON with a Zod schema for the response,
|
69
|
+
* wrapping response data in a `Result` class.
|
70
|
+
*
|
71
|
+
* @param url
|
72
|
+
* @param schema Zod schema for the response
|
73
|
+
*/
|
74
|
+
getJsonSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT>>(url: string, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;
|
75
|
+
getJsonSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT>>(url: string, options: JSONOpts, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;
|
76
|
+
/**
|
77
|
+
* @deprecated use `head` instead
|
78
|
+
*/
|
79
|
+
headJson(url: string, httpOptions?: JSONOpts): Promise<HttpResponse<never>>;
|
80
|
+
postJson<T>(url: string, options?: JSONOpts): Promise<HttpResponse<T>>;
|
81
|
+
postJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
82
|
+
postJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: JSONOpts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
83
|
+
putJson<T>(url: string, options?: JSONOpts): Promise<HttpResponse<T>>;
|
84
|
+
putJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
85
|
+
putJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: JSONOpts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
86
|
+
patchJson<T>(url: string, options?: JSONOpts): Promise<HttpResponse<T>>;
|
87
|
+
patchJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
88
|
+
patchJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: JSONOpts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
89
|
+
deleteJson<T>(url: string, options?: JSONOpts): Promise<HttpResponse<T>>;
|
90
|
+
deleteJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
91
|
+
deleteJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: JSONOpts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
92
|
+
stream(url: string, options?: HttpOptions): NodeJS.ReadableStream;
|
93
|
+
}
|
@@ -0,0 +1,346 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.HttpBase = void 0;
|
4
|
+
exports.applyDefaultHeaders = applyDefaultHeaders;
|
5
|
+
const tslib_1 = require("tslib");
|
6
|
+
const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
|
7
|
+
const deepmerge_1 = tslib_1.__importDefault(require("deepmerge"));
|
8
|
+
const zod_1 = require("zod");
|
9
|
+
const global_1 = require("../../config/global");
|
10
|
+
const error_messages_1 = require("../../constants/error-messages");
|
11
|
+
const expose_cjs_1 = require("../../expose.cjs");
|
12
|
+
const logger_1 = require("../../logger");
|
13
|
+
const external_host_error_1 = require("../../types/errors/external-host-error");
|
14
|
+
const memCache = tslib_1.__importStar(require("../cache/memory"));
|
15
|
+
const hash_1 = require("../hash");
|
16
|
+
const result_1 = require("../result");
|
17
|
+
const stats_1 = require("../stats");
|
18
|
+
const url_1 = require("../url");
|
19
|
+
const yaml_1 = require("../yaml");
|
20
|
+
const auth_1 = require("./auth");
|
21
|
+
const got_1 = require("./got");
|
22
|
+
const host_rules_1 = require("./host-rules");
|
23
|
+
const queue_1 = require("./queue");
|
24
|
+
const retry_after_1 = require("./retry-after");
|
25
|
+
const throttle_1 = require("./throttle");
|
26
|
+
const util_1 = require("./util");
|
27
|
+
function applyDefaultHeaders(options) {
|
28
|
+
const renovateVersion = expose_cjs_1.pkg.version;
|
29
|
+
options.headers = {
|
30
|
+
...options.headers,
|
31
|
+
'user-agent': global_1.GlobalConfig.get('userAgent') ??
|
32
|
+
`RenovateBot/${renovateVersion} (https://github.com/renovatebot/renovate)`,
|
33
|
+
};
|
34
|
+
}
|
35
|
+
class HttpBase {
|
36
|
+
hostType;
|
37
|
+
options;
|
38
|
+
get baseUrl() {
|
39
|
+
return undefined;
|
40
|
+
}
|
41
|
+
constructor(hostType, options = {}) {
|
42
|
+
this.hostType = hostType;
|
43
|
+
const retryLimit = process.env.NODE_ENV === 'test' ? 0 : 2;
|
44
|
+
this.options = (0, deepmerge_1.default)(options, {
|
45
|
+
method: 'get',
|
46
|
+
context: { hostType },
|
47
|
+
retry: {
|
48
|
+
calculateDelay: (retryObject) => this.calculateRetryDelay(retryObject),
|
49
|
+
limit: retryLimit,
|
50
|
+
maxRetryAfter: 0, // Don't rely on `got` retry-after handling, just let it fail and then we'll handle it
|
51
|
+
},
|
52
|
+
}, { isMergeableObject: is_1.default.plainObject });
|
53
|
+
}
|
54
|
+
async request(requestUrl, httpOptions) {
|
55
|
+
const resolvedUrl = this.resolveUrl(requestUrl, httpOptions);
|
56
|
+
const url = resolvedUrl.toString();
|
57
|
+
this.processOptions(resolvedUrl, httpOptions);
|
58
|
+
let options = (0, deepmerge_1.default)({
|
59
|
+
...this.options,
|
60
|
+
hostType: this.hostType,
|
61
|
+
}, httpOptions, { isMergeableObject: is_1.default.plainObject });
|
62
|
+
logger_1.logger.trace(`HTTP request: ${options.method.toUpperCase()} ${url}`);
|
63
|
+
options.hooks = {
|
64
|
+
beforeRedirect: [auth_1.removeAuthorization],
|
65
|
+
};
|
66
|
+
applyDefaultHeaders(options);
|
67
|
+
if (is_1.default.undefined(options.readOnly) &&
|
68
|
+
['head', 'get'].includes(options.method)) {
|
69
|
+
options.readOnly = true;
|
70
|
+
}
|
71
|
+
const hostRule = (0, host_rules_1.findMatchingRule)(url, options);
|
72
|
+
options = (0, host_rules_1.applyHostRule)(url, options, hostRule);
|
73
|
+
if (options.enabled === false) {
|
74
|
+
logger_1.logger.debug(`Host is disabled - rejecting request. HostUrl: ${url}`);
|
75
|
+
throw new Error(error_messages_1.HOST_DISABLED);
|
76
|
+
}
|
77
|
+
options = (0, auth_1.applyAuthorization)(options);
|
78
|
+
options.timeout ??= 60000;
|
79
|
+
const { cacheProvider } = options;
|
80
|
+
const memCacheKey = !cacheProvider &&
|
81
|
+
options.memCache !== false &&
|
82
|
+
(options.method === 'get' || options.method === 'head')
|
83
|
+
? (0, hash_1.hash)(`got-${JSON.stringify({
|
84
|
+
url,
|
85
|
+
headers: options.headers,
|
86
|
+
method: options.method,
|
87
|
+
})}`)
|
88
|
+
: null;
|
89
|
+
const cachedResponse = await cacheProvider?.bypassServer(url);
|
90
|
+
if (cachedResponse) {
|
91
|
+
return cachedResponse;
|
92
|
+
}
|
93
|
+
let resPromise = null;
|
94
|
+
// Cache GET requests unless memCache=false
|
95
|
+
if (memCacheKey) {
|
96
|
+
resPromise = memCache.get(memCacheKey);
|
97
|
+
/* v8 ignore start: temporary code */
|
98
|
+
if (resPromise && !cacheProvider) {
|
99
|
+
stats_1.ObsoleteCacheHitLogger.write(url);
|
100
|
+
}
|
101
|
+
/* v8 ignore stop: temporary code */
|
102
|
+
}
|
103
|
+
if (!resPromise) {
|
104
|
+
if (cacheProvider) {
|
105
|
+
await cacheProvider.setCacheHeaders(url, options);
|
106
|
+
}
|
107
|
+
const startTime = Date.now();
|
108
|
+
const httpTask = () => {
|
109
|
+
const queueMs = Date.now() - startTime;
|
110
|
+
return (0, got_1.fetch)(url, options, { queueMs });
|
111
|
+
};
|
112
|
+
const throttle = (0, throttle_1.getThrottle)(url);
|
113
|
+
const throttledTask = throttle ? () => throttle.add(httpTask) : httpTask;
|
114
|
+
const queue = (0, queue_1.getQueue)(url);
|
115
|
+
const queuedTask = queue ? () => queue.add(throttledTask) : throttledTask;
|
116
|
+
const { maxRetryAfter = 60 } = hostRule;
|
117
|
+
resPromise = (0, retry_after_1.wrapWithRetry)(queuedTask, url, retry_after_1.getRetryAfter, maxRetryAfter);
|
118
|
+
if (memCacheKey) {
|
119
|
+
memCache.set(memCacheKey, resPromise);
|
120
|
+
}
|
121
|
+
}
|
122
|
+
try {
|
123
|
+
const res = await resPromise;
|
124
|
+
const deepCopyNeeded = !!memCacheKey && res.statusCode !== 304;
|
125
|
+
const resCopy = (0, util_1.copyResponse)(res, deepCopyNeeded);
|
126
|
+
resCopy.authorization = !!options?.headers?.authorization;
|
127
|
+
if (cacheProvider) {
|
128
|
+
return await cacheProvider.wrapServerResponse(url, resCopy);
|
129
|
+
}
|
130
|
+
return resCopy;
|
131
|
+
}
|
132
|
+
catch (err) {
|
133
|
+
const { abortOnError, abortIgnoreStatusCodes } = options;
|
134
|
+
if (abortOnError && !abortIgnoreStatusCodes?.includes(err.statusCode)) {
|
135
|
+
throw new external_host_error_1.ExternalHostError(err);
|
136
|
+
}
|
137
|
+
const staleResponse = await cacheProvider?.bypassServer(url, true);
|
138
|
+
if (staleResponse) {
|
139
|
+
logger_1.logger.debug({ err }, `Request error: returning stale cache instead for ${url}`);
|
140
|
+
return staleResponse;
|
141
|
+
}
|
142
|
+
this.handleError(requestUrl, httpOptions, err);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
processOptions(_url, _options) {
|
146
|
+
// noop
|
147
|
+
}
|
148
|
+
handleError(_url, _httpOptions, err) {
|
149
|
+
throw err;
|
150
|
+
}
|
151
|
+
resolveUrl(requestUrl, options) {
|
152
|
+
let url = requestUrl;
|
153
|
+
if (url instanceof URL) {
|
154
|
+
// already a aboslute URL
|
155
|
+
return url;
|
156
|
+
}
|
157
|
+
const baseUrl = options?.baseUrl ?? this.baseUrl;
|
158
|
+
if (baseUrl) {
|
159
|
+
url = (0, url_1.resolveBaseUrl)(baseUrl, url);
|
160
|
+
}
|
161
|
+
const parsedUrl = (0, url_1.parseUrl)(url);
|
162
|
+
if (!parsedUrl || !(0, url_1.isHttpUrl)(parsedUrl)) {
|
163
|
+
logger_1.logger.error({ url: requestUrl, baseUrl, resolvedUrl: url }, 'Request Error: cannot parse url');
|
164
|
+
throw new Error('Invalid URL');
|
165
|
+
}
|
166
|
+
return parsedUrl;
|
167
|
+
}
|
168
|
+
calculateRetryDelay({ computedValue }) {
|
169
|
+
return computedValue;
|
170
|
+
}
|
171
|
+
get(url, options = {}) {
|
172
|
+
return this.request(url, options);
|
173
|
+
}
|
174
|
+
head(url, options = {}) {
|
175
|
+
// to complex to validate
|
176
|
+
return this.request(url, {
|
177
|
+
...options,
|
178
|
+
responseType: 'text',
|
179
|
+
method: 'head',
|
180
|
+
});
|
181
|
+
}
|
182
|
+
getText(url, options = {}) {
|
183
|
+
return this.request(url, { ...options, responseType: 'text' });
|
184
|
+
}
|
185
|
+
getBuffer(url, options = {}) {
|
186
|
+
return this.request(url, { ...options, responseType: 'buffer' });
|
187
|
+
}
|
188
|
+
requestJsonUnsafe(method, { url, httpOptions: requestOptions }) {
|
189
|
+
const { body: json, ...httpOptions } = { ...requestOptions };
|
190
|
+
const opts = {
|
191
|
+
...httpOptions,
|
192
|
+
method,
|
193
|
+
};
|
194
|
+
// signal that we expect a json response
|
195
|
+
opts.headers = {
|
196
|
+
accept: 'application/json',
|
197
|
+
...opts.headers,
|
198
|
+
};
|
199
|
+
if (json) {
|
200
|
+
opts.json = json;
|
201
|
+
}
|
202
|
+
return this.request(url, { ...opts, responseType: 'json' });
|
203
|
+
}
|
204
|
+
async requestJson(method, options) {
|
205
|
+
const res = await this.requestJsonUnsafe(method, options);
|
206
|
+
if (options.schema) {
|
207
|
+
res.body = await options.schema.parseAsync(res.body);
|
208
|
+
}
|
209
|
+
return res;
|
210
|
+
}
|
211
|
+
resolveArgs(arg1, arg2, arg3) {
|
212
|
+
const res = { url: arg1 };
|
213
|
+
if (arg2 instanceof zod_1.ZodType) {
|
214
|
+
res.schema = arg2;
|
215
|
+
}
|
216
|
+
else if (arg2) {
|
217
|
+
res.httpOptions = arg2;
|
218
|
+
}
|
219
|
+
if (arg3) {
|
220
|
+
res.schema = arg3;
|
221
|
+
}
|
222
|
+
return res;
|
223
|
+
}
|
224
|
+
async getPlain(url, options) {
|
225
|
+
const opt = options ?? {};
|
226
|
+
return await this.getText(url, {
|
227
|
+
headers: {
|
228
|
+
Accept: 'text/plain',
|
229
|
+
},
|
230
|
+
...opt,
|
231
|
+
});
|
232
|
+
}
|
233
|
+
/**
|
234
|
+
* @deprecated use `getYaml` instead
|
235
|
+
*/
|
236
|
+
async getYamlUnchecked(url, options) {
|
237
|
+
const res = await this.getText(url, options);
|
238
|
+
const body = (0, yaml_1.parseSingleYaml)(res.body);
|
239
|
+
return { ...res, body };
|
240
|
+
}
|
241
|
+
async getYaml(arg1, arg2, arg3) {
|
242
|
+
const url = arg1;
|
243
|
+
let schema;
|
244
|
+
let httpOptions;
|
245
|
+
if (arg3) {
|
246
|
+
schema = arg3;
|
247
|
+
httpOptions = arg2;
|
248
|
+
}
|
249
|
+
else {
|
250
|
+
schema = arg2;
|
251
|
+
}
|
252
|
+
const opts = {
|
253
|
+
...httpOptions,
|
254
|
+
method: 'get',
|
255
|
+
};
|
256
|
+
const res = await this.getText(url, opts);
|
257
|
+
const body = await schema.parseAsync((0, yaml_1.parseSingleYaml)(res.body));
|
258
|
+
return { ...res, body };
|
259
|
+
}
|
260
|
+
getYamlSafe(arg1, arg2, arg3) {
|
261
|
+
const url = arg1;
|
262
|
+
let schema;
|
263
|
+
let httpOptions;
|
264
|
+
if (arg3) {
|
265
|
+
schema = arg3;
|
266
|
+
httpOptions = arg2;
|
267
|
+
}
|
268
|
+
else {
|
269
|
+
schema = arg2;
|
270
|
+
}
|
271
|
+
let res;
|
272
|
+
if (httpOptions) {
|
273
|
+
res = result_1.Result.wrap(this.getYaml(url, httpOptions, schema));
|
274
|
+
}
|
275
|
+
else {
|
276
|
+
res = result_1.Result.wrap(this.getYaml(url, schema));
|
277
|
+
}
|
278
|
+
return res.transform((response) => result_1.Result.ok(response.body));
|
279
|
+
}
|
280
|
+
/**
|
281
|
+
* Request JSON and return the response without any validation.
|
282
|
+
*
|
283
|
+
* The usage of this method is discouraged, please use `getJson` instead.
|
284
|
+
*
|
285
|
+
* If you're new to Zod schema validation library:
|
286
|
+
* - consult the [documentation of Zod library](https://github.com/colinhacks/zod?tab=readme-ov-file#basic-usage)
|
287
|
+
* - search the Renovate codebase for 'zod' module usage
|
288
|
+
* - take a look at the `schema-utils.ts` file for Renovate-specific schemas and utilities
|
289
|
+
*/
|
290
|
+
getJsonUnchecked(url, options) {
|
291
|
+
return this.requestJson('get', { url, httpOptions: options });
|
292
|
+
}
|
293
|
+
getJson(arg1, arg2, arg3) {
|
294
|
+
const args = this.resolveArgs(arg1, arg2, arg3);
|
295
|
+
return this.requestJson('get', args);
|
296
|
+
}
|
297
|
+
getJsonSafe(arg1, arg2, arg3) {
|
298
|
+
const args = this.resolveArgs(arg1, arg2, arg3);
|
299
|
+
return result_1.Result.wrap(this.requestJson('get', args)).transform((response) => result_1.Result.ok(response.body));
|
300
|
+
}
|
301
|
+
/**
|
302
|
+
* @deprecated use `head` instead
|
303
|
+
*/
|
304
|
+
headJson(url, httpOptions) {
|
305
|
+
return this.requestJson('head', { url, httpOptions });
|
306
|
+
}
|
307
|
+
postJson(arg1, arg2, arg3) {
|
308
|
+
const args = this.resolveArgs(arg1, arg2, arg3);
|
309
|
+
return this.requestJson('post', args);
|
310
|
+
}
|
311
|
+
putJson(arg1, arg2, arg3) {
|
312
|
+
const args = this.resolveArgs(arg1, arg2, arg3);
|
313
|
+
return this.requestJson('put', args);
|
314
|
+
}
|
315
|
+
patchJson(arg1, arg2, arg3) {
|
316
|
+
const args = this.resolveArgs(arg1, arg2, arg3);
|
317
|
+
return this.requestJson('patch', args);
|
318
|
+
}
|
319
|
+
deleteJson(arg1, arg2, arg3) {
|
320
|
+
const args = this.resolveArgs(arg1, arg2, arg3);
|
321
|
+
return this.requestJson('delete', args);
|
322
|
+
}
|
323
|
+
stream(url, options) {
|
324
|
+
let combinedOptions = {
|
325
|
+
...this.options,
|
326
|
+
hostType: this.hostType,
|
327
|
+
...options,
|
328
|
+
method: 'get',
|
329
|
+
};
|
330
|
+
const resolvedUrl = this.resolveUrl(url, options).toString();
|
331
|
+
applyDefaultHeaders(combinedOptions);
|
332
|
+
if (is_1.default.undefined(combinedOptions.readOnly) &&
|
333
|
+
['head', 'get'].includes(combinedOptions.method)) {
|
334
|
+
combinedOptions.readOnly = true;
|
335
|
+
}
|
336
|
+
const hostRule = (0, host_rules_1.findMatchingRule)(url, combinedOptions);
|
337
|
+
combinedOptions = (0, host_rules_1.applyHostRule)(resolvedUrl, combinedOptions, hostRule);
|
338
|
+
if (combinedOptions.enabled === false) {
|
339
|
+
throw new Error(error_messages_1.HOST_DISABLED);
|
340
|
+
}
|
341
|
+
combinedOptions = (0, auth_1.applyAuthorization)(combinedOptions);
|
342
|
+
return (0, got_1.stream)(resolvedUrl, combinedOptions);
|
343
|
+
}
|
344
|
+
}
|
345
|
+
exports.HttpBase = HttpBase;
|
346
|
+
//# sourceMappingURL=http.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../lib/util/http/http.ts"],"names":[],"mappings":";;;AA4DA,kDAQC;;AApED,kEAAkC;AAClC,kEAA8B;AAI9B,6BAA8B;AAC9B,gDAAmD;AACnD,mEAA+D;AAC/D,iDAAuC;AACvC,yCAAsC;AACtC,gFAA2E;AAC3E,kEAA4C;AAC5C,kCAA+B;AAC/B,sCAAqD;AACrD,oCAAkD;AAClD,gCAA6D;AAC7D,kCAA0C;AAC1C,iCAAiE;AACjE,+BAAsC;AACtC,6CAA+D;AAE/D,mCAAmC;AACnC,+CAA6D;AAC7D,yCAAyC;AAUzC,iCAAsC;AA2BtC,SAAgB,mBAAmB,CAAC,OAAgB;IAClD,MAAM,eAAe,GAAG,gBAAG,CAAC,OAAO,CAAC;IACpC,OAAO,CAAC,OAAO,GAAG;QAChB,GAAG,OAAO,CAAC,OAAO;QAClB,YAAY,EACV,qBAAY,CAAC,GA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;QACjC,CAAC;QACD,eAAe,GAAG,IAAA,yBAAkB,EAAC,eAAe,CAAC,CAAC;QAEtD,OAAO,IAAA,YAAM,EAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAC9C,CAAC;CACF;AAzkBD,4BAykBC","sourcesContent":["import is from '@sindresorhus/is';\nimport merge from 'deepmerge';\nimport type { Options, RetryObject } from 'got';\nimport type { Merge, SetRequired } from 'type-fest';\nimport type { infer as Infer } from 'zod';\nimport { ZodType } from 'zod';\nimport { GlobalConfig } from '../../config/global';\nimport { HOST_DISABLED } from '../../constants/error-messages';\nimport { pkg } from '../../expose.cjs';\nimport { logger } from '../../logger';\nimport { ExternalHostError } from '../../types/errors/external-host-error';\nimport * as memCache from '../cache/memory';\nimport { hash } from '../hash';\nimport { type AsyncResult, Result } from '../result';\nimport { ObsoleteCacheHitLogger } from '../stats';\nimport { isHttpUrl, parseUrl, resolveBaseUrl } from '../url';\nimport { parseSingleYaml } from '../yaml';\nimport { applyAuthorization, removeAuthorization } from './auth';\nimport { fetch, stream } from './got';\nimport { applyHostRule, findMatchingRule } from './host-rules';\n\nimport { getQueue } from './queue';\nimport { getRetryAfter, wrapWithRetry } from './retry-after';\nimport { getThrottle } from './throttle';\nimport type {\n GotOptions,\n GotStreamOptions,\n GotTask,\n HttpMethod,\n HttpOptions,\n HttpResponse,\n SafeJsonError,\n} from './types';\nimport { copyResponse } from './util';\n\nexport interface InternalJsonUnsafeOptions<\n Opts extends HttpOptions = HttpOptions,\n> {\n url: string | URL;\n httpOptions?: Opts;\n}\n\nexport interface InternalJsonOptions<\n Opts extends HttpOptions,\n ResT = unknown,\n Schema extends ZodType<ResT> = ZodType<ResT>,\n> extends InternalJsonUnsafeOptions<Opts> {\n schema?: Schema;\n}\n\nexport type InternalGotOptions = SetRequired<GotOptions, 'method' | 'context'>;\n\nexport interface InternalHttpOptions extends HttpOptions {\n json?: HttpOptions['body'];\n\n method?: HttpMethod;\n\n parseJson?: Options['parseJson'];\n}\n\nexport function applyDefaultHeaders(options: Options): void {\n const renovateVersion = pkg.version;\n options.headers = {\n ...options.headers,\n 'user-agent':\n GlobalConfig.get('userAgent') ??\n `RenovateBot/${renovateVersion} (https://github.com/renovatebot/renovate)`,\n };\n}\n\nexport abstract class HttpBase<\n JSONOpts extends HttpOptions = HttpOptions,\n Opts extends HttpOptions = HttpOptions,\n> {\n private readonly options: InternalGotOptions;\n\n protected get baseUrl(): string | undefined {\n return undefined;\n }\n\n constructor(\n protected hostType: string,\n options: HttpOptions = {},\n ) {\n const retryLimit = process.env.NODE_ENV === 'test' ? 0 : 2;\n this.options = merge<InternalGotOptions>(\n options,\n {\n method: 'get',\n context: { hostType },\n retry: {\n calculateDelay: (retryObject) =>\n this.calculateRetryDelay(retryObject),\n limit: retryLimit,\n maxRetryAfter: 0, // Don't rely on `got` retry-after handling, just let it fail and then we'll handle it\n },\n },\n { isMergeableObject: is.plainObject },\n );\n }\n private async request(\n requestUrl: string | URL,\n httpOptions: InternalHttpOptions,\n ): Promise<HttpResponse<string>>;\n private async request(\n requestUrl: string | URL,\n httpOptions: InternalHttpOptions & { responseType: 'text' },\n ): Promise<HttpResponse<string>>;\n private async request(\n requestUrl: string | URL,\n httpOptions: InternalHttpOptions & { responseType: 'buffer' },\n ): Promise<HttpResponse<Buffer>>;\n private async request<T = unknown>(\n requestUrl: string | URL,\n httpOptions: InternalHttpOptions & { responseType: 'json' },\n ): Promise<HttpResponse<T>>;\n\n private async request(\n requestUrl: string | URL,\n httpOptions: InternalHttpOptions,\n ): Promise<HttpResponse<unknown>> {\n const resolvedUrl = this.resolveUrl(requestUrl, httpOptions);\n const url = resolvedUrl.toString();\n\n this.processOptions(resolvedUrl, httpOptions);\n\n let options = merge<InternalGotOptions, InternalHttpOptions>(\n {\n ...this.options,\n hostType: this.hostType,\n },\n httpOptions,\n { isMergeableObject: is.plainObject },\n );\n\n logger.trace(`HTTP request: ${options.method.toUpperCase()} ${url}`);\n\n options.hooks = {\n beforeRedirect: [removeAuthorization],\n };\n\n applyDefaultHeaders(options);\n\n if (\n is.undefined(options.readOnly) &&\n ['head', 'get'].includes(options.method)\n ) {\n options.readOnly = true;\n }\n\n const hostRule = findMatchingRule(url, options);\n options = applyHostRule(url, options, hostRule);\n if (options.enabled === false) {\n logger.debug(`Host is disabled - rejecting request. HostUrl: ${url}`);\n throw new Error(HOST_DISABLED);\n }\n options = applyAuthorization(options);\n options.timeout ??= 60000;\n\n const { cacheProvider } = options;\n\n const memCacheKey =\n !cacheProvider &&\n options.memCache !== false &&\n (options.method === 'get' || options.method === 'head')\n ? hash(\n `got-${JSON.stringify({\n url,\n headers: options.headers,\n method: options.method,\n })}`,\n )\n : null;\n\n const cachedResponse = await cacheProvider?.bypassServer<unknown>(url);\n if (cachedResponse) {\n return cachedResponse;\n }\n\n let resPromise: Promise<HttpResponse<unknown>> | null = null;\n\n // Cache GET requests unless memCache=false\n if (memCacheKey) {\n resPromise = memCache.get(memCacheKey);\n\n /* v8 ignore start: temporary code */\n if (resPromise && !cacheProvider) {\n ObsoleteCacheHitLogger.write(url);\n }\n /* v8 ignore stop: temporary code */\n }\n\n if (!resPromise) {\n if (cacheProvider) {\n await cacheProvider.setCacheHeaders(url, options);\n }\n\n const startTime = Date.now();\n const httpTask: GotTask = () => {\n const queueMs = Date.now() - startTime;\n return fetch(url, options, { queueMs });\n };\n\n const throttle = getThrottle(url);\n const throttledTask = throttle ? () => throttle.add(httpTask) : httpTask;\n\n const queue = getQueue(url);\n const queuedTask = queue ? () => queue.add(throttledTask) : throttledTask;\n\n const { maxRetryAfter = 60 } = hostRule;\n resPromise = wrapWithRetry(queuedTask, url, getRetryAfter, maxRetryAfter);\n\n if (memCacheKey) {\n memCache.set(memCacheKey, resPromise);\n }\n }\n\n try {\n const res = await resPromise;\n const deepCopyNeeded = !!memCacheKey && res.statusCode !== 304;\n const resCopy = copyResponse(res, deepCopyNeeded);\n resCopy.authorization = !!options?.headers?.authorization;\n\n if (cacheProvider) {\n return await cacheProvider.wrapServerResponse(url, resCopy);\n }\n\n return resCopy;\n } catch (err) {\n const { abortOnError, abortIgnoreStatusCodes } = options;\n if (abortOnError && !abortIgnoreStatusCodes?.includes(err.statusCode)) {\n throw new ExternalHostError(err);\n }\n\n const staleResponse = await cacheProvider?.bypassServer<string | Buffer>(\n url,\n true,\n );\n if (staleResponse) {\n logger.debug(\n { err },\n `Request error: returning stale cache instead for ${url}`,\n );\n return staleResponse;\n }\n\n this.handleError(requestUrl, httpOptions, err);\n }\n }\n\n protected processOptions(_url: URL, _options: InternalHttpOptions): void {\n // noop\n }\n\n protected handleError(\n _url: string | URL,\n _httpOptions: HttpOptions,\n err: Error,\n ): never {\n throw err;\n }\n\n protected resolveUrl(\n requestUrl: string | URL,\n options: HttpOptions | undefined,\n ): URL {\n let url = requestUrl;\n\n if (url instanceof URL) {\n // already a aboslute URL\n return url;\n }\n\n const baseUrl = options?.baseUrl ?? this.baseUrl;\n if (baseUrl) {\n url = resolveBaseUrl(baseUrl, url);\n }\n\n const parsedUrl = parseUrl(url);\n if (!parsedUrl || !isHttpUrl(parsedUrl)) {\n logger.error(\n { url: requestUrl, baseUrl, resolvedUrl: url },\n 'Request Error: cannot parse url',\n );\n throw new Error('Invalid URL');\n }\n return parsedUrl;\n }\n\n protected calculateRetryDelay({ computedValue }: RetryObject): number {\n return computedValue;\n }\n\n get(\n url: string,\n options: HttpOptions = {},\n ): Promise<HttpResponse<string | Buffer>> {\n return this.request(url, options);\n }\n\n head(url: string, options: HttpOptions = {}): Promise<HttpResponse<never>> {\n // to complex to validate\n return this.request(url, {\n ...options,\n responseType: 'text',\n method: 'head',\n }) as Promise<HttpResponse<never>>;\n }\n\n getText(\n url: string | URL,\n options: HttpOptions = {},\n ): Promise<HttpResponse<string>> {\n return this.request(url, { ...options, responseType: 'text' });\n }\n\n getBuffer(\n url: string | URL,\n options: HttpOptions = {},\n ): Promise<HttpResponse<Buffer>> {\n return this.request(url, { ...options, responseType: 'buffer' });\n }\n\n protected requestJsonUnsafe<ResT>(\n method: HttpMethod,\n { url, httpOptions: requestOptions }: InternalJsonUnsafeOptions<JSONOpts>,\n ): Promise<HttpResponse<ResT>> {\n const { body: json, ...httpOptions } = { ...requestOptions };\n const opts: InternalHttpOptions = {\n ...httpOptions,\n method,\n };\n // signal that we expect a json response\n opts.headers = {\n accept: 'application/json',\n ...opts.headers,\n };\n if (json) {\n opts.json = json;\n }\n return this.request<ResT>(url, { ...opts, responseType: 'json' });\n }\n\n private async requestJson<ResT, Schema extends ZodType<ResT> = ZodType<ResT>>(\n method: HttpMethod,\n options: InternalJsonOptions<JSONOpts, ResT, Schema>,\n ): Promise<HttpResponse<ResT>> {\n const res = await this.requestJsonUnsafe<ResT>(method, options);\n\n if (options.schema) {\n res.body = await options.schema.parseAsync(res.body);\n }\n\n return res;\n }\n\n private resolveArgs<ResT = unknown>(\n arg1: string,\n arg2: JSONOpts | ZodType<ResT> | undefined,\n arg3: ZodType<ResT> | undefined,\n ): InternalJsonOptions<JSONOpts, ResT> {\n const res: InternalJsonOptions<JSONOpts, ResT> = { url: arg1 };\n\n if (arg2 instanceof ZodType) {\n res.schema = arg2;\n } else if (arg2) {\n res.httpOptions = arg2;\n }\n\n if (arg3) {\n res.schema = arg3;\n }\n\n return res;\n }\n\n async getPlain(url: string, options?: Opts): Promise<HttpResponse> {\n const opt = options ?? {};\n return await this.getText(url, {\n headers: {\n Accept: 'text/plain',\n },\n ...opt,\n });\n }\n\n /**\n * @deprecated use `getYaml` instead\n */\n async getYamlUnchecked<ResT>(\n url: string,\n options?: Opts,\n ): Promise<HttpResponse<ResT>> {\n const res = await this.getText(url, options);\n const body = parseSingleYaml<ResT>(res.body);\n return { ...res, body };\n }\n\n async getYaml<Schema extends ZodType<any, any, any>>(\n url: string,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n async getYaml<Schema extends ZodType<any, any, any>>(\n url: string,\n options: Opts,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n async getYaml<Schema extends ZodType<any, any, any>>(\n arg1: string,\n arg2?: Opts | Schema,\n arg3?: Schema,\n ): Promise<HttpResponse<Infer<Schema>>> {\n const url = arg1;\n let schema: Schema;\n let httpOptions: Opts | undefined;\n if (arg3) {\n schema = arg3;\n httpOptions = arg2 as Opts;\n } else {\n schema = arg2 as Schema;\n }\n\n const opts: InternalHttpOptions = {\n ...httpOptions,\n method: 'get',\n };\n\n const res = await this.getText(url, opts);\n const body = await schema.parseAsync(parseSingleYaml(res.body));\n return { ...res, body };\n }\n\n getYamlSafe<\n ResT extends NonNullable<unknown>,\n Schema extends ZodType<ResT> = ZodType<ResT>,\n >(url: string, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;\n getYamlSafe<\n ResT extends NonNullable<unknown>,\n Schema extends ZodType<ResT> = ZodType<ResT>,\n >(\n url: string,\n options: Opts,\n schema: Schema,\n ): AsyncResult<Infer<Schema>, SafeJsonError>;\n getYamlSafe<\n ResT extends NonNullable<unknown>,\n Schema extends ZodType<ResT> = ZodType<ResT>,\n >(\n arg1: string,\n arg2: Opts | Schema,\n arg3?: Schema,\n ): AsyncResult<ResT, SafeJsonError> {\n const url = arg1;\n let schema: Schema;\n let httpOptions: Opts | undefined;\n if (arg3) {\n schema = arg3;\n httpOptions = arg2 as Opts;\n } else {\n schema = arg2 as Schema;\n }\n\n let res: AsyncResult<HttpResponse<ResT>, SafeJsonError>;\n if (httpOptions) {\n res = Result.wrap(this.getYaml(url, httpOptions, schema));\n } else {\n res = Result.wrap(this.getYaml(url, schema));\n }\n\n return res.transform((response) => Result.ok(response.body));\n }\n\n /**\n * Request JSON and return the response without any validation.\n *\n * The usage of this method is discouraged, please use `getJson` instead.\n *\n * If you're new to Zod schema validation library:\n * - consult the [documentation of Zod library](https://github.com/colinhacks/zod?tab=readme-ov-file#basic-usage)\n * - search the Renovate codebase for 'zod' module usage\n * - take a look at the `schema-utils.ts` file for Renovate-specific schemas and utilities\n */\n getJsonUnchecked<ResT = unknown>(\n url: string,\n options?: JSONOpts,\n ): Promise<HttpResponse<ResT>> {\n return this.requestJson<ResT>('get', { url, httpOptions: options });\n }\n\n /**\n * Request JSON with a Zod schema for the response,\n * throwing an error if the response is not valid.\n *\n * @param url\n * @param schema Zod schema for the response\n */\n getJson<Schema extends ZodType<any, any, any>>(\n url: string,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n getJson<Schema extends ZodType<any, any, any>>(\n url: string,\n options: JSONOpts,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n getJson<Schema extends ZodType<any, any, any>>(\n arg1: string,\n arg2?: JSONOpts | Schema,\n arg3?: Schema,\n ): Promise<HttpResponse<Infer<Schema>>> {\n const args = this.resolveArgs<Infer<Schema>>(arg1, arg2, arg3);\n return this.requestJson<Infer<Schema>>('get', args);\n }\n\n /**\n * Request JSON with a Zod schema for the response,\n * wrapping response data in a `Result` class.\n *\n * @param url\n * @param schema Zod schema for the response\n */\n getJsonSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT>>(\n url: string,\n schema: Schema,\n ): AsyncResult<Infer<Schema>, SafeJsonError>;\n getJsonSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT>>(\n url: string,\n options: JSONOpts,\n schema: Schema,\n ): AsyncResult<Infer<Schema>, SafeJsonError>;\n getJsonSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT>>(\n arg1: string,\n arg2?: JSONOpts | Schema,\n arg3?: Schema,\n ): AsyncResult<ResT, SafeJsonError> {\n const args = this.resolveArgs<ResT>(arg1, arg2, arg3);\n return Result.wrap(this.requestJson<ResT>('get', args)).transform(\n (response) => Result.ok(response.body),\n );\n }\n\n /**\n * @deprecated use `head` instead\n */\n headJson(url: string, httpOptions?: JSONOpts): Promise<HttpResponse<never>> {\n return this.requestJson<never>('head', { url, httpOptions });\n }\n\n postJson<T>(url: string, options?: JSONOpts): Promise<HttpResponse<T>>;\n postJson<T, Schema extends ZodType<T> = ZodType<T>>(\n url: string,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n postJson<T, Schema extends ZodType<T> = ZodType<T>>(\n url: string,\n options: JSONOpts,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n postJson<T = unknown, Schema extends ZodType<T> = ZodType<T>>(\n arg1: string,\n arg2?: JSONOpts | Schema,\n arg3?: Schema,\n ): Promise<HttpResponse<T>> {\n const args = this.resolveArgs(arg1, arg2, arg3);\n return this.requestJson<T>('post', args);\n }\n\n putJson<T>(url: string, options?: JSONOpts): Promise<HttpResponse<T>>;\n putJson<T, Schema extends ZodType<T> = ZodType<T>>(\n url: string,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n putJson<T, Schema extends ZodType<T> = ZodType<T>>(\n url: string,\n options: JSONOpts,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n putJson<T = unknown, Schema extends ZodType<T> = ZodType<T>>(\n arg1: string,\n arg2?: JSONOpts | Schema,\n arg3?: ZodType,\n ): Promise<HttpResponse<T>> {\n const args = this.resolveArgs(arg1, arg2, arg3);\n return this.requestJson<T>('put', args);\n }\n\n patchJson<T>(url: string, options?: JSONOpts): Promise<HttpResponse<T>>;\n patchJson<T, Schema extends ZodType<T> = ZodType<T>>(\n url: string,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n patchJson<T, Schema extends ZodType<T> = ZodType<T>>(\n url: string,\n options: JSONOpts,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n patchJson<T = unknown, Schema extends ZodType<T> = ZodType<T>>(\n arg1: string,\n arg2?: JSONOpts | Schema,\n arg3?: Schema,\n ): Promise<HttpResponse<T>> {\n const args = this.resolveArgs(arg1, arg2, arg3);\n return this.requestJson<T>('patch', args);\n }\n\n deleteJson<T>(url: string, options?: JSONOpts): Promise<HttpResponse<T>>;\n deleteJson<T, Schema extends ZodType<T> = ZodType<T>>(\n url: string,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n deleteJson<T, Schema extends ZodType<T> = ZodType<T>>(\n url: string,\n options: JSONOpts,\n schema: Schema,\n ): Promise<HttpResponse<Infer<Schema>>>;\n deleteJson<T = unknown, Schema extends ZodType<T> = ZodType<T>>(\n arg1: string,\n arg2?: JSONOpts | Schema,\n arg3?: Schema,\n ): Promise<HttpResponse<T>> {\n const args = this.resolveArgs(arg1, arg2, arg3);\n return this.requestJson<T>('delete', args);\n }\n\n stream(url: string, options?: HttpOptions): NodeJS.ReadableStream {\n let combinedOptions: Merge<\n GotStreamOptions,\n SetRequired<InternalHttpOptions, 'method'>\n > = {\n ...this.options,\n hostType: this.hostType,\n ...options,\n method: 'get',\n };\n\n const resolvedUrl = this.resolveUrl(url, options).toString();\n\n applyDefaultHeaders(combinedOptions);\n\n if (\n is.undefined(combinedOptions.readOnly) &&\n ['head', 'get'].includes(combinedOptions.method)\n ) {\n combinedOptions.readOnly = true;\n }\n\n const hostRule = findMatchingRule(url, combinedOptions);\n combinedOptions = applyHostRule(resolvedUrl, combinedOptions, hostRule);\n if (combinedOptions.enabled === false) {\n throw new Error(HOST_DISABLED);\n }\n combinedOptions = applyAuthorization(combinedOptions);\n\n return stream(resolvedUrl, combinedOptions);\n }\n}\n"]}
|
@@ -1,75 +1,7 @@
|
|
1
|
-
import
|
2
|
-
import { RequestError } from 'got';
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
import './legacy';
|
8
|
-
export { RequestError as HttpError };
|
9
|
-
export declare class EmptyResultError extends Error {
|
10
|
-
}
|
11
|
-
export type SafeJsonError = RequestError | ZodError | EmptyResultError;
|
12
|
-
export declare class Http<Opts extends HttpOptions = HttpOptions> {
|
13
|
-
protected hostType: string;
|
14
|
-
private options?;
|
15
|
-
constructor(hostType: string, options?: HttpOptions);
|
16
|
-
protected request<T>(requestUrl: string | URL, httpOptions: InternalHttpOptions): Promise<HttpResponse<T>>;
|
17
|
-
protected calculateRetryDelay({ computedValue }: RetryObject): number;
|
18
|
-
get(url: string, options?: HttpOptions): Promise<HttpResponse>;
|
19
|
-
head(url: string, options?: HttpOptions): Promise<HttpResponse>;
|
20
|
-
getBuffer(url: string, options?: HttpOptions): Promise<HttpResponse<Buffer>>;
|
21
|
-
private requestJson;
|
22
|
-
private resolveArgs;
|
23
|
-
getPlain(url: string, options?: Opts): Promise<HttpResponse>;
|
24
|
-
/**
|
25
|
-
* @deprecated use `getYaml` instead
|
26
|
-
*/
|
27
|
-
getYamlUnchecked<ResT>(url: string, options?: Opts): Promise<HttpResponse<ResT>>;
|
28
|
-
getYaml<Schema extends ZodType<any, any, any>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
29
|
-
getYaml<Schema extends ZodType<any, any, any>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
30
|
-
getYamlSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT> = ZodType<ResT>>(url: string, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;
|
31
|
-
getYamlSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT> = ZodType<ResT>>(url: string, options: Opts, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;
|
32
|
-
/**
|
33
|
-
* Request JSON and return the response without any validation.
|
34
|
-
*
|
35
|
-
* The usage of this method is discouraged, please use `getJson` instead.
|
36
|
-
*
|
37
|
-
* If you're new to Zod schema validation library:
|
38
|
-
* - consult the [documentation of Zod library](https://github.com/colinhacks/zod?tab=readme-ov-file#basic-usage)
|
39
|
-
* - search the Renovate codebase for 'zod' module usage
|
40
|
-
* - take a look at the `schema-utils.ts` file for Renovate-specific schemas and utilities
|
41
|
-
*/
|
42
|
-
getJsonUnchecked<ResT = unknown>(url: string, options?: Opts): Promise<HttpResponse<ResT>>;
|
43
|
-
/**
|
44
|
-
* Request JSON with a Zod schema for the response,
|
45
|
-
* throwing an error if the response is not valid.
|
46
|
-
*
|
47
|
-
* @param url
|
48
|
-
* @param schema Zod schema for the response
|
49
|
-
*/
|
50
|
-
getJson<Schema extends ZodType<any, any, any>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
51
|
-
getJson<Schema extends ZodType<any, any, any>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
52
|
-
/**
|
53
|
-
* Request JSON with a Zod schema for the response,
|
54
|
-
* wrapping response data in a `Result` class.
|
55
|
-
*
|
56
|
-
* @param url
|
57
|
-
* @param schema Zod schema for the response
|
58
|
-
*/
|
59
|
-
getJsonSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT>>(url: string, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;
|
60
|
-
getJsonSafe<ResT extends NonNullable<unknown>, Schema extends ZodType<ResT>>(url: string, options: Opts, schema: Schema): AsyncResult<Infer<Schema>, SafeJsonError>;
|
61
|
-
headJson(url: string, httpOptions?: Opts): Promise<HttpResponse<never>>;
|
62
|
-
postJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
|
63
|
-
postJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
64
|
-
postJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
65
|
-
putJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
|
66
|
-
putJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
67
|
-
putJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
68
|
-
patchJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
|
69
|
-
patchJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
70
|
-
patchJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
71
|
-
deleteJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
|
72
|
-
deleteJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
73
|
-
deleteJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
|
74
|
-
stream(url: string, options?: HttpOptions): NodeJS.ReadableStream;
|
1
|
+
import { EmptyResultError } from './errors';
|
2
|
+
import { RequestError } from './got';
|
3
|
+
import { HttpBase } from './http';
|
4
|
+
export { RequestError as HttpError, EmptyResultError };
|
5
|
+
export type * from './types';
|
6
|
+
export declare class Http extends HttpBase {
|
75
7
|
}
|