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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep621/utils.ts"],"names":[],"mappings":";;;AAyBA,kCAuCC;AAED,8DA0BC;AAED,gEAmBC;AAED,kDA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C3B,MAAM,GAAG,GAAG,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxD,IAAI,YAAE,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,cAAc,CAC5B,WAAmB,EACnB,OAAe;IAEf,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,YAAS,EAAC,IAAA,cAAW,EAAC,OAAO,CAAC,CAAC,CAAC;QAChD,OAAO,wBAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAM,CAAC,KAAK,CACV,EAAE,WAAW,EAAE,GAAG,EAAE,EACpB,6CAA6C,CAC9C,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport { regEx } from '../../../util/regex';\nimport { massage as massageToml, parse as parseToml } from '../../../util/toml';\nimport { PypiDatasource } from '../../datasource/pypi';\nimport { normalizePythonDepName } from '../../datasource/pypi/common';\nimport type { PackageDependency } from '../types';\nimport type { PyProject } from './schema';\nimport { PyProjectSchema } from './schema';\nimport type { Pep508ParseResult, Pep621ManagerData } from './types';\n\nconst pep508Regex = regEx(\n /^(?<packageName>[A-Z0-9._-]+)\\s*(\\[(?<extras>[A-Z0-9\\s,._-]+)\\])?\\s*(?<currentValue>[^;]+)?(;\\s*(?<marker>.*))?/i,\n);\n\nexport const depTypes = {\n dependencies: 'project.dependencies',\n optionalDependencies: 'project.optional-dependencies',\n dependencyGroups: 'dependency-groups',\n pdmDevDependencies: 'tool.pdm.dev-dependencies',\n uvDevDependencies: 'tool.uv.dev-dependencies',\n uvSources: 'tool.uv.sources',\n buildSystemRequires: 'build-system.requires',\n};\n\nexport function parsePEP508(\n value: string | null | undefined,\n): Pep508ParseResult | null {\n if (is.nullOrUndefined(value)) {\n return null;\n }\n\n const regExpExec = pep508Regex.exec(value);\n if (\n is.nullOrUndefined(regExpExec) ||\n is.nullOrUndefined(regExpExec?.groups)\n ) {\n logger.trace(`Pep508 could not be extracted`);\n return null;\n }\n\n const result: Pep508ParseResult = {\n packageName: regExpExec.groups.packageName,\n };\n if (is.nonEmptyString(regExpExec.groups.currentValue)) {\n if (\n regExpExec.groups.currentValue.startsWith('(') &&\n regExpExec.groups.currentValue.endsWith(')')\n ) {\n result.currentValue = regExpExec.groups.currentValue.slice(1, -1).trim();\n } else {\n result.currentValue = regExpExec.groups.currentValue;\n }\n }\n\n if (is.nonEmptyString(regExpExec.groups.marker)) {\n result.marker = regExpExec.groups.marker;\n }\n if (is.nonEmptyString(regExpExec.groups.extras)) {\n // trim to remove allowed whitespace between brackets\n result.extras = regExpExec.groups.extras.split(',').map((e) => e.trim());\n }\n\n return result;\n}\n\nexport function pep508ToPackageDependency(\n depType: string,\n value: string,\n): PackageDependency | null {\n const parsed = parsePEP508(value);\n if (is.nullOrUndefined(parsed)) {\n return null;\n }\n\n const dep: PackageDependency = {\n packageName: normalizePythonDepName(parsed.packageName),\n depName: parsed.packageName,\n datasource: PypiDatasource.id,\n depType,\n };\n\n if (is.nullOrUndefined(parsed.currentValue)) {\n dep.skipReason = 'unspecified-version';\n } else {\n dep.currentValue = parsed.currentValue;\n\n if (parsed.currentValue.startsWith('==')) {\n dep.currentVersion = parsed.currentValue.replace(regEx(/^==\\s*/), '');\n }\n }\n return dep;\n}\n\nexport function parseDependencyGroupRecord(\n depType: string,\n records: Record<string, string[]> | null | undefined,\n): PackageDependency[] {\n if (is.nullOrUndefined(records)) {\n return [];\n }\n\n const deps: PackageDependency<Pep621ManagerData>[] = [];\n for (const [depGroup, pep508Strings] of Object.entries(records)) {\n for (const dep of parseDependencyList(depType, pep508Strings)) {\n deps.push({\n ...dep,\n depName: dep.packageName!,\n managerData: { depGroup },\n });\n }\n }\n return deps;\n}\n\nexport function parseDependencyList(\n depType: string,\n list: string[] | null | undefined,\n): PackageDependency[] {\n if (is.nullOrUndefined(list)) {\n return [];\n }\n\n const deps: PackageDependency[] = [];\n for (const element of list) {\n const dep = pep508ToPackageDependency(depType, element);\n if (is.truthy(dep)) {\n deps.push(dep);\n }\n }\n return deps;\n}\n\nexport function parsePyProject(\n packageFile: string,\n content: string,\n): PyProject | null {\n try {\n const jsonMap = parseToml(massageToml(content));\n return PyProjectSchema.parse(jsonMap);\n } catch (err) {\n logger.debug(\n { packageFile, err },\n `Failed to parse and validate pyproject file`,\n );\n return null;\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip-compile/common.ts"],"names":[],"mappings":";;;AAiBA,gEAkBC;AAED,oEAYC;AAED,wDAUC;AAED,4DAeC;AAED,wCA4BC;AAsDD,oDA+GC;AAOD,oDAqBC;AAoDD,kFA0BC;AAED,oCAeC;;AA5YD,kEAAkC;AAClC,iCAA8B;AAC9B,0DAA0B;AAC1B,4CAAyC;AACzC,+CAA2D;AAM3D,yCAAkD;AAClD,gDAAwD;AACxD,4EAAsD;AACtD,+CAA4C;AAI5C,SAAgB,0BAA0B,CACxC,MAA6B,EAC7B,sBAA0C;IAE1C,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAE/B,IAAI,MAAM,EAAE,CAAC;QACX,eAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,sBAAsB,EAAE,CAAC;QAC3B,eAAM,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QACrE,OAAO,KAAK,sBAAsB,EAAE,CAAC;IACvC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB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AQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1D,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { split } from 'shlex';\nimport upath from 'upath';\nimport { logger } from '../../../logger';\nimport { isNotNullOrUndefined } from '../../../util/array';\nimport type {\n ExecOptions,\n ExtraEnv,\n ToolConstraint,\n} from '../../../util/exec/types';\nimport { ensureCacheDir } from '../../../util/fs';\nimport { ensureLocalPath } from '../../../util/fs/util';\nimport * as hostRules from '../../../util/host-rules';\nimport { regEx } from '../../../util/regex';\nimport type { PackageFileContent, UpdateArtifactsConfig } from '../types';\nimport type { CommandType, PipCompileArgs, SupportedManagers } from './types';\n\nexport function getPythonVersionConstraint(\n config: UpdateArtifactsConfig,\n extractedPythonVersion: string | undefined,\n): string | undefined | null {\n const { constraints = {} } = config;\n const { python } = constraints;\n\n if (python) {\n logger.debug('Using python constraint from config');\n return python;\n }\n\n if (extractedPythonVersion) {\n logger.debug('Using python constraint extracted from the lock file');\n return `==${extractedPythonVersion}`;\n }\n\n return undefined;\n}\n\nexport function getPipToolsVersionConstraint(\n config: UpdateArtifactsConfig,\n): string {\n const { constraints = {} } = config;\n const { pipTools } = constraints;\n\n if (is.string(pipTools)) {\n logger.debug('Using pipTools constraint from config');\n return pipTools;\n }\n\n return '';\n}\n\nexport function getUvVersionConstraint(config: UpdateArtifactsConfig): string {\n const { constraints = {} } = config;\n const { uv } = constraints;\n\n if (is.string(uv)) {\n logger.debug('Using uv constraint from config');\n return uv;\n }\n\n return '';\n}\n\nexport function getToolVersionConstraint(\n config: UpdateArtifactsConfig,\n commandType: CommandType,\n): ToolConstraint {\n if (commandType === 'uv') {\n return {\n toolName: 'uv',\n constraint: getUvVersionConstraint(config),\n };\n }\n\n return {\n toolName: 'pip-tools',\n constraint: getPipToolsVersionConstraint(config),\n };\n}\n\nexport async function getExecOptions(\n config: UpdateArtifactsConfig,\n commandType: CommandType,\n cwd: string,\n extraEnv: ExtraEnv<string>,\n extractedPythonVersion: string | undefined,\n): Promise<ExecOptions> {\n const constraint = getPythonVersionConstraint(config, extractedPythonVersion);\n const execOptions: ExecOptions = {\n cwd: ensureLocalPath(cwd),\n docker: {},\n userConfiguredEnv: config.env,\n toolConstraints: [\n {\n toolName: 'python',\n constraint,\n },\n getToolVersionConstraint(config, commandType),\n ],\n extraEnv: {\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n PIP_NO_INPUT: 'true', // ensure pip doesn't block forever waiting for credentials on stdin\n PIP_KEYRING_PROVIDER: 'import',\n PYTHON_KEYRING_BACKEND: 'keyrings.envvars.keyring.EnvvarsKeyring',\n ...extraEnv,\n },\n };\n return execOptions;\n}\n\nexport const constraintLineRegex = regEx(\n /^(#.*?\\r?\\n)+# {4}(?<command>\\S*)(?<arguments> .*?)?\\r?\\n/,\n);\n\nexport const disallowedPipOptions = [\n '--no-header', // header is required by this manager\n];\nconst commonOptionsWithArguments = [\n '--output-file',\n '--extra',\n '--extra-index-url',\n];\nconst pipOptionsWithArguments = [\n '--resolver',\n '--constraint',\n ...commonOptionsWithArguments,\n];\nconst uvOptionsWithArguments = [\n '--constraints',\n '--python-version',\n ...commonOptionsWithArguments,\n];\nexport const optionsWithArguments = [\n ...pipOptionsWithArguments,\n ...uvOptionsWithArguments,\n];\nconst allowedCommonOptions = [\n '-v',\n '--generate-hashes',\n '--emit-index-url',\n '--index-url',\n];\nexport const allowedOptions: Record<CommandType, string[]> = {\n 'pip-compile': [\n '--all-extras',\n '--allow-unsafe',\n '--generate-hashes',\n '--no-emit-index-url',\n '--strip-extras',\n ...allowedCommonOptions,\n ...pipOptionsWithArguments,\n ],\n uv: [\n '--no-strip-extras',\n '--universal',\n ...allowedCommonOptions,\n ...uvOptionsWithArguments,\n ],\n custom: [],\n};\n\n// TODO(not7cd): test on all correct headers, even with CUSTOM_COMPILE_COMMAND\nexport function extractHeaderCommand(\n content: string,\n fileName: string,\n): PipCompileArgs {\n const compileCommand = constraintLineRegex.exec(content);\n if (compileCommand?.groups === undefined) {\n throw new Error(\n `Failed to extract command from header in ${fileName} ${content}`,\n );\n }\n logger.trace(\n `pip-compile: found header in ${fileName}: \\n${compileCommand[0]}`,\n );\n const command = compileCommand.groups.command;\n const argv = [command];\n let commandType: CommandType;\n if (command === 'pip-compile') {\n commandType = 'pip-compile';\n } else if (command === 'uv') {\n commandType = 'uv';\n } else {\n commandType = 'custom';\n }\n if (compileCommand.groups.arguments) {\n argv.push(...split(compileCommand.groups.arguments));\n }\n logger.debug(\n { fileName, argv, commandType },\n `pip-compile: extracted command from header`,\n );\n\n const result: PipCompileArgs = {\n argv,\n command,\n commandType,\n outputFile: '',\n sourceFiles: [],\n };\n for (const arg of argv.slice(1)) {\n if (commandType === 'uv' && ['pip', 'compile'].includes(arg)) {\n continue;\n }\n // TODO(not7cd): check for \"--option -- argument\" case\n if (!arg.startsWith('-')) {\n result.sourceFiles.push(arg);\n continue;\n }\n throwForDisallowedOption(arg);\n throwForNoEqualSignInOptionWithArgument(arg);\n throwForUnknownOption(commandType, arg);\n\n if (arg.includes('=')) {\n const [option, value] = arg.split('=');\n if (option === '--extra') {\n result.extra = result.extra ?? [];\n result.extra.push(value);\n } else if (option === '--extra-index-url') {\n result.extraIndexUrl = result.extraIndexUrl ?? [];\n result.extraIndexUrl.push(value);\n // TODO: add to secrets? next PR\n } else if (['--constraint', '--constraints'].includes(option)) {\n result.constraintsFiles = result.constraintsFiles ?? [];\n result.constraintsFiles.push(value);\n } else if (option === '--output-file') {\n if (result.outputFile) {\n throw new Error('Cannot use multiple --output-file options');\n }\n result.outputFile = upath.normalize(value);\n } else if (option === '--python-version') {\n result.pythonVersion = value;\n } else if (option === '--index-url') {\n if (result.indexUrl) {\n throw new Error('Cannot use multiple --index-url options');\n }\n result.indexUrl = value;\n // TODO: add to secrets? next PR\n } else {\n logger.debug({ option }, `pip-compile: option not handled`);\n }\n continue;\n }\n if (arg === '--no-emit-index-url') {\n result.noEmitIndexUrl = true;\n continue;\n }\n if (arg === '--emit-index-url') {\n result.emitIndexUrl = true;\n continue;\n }\n if (arg === '--all-extras') {\n result.allExtras = true;\n continue;\n }\n\n logger.debug({ option: arg }, `pip-compile: option not handled`);\n }\n logger.trace(\n {\n ...result,\n },\n 'Parsed pip-compile command from header',\n );\n if (result.noEmitIndexUrl && result.emitIndexUrl) {\n throw new Error('Cannot use both --no-emit-index-url and --emit-index-url');\n }\n if (result.sourceFiles.length === 0) {\n throw new Error(\n 'No source files detected in command, pass at least one package file explicitly',\n );\n }\n return result;\n}\n\nconst pythonVersionRegex = regEx(\n /^(#.*?\\r?\\n)*# This file is autogenerated by pip-compile with Python (?<pythonVersion>\\d+(\\.\\d+)*)\\s/,\n 'i',\n);\n\nexport function extractPythonVersion(\n content: string,\n fileName: string,\n): string | undefined {\n const match = pythonVersionRegex.exec(content);\n if (match?.groups === undefined) {\n logger.warn(\n { fileName, content },\n 'pip-compile: failed to extract Python version from header in file',\n );\n return undefined;\n }\n logger.trace(\n `pip-compile: found Python version header in ${fileName}: \\n${match[0]}`,\n );\n const { pythonVersion } = match.groups;\n logger.debug(\n { fileName, pythonVersion },\n `pip-compile: extracted Python version from header`,\n );\n return pythonVersion;\n}\n\nfunction throwForDisallowedOption(arg: string): void {\n if (disallowedPipOptions.includes(arg)) {\n throw new Error(`Option ${arg} not allowed for this manager`);\n }\n}\nfunction throwForNoEqualSignInOptionWithArgument(arg: string): void {\n if (optionsWithArguments.includes(arg)) {\n throw new Error(\n `Option ${arg} must have equal sign '=' separating it's argument`,\n );\n }\n}\nfunction throwForUnknownOption(commandType: CommandType, arg: string): void {\n if (arg.includes('=')) {\n const [option] = arg.split('=');\n if (allowedOptions[commandType].includes(option)) {\n return;\n }\n }\n if (allowedOptions[commandType].includes(arg)) {\n return;\n }\n throw new Error(`Option ${arg} not supported (yet)`);\n}\n\nfunction getRegistryCredEnvVars(\n url: URL,\n index: number,\n): Record<string, string> {\n const hostRule = hostRules.find({ url: url.href });\n logger.debug(hostRule, `Found host rule for url ${url.href}`);\n const ret: Record<string, string> = {};\n if (!!hostRule.username || !!hostRule.password) {\n ret[`KEYRING_SERVICE_NAME_${index}`] = url.hostname;\n ret[`KEYRING_SERVICE_USERNAME_${index}`] = hostRule.username ?? '';\n ret[`KEYRING_SERVICE_PASSWORD_${index}`] = hostRule.password ?? '';\n }\n return ret;\n}\n\nfunction cleanUrl(url: string): URL | null {\n try {\n // Strip everything but protocol, host, and port\n const urlObj = new URL(url);\n return new URL(urlObj.origin);\n } catch {\n return null;\n }\n}\n\nexport function getRegistryCredVarsFromPackageFiles(\n packageFiles: PackageFileContent[],\n): ExtraEnv<string> {\n const urls: string[] = [];\n for (const packageFile of packageFiles) {\n urls.push(\n ...(packageFile.registryUrls ?? []),\n ...(packageFile.additionalRegistryUrls ?? []),\n );\n }\n logger.debug(urls, 'Extracted registry URLs from package files');\n\n const uniqueHosts = new Set<URL>(\n urls.map(cleanUrl).filter(isNotNullOrUndefined),\n );\n\n let allCreds: ExtraEnv<string> = {};\n for (const [index, host] of [...uniqueHosts].entries()) {\n const hostCreds = getRegistryCredEnvVars(host, index);\n allCreds = {\n ...allCreds,\n ...hostCreds,\n };\n }\n\n return allCreds;\n}\n\nexport function matchManager(filename: string): SupportedManagers | 'unknown' {\n if (filename.endsWith('setup.py')) {\n return 'pip_setup';\n }\n if (filename.endsWith('setup.cfg')) {\n return 'setup-cfg';\n }\n if (filename.endsWith('pyproject.toml')) {\n return 'pep621';\n }\n // naive, could be improved, maybe use pip_requirements.fileMatch\n if (filename.endsWith('.in') || filename.endsWith('.txt')) {\n return 'pip_requirements';\n }\n return 'unknown';\n}\n"]}
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip-compile/common.ts"],"names":[],"mappings":";;;AAiBA,gEAkBC;AAED,oEAYC;AAED,wDAUC;AAED,4D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CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACvD,MAAM,SAAS,GAAG,sBAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACtD,QAAQ,GAAG;YACT,GAAG,QAAQ;YACX,GAAG,SAAS;SACb,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAgB,YAAY,CAAC,QAAgB;IAC3C,IAAI,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACnC,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACxC,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,iEAAiE;IACjE,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1D,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { split } from 'shlex';\nimport upath from 'upath';\nimport { logger } from '../../../logger';\nimport { isNotNullOrUndefined } from '../../../util/array';\nimport type {\n ExecOptions,\n ExtraEnv,\n ToolConstraint,\n} from '../../../util/exec/types';\nimport { ensureCacheDir } from '../../../util/fs';\nimport { ensureLocalPath } from '../../../util/fs/util';\nimport * as hostRules from '../../../util/host-rules';\nimport { regEx } from '../../../util/regex';\nimport type { PackageFileContent, UpdateArtifactsConfig } from '../types';\nimport type { CommandType, PipCompileArgs, SupportedManagers } from './types';\n\nexport function getPythonVersionConstraint(\n config: UpdateArtifactsConfig,\n extractedPythonVersion: string | undefined,\n): string | undefined | null {\n const { constraints = {} } = config;\n const { python } = constraints;\n\n if (python) {\n logger.debug('Using python constraint from config');\n return python;\n }\n\n if (extractedPythonVersion) {\n logger.debug('Using python constraint extracted from the lock file');\n return `==${extractedPythonVersion}`;\n }\n\n return undefined;\n}\n\nexport function getPipToolsVersionConstraint(\n config: UpdateArtifactsConfig,\n): string {\n const { constraints = {} } = config;\n const { pipTools } = constraints;\n\n if (is.string(pipTools)) {\n logger.debug('Using pipTools constraint from config');\n return pipTools;\n }\n\n return '';\n}\n\nexport function getUvVersionConstraint(config: UpdateArtifactsConfig): string {\n const { constraints = {} } = config;\n const { uv } = constraints;\n\n if (is.string(uv)) {\n logger.debug('Using uv constraint from config');\n return uv;\n }\n\n return '';\n}\n\nexport function getToolVersionConstraint(\n config: UpdateArtifactsConfig,\n commandType: CommandType,\n): ToolConstraint {\n if (commandType === 'uv') {\n return {\n toolName: 'uv',\n constraint: getUvVersionConstraint(config),\n };\n }\n\n return {\n toolName: 'pip-tools',\n constraint: getPipToolsVersionConstraint(config),\n };\n}\n\nexport async function getExecOptions(\n config: UpdateArtifactsConfig,\n commandType: CommandType,\n cwd: string,\n extraEnv: ExtraEnv<string>,\n extractedPythonVersion: string | undefined,\n): Promise<ExecOptions> {\n const constraint = getPythonVersionConstraint(config, extractedPythonVersion);\n const execOptions: ExecOptions = {\n cwd: ensureLocalPath(cwd),\n docker: {},\n toolConstraints: [\n {\n toolName: 'python',\n constraint,\n },\n getToolVersionConstraint(config, commandType),\n ],\n extraEnv: {\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n PIP_NO_INPUT: 'true', // ensure pip doesn't block forever waiting for credentials on stdin\n PIP_KEYRING_PROVIDER: 'import',\n PYTHON_KEYRING_BACKEND: 'keyrings.envvars.keyring.EnvvarsKeyring',\n ...extraEnv,\n },\n };\n return execOptions;\n}\n\nexport const constraintLineRegex = regEx(\n /^(#.*?\\r?\\n)+# {4}(?<command>\\S*)(?<arguments> .*?)?\\r?\\n/,\n);\n\nexport const disallowedPipOptions = [\n '--no-header', // header is required by this manager\n];\nconst commonOptionsWithArguments = [\n '--output-file',\n '--extra',\n '--extra-index-url',\n];\nconst pipOptionsWithArguments = [\n '--resolver',\n '--constraint',\n ...commonOptionsWithArguments,\n];\nconst uvOptionsWithArguments = [\n '--constraints',\n '--python-version',\n ...commonOptionsWithArguments,\n];\nexport const optionsWithArguments = [\n ...pipOptionsWithArguments,\n ...uvOptionsWithArguments,\n];\nconst allowedCommonOptions = [\n '-v',\n '--generate-hashes',\n '--emit-index-url',\n '--index-url',\n];\nexport const allowedOptions: Record<CommandType, string[]> = {\n 'pip-compile': [\n '--all-extras',\n '--allow-unsafe',\n '--generate-hashes',\n '--no-emit-index-url',\n '--strip-extras',\n ...allowedCommonOptions,\n ...pipOptionsWithArguments,\n ],\n uv: [\n '--no-strip-extras',\n '--universal',\n ...allowedCommonOptions,\n ...uvOptionsWithArguments,\n ],\n custom: [],\n};\n\n// TODO(not7cd): test on all correct headers, even with CUSTOM_COMPILE_COMMAND\nexport function extractHeaderCommand(\n content: string,\n fileName: string,\n): PipCompileArgs {\n const compileCommand = constraintLineRegex.exec(content);\n if (compileCommand?.groups === undefined) {\n throw new Error(\n `Failed to extract command from header in ${fileName} ${content}`,\n );\n }\n logger.trace(\n `pip-compile: found header in ${fileName}: \\n${compileCommand[0]}`,\n );\n const command = compileCommand.groups.command;\n const argv = [command];\n let commandType: CommandType;\n if (command === 'pip-compile') {\n commandType = 'pip-compile';\n } else if (command === 'uv') {\n commandType = 'uv';\n } else {\n commandType = 'custom';\n }\n if (compileCommand.groups.arguments) {\n argv.push(...split(compileCommand.groups.arguments));\n }\n logger.debug(\n { fileName, argv, commandType },\n `pip-compile: extracted command from header`,\n );\n\n const result: PipCompileArgs = {\n argv,\n command,\n commandType,\n outputFile: '',\n sourceFiles: [],\n };\n for (const arg of argv.slice(1)) {\n if (commandType === 'uv' && ['pip', 'compile'].includes(arg)) {\n continue;\n }\n // TODO(not7cd): check for \"--option -- argument\" case\n if (!arg.startsWith('-')) {\n result.sourceFiles.push(arg);\n continue;\n }\n throwForDisallowedOption(arg);\n throwForNoEqualSignInOptionWithArgument(arg);\n throwForUnknownOption(commandType, arg);\n\n if (arg.includes('=')) {\n const [option, value] = arg.split('=');\n if (option === '--extra') {\n result.extra = result.extra ?? [];\n result.extra.push(value);\n } else if (option === '--extra-index-url') {\n result.extraIndexUrl = result.extraIndexUrl ?? [];\n result.extraIndexUrl.push(value);\n // TODO: add to secrets? next PR\n } else if (['--constraint', '--constraints'].includes(option)) {\n result.constraintsFiles = result.constraintsFiles ?? [];\n result.constraintsFiles.push(value);\n } else if (option === '--output-file') {\n if (result.outputFile) {\n throw new Error('Cannot use multiple --output-file options');\n }\n result.outputFile = upath.normalize(value);\n } else if (option === '--python-version') {\n result.pythonVersion = value;\n } else if (option === '--index-url') {\n if (result.indexUrl) {\n throw new Error('Cannot use multiple --index-url options');\n }\n result.indexUrl = value;\n // TODO: add to secrets? next PR\n } else {\n logger.debug({ option }, `pip-compile: option not handled`);\n }\n continue;\n }\n if (arg === '--no-emit-index-url') {\n result.noEmitIndexUrl = true;\n continue;\n }\n if (arg === '--emit-index-url') {\n result.emitIndexUrl = true;\n continue;\n }\n if (arg === '--all-extras') {\n result.allExtras = true;\n continue;\n }\n\n logger.debug({ option: arg }, `pip-compile: option not handled`);\n }\n logger.trace(\n {\n ...result,\n },\n 'Parsed pip-compile command from header',\n );\n if (result.noEmitIndexUrl && result.emitIndexUrl) {\n throw new Error('Cannot use both --no-emit-index-url and --emit-index-url');\n }\n if (result.sourceFiles.length === 0) {\n throw new Error(\n 'No source files detected in command, pass at least one package file explicitly',\n );\n }\n return result;\n}\n\nconst pythonVersionRegex = regEx(\n /^(#.*?\\r?\\n)*# This file is autogenerated by pip-compile with Python (?<pythonVersion>\\d+(\\.\\d+)*)\\s/,\n 'i',\n);\n\nexport function extractPythonVersion(\n content: string,\n fileName: string,\n): string | undefined {\n const match = pythonVersionRegex.exec(content);\n if (match?.groups === undefined) {\n logger.warn(\n { fileName, content },\n 'pip-compile: failed to extract Python version from header in file',\n );\n return undefined;\n }\n logger.trace(\n `pip-compile: found Python version header in ${fileName}: \\n${match[0]}`,\n );\n const { pythonVersion } = match.groups;\n logger.debug(\n { fileName, pythonVersion },\n `pip-compile: extracted Python version from header`,\n );\n return pythonVersion;\n}\n\nfunction throwForDisallowedOption(arg: string): void {\n if (disallowedPipOptions.includes(arg)) {\n throw new Error(`Option ${arg} not allowed for this manager`);\n }\n}\nfunction throwForNoEqualSignInOptionWithArgument(arg: string): void {\n if (optionsWithArguments.includes(arg)) {\n throw new Error(\n `Option ${arg} must have equal sign '=' separating it's argument`,\n );\n }\n}\nfunction throwForUnknownOption(commandType: CommandType, arg: string): void {\n if (arg.includes('=')) {\n const [option] = arg.split('=');\n if (allowedOptions[commandType].includes(option)) {\n return;\n }\n }\n if (allowedOptions[commandType].includes(arg)) {\n return;\n }\n throw new Error(`Option ${arg} not supported (yet)`);\n}\n\nfunction getRegistryCredEnvVars(\n url: URL,\n index: number,\n): Record<string, string> {\n const hostRule = hostRules.find({ url: url.href });\n logger.debug(hostRule, `Found host rule for url ${url.href}`);\n const ret: Record<string, string> = {};\n if (!!hostRule.username || !!hostRule.password) {\n ret[`KEYRING_SERVICE_NAME_${index}`] = url.hostname;\n ret[`KEYRING_SERVICE_USERNAME_${index}`] = hostRule.username ?? '';\n ret[`KEYRING_SERVICE_PASSWORD_${index}`] = hostRule.password ?? '';\n }\n return ret;\n}\n\nfunction cleanUrl(url: string): URL | null {\n try {\n // Strip everything but protocol, host, and port\n const urlObj = new URL(url);\n return new URL(urlObj.origin);\n } catch {\n return null;\n }\n}\n\nexport function getRegistryCredVarsFromPackageFiles(\n packageFiles: PackageFileContent[],\n): ExtraEnv<string> {\n const urls: string[] = [];\n for (const packageFile of packageFiles) {\n urls.push(\n ...(packageFile.registryUrls ?? []),\n ...(packageFile.additionalRegistryUrls ?? []),\n );\n }\n logger.debug(urls, 'Extracted registry URLs from package files');\n\n const uniqueHosts = new Set<URL>(\n urls.map(cleanUrl).filter(isNotNullOrUndefined),\n );\n\n let allCreds: ExtraEnv<string> = {};\n for (const [index, host] of [...uniqueHosts].entries()) {\n const hostCreds = getRegistryCredEnvVars(host, index);\n allCreds = {\n ...allCreds,\n ...hostCreds,\n };\n }\n\n return allCreds;\n}\n\nexport function matchManager(filename: string): SupportedManagers | 'unknown' {\n if (filename.endsWith('setup.py')) {\n return 'pip_setup';\n }\n if (filename.endsWith('setup.cfg')) {\n return 'setup-cfg';\n }\n if (filename.endsWith('pyproject.toml')) {\n return 'pep621';\n }\n // naive, could be improved, maybe use pip_requirements.fileMatch\n if (filename.endsWith('.in') || filename.endsWith('.txt')) {\n return 'pip_requirements';\n }\n return 'unknown';\n}\n"]}
|
@@ -58,7 +58,6 @@ async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileCon
|
|
58
58
|
const execOptions = {
|
59
59
|
cwdFile: '.',
|
60
60
|
docker: {},
|
61
|
-
userConfiguredEnv: config.env,
|
62
61
|
toolConstraints: [
|
63
62
|
{ toolName: 'python', constraint: config.constraints?.python },
|
64
63
|
{ toolName: 'hashin', constraint: config.constraints?.hashin },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip_requirements/artifacts.ts"],"names":[],"mappings":";;AAoCA,
|
1
|
+
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip_requirements/artifacts.ts"],"names":[],"mappings":";;AAoCA,0CA0EC;;AA9GD,kEAAkC;AAClC,iCAA8B;AAC9B,sEAAoE;AACpE,4CAAyC;AACzC,6CAA0C;AAE1C,yCAAiE;AACjE,+CAA0D;AAE1D,uCAA0C;AAE1C;;;;;;;;;;GAUG;AACH,SAAS,wBAAwB,CAAC,OAAe;IAC/C,MAAM,cAAc,GAAG,IAAA,oBAAY,EAAC,OAAO,CAAC,CAAC;IAE7C,8FAA8F;IAC9F,oEAAoE;I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BACvD;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions } from '../../../util/exec/types';\nimport { ensureCacheDir, readLocalFile } from '../../../util/fs';\nimport { escapeRegExp, regEx } from '../../../util/regex';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { extrasPattern } from './extract';\n\n/**\n * Create a RegExp that matches the first dependency pattern for\n * the named dependency that is followed by package hashes.\n *\n * The regular expression defines a single named group `depConstraint`\n * that holds the dependency constraint without the hash specifiers.\n * The substring matched by this named group will start with the dependency\n * name and end with a non-whitespace character.\n *\n * @param depName the name of the dependency\n */\nfunction dependencyAndHashPattern(depName: string): RegExp {\n const escapedDepName = escapeRegExp(depName);\n\n // extrasPattern covers any whitespace between the dep name and the optional extras specifier,\n // but it does not cover any whitespace in front of the equal signs.\n //\n // Use a non-greedy wildcard for the range pattern; otherwise, we would\n // include all but the last hash specifier into depConstraint.\n return regEx(\n `^\\\\s*(?<depConstraint>${escapedDepName}${extrasPattern}\\\\s*==.*?\\\\S)\\\\s+--hash=`,\n 'm',\n );\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`pip_requirements.updateArtifacts(${packageFileName})`);\n if (!is.nonEmptyArray(updatedDeps)) {\n logger.debug('No updated pip_requirements deps - returning null');\n return null;\n }\n try {\n const cmd: string[] = [];\n const rewrittenContent = newPackageFileContent.replace(regEx(/\\\\\\n/g), '');\n for (const dep of updatedDeps) {\n if (!dep.depName) {\n continue;\n }\n const depAndHashMatch = dependencyAndHashPattern(dep.depName).exec(\n rewrittenContent,\n );\n if (depAndHashMatch) {\n // If there's a match, then the regular expression guarantees\n // that the named subgroup deepConstraint did match as well.\n const depConstraint = depAndHashMatch.groups!.depConstraint;\n cmd.push(`hashin ${quote(depConstraint)} -r ${quote(packageFileName)}`);\n }\n }\n if (!cmd.length) {\n logger.debug('No hashin commands to run - returning');\n return null;\n }\n const execOptions: ExecOptions = {\n cwdFile: '.',\n docker: {},\n toolConstraints: [\n { toolName: 'python', constraint: config.constraints?.python },\n { toolName: 'hashin', constraint: config.constraints?.hashin },\n ],\n extraEnv: {\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n },\n };\n await exec(cmd, execOptions);\n const newContent = await readLocalFile(packageFileName, 'utf8');\n if (newContent === newPackageFileContent) {\n logger.debug(`${packageFileName} is unchanged`);\n return null;\n }\n logger.debug(`Returning updated ${packageFileName}`);\n return [\n {\n file: {\n type: 'addition',\n path: packageFileName,\n contents: newContent,\n },\n },\n ];\n } catch (err) {\n // istanbul ignore if\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, `Failed to update ${packageFileName} file`);\n return [\n {\n artifactError: {\n lockFile: packageFileName,\n stderr: `${String(err.stdout)}\\n${String(err.stderr)}`,\n },\n },\n ];\n }\n}\n"]}
|
@@ -51,15 +51,11 @@ function extractPackageFileFlags(content) {
|
|
51
51
|
res.additionalRegistryUrls = cleanRegistryUrls(additionalRegistryUrls);
|
52
52
|
}
|
53
53
|
if (additionalRequirementsFiles.length) {
|
54
|
-
|
55
|
-
res.managerData = {};
|
56
|
-
}
|
54
|
+
res.managerData ??= {};
|
57
55
|
res.managerData.requirementsFiles = additionalRequirementsFiles;
|
58
56
|
}
|
59
57
|
if (additionalConstraintsFiles.length) {
|
60
|
-
|
61
|
-
res.managerData = {};
|
62
|
-
}
|
58
|
+
res.managerData ??= {};
|
63
59
|
res.managerData.constraintsFiles = additionalConstraintsFiles;
|
64
60
|
}
|
65
61
|
return res;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip_requirements/common.ts"],"names":[],"mappings":";;A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GAAG,CAAC,WAAW,KAAK,EAAE,CAAC;QACvB,GAAG,CAAC,WAAW,CAAC,iBAAiB,GAAG,2BAA2B,CAAC;IAClE,CAAC;IACD,IAAI,0BAA0B,CAAC,MAAM,EAAE,CAAC;QACtC,GAAG,CAAC,WAAW,KAAK,EAAE,CAAC;QACvB,GAAG,CAAC,WAAW,CAAC,gBAAgB,GAAG,0BAA0B,CAAC;IAChE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { GlobalConfig } from '../../../config/global';\nimport { newlineRegex, regEx } from '../../../util/regex';\nimport type { PackageFileContent } from '../types';\nimport type { PipRequirementsManagerData } from './types';\n\nfunction cleanRegistryUrls(registryUrls: string[]): string[] {\n return registryUrls.map((url) => {\n // handle the optional quotes in eg. `--extra-index-url \"https://foo.bar\"`\n const cleaned = url.replace(regEx(/^\"/), '').replace(regEx(/\"$/), '');\n if (!GlobalConfig.get('exposeAllEnv')) {\n return cleaned;\n }\n // interpolate any environment variables\n return cleaned.replace(\n regEx(/(\\$[A-Za-z\\d_]+)|(\\${[A-Za-z\\d_]+})/g),\n (match) => {\n const envvar = match\n .substring(1)\n .replace(regEx(/^{/), '')\n .replace(regEx(/}$/), '');\n const sub = process.env[envvar];\n return sub ?? match;\n },\n );\n });\n}\n\nexport function extractPackageFileFlags(\n content: string,\n): PackageFileContent<PipRequirementsManagerData> {\n let registryUrls: string[] = [];\n const additionalRegistryUrls: string[] = [];\n const additionalRequirementsFiles: string[] = [];\n const additionalConstraintsFiles: string[] = [];\n content.split(newlineRegex).forEach((line) => {\n if (line.startsWith('-i ') || line.startsWith('--index-url ')) {\n registryUrls = [line.split(' ')[1]];\n } else if (line.startsWith('--extra-index-url ')) {\n const extraUrl = line\n .substring('--extra-index-url '.length)\n .split(' ')[0];\n additionalRegistryUrls.push(extraUrl);\n } else if (line.startsWith('-r ')) {\n additionalRequirementsFiles.push(line.split(' ')[1]);\n } else if (line.startsWith('-c ')) {\n additionalConstraintsFiles.push(line.split(' ')[1]);\n }\n });\n\n const res: PackageFileContent<PipRequirementsManagerData> = { deps: [] };\n if (registryUrls.length > 0) {\n res.registryUrls = cleanRegistryUrls(registryUrls);\n }\n if (additionalRegistryUrls.length) {\n res.additionalRegistryUrls = cleanRegistryUrls(additionalRegistryUrls);\n }\n if (additionalRequirementsFiles.length) {\n res.managerData ??= {};\n res.managerData.requirementsFiles = additionalRequirementsFiles;\n }\n if (additionalConstraintsFiles.length) {\n res.managerData ??= {};\n res.managerData.constraintsFiles = additionalConstraintsFiles;\n }\n return res;\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pipenv/artifacts.ts"],"names":[],"mappings":";;AAwBA,kDAUC;AAoBD,wEAKC;AAED,kDAkBC;AA6CD,0CA+EC;;AA3MD,4DAAmE;AACnE,kEAAkC;AAClC,sEAAoE;AACpE,4CAAyC;AAEzC,6CAA0C;AAE1C,yCAO0B;AAC1B,gDAAwD;AACxD,2CAAkD;AAClD,yDAAgD;AAChD,+CAA4C;AAC5C,2CAA6C;AAC7C,gDAAuD;AAEvD,uCAA+C;AAE/C,SAAgB,mBAAmB,CAAC,GAAW;IAC7C,MAAM,SAAS,GAAG,IAAA,cAAQ,EAAC,GAAG,CAAC,CAAC;IAChC,IAAI,SAAS,EAAE,CAAC;QACd,SAAS,CAAC,QAAQ,GAAG,EAAE,CAAC;QACxB,SAAS,CAAC,QAAQ,GAAG,EAAE,CAAC;QACxB,MAAM,qBAAqB,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;QAEnD,OAAO,IAAA,iBAAI,EAAC,EAAE,QAAQ,EAAE,qBAAc,CAAC,EAAE,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,oCAAoC,CACjD,cAAsB,EACtB,WAAmB;IAEnB,MAAM,OAAO,GAAG,M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C7C,OAAO,IAAI,CAAC;QACd,CAAC;QACD,eAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC/C,OAAO;YACL;gBACE,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,MAAM,IAAA,kBAAa,EAAC,YAAY,EAAE,MAAM,CAAC;iBACpD;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,qBAAqB;QACrB,IAAI,GAAG,CAAC,OAAO,KAAK,gCAAe,EAAE,CAAC;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,+BAA+B,CAAC,CAAC;QACvD,OAAO;YACL;gBACE,aAAa,EAAE;oBACb,QAAQ,EAAE,YAAY;oBACtB,MAAM,EAAE,GAAG,CAAC,OAAO;iBACpB;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { pipenv as pipenvDetect } from '@renovatebot/detect-tools';\nimport is from '@sindresorhus/is';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport type { HostRule } from '../../../types';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions, ExtraEnv, Opt } from '../../../util/exec/types';\nimport {\n deleteLocalFile,\n ensureCacheDir,\n getParentDir,\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs';\nimport { ensureLocalPath } from '../../../util/fs/util';\nimport { getRepoStatus } from '../../../util/git';\nimport { find } from '../../../util/host-rules';\nimport { regEx } from '../../../util/regex';\nimport { parseUrl } from '../../../util/url';\nimport { PypiDatasource } from '../../datasource/pypi';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { extractPackageFile } from './extract';\n\nexport function getMatchingHostRule(url: string): HostRule | null {\n const parsedUrl = parseUrl(url);\n if (parsedUrl) {\n parsedUrl.username = '';\n parsedUrl.password = '';\n const urlWithoutCredentials = parsedUrl.toString();\n\n return find({ hostType: PypiDatasource.id, url: urlWithoutCredentials });\n }\n return null;\n}\n\nasync function findPipfileSourceUrlsWithCredentials(\n pipfileContent: string,\n pipfileName: string,\n): Promise<URL[]> {\n const pipfile = await extractPackageFile(pipfileContent, pipfileName);\n\n return (\n pipfile?.registryUrls\n ?.map(parseUrl)\n .filter(is.urlInstance)\n .filter((url) => is.nonEmptyStringAndNotWhitespace(url.username)) ?? []\n );\n}\n\n/**\n * This will extract the actual variable name from an environment-placeholder:\n * ${USERNAME:-defaultvalue} will yield 'USERNAME'\n */\nexport function extractEnvironmentVariableName(\n credential: string,\n): string | null {\n const match = regEx('([a-z0-9_]+)', 'i').exec(decodeURI(credential));\n return match?.length ? match[0] : null;\n}\n\nexport function addExtraEnvVariable(\n extraEnv: ExtraEnv<unknown>,\n environmentVariableName: string,\n environmentValue: string,\n): void {\n logger.trace(\n `Adding ${environmentVariableName} environment variable for pipenv`,\n );\n if (\n extraEnv[environmentVariableName] &&\n extraEnv[environmentVariableName] !== environmentValue\n ) {\n logger.warn(\n { envVar: environmentVariableName },\n 'Possible misconfiguration, environment variable already set to a different value',\n );\n }\n extraEnv[environmentVariableName] = environmentValue;\n}\n\n/**\n * Pipenv allows configuring source-urls for remote repositories with placeholders for credentials, i.e. http://$USER:$PASS@myprivate.repo\n * if a matching host rule exists for that repository, we need to set the corresponding variables.\n * Simply substituting them in the URL is not an option as it would impact the hash for the resulting Pipfile.lock\n *\n */\nasync function addCredentialsForSourceUrls(\n newPipfileContent: string,\n pipfileName: string,\n extraEnv: ExtraEnv<unknown>,\n): Promise<void> {\n const sourceUrls = await findPipfileSourceUrlsWithCredentials(\n newPipfileContent,\n pipfileName,\n );\n for (const parsedSourceUrl of sourceUrls) {\n logger.trace(`Trying to add credentials for ${parsedSourceUrl.toString()}`);\n const matchingHostRule = getMatchingHostRule(parsedSourceUrl.toString());\n if (matchingHostRule) {\n const usernameVariableName = extractEnvironmentVariableName(\n parsedSourceUrl.username,\n );\n if (matchingHostRule.username && usernameVariableName) {\n addExtraEnvVariable(\n extraEnv,\n usernameVariableName,\n matchingHostRule.username,\n );\n }\n const passwordVariableName = extractEnvironmentVariableName(\n parsedSourceUrl.password,\n );\n if (matchingHostRule.password && passwordVariableName) {\n addExtraEnvVariable(\n extraEnv,\n passwordVariableName,\n matchingHostRule.password,\n );\n }\n }\n }\n}\n\nexport async function updateArtifacts({\n packageFileName: pipfileName,\n newPackageFileContent: newPipfileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`pipenv.updateArtifacts(${pipfileName})`);\n\n const lockFileName = pipfileName + '.lock';\n if (!(await localPathExists(lockFileName))) {\n logger.debug('No Pipfile.lock found');\n return null;\n }\n try {\n await writeLocalFile(pipfileName, newPipfileContent);\n if (config.isLockFileMaintenance) {\n await deleteLocalFile(lockFileName);\n }\n const cmd = 'pipenv lock';\n const pipfileDir = getParentDir(ensureLocalPath(pipfileName));\n const tagConstraint =\n config.constraints?.python ??\n (await pipenvDetect.getPythonConstraint(pipfileDir));\n const pipenvConstraint =\n config.constraints?.pipenv ??\n (await pipenvDetect.getPipenvConstraint(pipfileDir));\n const extraEnv: Opt<ExtraEnv> = {\n PIPENV_CACHE_DIR: await ensureCacheDir('pipenv'),\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n WORKON_HOME: await ensureCacheDir('virtualenvs'),\n };\n const execOptions: ExecOptions = {\n cwdFile: pipfileName,\n docker: {},\n userConfiguredEnv: config.env,\n toolConstraints: [\n {\n toolName: 'python',\n constraint: tagConstraint,\n },\n {\n toolName: 'pipenv',\n constraint: pipenvConstraint,\n },\n ],\n };\n await addCredentialsForSourceUrls(newPipfileContent, pipfileName, extraEnv);\n execOptions.extraEnv = extraEnv;\n\n logger.trace({ cmd }, 'pipenv lock command');\n await exec(cmd, execOptions);\n const status = await getRepoStatus();\n if (!status?.modified.includes(lockFileName)) {\n return null;\n }\n logger.debug('Returning updated Pipfile.lock');\n return [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: await readLocalFile(lockFileName, 'utf8'),\n },\n },\n ];\n } catch (err) {\n // istanbul ignore if\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update Pipfile.lock');\n return [\n {\n artifactError: {\n lockFile: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pipenv/artifacts.ts"],"names":[],"mappings":";;AAwBA,kDAUC;AAoBD,wEAKC;AAED,kDAkBC;AA6CD,0CA8EC;;AA1MD,4DAAmE;AACnE,kEAAkC;AAClC,sEAAoE;AACpE,4CAAyC;AAEzC,6CAA0C;AAE1C,yCAO0B;AAC1B,gDAAwD;AACxD,2CAAkD;AAClD,yDAAgD;AAChD,+CAA4C;AAC5C,2CAA6C;AAC7C,gDAAuD;AAEvD,uCAA+C;AAE/C,SAAgB,mBAAmB,CAAC,GAAW;IAC7C,MAAM,SAAS,GAAG,IAAA,cAAQ,EAAC,GAAG,CAAC,CAAC;IAChC,IAAI,SAAS,EAAE,CAAC;QACd,SAAS,CAAC,QAAQ,GAAG,EAAE,CAAC;QACxB,SAAS,CAAC,QAAQ,GAAG,EAAE,CAAC;QACxB,MAAM,qBAAqB,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;QAEnD,OAAO,IAAA,iBAAI,EAAC,EAAE,QAAQ,EAAE,qBAAc,CAAC,EAAE,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,oCAAoC,CACjD,cAAsB,EACtB,WAAmB;IAEnB,MAAM,OAAO,GAAG,MAAM,IAAA,4BAAkB,EAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAEtE,OAAO,CACL,OAAO,EAAE,YAAY;QACnB,EAAE,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;oBAChB,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,MAAM,IAAA,kBAAa,EAAC,YAAY,EAAE,MAAM,CAAC;iBACpD;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,qBAAqB;QACrB,IAAI,GAAG,CAAC,OAAO,KAAK,gCAAe,EAAE,CAAC;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,+BAA+B,CAAC,CAAC;QACvD,OAAO;YACL;gBACE,aAAa,EAAE;oBACb,QAAQ,EAAE,YAAY;oBACtB,MAAM,EAAE,GAAG,CAAC,OAAO;iBACpB;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { pipenv as pipenvDetect } from '@renovatebot/detect-tools';\nimport is from '@sindresorhus/is';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport type { HostRule } from '../../../types';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions, ExtraEnv, Opt } from '../../../util/exec/types';\nimport {\n deleteLocalFile,\n ensureCacheDir,\n getParentDir,\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs';\nimport { ensureLocalPath } from '../../../util/fs/util';\nimport { getRepoStatus } from '../../../util/git';\nimport { find } from '../../../util/host-rules';\nimport { regEx } from '../../../util/regex';\nimport { parseUrl } from '../../../util/url';\nimport { PypiDatasource } from '../../datasource/pypi';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { extractPackageFile } from './extract';\n\nexport function getMatchingHostRule(url: string): HostRule | null {\n const parsedUrl = parseUrl(url);\n if (parsedUrl) {\n parsedUrl.username = '';\n parsedUrl.password = '';\n const urlWithoutCredentials = parsedUrl.toString();\n\n return find({ hostType: PypiDatasource.id, url: urlWithoutCredentials });\n }\n return null;\n}\n\nasync function findPipfileSourceUrlsWithCredentials(\n pipfileContent: string,\n pipfileName: string,\n): Promise<URL[]> {\n const pipfile = await extractPackageFile(pipfileContent, pipfileName);\n\n return (\n pipfile?.registryUrls\n ?.map(parseUrl)\n .filter(is.urlInstance)\n .filter((url) => is.nonEmptyStringAndNotWhitespace(url.username)) ?? []\n );\n}\n\n/**\n * This will extract the actual variable name from an environment-placeholder:\n * ${USERNAME:-defaultvalue} will yield 'USERNAME'\n */\nexport function extractEnvironmentVariableName(\n credential: string,\n): string | null {\n const match = regEx('([a-z0-9_]+)', 'i').exec(decodeURI(credential));\n return match?.length ? match[0] : null;\n}\n\nexport function addExtraEnvVariable(\n extraEnv: ExtraEnv<unknown>,\n environmentVariableName: string,\n environmentValue: string,\n): void {\n logger.trace(\n `Adding ${environmentVariableName} environment variable for pipenv`,\n );\n if (\n extraEnv[environmentVariableName] &&\n extraEnv[environmentVariableName] !== environmentValue\n ) {\n logger.warn(\n { envVar: environmentVariableName },\n 'Possible misconfiguration, environment variable already set to a different value',\n );\n }\n extraEnv[environmentVariableName] = environmentValue;\n}\n\n/**\n * Pipenv allows configuring source-urls for remote repositories with placeholders for credentials, i.e. http://$USER:$PASS@myprivate.repo\n * if a matching host rule exists for that repository, we need to set the corresponding variables.\n * Simply substituting them in the URL is not an option as it would impact the hash for the resulting Pipfile.lock\n *\n */\nasync function addCredentialsForSourceUrls(\n newPipfileContent: string,\n pipfileName: string,\n extraEnv: ExtraEnv<unknown>,\n): Promise<void> {\n const sourceUrls = await findPipfileSourceUrlsWithCredentials(\n newPipfileContent,\n pipfileName,\n );\n for (const parsedSourceUrl of sourceUrls) {\n logger.trace(`Trying to add credentials for ${parsedSourceUrl.toString()}`);\n const matchingHostRule = getMatchingHostRule(parsedSourceUrl.toString());\n if (matchingHostRule) {\n const usernameVariableName = extractEnvironmentVariableName(\n parsedSourceUrl.username,\n );\n if (matchingHostRule.username && usernameVariableName) {\n addExtraEnvVariable(\n extraEnv,\n usernameVariableName,\n matchingHostRule.username,\n );\n }\n const passwordVariableName = extractEnvironmentVariableName(\n parsedSourceUrl.password,\n );\n if (matchingHostRule.password && passwordVariableName) {\n addExtraEnvVariable(\n extraEnv,\n passwordVariableName,\n matchingHostRule.password,\n );\n }\n }\n }\n}\n\nexport async function updateArtifacts({\n packageFileName: pipfileName,\n newPackageFileContent: newPipfileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`pipenv.updateArtifacts(${pipfileName})`);\n\n const lockFileName = pipfileName + '.lock';\n if (!(await localPathExists(lockFileName))) {\n logger.debug('No Pipfile.lock found');\n return null;\n }\n try {\n await writeLocalFile(pipfileName, newPipfileContent);\n if (config.isLockFileMaintenance) {\n await deleteLocalFile(lockFileName);\n }\n const cmd = 'pipenv lock';\n const pipfileDir = getParentDir(ensureLocalPath(pipfileName));\n const tagConstraint =\n config.constraints?.python ??\n (await pipenvDetect.getPythonConstraint(pipfileDir));\n const pipenvConstraint =\n config.constraints?.pipenv ??\n (await pipenvDetect.getPipenvConstraint(pipfileDir));\n const extraEnv: Opt<ExtraEnv> = {\n PIPENV_CACHE_DIR: await ensureCacheDir('pipenv'),\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n WORKON_HOME: await ensureCacheDir('virtualenvs'),\n };\n const execOptions: ExecOptions = {\n cwdFile: pipfileName,\n docker: {},\n toolConstraints: [\n {\n toolName: 'python',\n constraint: tagConstraint,\n },\n {\n toolName: 'pipenv',\n constraint: pipenvConstraint,\n },\n ],\n };\n await addCredentialsForSourceUrls(newPipfileContent, pipfileName, extraEnv);\n execOptions.extraEnv = extraEnv;\n\n logger.trace({ cmd }, 'pipenv lock command');\n await exec(cmd, execOptions);\n const status = await getRepoStatus();\n if (!status?.modified.includes(lockFileName)) {\n return null;\n }\n logger.debug('Returning updated Pipfile.lock');\n return [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: await readLocalFile(lockFileName, 'utf8'),\n },\n },\n ];\n } catch (err) {\n // istanbul ignore if\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update Pipfile.lock');\n return [\n {\n artifactError: {\n lockFile: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n}\n"]}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { UpdateArtifact, UpdateArtifactsResult } from '../types';
|
2
|
+
export declare const commandLock = "pixi lock --no-progress --color=never --quiet";
|
3
|
+
export declare function updateArtifacts({ packageFileName, updatedDeps, newPackageFileContent, config, }: UpdateArtifact): Promise<UpdateArtifactsResult[] | null>;
|
@@ -0,0 +1,78 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.commandLock = void 0;
|
4
|
+
exports.updateArtifacts = updateArtifacts;
|
5
|
+
const tslib_1 = require("tslib");
|
6
|
+
const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
|
7
|
+
const error_messages_1 = require("../../../constants/error-messages");
|
8
|
+
const logger_1 = require("../../../logger");
|
9
|
+
const exec_1 = require("../../../util/exec");
|
10
|
+
const fs_1 = require("../../../util/fs");
|
11
|
+
const extract_1 = require("./extract");
|
12
|
+
exports.commandLock = 'pixi lock --no-progress --color=never --quiet';
|
13
|
+
async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileContent, config, }) {
|
14
|
+
logger_1.logger.debug(`pixi.updateArtifacts(${packageFileName})`);
|
15
|
+
const { isLockFileMaintenance } = config;
|
16
|
+
if (!is_1.default.nonEmptyArray(updatedDeps) && !isLockFileMaintenance) {
|
17
|
+
logger_1.logger.debug('No updated pixi deps - returning null');
|
18
|
+
return null;
|
19
|
+
}
|
20
|
+
const lockFileName = (0, fs_1.getSiblingFileName)(packageFileName, 'pixi.lock');
|
21
|
+
const existingLockFileContent = await (0, fs_1.readLocalFile)(lockFileName, 'utf8');
|
22
|
+
if (!existingLockFileContent) {
|
23
|
+
logger_1.logger.debug(`No lock file found`);
|
24
|
+
return null;
|
25
|
+
}
|
26
|
+
logger_1.logger.trace(`Updating ${lockFileName}`);
|
27
|
+
const cmd = [exports.commandLock];
|
28
|
+
const pixiConfig = (0, extract_1.getUserPixiConfig)(newPackageFileContent, packageFileName);
|
29
|
+
const constraint = config.constraints?.pixi ?? pixiConfig?.project['requires-pixi'];
|
30
|
+
try {
|
31
|
+
await (0, fs_1.writeLocalFile)(packageFileName, newPackageFileContent);
|
32
|
+
if (isLockFileMaintenance) {
|
33
|
+
await (0, fs_1.deleteLocalFile)(lockFileName);
|
34
|
+
}
|
35
|
+
// https://pixi.sh/latest/features/environment/#caching-packages
|
36
|
+
const PIXI_CACHE_DIR = await (0, fs_1.ensureCacheDir)('pixi');
|
37
|
+
const extraEnv = {
|
38
|
+
PIXI_CACHE_DIR,
|
39
|
+
RATTLER_CACHE_DIR: PIXI_CACHE_DIR,
|
40
|
+
};
|
41
|
+
const execOptions = {
|
42
|
+
cwdFile: packageFileName,
|
43
|
+
extraEnv,
|
44
|
+
docker: {},
|
45
|
+
toolConstraints: [{ toolName: 'pixi', constraint }],
|
46
|
+
};
|
47
|
+
await (0, exec_1.exec)(cmd, execOptions);
|
48
|
+
const newPixiLockContent = await (0, fs_1.readLocalFile)(lockFileName, 'utf8');
|
49
|
+
if (existingLockFileContent === newPixiLockContent) {
|
50
|
+
logger_1.logger.debug(`${lockFileName} is unchanged`);
|
51
|
+
return null;
|
52
|
+
}
|
53
|
+
return [
|
54
|
+
{
|
55
|
+
file: {
|
56
|
+
type: 'addition',
|
57
|
+
path: lockFileName,
|
58
|
+
contents: newPixiLockContent,
|
59
|
+
},
|
60
|
+
},
|
61
|
+
];
|
62
|
+
}
|
63
|
+
catch (err) {
|
64
|
+
if (err.message === error_messages_1.TEMPORARY_ERROR) {
|
65
|
+
throw err;
|
66
|
+
}
|
67
|
+
logger_1.logger.debug({ err }, `Failed to update ${lockFileName} file`);
|
68
|
+
return [
|
69
|
+
{
|
70
|
+
artifactError: {
|
71
|
+
lockFile: lockFileName,
|
72
|
+
stderr: `${err}`,
|
73
|
+
},
|
74
|
+
},
|
75
|
+
];
|
76
|
+
}
|
77
|
+
}
|
78
|
+
//# sourceMappingURL=artifacts.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pixi/artifacts.ts"],"names":[],"mappings":";;;AAiBA,0CA8EC;;AA/FD,kEAAkC;AAClC,sEAAoE;AACpE,4CAAyC;AACzC,6CAA0C;AAE1C,yCAM0B;AAE1B,uCAA8C;AAEjC,QAAA,WAAW,GAAG,+CAA+C,CAAC;AAEpE,KAAK,UAAU,eAAe,CAAC,EACpC,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,MAAM,GACS;IACf,eAAM,CAAC,KAAK,CAAC,wBAAwB,eAAe,GAAG,CAAC,CAAC;IACzD,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;IAEzC,IAAI,CAAC,YAAE,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7D,eAAM,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,YAAY,GAAG,IAAA,uBAAkB,EAAC,eAAe,EAAE,WAAW,CAAC,CAAC;IACtE,MAAM,uBAAuB,GAAG,MAAM,IAAA,kBAAa,EAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC1E,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC7B,eAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,eAAM,CAAC,KAAK,CAAC,YAAY,YAAY,EAAE,CAAC,CAAC;IAEzC,MAAM,GAAG,GAAG,CAAC,mBAAW,CAAC,CAAC;IAE1B,MAAM,UAAU,GAAG,IAAA,2BAAiB,EAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;IAE7E,MAAM,UAAU,GACd,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,U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,EAAE,YAAY;oBACtB,MAAM,EAAE,GAAG,GAAG,EAAE;iBACjB;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions } from '../../../util/exec/types';\nimport {\n deleteLocalFile,\n ensureCacheDir,\n getSiblingFileName,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { getUserPixiConfig } from './extract';\n\nexport const commandLock = 'pixi lock --no-progress --color=never --quiet';\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`pixi.updateArtifacts(${packageFileName})`);\n const { isLockFileMaintenance } = config;\n\n if (!is.nonEmptyArray(updatedDeps) && !isLockFileMaintenance) {\n logger.debug('No updated pixi deps - returning null');\n return null;\n }\n\n const lockFileName = getSiblingFileName(packageFileName, 'pixi.lock');\n const existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n logger.debug(`No lock file found`);\n return null;\n }\n logger.trace(`Updating ${lockFileName}`);\n\n const cmd = [commandLock];\n\n const pixiConfig = getUserPixiConfig(newPackageFileContent, packageFileName);\n\n const constraint =\n config.constraints?.pixi ?? pixiConfig?.project['requires-pixi'];\n\n try {\n await writeLocalFile(packageFileName, newPackageFileContent);\n if (isLockFileMaintenance) {\n await deleteLocalFile(lockFileName);\n }\n\n // https://pixi.sh/latest/features/environment/#caching-packages\n const PIXI_CACHE_DIR = await ensureCacheDir('pixi');\n const extraEnv = {\n PIXI_CACHE_DIR,\n RATTLER_CACHE_DIR: PIXI_CACHE_DIR,\n };\n\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n docker: {},\n toolConstraints: [{ toolName: 'pixi', constraint }],\n };\n await exec(cmd, execOptions);\n const newPixiLockContent = await readLocalFile(lockFileName, 'utf8');\n if (existingLockFileContent === newPixiLockContent) {\n logger.debug(`${lockFileName} is unchanged`);\n return null;\n }\n return [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newPixiLockContent,\n },\n },\n ];\n } catch (err) {\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n\n logger.debug({ err }, `Failed to update ${lockFileName} file`);\n return [\n {\n artifactError: {\n lockFile: lockFileName,\n stderr: `${err}`,\n },\n },\n ];\n }\n}\n"]}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { PackageFileContent } from '../types';
|
2
|
+
import { type PixiConfig } from './schema';
|
3
|
+
export declare function getUserPixiConfig(content: string, packageFile: string): null | PixiConfig;
|
4
|
+
export declare function extractPackageFile(content: string, packageFile: string): Promise<PackageFileContent | null>;
|
@@ -0,0 +1,131 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getUserPixiConfig = getUserPixiConfig;
|
4
|
+
exports.extractPackageFile = extractPackageFile;
|
5
|
+
const tslib_1 = require("tslib");
|
6
|
+
const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
|
7
|
+
const zod_1 = require("zod");
|
8
|
+
const logger_1 = require("../../../logger");
|
9
|
+
const array_1 = require("../../../util/array");
|
10
|
+
const fs_1 = require("../../../util/fs");
|
11
|
+
const result_1 = require("../../../util/result");
|
12
|
+
const schema_utils_1 = require("../../../util/schema-utils");
|
13
|
+
const url_1 = require("../../../util/url");
|
14
|
+
const common_1 = require("../../datasource/conda/common");
|
15
|
+
const schema_1 = require("../pep621/schema");
|
16
|
+
const schema_2 = require("./schema");
|
17
|
+
const PyProjectToml = schema_utils_1.Toml.pipe(schema_1.PyProjectSchema);
|
18
|
+
function getUserPixiConfig(content, packageFile) {
|
19
|
+
if (packageFile === 'pyproject.toml' ||
|
20
|
+
packageFile.endsWith('/pyproject.toml')) {
|
21
|
+
const { val, err } = result_1.Result.parse(content, PyProjectToml).unwrap();
|
22
|
+
if (err) {
|
23
|
+
logger_1.logger.debug({ packageFile, err }, `error parsing ${packageFile}`);
|
24
|
+
return null;
|
25
|
+
}
|
26
|
+
return val.tool?.pixi ?? null;
|
27
|
+
}
|
28
|
+
if (packageFile === 'pixi.toml' || packageFile.endsWith('/pixi.toml')) {
|
29
|
+
const { val, err } = result_1.Result.parse(content, schema_2.PixiToml).unwrap();
|
30
|
+
if (err) {
|
31
|
+
logger_1.logger.debug({ packageFile, err }, `error parsing ${packageFile}`);
|
32
|
+
return null;
|
33
|
+
}
|
34
|
+
return val;
|
35
|
+
}
|
36
|
+
const { val, err } = result_1.Result.parse(content, zod_1.z.union([schema_2.PixiToml, PyProjectToml.transform((p) => p.tool?.pixi)])).unwrap();
|
37
|
+
if (err) {
|
38
|
+
logger_1.logger.debug({ packageFile, err }, `error parsing ${packageFile}`);
|
39
|
+
return null;
|
40
|
+
}
|
41
|
+
return val ?? null;
|
42
|
+
}
|
43
|
+
async function extractPackageFile(content, packageFile) {
|
44
|
+
logger_1.logger.trace(`pixi.extractPackageFile(${packageFile})`);
|
45
|
+
const val = getUserPixiConfig(content, packageFile);
|
46
|
+
if (!val) {
|
47
|
+
return null;
|
48
|
+
}
|
49
|
+
const lockfileName = (0, fs_1.getSiblingFileName)(packageFile, 'pixi.lock');
|
50
|
+
const lockFiles = [];
|
51
|
+
if (await (0, fs_1.localPathExists)(lockfileName)) {
|
52
|
+
lockFiles.push(lockfileName);
|
53
|
+
}
|
54
|
+
const project = val.project;
|
55
|
+
const channelPriority = project['channel-priority'];
|
56
|
+
let registryStrategy;
|
57
|
+
if (channelPriority === 'disabled') {
|
58
|
+
registryStrategy = 'merge';
|
59
|
+
}
|
60
|
+
// resolve channels and build registry urls for each channel with order
|
61
|
+
const conda = [];
|
62
|
+
for (const item of val.conda) {
|
63
|
+
conda.push(addRegistryUrls({
|
64
|
+
...item,
|
65
|
+
channels: project.channels,
|
66
|
+
registryStrategy,
|
67
|
+
}));
|
68
|
+
}
|
69
|
+
for (const item of val.feature.conda) {
|
70
|
+
conda.push(addRegistryUrls({
|
71
|
+
...item,
|
72
|
+
registryStrategy,
|
73
|
+
channels: [...(0, array_1.coerceArray)(item.channels), ...project.channels],
|
74
|
+
}));
|
75
|
+
}
|
76
|
+
return {
|
77
|
+
lockFiles,
|
78
|
+
deps: [conda, val.pypi, val.feature.pypi].flat(),
|
79
|
+
};
|
80
|
+
}
|
81
|
+
function addRegistryUrls(item) {
|
82
|
+
const channels = orderChannels(item.channels);
|
83
|
+
if (item.channel) {
|
84
|
+
return {
|
85
|
+
...item,
|
86
|
+
channels,
|
87
|
+
registryUrls: [channelToRegistryUrl(item.channel)],
|
88
|
+
};
|
89
|
+
}
|
90
|
+
if (channels.length === 0) {
|
91
|
+
return {
|
92
|
+
...item,
|
93
|
+
channels,
|
94
|
+
skipStage: 'extract',
|
95
|
+
skipReason: 'unknown-registry',
|
96
|
+
};
|
97
|
+
}
|
98
|
+
const registryUrls = [];
|
99
|
+
for (const channel of channels) {
|
100
|
+
registryUrls.push(channelToRegistryUrl(channel));
|
101
|
+
}
|
102
|
+
return {
|
103
|
+
...item,
|
104
|
+
channels,
|
105
|
+
registryUrls,
|
106
|
+
};
|
107
|
+
}
|
108
|
+
function channelToRegistryUrl(channel) {
|
109
|
+
if ((0, url_1.isHttpUrl)(channel)) {
|
110
|
+
return (0, url_1.ensureTrailingSlash)(channel);
|
111
|
+
}
|
112
|
+
return (0, url_1.ensureTrailingSlash)((0, url_1.joinUrlParts)(common_1.defaultRegistryUrl, channel));
|
113
|
+
}
|
114
|
+
function orderChannels(channels = []) {
|
115
|
+
return channels
|
116
|
+
.map((channel, index) => {
|
117
|
+
if (is_1.default.string(channel)) {
|
118
|
+
return { channel, priority: 0, index };
|
119
|
+
}
|
120
|
+
return { ...channel, index: 0 };
|
121
|
+
})
|
122
|
+
.toSorted((a, b) => {
|
123
|
+
// first based on priority then based on index
|
124
|
+
if (a.priority !== b.priority) {
|
125
|
+
return b.priority - a.priority;
|
126
|
+
}
|
127
|
+
return a.index - b.index;
|
128
|
+
})
|
129
|
+
.map((c) => c.channel);
|
130
|
+
}
|
131
|
+
//# sourceMappingURL=extract.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pixi/extract.ts"],"names":[],"mappings":";;AA0BA,8CAqCC;AAED,gDAsDC;;AAvHD,kEAAkC;AAClC,6BAAwB;AAExB,4CAAyC;AACzC,+CAAkD;AAClD,yCAAuE;AACvE,iDAA8C;AAC9C,6DAAkD;AAClD,2CAI2B;AAE3B,0DAA8F;AAC9F,6CAAmD;AAEnD,qCAKkB;AAElB,MAAM,aAAa,GAAG,mBAAI,CAAC,IAAI,CAAC,wBAAe,CAAC,CAAC;AAEjD,SAAgB,iBAAiB,CAC/B,OAAe,EACf,WAAmB;IAEnB,IACE,WAAW,KAAK,gBAAgB;QAChC,WAAW,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EACvC,CAAC;QACD,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,eAAM,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC;QACnE,IAAI,GAAG,EAAE,CAAC;YACR,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,EAAE,iBAAiB,WAAW,EAAE,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,CAAC;IAChC,CAAC;IAED,IAAI,WAAW,KAAK,WAAW,IAAI,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QACtE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,eAAM,CAAC,KAAK,CAAC,OAAO,EAAE,iBAAQ,CAAC,CAAC,MAAM,EAAE,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,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { z } from 'zod';\n\nimport { logger } from '../../../logger';\nimport { coerceArray } from '../../../util/array';\nimport { getSiblingFileName, localPathExists } from '../../../util/fs';\nimport { Result } from '../../../util/result';\nimport { Toml } from '../../../util/schema-utils';\nimport {\n ensureTrailingSlash,\n isHttpUrl,\n joinUrlParts,\n} from '../../../util/url';\nimport type { RegistryStrategy } from '../../datasource';\nimport { defaultRegistryUrl as defaultCondaRegistryApi } from '../../datasource/conda/common';\nimport { PyProjectSchema } from '../pep621/schema';\nimport type { PackageFileContent } from '../types';\nimport {\n type Channels,\n type PixiConfig,\n type PixiPackageDependency,\n PixiToml,\n} from './schema';\n\nconst PyProjectToml = Toml.pipe(PyProjectSchema);\n\nexport function getUserPixiConfig(\n content: string,\n packageFile: string,\n): null | PixiConfig {\n if (\n packageFile === 'pyproject.toml' ||\n packageFile.endsWith('/pyproject.toml')\n ) {\n const { val, err } = Result.parse(content, PyProjectToml).unwrap();\n if (err) {\n logger.debug({ packageFile, err }, `error parsing ${packageFile}`);\n return null;\n }\n\n return val.tool?.pixi ?? null;\n }\n\n if (packageFile === 'pixi.toml' || packageFile.endsWith('/pixi.toml')) {\n const { val, err } = Result.parse(content, PixiToml).unwrap();\n if (err) {\n logger.debug({ packageFile, err }, `error parsing ${packageFile}`);\n return null;\n }\n\n return val;\n }\n\n const { val, err } = Result.parse(\n content,\n z.union([PixiToml, PyProjectToml.transform((p) => p.tool?.pixi)]),\n ).unwrap();\n\n if (err) {\n logger.debug({ packageFile, err }, `error parsing ${packageFile}`);\n return null;\n }\n return val ?? null;\n}\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n): Promise<PackageFileContent | null> {\n logger.trace(`pixi.extractPackageFile(${packageFile})`);\n\n const val = getUserPixiConfig(content, packageFile);\n if (!val) {\n return null;\n }\n\n const lockfileName = getSiblingFileName(packageFile, 'pixi.lock');\n const lockFiles: string[] = [];\n if (await localPathExists(lockfileName)) {\n lockFiles.push(lockfileName);\n }\n\n const project = val.project;\n\n const channelPriority = project['channel-priority'];\n\n let registryStrategy: RegistryStrategy | undefined;\n\n if (channelPriority === 'disabled') {\n registryStrategy = 'merge';\n }\n\n // resolve channels and build registry urls for each channel with order\n const conda: PixiPackageDependency[] = [];\n\n for (const item of val.conda) {\n conda.push(\n addRegistryUrls({\n ...item,\n channels: project.channels,\n registryStrategy,\n }),\n );\n }\n\n for (const item of val.feature.conda) {\n conda.push(\n addRegistryUrls({\n ...item,\n registryStrategy,\n channels: [...coerceArray(item.channels), ...project.channels],\n }),\n );\n }\n\n return {\n lockFiles,\n deps: [conda, val.pypi, val.feature.pypi].flat(),\n };\n}\n\nfunction addRegistryUrls(item: PixiPackageDependency): PixiPackageDependency {\n const channels = orderChannels(item.channels);\n\n if (item.channel) {\n return {\n ...item,\n channels,\n registryUrls: [channelToRegistryUrl(item.channel)],\n };\n }\n\n if (channels.length === 0) {\n return {\n ...item,\n channels,\n skipStage: 'extract',\n skipReason: 'unknown-registry',\n };\n }\n\n const registryUrls: string[] = [];\n for (const channel of channels) {\n registryUrls.push(channelToRegistryUrl(channel));\n }\n\n return {\n ...item,\n channels,\n registryUrls,\n };\n}\n\nfunction channelToRegistryUrl(channel: string): string {\n if (isHttpUrl(channel)) {\n return ensureTrailingSlash(channel);\n }\n\n return ensureTrailingSlash(joinUrlParts(defaultCondaRegistryApi, channel));\n}\n\nfunction orderChannels(channels: Channels = []): string[] {\n return channels\n .map((channel, index) => {\n if (is.string(channel)) {\n return { channel, priority: 0, index };\n }\n\n return { ...channel, index: 0 };\n })\n .toSorted((a, b) => {\n // first based on priority then based on index\n if (a.priority !== b.priority) {\n return b.priority - a.priority;\n }\n\n return a.index - b.index;\n })\n .map((c) => c.channel);\n}\n"]}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { Category } from '../../../constants';
|
2
|
+
export { extractPackageFile } from './extract';
|
3
|
+
export { updateArtifacts } from './artifacts';
|
4
|
+
export declare const supportsLockFileMaintenance = true;
|
5
|
+
export declare const url = "https://github.com/prefix-dev/pixi/";
|
6
|
+
export declare const categories: Category[];
|
7
|
+
export declare const defaultConfig: {
|
8
|
+
fileMatch: string[];
|
9
|
+
};
|
10
|
+
export declare const supportedDatasources: string[];
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.supportedDatasources = exports.defaultConfig = exports.categories = exports.url = exports.supportsLockFileMaintenance = exports.updateArtifacts = exports.extractPackageFile = void 0;
|
4
|
+
const conda_1 = require("../../datasource/conda");
|
5
|
+
const pypi_1 = require("../../datasource/pypi");
|
6
|
+
var extract_1 = require("./extract");
|
7
|
+
Object.defineProperty(exports, "extractPackageFile", { enumerable: true, get: function () { return extract_1.extractPackageFile; } });
|
8
|
+
var artifacts_1 = require("./artifacts");
|
9
|
+
Object.defineProperty(exports, "updateArtifacts", { enumerable: true, get: function () { return artifacts_1.updateArtifacts; } });
|
10
|
+
exports.supportsLockFileMaintenance = true;
|
11
|
+
exports.url = 'https://github.com/prefix-dev/pixi/';
|
12
|
+
exports.categories = ['python'];
|
13
|
+
exports.defaultConfig = {
|
14
|
+
fileMatch: [
|
15
|
+
'(^|/)pyproject\\.toml$', // `tool.pixi` section
|
16
|
+
'(^|/)pixi\\.toml$', // root object
|
17
|
+
],
|
18
|
+
};
|
19
|
+
exports.supportedDatasources = [pypi_1.PypiDatasource.id, conda_1.CondaDatasource.id];
|
20
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pixi/index.ts"],"names":[],"mappings":";;;AACA,kDAAyD;AACzD,gDAAuD;AAEvD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,GAAG,GAAG,qCAAqC,CAAC;AAC5C,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE;QACT,wBAAwB,EAAE,sBAAsB;QAChD,mBAAmB,EAAE,cAAc;KACpC;CACF,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,EAAE,uBAAe,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { CondaDatasource } from '../../datasource/conda';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const url = 'https://github.com/prefix-dev/pixi/';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n fileMatch: [\n '(^|/)pyproject\\\\.toml$', // `tool.pixi` section\n '(^|/)pixi\\\\.toml$', // root object\n ],\n};\n\nexport const supportedDatasources = [PypiDatasource.id, CondaDatasource.id];\n"]}
|