renovate 40.0.0-next.4 → 40.0.0-next.41

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.
Files changed (810) hide show
  1. package/dist/config/decrypt/legacy.js +0 -1
  2. package/dist/config/decrypt/legacy.js.map +1 -1
  3. package/dist/config/decrypt.d.ts +3 -1
  4. package/dist/config/decrypt.js +56 -13
  5. package/dist/config/decrypt.js.map +1 -1
  6. package/dist/config/migrate-validate.js +3 -2
  7. package/dist/config/migrate-validate.js.map +1 -1
  8. package/dist/config/migration.js +2 -1
  9. package/dist/config/migration.js.map +1 -1
  10. package/dist/config/migrations/custom/rebase-stale-prs-migration.js +1 -1
  11. package/dist/config/migrations/custom/rebase-stale-prs-migration.js.map +1 -1
  12. package/dist/config/options/index.js +17 -3
  13. package/dist/config/options/index.js.map +1 -1
  14. package/dist/config/parse.js +2 -2
  15. package/dist/config/parse.js.map +1 -1
  16. package/dist/config/presets/common.js +1 -0
  17. package/dist/config/presets/common.js.map +1 -1
  18. package/dist/config/presets/gitea/index.js +0 -1
  19. package/dist/config/presets/gitea/index.js.map +1 -1
  20. package/dist/config/presets/github/index.js +0 -1
  21. package/dist/config/presets/github/index.js.map +1 -1
  22. package/dist/config/presets/gitlab/index.js +1 -1
  23. package/dist/config/presets/gitlab/index.js.map +1 -1
  24. package/dist/config/presets/http/index.js +1 -2
  25. package/dist/config/presets/http/index.js.map +1 -1
  26. package/dist/config/presets/index.js +0 -7
  27. package/dist/config/presets/index.js.map +1 -1
  28. package/dist/config/presets/internal/custom-managers.js +18 -4
  29. package/dist/config/presets/internal/custom-managers.js.map +1 -1
  30. package/dist/config/presets/internal/group.js +30 -1
  31. package/dist/config/presets/internal/group.js.map +1 -1
  32. package/dist/config/presets/internal/index.js +1 -3
  33. package/dist/config/presets/internal/index.js.map +1 -1
  34. package/dist/config/presets/internal/workarounds.js +1 -0
  35. package/dist/config/presets/internal/workarounds.js.map +1 -1
  36. package/dist/config/presets/parse.js +2 -1
  37. package/dist/config/presets/parse.js.map +1 -1
  38. package/dist/config/schema.d.ts +2 -2
  39. package/dist/config/types.d.ts +4 -1
  40. package/dist/config/types.js.map +1 -1
  41. package/dist/config/validation.js +3 -5
  42. package/dist/config/validation.js.map +1 -1
  43. package/dist/config-validator.js +0 -1
  44. package/dist/config-validator.js.map +1 -1
  45. package/dist/constants/category.js +0 -1
  46. package/dist/constants/category.js.map +1 -1
  47. package/dist/constants/platforms.js +5 -1
  48. package/dist/constants/platforms.js.map +1 -1
  49. package/dist/data/monorepo.json +8 -2
  50. package/dist/data/source-urls.json +1 -0
  51. package/dist/data-files.generated.js +2 -2
  52. package/dist/data-files.generated.js.map +1 -1
  53. package/dist/instrumentation/index.js +39 -15
  54. package/dist/instrumentation/index.js.map +1 -1
  55. package/dist/instrumentation/utils.js +1 -1
  56. package/dist/instrumentation/utils.js.map +1 -1
  57. package/dist/logger/cmd-serializer.js +0 -1
  58. package/dist/logger/cmd-serializer.js.map +1 -1
  59. package/dist/logger/config-serializer.js +0 -1
  60. package/dist/logger/config-serializer.js.map +1 -1
  61. package/dist/logger/index.js +1 -4
  62. package/dist/logger/index.js.map +1 -1
  63. package/dist/logger/once.js +4 -2
  64. package/dist/logger/once.js.map +1 -1
  65. package/dist/logger/pretty-stdout.js +0 -1
  66. package/dist/logger/pretty-stdout.js.map +1 -1
  67. package/dist/logger/renovate-logger.js +1 -1
  68. package/dist/logger/renovate-logger.js.map +1 -1
  69. package/dist/logger/utils.js +6 -11
  70. package/dist/logger/utils.js.map +1 -1
  71. package/dist/modules/datasource/api.js +4 -0
  72. package/dist/modules/datasource/api.js.map +1 -1
  73. package/dist/modules/datasource/artifactory/index.js +1 -2
  74. package/dist/modules/datasource/artifactory/index.js.map +1 -1
  75. package/dist/modules/datasource/aws-eks-addon/index.d.ts +11 -0
  76. package/dist/modules/datasource/aws-eks-addon/index.js +75 -0
  77. package/dist/modules/datasource/aws-eks-addon/index.js.map +1 -0
  78. package/dist/modules/datasource/aws-eks-addon/schema.d.ts +40 -0
  79. package/dist/modules/datasource/aws-eks-addon/schema.js +31 -0
  80. package/dist/modules/datasource/aws-eks-addon/schema.js.map +1 -0
  81. package/dist/modules/datasource/aws-machine-image/index.js +6 -5
  82. package/dist/modules/datasource/aws-machine-image/index.js.map +1 -1
  83. package/dist/modules/datasource/azure-pipelines-tasks/index.js +15 -1
  84. package/dist/modules/datasource/azure-pipelines-tasks/index.js.map +1 -1
  85. package/dist/modules/datasource/azure-pipelines-tasks/schema.d.ts +24 -0
  86. package/dist/modules/datasource/azure-pipelines-tasks/schema.js +3 -0
  87. package/dist/modules/datasource/azure-pipelines-tasks/schema.js.map +1 -1
  88. package/dist/modules/datasource/bazel/index.js +18 -2
  89. package/dist/modules/datasource/bazel/index.js.map +1 -1
  90. package/dist/modules/datasource/bazel/schema.d.ts +1 -0
  91. package/dist/modules/datasource/bazel/schema.js.map +1 -1
  92. package/dist/modules/datasource/bitbucket-server-tags/index.d.ts +19 -0
  93. package/dist/modules/datasource/bitbucket-server-tags/index.js +133 -0
  94. package/dist/modules/datasource/bitbucket-server-tags/index.js.map +1 -0
  95. package/dist/modules/datasource/bitbucket-server-tags/schema.d.ts +28 -0
  96. package/dist/modules/datasource/bitbucket-server-tags/schema.js +13 -0
  97. package/dist/modules/datasource/bitbucket-server-tags/schema.js.map +1 -0
  98. package/dist/modules/datasource/bitrise/index.js +1 -1
  99. package/dist/modules/datasource/bitrise/index.js.map +1 -1
  100. package/dist/modules/datasource/cdnjs/schema.d.ts +2 -2
  101. package/dist/modules/datasource/conda/index.js +18 -1
  102. package/dist/modules/datasource/conda/index.js.map +1 -1
  103. package/dist/modules/datasource/conda/prefix-dev.d.ts +3 -0
  104. package/dist/modules/datasource/conda/prefix-dev.js +81 -0
  105. package/dist/modules/datasource/conda/prefix-dev.js.map +1 -0
  106. package/dist/modules/datasource/conda/schema/prefix-dev.d.ts +189 -0
  107. package/dist/modules/datasource/conda/schema/prefix-dev.js +31 -0
  108. package/dist/modules/datasource/conda/schema/prefix-dev.js.map +1 -0
  109. package/dist/modules/datasource/conda/types.d.ts +1 -20
  110. package/dist/modules/datasource/conda/types.js.map +1 -1
  111. package/dist/modules/datasource/cpan/index.js +2 -4
  112. package/dist/modules/datasource/cpan/index.js.map +1 -1
  113. package/dist/modules/datasource/crate/index.js +3 -3
  114. package/dist/modules/datasource/crate/index.js.map +1 -1
  115. package/dist/modules/datasource/custom/formats/html.js +1 -1
  116. package/dist/modules/datasource/custom/formats/html.js.map +1 -1
  117. package/dist/modules/datasource/custom/formats/yaml.js +1 -1
  118. package/dist/modules/datasource/custom/formats/yaml.js.map +1 -1
  119. package/dist/modules/datasource/custom/index.js +4 -2
  120. package/dist/modules/datasource/custom/index.js.map +1 -1
  121. package/dist/modules/datasource/custom/schema.d.ts +22 -22
  122. package/dist/modules/datasource/custom/utils.js +1 -0
  123. package/dist/modules/datasource/custom/utils.js.map +1 -1
  124. package/dist/modules/datasource/dart/index.js +1 -1
  125. package/dist/modules/datasource/dart/index.js.map +1 -1
  126. package/dist/modules/datasource/dart-version/index.js +1 -1
  127. package/dist/modules/datasource/dart-version/index.js.map +1 -1
  128. package/dist/modules/datasource/datasource.js +0 -1
  129. package/dist/modules/datasource/datasource.js.map +1 -1
  130. package/dist/modules/datasource/deb/index.d.ts +4 -5
  131. package/dist/modules/datasource/deb/index.js +10 -11
  132. package/dist/modules/datasource/deb/index.js.map +1 -1
  133. package/dist/modules/datasource/deb/url.d.ts +3 -3
  134. package/dist/modules/datasource/deb/url.js +17 -13
  135. package/dist/modules/datasource/deb/url.js.map +1 -1
  136. package/dist/modules/datasource/deno/index.js +1 -1
  137. package/dist/modules/datasource/deno/index.js.map +1 -1
  138. package/dist/modules/datasource/deno/schema.d.ts +1 -1
  139. package/dist/modules/datasource/devbox/index.js +0 -1
  140. package/dist/modules/datasource/devbox/index.js.map +1 -1
  141. package/dist/modules/datasource/docker/common.js +5 -2
  142. package/dist/modules/datasource/docker/common.js.map +1 -1
  143. package/dist/modules/datasource/docker/index.js +10 -8
  144. package/dist/modules/datasource/docker/index.js.map +1 -1
  145. package/dist/modules/datasource/docker/schema.d.ts +77 -101
  146. package/dist/modules/datasource/docker/schema.js +2 -1
  147. package/dist/modules/datasource/docker/schema.js.map +1 -1
  148. package/dist/modules/datasource/flutter-version/index.js +1 -1
  149. package/dist/modules/datasource/flutter-version/index.js.map +1 -1
  150. package/dist/modules/datasource/galaxy/schema.d.ts +1 -1
  151. package/dist/modules/datasource/galaxy-collection/schema.d.ts +8 -8
  152. package/dist/modules/datasource/git-refs/index.js +1 -1
  153. package/dist/modules/datasource/git-refs/index.js.map +1 -1
  154. package/dist/modules/datasource/gitea-releases/schema.d.ts +2 -2
  155. package/dist/modules/datasource/gitea-tags/schema.d.ts +4 -4
  156. package/dist/modules/datasource/github-release-attachments/index.js +2 -2
  157. package/dist/modules/datasource/github-release-attachments/index.js.map +1 -1
  158. package/dist/modules/datasource/github-runners/index.js +2 -2
  159. package/dist/modules/datasource/github-runners/index.js.map +1 -1
  160. package/dist/modules/datasource/gitlab-packages/index.js +1 -1
  161. package/dist/modules/datasource/gitlab-packages/index.js.map +1 -1
  162. package/dist/modules/datasource/gitlab-releases/index.js +1 -3
  163. package/dist/modules/datasource/gitlab-releases/index.js.map +1 -1
  164. package/dist/modules/datasource/go/base.js +1 -1
  165. package/dist/modules/datasource/go/base.js.map +1 -1
  166. package/dist/modules/datasource/go/index.js +1 -1
  167. package/dist/modules/datasource/go/index.js.map +1 -1
  168. package/dist/modules/datasource/go/releases-direct.js +7 -4
  169. package/dist/modules/datasource/go/releases-direct.js.map +1 -1
  170. package/dist/modules/datasource/go/releases-goproxy.js +1 -1
  171. package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
  172. package/dist/modules/datasource/golang-version/index.js +2 -2
  173. package/dist/modules/datasource/golang-version/index.js.map +1 -1
  174. package/dist/modules/datasource/gradle-version/index.js +1 -1
  175. package/dist/modules/datasource/gradle-version/index.js.map +1 -1
  176. package/dist/modules/datasource/helm/index.js +1 -1
  177. package/dist/modules/datasource/helm/index.js.map +1 -1
  178. package/dist/modules/datasource/hex/index.js +1 -1
  179. package/dist/modules/datasource/hex/index.js.map +1 -1
  180. package/dist/modules/datasource/hex/schema.d.ts +11 -11
  181. package/dist/modules/datasource/hexpm-bob/index.js +1 -1
  182. package/dist/modules/datasource/hexpm-bob/index.js.map +1 -1
  183. package/dist/modules/datasource/index.js +4 -4
  184. package/dist/modules/datasource/index.js.map +1 -1
  185. package/dist/modules/datasource/java-version/index.js +0 -1
  186. package/dist/modules/datasource/java-version/index.js.map +1 -1
  187. package/dist/modules/datasource/jenkins-plugins/index.js +1 -1
  188. package/dist/modules/datasource/jenkins-plugins/index.js.map +1 -1
  189. package/dist/modules/datasource/maven/index.js +35 -27
  190. package/dist/modules/datasource/maven/index.js.map +1 -1
  191. package/dist/modules/datasource/maven/types.d.ts +3 -6
  192. package/dist/modules/datasource/maven/types.js.map +1 -1
  193. package/dist/modules/datasource/maven/util.d.ts +4 -5
  194. package/dist/modules/datasource/maven/util.js +94 -157
  195. package/dist/modules/datasource/maven/util.js.map +1 -1
  196. package/dist/modules/datasource/metadata.js +9 -1
  197. package/dist/modules/datasource/metadata.js.map +1 -1
  198. package/dist/modules/datasource/node-version/index.js +1 -1
  199. package/dist/modules/datasource/node-version/index.js.map +1 -1
  200. package/dist/modules/datasource/npm/get.d.ts +0 -1
  201. package/dist/modules/datasource/npm/get.js +14 -68
  202. package/dist/modules/datasource/npm/get.js.map +1 -1
  203. package/dist/modules/datasource/npm/index.js +1 -1
  204. package/dist/modules/datasource/npm/index.js.map +1 -1
  205. package/dist/modules/datasource/npm/npmrc.js +1 -1
  206. package/dist/modules/datasource/npm/npmrc.js.map +1 -1
  207. package/dist/modules/datasource/npm/types.d.ts +0 -8
  208. package/dist/modules/datasource/npm/types.js.map +1 -1
  209. package/dist/modules/datasource/nuget/index.js +1 -1
  210. package/dist/modules/datasource/nuget/index.js.map +1 -1
  211. package/dist/modules/datasource/nuget/v2.js +1 -1
  212. package/dist/modules/datasource/nuget/v2.js.map +1 -1
  213. package/dist/modules/datasource/nuget/v3.js +6 -6
  214. package/dist/modules/datasource/nuget/v3.js.map +1 -1
  215. package/dist/modules/datasource/orb/index.js +1 -1
  216. package/dist/modules/datasource/orb/index.js.map +1 -1
  217. package/dist/modules/datasource/packagist/index.js +2 -2
  218. package/dist/modules/datasource/packagist/index.js.map +1 -1
  219. package/dist/modules/datasource/packagist/schema.d.ts +32 -32
  220. package/dist/modules/datasource/pod/index.js +2 -2
  221. package/dist/modules/datasource/pod/index.js.map +1 -1
  222. package/dist/modules/datasource/postprocess-release.js +1 -1
  223. package/dist/modules/datasource/postprocess-release.js.map +1 -1
  224. package/dist/modules/datasource/pypi/index.js +1 -1
  225. package/dist/modules/datasource/pypi/index.js.map +1 -1
  226. package/dist/modules/datasource/python-version/index.js +1 -1
  227. package/dist/modules/datasource/python-version/index.js.map +1 -1
  228. package/dist/modules/datasource/repology/index.js +1 -1
  229. package/dist/modules/datasource/repology/index.js.map +1 -1
  230. package/dist/modules/datasource/ruby-version/index.js +1 -1
  231. package/dist/modules/datasource/ruby-version/index.js.map +1 -1
  232. package/dist/modules/datasource/rubygems/index.js +2 -2
  233. package/dist/modules/datasource/rubygems/index.js.map +1 -1
  234. package/dist/modules/datasource/rubygems/versions-endpoint-cache.js +2 -2
  235. package/dist/modules/datasource/rubygems/versions-endpoint-cache.js.map +1 -1
  236. package/dist/modules/datasource/sbt-package/index.js +1 -1
  237. package/dist/modules/datasource/sbt-package/index.js.map +1 -1
  238. package/dist/modules/datasource/sbt-plugin/index.js +1 -1
  239. package/dist/modules/datasource/sbt-plugin/index.js.map +1 -1
  240. package/dist/modules/datasource/schema.d.ts +4 -4
  241. package/dist/modules/datasource/terraform-module/index.js +1 -1
  242. package/dist/modules/datasource/terraform-module/index.js.map +1 -1
  243. package/dist/modules/datasource/terraform-provider/index.js +2 -3
  244. package/dist/modules/datasource/terraform-provider/index.js.map +1 -1
  245. package/dist/modules/datasource/types.d.ts +2 -0
  246. package/dist/modules/datasource/types.js.map +1 -1
  247. package/dist/modules/datasource/unity3d/index.d.ts +4 -1
  248. package/dist/modules/datasource/unity3d/index.js +36 -42
  249. package/dist/modules/datasource/unity3d/index.js.map +1 -1
  250. package/dist/modules/datasource/unity3d/schema.d.ts +47 -0
  251. package/dist/modules/datasource/unity3d/schema.js +17 -0
  252. package/dist/modules/datasource/unity3d/schema.js.map +1 -0
  253. package/dist/modules/manager/api.js +2 -0
  254. package/dist/modules/manager/api.js.map +1 -1
  255. package/dist/modules/manager/argocd/extract.js +1 -1
  256. package/dist/modules/manager/argocd/extract.js.map +1 -1
  257. package/dist/modules/manager/argocd/schema.d.ts +22 -22
  258. package/dist/modules/manager/asdf/upgradeable-tooling.js +94 -0
  259. package/dist/modules/manager/asdf/upgradeable-tooling.js.map +1 -1
  260. package/dist/modules/manager/azure-pipelines/schema.d.ts +32 -32
  261. package/dist/modules/manager/batect/schema.d.ts +4 -4
  262. package/dist/modules/manager/batect-wrapper/artifacts.js +1 -1
  263. package/dist/modules/manager/batect-wrapper/artifacts.js.map +1 -1
  264. package/dist/modules/manager/bazel/rules/docker.d.ts +6 -6
  265. package/dist/modules/manager/bazel/rules/git.d.ts +10 -10
  266. package/dist/modules/manager/bazel/rules/git.js +9 -2
  267. package/dist/modules/manager/bazel/rules/git.js.map +1 -1
  268. package/dist/modules/manager/bazel/rules/go.d.ts +5 -5
  269. package/dist/modules/manager/bazel/rules/maven.d.ts +7 -7
  270. package/dist/modules/manager/bazel/rules/oci.d.ts +6 -6
  271. package/dist/modules/manager/bazel-module/parser/fragments.d.ts +40 -40
  272. package/dist/modules/manager/bazel-module/parser/maven.d.ts +44 -90
  273. package/dist/modules/manager/bazel-module/parser/oci.d.ts +19 -42
  274. package/dist/modules/manager/bazel-module/rules.d.ts +50 -160
  275. package/dist/modules/manager/bun/artifacts.js +0 -1
  276. package/dist/modules/manager/bun/artifacts.js.map +1 -1
  277. package/dist/modules/manager/bun/extract.d.ts +1 -0
  278. package/dist/modules/manager/bun/extract.js +53 -27
  279. package/dist/modules/manager/bun/extract.js.map +1 -1
  280. package/dist/modules/manager/bun/index.js +1 -1
  281. package/dist/modules/manager/bun/index.js.map +1 -1
  282. package/dist/modules/manager/bun/utils.d.ts +2 -0
  283. package/dist/modules/manager/bun/utils.js +22 -0
  284. package/dist/modules/manager/bun/utils.js.map +1 -0
  285. package/dist/modules/manager/bundler/artifacts.js +0 -1
  286. package/dist/modules/manager/bundler/artifacts.js.map +1 -1
  287. package/dist/modules/manager/bundler/extract.js +2 -1
  288. package/dist/modules/manager/bundler/extract.js.map +1 -1
  289. package/dist/modules/manager/cake/index.js +4 -2
  290. package/dist/modules/manager/cake/index.js.map +1 -1
  291. package/dist/modules/manager/cargo/artifacts.js +5 -7
  292. package/dist/modules/manager/cargo/artifacts.js.map +1 -1
  293. package/dist/modules/manager/cargo/schema.d.ts +117 -117
  294. package/dist/modules/manager/circleci/extract.js +21 -30
  295. package/dist/modules/manager/circleci/extract.js.map +1 -1
  296. package/dist/modules/manager/circleci/schema.d.ts +33 -144
  297. package/dist/modules/manager/circleci/schema.js +21 -17
  298. package/dist/modules/manager/circleci/schema.js.map +1 -1
  299. package/dist/modules/manager/cocoapods/artifacts.js +1 -2
  300. package/dist/modules/manager/cocoapods/artifacts.js.map +1 -1
  301. package/dist/modules/manager/composer/artifacts.js +1 -2
  302. package/dist/modules/manager/composer/artifacts.js.map +1 -1
  303. package/dist/modules/manager/composer/schema.d.ts +32 -34
  304. package/dist/modules/manager/composer/schema.js +1 -1
  305. package/dist/modules/manager/composer/schema.js.map +1 -1
  306. package/dist/modules/manager/composer/utils.d.ts +1 -0
  307. package/dist/modules/manager/composer/utils.js +18 -6
  308. package/dist/modules/manager/composer/utils.js.map +1 -1
  309. package/dist/modules/manager/conan/artifacts.d.ts +2 -0
  310. package/dist/modules/manager/conan/artifacts.js +76 -0
  311. package/dist/modules/manager/conan/artifacts.js.map +1 -0
  312. package/dist/modules/manager/conan/index.d.ts +2 -0
  313. package/dist/modules/manager/conan/index.js +4 -1
  314. package/dist/modules/manager/conan/index.js.map +1 -1
  315. package/dist/modules/manager/copier/artifacts.js +0 -1
  316. package/dist/modules/manager/copier/artifacts.js.map +1 -1
  317. package/dist/modules/manager/crossplane/schema.d.ts +2 -2
  318. package/dist/modules/manager/custom/jsonata/index.js +4 -0
  319. package/dist/modules/manager/custom/jsonata/index.js.map +1 -1
  320. package/dist/modules/manager/custom/jsonata/schema.d.ts +21 -21
  321. package/dist/modules/manager/custom/regex/index.js +2 -0
  322. package/dist/modules/manager/custom/regex/index.js.map +1 -1
  323. package/dist/modules/manager/deps-edn/extract.js +2 -1
  324. package/dist/modules/manager/deps-edn/extract.js.map +1 -1
  325. package/dist/modules/manager/devbox/artifacts.d.ts +1 -1
  326. package/dist/modules/manager/devbox/artifacts.js +35 -11
  327. package/dist/modules/manager/devbox/artifacts.js.map +1 -1
  328. package/dist/modules/manager/devbox/schema.js +1 -1
  329. package/dist/modules/manager/devbox/schema.js.map +1 -1
  330. package/dist/modules/manager/devcontainer/extract.js +43 -1
  331. package/dist/modules/manager/devcontainer/extract.js.map +1 -1
  332. package/dist/modules/manager/devcontainer/index.js +11 -1
  333. package/dist/modules/manager/devcontainer/index.js.map +1 -1
  334. package/dist/modules/manager/devcontainer/schema.d.ts +7 -3
  335. package/dist/modules/manager/devcontainer/schema.js +3 -1
  336. package/dist/modules/manager/devcontainer/schema.js.map +1 -1
  337. package/dist/modules/manager/docker-compose/schema.d.ts +6 -6
  338. package/dist/modules/manager/dockerfile/extract.js +2 -6
  339. package/dist/modules/manager/dockerfile/extract.js.map +1 -1
  340. package/dist/modules/manager/fingerprint.generated.js +86 -85
  341. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  342. package/dist/modules/manager/flux/artifacts.js +0 -1
  343. package/dist/modules/manager/flux/artifacts.js.map +1 -1
  344. package/dist/modules/manager/flux/extract.js +27 -24
  345. package/dist/modules/manager/flux/extract.js.map +1 -1
  346. package/dist/modules/manager/flux/schema.d.ts +130 -154
  347. package/dist/modules/manager/github-actions/extract.js +60 -39
  348. package/dist/modules/manager/github-actions/extract.js.map +1 -1
  349. package/dist/modules/manager/github-actions/schema.d.ts +66 -0
  350. package/dist/modules/manager/github-actions/schema.js +38 -0
  351. package/dist/modules/manager/github-actions/schema.js.map +1 -0
  352. package/dist/modules/manager/gitlabci/extract.d.ts +1 -5
  353. package/dist/modules/manager/gitlabci/extract.js +27 -126
  354. package/dist/modules/manager/gitlabci/extract.js.map +1 -1
  355. package/dist/modules/manager/gitlabci/schema.d.ts +55 -0
  356. package/dist/modules/manager/gitlabci/schema.js +63 -0
  357. package/dist/modules/manager/gitlabci/schema.js.map +1 -0
  358. package/dist/modules/manager/gitlabci-include/extract.js +6 -54
  359. package/dist/modules/manager/gitlabci-include/extract.js.map +1 -1
  360. package/dist/modules/manager/gitlabci-include/schema.d.ts +13 -0
  361. package/dist/modules/manager/gitlabci-include/schema.js +46 -0
  362. package/dist/modules/manager/gitlabci-include/schema.js.map +1 -0
  363. package/dist/modules/manager/glasskube/schema.d.ts +8 -8
  364. package/dist/modules/manager/gomod/artifacts-extra.js +12 -4
  365. package/dist/modules/manager/gomod/artifacts-extra.js.map +1 -1
  366. package/dist/modules/manager/gomod/artifacts.js +24 -10
  367. package/dist/modules/manager/gomod/artifacts.js.map +1 -1
  368. package/dist/modules/manager/gomod/extract.js +23 -0
  369. package/dist/modules/manager/gomod/extract.js.map +1 -1
  370. package/dist/modules/manager/gomod/line-parser.js +16 -0
  371. package/dist/modules/manager/gomod/line-parser.js.map +1 -1
  372. package/dist/modules/manager/gomod/update.js +5 -3
  373. package/dist/modules/manager/gomod/update.js.map +1 -1
  374. package/dist/modules/manager/gradle/artifacts.js +0 -1
  375. package/dist/modules/manager/gradle/artifacts.js.map +1 -1
  376. package/dist/modules/manager/gradle/extract/catalog.js +1 -1
  377. package/dist/modules/manager/gradle/extract/catalog.js.map +1 -1
  378. package/dist/modules/manager/gradle/extract.js +8 -13
  379. package/dist/modules/manager/gradle/extract.js.map +1 -1
  380. package/dist/modules/manager/gradle/parser/assignments.js +2 -2
  381. package/dist/modules/manager/gradle/parser/assignments.js.map +1 -1
  382. package/dist/modules/manager/gradle/parser/handlers.d.ts +1 -2
  383. package/dist/modules/manager/gradle/parser/handlers.js +17 -24
  384. package/dist/modules/manager/gradle/parser/handlers.js.map +1 -1
  385. package/dist/modules/manager/gradle/parser/registry-urls.js +46 -12
  386. package/dist/modules/manager/gradle/parser/registry-urls.js.map +1 -1
  387. package/dist/modules/manager/gradle/types.d.ts +1 -0
  388. package/dist/modules/manager/gradle/types.js.map +1 -1
  389. package/dist/modules/manager/gradle-wrapper/artifacts.js +1 -2
  390. package/dist/modules/manager/gradle-wrapper/artifacts.js.map +1 -1
  391. package/dist/modules/manager/helmfile/artifacts.js +0 -1
  392. package/dist/modules/manager/helmfile/artifacts.js.map +1 -1
  393. package/dist/modules/manager/helmfile/extract.js +4 -0
  394. package/dist/modules/manager/helmfile/extract.js.map +1 -1
  395. package/dist/modules/manager/helmfile/schema.d.ts +9 -9
  396. package/dist/modules/manager/helmv3/artifacts.js +0 -1
  397. package/dist/modules/manager/helmv3/artifacts.js.map +1 -1
  398. package/dist/modules/manager/helmv3/utils.js +3 -1
  399. package/dist/modules/manager/helmv3/utils.js.map +1 -1
  400. package/dist/modules/manager/hermit/artifacts.js +0 -1
  401. package/dist/modules/manager/hermit/artifacts.js.map +1 -1
  402. package/dist/modules/manager/homebrew/extract.js +0 -1
  403. package/dist/modules/manager/homebrew/extract.js.map +1 -1
  404. package/dist/modules/manager/jsonnet-bundler/artifacts.js +0 -1
  405. package/dist/modules/manager/jsonnet-bundler/artifacts.js.map +1 -1
  406. package/dist/modules/manager/kustomize/artifacts.d.ts +2 -0
  407. package/dist/modules/manager/kustomize/artifacts.js +154 -0
  408. package/dist/modules/manager/kustomize/artifacts.js.map +1 -0
  409. package/dist/modules/manager/kustomize/common.d.ts +3 -0
  410. package/dist/modules/manager/kustomize/common.js +22 -0
  411. package/dist/modules/manager/kustomize/common.js.map +1 -0
  412. package/dist/modules/manager/kustomize/index.d.ts +1 -0
  413. package/dist/modules/manager/kustomize/index.js +3 -1
  414. package/dist/modules/manager/kustomize/index.js.map +1 -1
  415. package/dist/modules/manager/kustomize/types.d.ts +4 -0
  416. package/dist/modules/manager/kustomize/types.js.map +1 -1
  417. package/dist/modules/manager/maven/extract.js +4 -4
  418. package/dist/modules/manager/maven/extract.js.map +1 -1
  419. package/dist/modules/manager/maven-wrapper/artifacts.js +0 -1
  420. package/dist/modules/manager/maven-wrapper/artifacts.js.map +1 -1
  421. package/dist/modules/manager/mise/extract.js +1 -1
  422. package/dist/modules/manager/mise/extract.js.map +1 -1
  423. package/dist/modules/manager/mix/artifacts.js +64 -14
  424. package/dist/modules/manager/mix/artifacts.js.map +1 -1
  425. package/dist/modules/manager/mix/index.d.ts +1 -0
  426. package/dist/modules/manager/mix/index.js +2 -1
  427. package/dist/modules/manager/mix/index.js.map +1 -1
  428. package/dist/modules/manager/nix/artifacts.js +0 -1
  429. package/dist/modules/manager/nix/artifacts.js.map +1 -1
  430. package/dist/modules/manager/nix/extract.js +1 -1
  431. package/dist/modules/manager/nix/extract.js.map +1 -1
  432. package/dist/modules/manager/nix/schema.d.ts +20 -20
  433. package/dist/modules/manager/nix/schema.js +1 -0
  434. package/dist/modules/manager/nix/schema.js.map +1 -1
  435. package/dist/modules/manager/npm/artifacts.js +0 -1
  436. package/dist/modules/manager/npm/artifacts.js.map +1 -1
  437. package/dist/modules/manager/npm/extract/common/package-file.js +1 -0
  438. package/dist/modules/manager/npm/extract/common/package-file.js.map +1 -1
  439. package/dist/modules/manager/npm/extract/yarn.js +2 -2
  440. package/dist/modules/manager/npm/extract/yarn.js.map +1 -1
  441. package/dist/modules/manager/npm/post-update/npm.js +0 -1
  442. package/dist/modules/manager/npm/post-update/npm.js.map +1 -1
  443. package/dist/modules/manager/npm/post-update/pnpm.js +13 -2
  444. package/dist/modules/manager/npm/post-update/pnpm.js.map +1 -1
  445. package/dist/modules/manager/npm/post-update/rules.js +11 -1
  446. package/dist/modules/manager/npm/post-update/rules.js.map +1 -1
  447. package/dist/modules/manager/npm/post-update/yarn.js +0 -1
  448. package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
  449. package/dist/modules/manager/npm/schema.d.ts +13 -13
  450. package/dist/modules/manager/npm/update/dependency/index.js +1 -1
  451. package/dist/modules/manager/npm/update/dependency/index.js.map +1 -1
  452. package/dist/modules/manager/nuget/artifacts.js +1 -2
  453. package/dist/modules/manager/nuget/artifacts.js.map +1 -1
  454. package/dist/modules/manager/nuget/extract.js +21 -18
  455. package/dist/modules/manager/nuget/extract.js.map +1 -1
  456. package/dist/modules/manager/nuget/package-tree.js +4 -0
  457. package/dist/modules/manager/nuget/package-tree.js.map +1 -1
  458. package/dist/modules/manager/nuget/schema.d.ts +8 -8
  459. package/dist/modules/manager/nuget/util.js +4 -1
  460. package/dist/modules/manager/nuget/util.js.map +1 -1
  461. package/dist/modules/manager/ocb/schema.d.ts +6 -6
  462. package/dist/modules/manager/pep621/processors/pdm.js +0 -1
  463. package/dist/modules/manager/pep621/processors/pdm.js.map +1 -1
  464. package/dist/modules/manager/pep621/processors/uv.js +0 -1
  465. package/dist/modules/manager/pep621/processors/uv.js.map +1 -1
  466. package/dist/modules/manager/pep621/schema.d.ts +346 -54
  467. package/dist/modules/manager/pep621/schema.js +2 -0
  468. package/dist/modules/manager/pep621/schema.js.map +1 -1
  469. package/dist/modules/manager/pep621/utils.js +1 -1
  470. package/dist/modules/manager/pep621/utils.js.map +1 -1
  471. package/dist/modules/manager/pip-compile/common.js +0 -1
  472. package/dist/modules/manager/pip-compile/common.js.map +1 -1
  473. package/dist/modules/manager/pip_requirements/artifacts.js +0 -1
  474. package/dist/modules/manager/pip_requirements/artifacts.js.map +1 -1
  475. package/dist/modules/manager/pip_requirements/common.js +2 -6
  476. package/dist/modules/manager/pip_requirements/common.js.map +1 -1
  477. package/dist/modules/manager/pipenv/artifacts.js +0 -1
  478. package/dist/modules/manager/pipenv/artifacts.js.map +1 -1
  479. package/dist/modules/manager/pixi/artifacts.d.ts +3 -0
  480. package/dist/modules/manager/pixi/artifacts.js +78 -0
  481. package/dist/modules/manager/pixi/artifacts.js.map +1 -0
  482. package/dist/modules/manager/pixi/extract.d.ts +4 -0
  483. package/dist/modules/manager/pixi/extract.js +131 -0
  484. package/dist/modules/manager/pixi/extract.js.map +1 -0
  485. package/dist/modules/manager/pixi/index.d.ts +10 -0
  486. package/dist/modules/manager/pixi/index.js +20 -0
  487. package/dist/modules/manager/pixi/index.js.map +1 -0
  488. package/dist/modules/manager/pixi/schema.d.ts +405 -0
  489. package/dist/modules/manager/pixi/schema.js +147 -0
  490. package/dist/modules/manager/pixi/schema.js.map +1 -0
  491. package/dist/modules/manager/poetry/artifacts.js +3 -4
  492. package/dist/modules/manager/poetry/artifacts.js.map +1 -1
  493. package/dist/modules/manager/poetry/extract.js +2 -1
  494. package/dist/modules/manager/poetry/extract.js.map +1 -1
  495. package/dist/modules/manager/poetry/schema.d.ts +48 -48
  496. package/dist/modules/manager/pub/artifacts.js +0 -1
  497. package/dist/modules/manager/pub/artifacts.js.map +1 -1
  498. package/dist/modules/manager/pub/schema.d.ts +8 -8
  499. package/dist/modules/manager/scalafmt/extract.js +1 -1
  500. package/dist/modules/manager/scalafmt/extract.js.map +1 -1
  501. package/dist/modules/manager/sveltos/schema.d.ts +30 -42
  502. package/dist/modules/manager/terraform/lockfile/hash.d.ts +1 -1
  503. package/dist/modules/manager/terraform/util.js +1 -3
  504. package/dist/modules/manager/terraform/util.js.map +1 -1
  505. package/dist/modules/manager/types.d.ts +6 -2
  506. package/dist/modules/manager/types.js.map +1 -1
  507. package/dist/modules/manager/vendir/schema.d.ts +7 -7
  508. package/dist/modules/platform/api.d.ts +1 -1
  509. package/dist/modules/platform/azure/azure-helper.js +2 -2
  510. package/dist/modules/platform/azure/azure-helper.js.map +1 -1
  511. package/dist/modules/platform/azure/index.js +14 -14
  512. package/dist/modules/platform/azure/index.js.map +1 -1
  513. package/dist/modules/platform/bitbucket/comments.js +4 -4
  514. package/dist/modules/platform/bitbucket/comments.js.map +1 -1
  515. package/dist/modules/platform/bitbucket/index.d.ts +1 -0
  516. package/dist/modules/platform/bitbucket/index.js +54 -44
  517. package/dist/modules/platform/bitbucket/index.js.map +1 -1
  518. package/dist/modules/platform/bitbucket/schema.d.ts +14 -14
  519. package/dist/modules/platform/bitbucket/utils.js +3 -3
  520. package/dist/modules/platform/bitbucket/utils.js.map +1 -1
  521. package/dist/modules/platform/bitbucket-server/index.d.ts +3 -3
  522. package/dist/modules/platform/bitbucket-server/index.js +81 -81
  523. package/dist/modules/platform/bitbucket-server/index.js.map +1 -1
  524. package/dist/modules/platform/bitbucket-server/pr-cache.d.ts +23 -0
  525. package/dist/modules/platform/bitbucket-server/pr-cache.js +125 -0
  526. package/dist/modules/platform/bitbucket-server/pr-cache.js.map +1 -0
  527. package/dist/modules/platform/bitbucket-server/schema.d.ts +76 -0
  528. package/dist/modules/platform/bitbucket-server/schema.js +15 -1
  529. package/dist/modules/platform/bitbucket-server/schema.js.map +1 -1
  530. package/dist/modules/platform/bitbucket-server/types.d.ts +8 -2
  531. package/dist/modules/platform/bitbucket-server/types.js.map +1 -1
  532. package/dist/modules/platform/bitbucket-server/utils.d.ts +0 -2
  533. package/dist/modules/platform/bitbucket-server/utils.js +6 -52
  534. package/dist/modules/platform/bitbucket-server/utils.js.map +1 -1
  535. package/dist/modules/platform/codecommit/codecommit-client.js +6 -6
  536. package/dist/modules/platform/codecommit/codecommit-client.js.map +1 -1
  537. package/dist/modules/platform/codecommit/index.js +24 -24
  538. package/dist/modules/platform/codecommit/index.js.map +1 -1
  539. package/dist/modules/platform/gerrit/client.d.ts +0 -3
  540. package/dist/modules/platform/gerrit/client.js +20 -29
  541. package/dist/modules/platform/gerrit/client.js.map +1 -1
  542. package/dist/modules/platform/gerrit/index.js +0 -6
  543. package/dist/modules/platform/gerrit/index.js.map +1 -1
  544. package/dist/modules/platform/gerrit/scm.js +5 -6
  545. package/dist/modules/platform/gerrit/scm.js.map +1 -1
  546. package/dist/modules/platform/gerrit/types.d.ts +1 -4
  547. package/dist/modules/platform/gerrit/types.js.map +1 -1
  548. package/dist/modules/platform/gerrit/utils.d.ts +3 -2
  549. package/dist/modules/platform/gerrit/utils.js +4 -8
  550. package/dist/modules/platform/gerrit/utils.js.map +1 -1
  551. package/dist/modules/platform/gitea/gitea-helper.d.ts +1 -0
  552. package/dist/modules/platform/gitea/gitea-helper.js +16 -0
  553. package/dist/modules/platform/gitea/gitea-helper.js.map +1 -1
  554. package/dist/modules/platform/gitea/index.d.ts +1 -0
  555. package/dist/modules/platform/gitea/index.js +33 -16
  556. package/dist/modules/platform/gitea/index.js.map +1 -1
  557. package/dist/modules/platform/gitea/schema.d.ts +8 -8
  558. package/dist/modules/platform/gitea/types.d.ts +1 -1
  559. package/dist/modules/platform/gitea/types.js.map +1 -1
  560. package/dist/modules/platform/github/common.d.ts +2 -0
  561. package/dist/modules/platform/github/common.js +16 -0
  562. package/dist/modules/platform/github/common.js.map +1 -1
  563. package/dist/modules/platform/github/index.d.ts +1 -1
  564. package/dist/modules/platform/github/index.js +87 -82
  565. package/dist/modules/platform/github/index.js.map +1 -1
  566. package/dist/modules/platform/github/issue.d.ts +18 -18
  567. package/dist/modules/platform/github/massage-markdown-links.js +2 -2
  568. package/dist/modules/platform/github/massage-markdown-links.js.map +1 -1
  569. package/dist/modules/platform/github/pr.js +3 -3
  570. package/dist/modules/platform/github/pr.js.map +1 -1
  571. package/dist/modules/platform/github/schema.d.ts +128 -128
  572. package/dist/modules/platform/github/schema.js +3 -1
  573. package/dist/modules/platform/github/schema.js.map +1 -1
  574. package/dist/modules/platform/gitlab/index.d.ts +1 -0
  575. package/dist/modules/platform/gitlab/index.js +72 -49
  576. package/dist/modules/platform/gitlab/index.js.map +1 -1
  577. package/dist/modules/platform/index.js +0 -1
  578. package/dist/modules/platform/index.js.map +1 -1
  579. package/dist/modules/platform/scm.d.ts +1 -1
  580. package/dist/modules/versioning/api.js +2 -0
  581. package/dist/modules/versioning/api.js.map +1 -1
  582. package/dist/modules/versioning/composer/index.js +10 -0
  583. package/dist/modules/versioning/composer/index.js.map +1 -1
  584. package/dist/modules/versioning/conda/index.d.ts +41 -0
  585. package/dist/modules/versioning/conda/index.js +178 -0
  586. package/dist/modules/versioning/conda/index.js.map +1 -0
  587. package/dist/modules/versioning/distro.js +1 -3
  588. package/dist/modules/versioning/distro.js.map +1 -1
  589. package/dist/modules/versioning/hashicorp/convertor.d.ts +2 -1
  590. package/dist/modules/versioning/hashicorp/convertor.js +13 -8
  591. package/dist/modules/versioning/hashicorp/convertor.js.map +1 -1
  592. package/dist/modules/versioning/hex/index.js +3 -3
  593. package/dist/modules/versioning/hex/index.js.map +1 -1
  594. package/dist/modules/versioning/npm/index.js +2 -1
  595. package/dist/modules/versioning/npm/index.js.map +1 -1
  596. package/dist/modules/versioning/schema.js +1 -1
  597. package/dist/modules/versioning/schema.js.map +1 -1
  598. package/dist/modules/versioning/types.d.ts +4 -0
  599. package/dist/modules/versioning/types.js.map +1 -1
  600. package/dist/proxy.js +2 -1
  601. package/dist/proxy.js.map +1 -1
  602. package/dist/renovate.js +2 -2
  603. package/dist/renovate.js.map +1 -1
  604. package/dist/util/cache/package/decorator.js +2 -2
  605. package/dist/util/cache/package/decorator.js.map +1 -1
  606. package/dist/util/cache/package/redis.js +0 -1
  607. package/dist/util/cache/package/redis.js.map +1 -1
  608. package/dist/util/cache/package/types.d.ts +1 -1
  609. package/dist/util/cache/package/types.js.map +1 -1
  610. package/dist/util/cache/repository/impl/base.d.ts +1 -1
  611. package/dist/util/cache/repository/impl/base.js +4 -0
  612. package/dist/util/cache/repository/impl/base.js.map +1 -1
  613. package/dist/util/cache/repository/schema.d.ts +4 -4
  614. package/dist/util/cache/repository/types.d.ts +3 -0
  615. package/dist/util/cache/repository/types.js.map +1 -1
  616. package/dist/util/common.d.ts +4 -2
  617. package/dist/util/common.js +17 -3
  618. package/dist/util/common.js.map +1 -1
  619. package/dist/util/env.d.ts +4 -0
  620. package/dist/util/env.js +22 -0
  621. package/dist/util/env.js.map +1 -0
  622. package/dist/util/exec/containerbase.js +19 -14
  623. package/dist/util/exec/containerbase.js.map +1 -1
  624. package/dist/util/exec/index.js +5 -2
  625. package/dist/util/exec/index.js.map +1 -1
  626. package/dist/util/exec/types.d.ts +0 -2
  627. package/dist/util/exec/types.js.map +1 -1
  628. package/dist/util/exec/utils.d.ts +1 -1
  629. package/dist/util/exec/utils.js +6 -5
  630. package/dist/util/exec/utils.js.map +1 -1
  631. package/dist/util/git/auth.js +8 -5
  632. package/dist/util/git/auth.js.map +1 -1
  633. package/dist/util/git/author.js +1 -1
  634. package/dist/util/git/author.js.map +1 -1
  635. package/dist/util/git/config.js +0 -1
  636. package/dist/util/git/config.js.map +1 -1
  637. package/dist/util/git/error.js +4 -2
  638. package/dist/util/git/error.js.map +1 -1
  639. package/dist/util/git/index.js +75 -52
  640. package/dist/util/git/index.js.map +1 -1
  641. package/dist/util/git/private-key.js +2 -4
  642. package/dist/util/git/private-key.js.map +1 -1
  643. package/dist/util/git/types.d.ts +2 -0
  644. package/dist/util/git/types.js.map +1 -1
  645. package/dist/util/git/url.js +1 -1
  646. package/dist/util/git/url.js.map +1 -1
  647. package/dist/util/github/graphql/datasource-fetcher.js +3 -5
  648. package/dist/util/github/graphql/datasource-fetcher.js.map +1 -1
  649. package/dist/util/github/graphql/query-adapters/releases-query-adapter.d.ts +2 -2
  650. package/dist/util/github/graphql/query-adapters/tags-query-adapter.d.ts +2 -2
  651. package/dist/util/http/auth.js +0 -1
  652. package/dist/util/http/auth.js.map +1 -1
  653. package/dist/util/http/bitbucket-server.d.ts +7 -5
  654. package/dist/util/http/bitbucket-server.js +26 -23
  655. package/dist/util/http/bitbucket-server.js.map +1 -1
  656. package/dist/util/http/bitbucket.d.ts +6 -5
  657. package/dist/util/http/bitbucket.js +34 -31
  658. package/dist/util/http/bitbucket.js.map +1 -1
  659. package/dist/util/http/cache/abstract-http-cache-provider.js +2 -2
  660. package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
  661. package/dist/util/http/cache/memory-http-cache-provider.d.ts +10 -0
  662. package/dist/util/http/cache/memory-http-cache-provider.js +29 -0
  663. package/dist/util/http/cache/memory-http-cache-provider.js.map +1 -0
  664. package/dist/util/http/cache/package-http-cache-provider.d.ts +23 -0
  665. package/dist/util/http/cache/package-http-cache-provider.js +80 -0
  666. package/dist/util/http/cache/package-http-cache-provider.js.map +1 -0
  667. package/dist/util/http/cache/schema.d.ts +2 -2
  668. package/dist/util/http/errors.d.ts +2 -0
  669. package/dist/util/http/errors.js +8 -0
  670. package/dist/util/http/errors.js.map +1 -0
  671. package/dist/util/http/gerrit.d.ts +6 -4
  672. package/dist/util/http/gerrit.js +11 -12
  673. package/dist/util/http/gerrit.js.map +1 -1
  674. package/dist/util/http/gitea.d.ts +5 -4
  675. package/dist/util/http/gitea.js +14 -13
  676. package/dist/util/http/gitea.js.map +1 -1
  677. package/dist/util/http/github.d.ts +14 -8
  678. package/dist/util/http/github.js +65 -60
  679. package/dist/util/http/github.js.map +1 -1
  680. package/dist/util/http/gitlab.d.ts +7 -5
  681. package/dist/util/http/gitlab.js +58 -46
  682. package/dist/util/http/gitlab.js.map +1 -1
  683. package/dist/util/http/got.d.ts +9 -0
  684. package/dist/util/http/got.js +54 -0
  685. package/dist/util/http/got.js.map +1 -0
  686. package/dist/util/http/host-rules.d.ts +2 -1
  687. package/dist/util/http/host-rules.js +17 -4
  688. package/dist/util/http/host-rules.js.map +1 -1
  689. package/dist/util/http/http.d.ts +93 -0
  690. package/dist/util/http/http.js +346 -0
  691. package/dist/util/http/http.js.map +1 -0
  692. package/dist/util/http/index.d.ts +6 -74
  693. package/dist/util/http/index.js +5 -359
  694. package/dist/util/http/index.js.map +1 -1
  695. package/dist/util/http/legacy.js +4 -1
  696. package/dist/util/http/legacy.js.map +1 -1
  697. package/dist/util/http/types.d.ts +9 -16
  698. package/dist/util/http/types.js.map +1 -1
  699. package/dist/util/schema-utils.d.ts +1 -0
  700. package/dist/util/schema-utils.js +43 -8
  701. package/dist/util/schema-utils.js.map +1 -1
  702. package/dist/util/stats.d.ts +10 -0
  703. package/dist/util/stats.js +45 -1
  704. package/dist/util/stats.js.map +1 -1
  705. package/dist/util/string.d.ts +16 -0
  706. package/dist/util/string.js +79 -0
  707. package/dist/util/string.js.map +1 -1
  708. package/dist/util/toml.d.ts +1 -0
  709. package/dist/util/toml.js +6 -0
  710. package/dist/util/toml.js.map +1 -1
  711. package/dist/util/url.js +3 -8
  712. package/dist/util/url.js.map +1 -1
  713. package/dist/util/yaml.js +3 -8
  714. package/dist/util/yaml.js.map +1 -1
  715. package/dist/workers/global/config/parse/env.js +3 -2
  716. package/dist/workers/global/config/parse/env.js.map +1 -1
  717. package/dist/workers/global/config/parse/file.js +19 -9
  718. package/dist/workers/global/config/parse/file.js.map +1 -1
  719. package/dist/workers/global/config/parse/host-rules-from-env.js +6 -2
  720. package/dist/workers/global/config/parse/host-rules-from-env.js.map +1 -1
  721. package/dist/workers/global/config/parse/index.js +15 -0
  722. package/dist/workers/global/config/parse/index.js.map +1 -1
  723. package/dist/workers/global/index.js +4 -2
  724. package/dist/workers/global/index.js.map +1 -1
  725. package/dist/workers/repository/cache.js +1 -2
  726. package/dist/workers/repository/cache.js.map +1 -1
  727. package/dist/workers/repository/config-migration/branch/migrated-data.js +2 -0
  728. package/dist/workers/repository/config-migration/branch/migrated-data.js.map +1 -1
  729. package/dist/workers/repository/index.js +1 -0
  730. package/dist/workers/repository/index.js.map +1 -1
  731. package/dist/workers/repository/init/merge.js +6 -3
  732. package/dist/workers/repository/init/merge.js.map +1 -1
  733. package/dist/workers/repository/onboarding/pr/config-description.js +3 -1
  734. package/dist/workers/repository/onboarding/pr/config-description.js.map +1 -1
  735. package/dist/workers/repository/process/extract-update.js +0 -1
  736. package/dist/workers/repository/process/extract-update.js.map +1 -1
  737. package/dist/workers/repository/process/fingerprint-fields.js +0 -1
  738. package/dist/workers/repository/process/fingerprint-fields.js.map +1 -1
  739. package/dist/workers/repository/process/libyear.js +2 -2
  740. package/dist/workers/repository/process/libyear.js.map +1 -1
  741. package/dist/workers/repository/process/lookup/index.js +15 -4
  742. package/dist/workers/repository/process/lookup/index.js.map +1 -1
  743. package/dist/workers/repository/process/lookup/timestamps.d.ts +18 -0
  744. package/dist/workers/repository/process/lookup/timestamps.js +69 -0
  745. package/dist/workers/repository/process/lookup/timestamps.js.map +1 -0
  746. package/dist/workers/repository/process/lookup/types.d.ts +1 -0
  747. package/dist/workers/repository/process/lookup/types.js.map +1 -1
  748. package/dist/workers/repository/process/lookup/utils.js +20 -9
  749. package/dist/workers/repository/process/lookup/utils.js.map +1 -1
  750. package/dist/workers/repository/process/sort.js +1 -1
  751. package/dist/workers/repository/process/sort.js.map +1 -1
  752. package/dist/workers/repository/process/vulnerabilities.js +1 -1
  753. package/dist/workers/repository/process/vulnerabilities.js.map +1 -1
  754. package/dist/workers/repository/process/write.js +1 -8
  755. package/dist/workers/repository/process/write.js.map +1 -1
  756. package/dist/workers/repository/reconfigure/utils.d.ts +2 -0
  757. package/dist/workers/repository/reconfigure/utils.js +16 -0
  758. package/dist/workers/repository/reconfigure/utils.js.map +1 -1
  759. package/dist/workers/repository/reconfigure/validate.js +6 -17
  760. package/dist/workers/repository/reconfigure/validate.js.map +1 -1
  761. package/dist/workers/repository/update/branch/auto-replace.js +25 -5
  762. package/dist/workers/repository/update/branch/auto-replace.js.map +1 -1
  763. package/dist/workers/repository/update/branch/commit.js +2 -0
  764. package/dist/workers/repository/update/branch/commit.js.map +1 -1
  765. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +10 -1
  766. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js.map +1 -1
  767. package/dist/workers/repository/update/pr/body/config-description.js +26 -1
  768. package/dist/workers/repository/update/pr/body/config-description.js.map +1 -1
  769. package/dist/workers/repository/update/pr/body/index.js +21 -14
  770. package/dist/workers/repository/update/pr/body/index.js.map +1 -1
  771. package/dist/workers/repository/update/pr/changelog/api.js +8 -6
  772. package/dist/workers/repository/update/pr/changelog/api.js.map +1 -1
  773. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js +1 -1
  774. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js.map +1 -1
  775. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.d.ts +3 -0
  776. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.js +39 -0
  777. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.js.map +1 -0
  778. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.d.ts +8 -0
  779. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.js +31 -0
  780. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.js.map +1 -0
  781. package/dist/workers/repository/update/pr/changelog/github/index.js +6 -3
  782. package/dist/workers/repository/update/pr/changelog/github/index.js.map +1 -1
  783. package/dist/workers/repository/update/pr/changelog/gitlab/index.js +1 -1
  784. package/dist/workers/repository/update/pr/changelog/gitlab/index.js.map +1 -1
  785. package/dist/workers/repository/update/pr/changelog/release-notes.js +12 -8
  786. package/dist/workers/repository/update/pr/changelog/release-notes.js.map +1 -1
  787. package/dist/workers/repository/update/pr/changelog/source.d.ts +1 -1
  788. package/dist/workers/repository/update/pr/changelog/source.js +1 -0
  789. package/dist/workers/repository/update/pr/changelog/source.js.map +1 -1
  790. package/dist/workers/repository/update/pr/changelog/types.d.ts +1 -1
  791. package/dist/workers/repository/update/pr/changelog/types.js.map +1 -1
  792. package/dist/workers/repository/update/pr/index.js +2 -4
  793. package/dist/workers/repository/update/pr/index.js.map +1 -1
  794. package/dist/workers/repository/updates/flatten.js +8 -4
  795. package/dist/workers/repository/updates/flatten.js.map +1 -1
  796. package/dist/workers/repository/updates/generate.js +3 -2
  797. package/dist/workers/repository/updates/generate.js.map +1 -1
  798. package/dist/workers/types.d.ts +1 -4
  799. package/dist/workers/types.js.map +1 -1
  800. package/package.json +85 -85
  801. package/renovate-schema.json +24 -3
  802. package/dist/modules/manager/github-actions/types.d.ts +0 -30
  803. package/dist/modules/manager/github-actions/types.js +0 -3
  804. package/dist/modules/manager/github-actions/types.js.map +0 -1
  805. package/dist/modules/manager/gitlabci/common.d.ts +0 -6
  806. package/dist/modules/manager/gitlabci/common.js +0 -30
  807. package/dist/modules/manager/gitlabci/common.js.map +0 -1
  808. package/dist/modules/manager/gitlabci/types.d.ts +0 -35
  809. package/dist/modules/manager/gitlabci/types.js +0 -3
  810. package/dist/modules/manager/gitlabci/types.js.map +0 -1
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateArtifacts = updateArtifacts;
4
+ const tslib_1 = require("tslib");
5
+ const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
6
+ const shlex_1 = require("shlex");
7
+ const upath_1 = tslib_1.__importDefault(require("upath"));
8
+ const error_messages_1 = require("../../../constants/error-messages");
9
+ const logger_1 = require("../../../logger");
10
+ const exec_1 = require("../../../util/exec");
11
+ const fs_1 = require("../../../util/fs");
12
+ const git_1 = require("../../../util/git");
13
+ const docker_1 = require("../../datasource/docker");
14
+ const helm_1 = require("../../datasource/helm");
15
+ const common_1 = require("./common");
16
+ const extract_1 = require("./extract");
17
+ async function localExistingChartPath(chartHome, dependencyName, version) {
18
+ const folderName = `${dependencyName}-${version}`;
19
+ const path = upath_1.default.join(chartHome, folderName);
20
+ const pathExists = await (0, fs_1.localPathExists)(path);
21
+ return pathExists ? path : null;
22
+ }
23
+ function helmRepositoryArgs(repository, depName, datasource) {
24
+ switch (datasource) {
25
+ case helm_1.HelmDatasource.id:
26
+ return `--repo ${(0, shlex_1.quote)(repository)} ${depName}`;
27
+ case docker_1.DockerDatasource.id:
28
+ return (0, shlex_1.quote)(`oci://${repository}`);
29
+ /* v8 ignore next 2: should never happen */
30
+ default:
31
+ throw new Error(`Unknown datasource: ${datasource}`);
32
+ }
33
+ }
34
+ async function inflateHelmChart(flagEnabled, execOptions, chartHome, depName, repository, currentVersion, newVersion, datasource) {
35
+ const currentChartExistingPath = await localExistingChartPath(chartHome, depName, currentVersion);
36
+ if (!flagEnabled && is_1.default.nullOrUndefined(currentChartExistingPath)) {
37
+ logger_1.logger.debug(`Not inflating Helm chart for ${depName} as kustomizeInflateHelmCharts is not enabled and the current version isn't inflated`);
38
+ return;
39
+ }
40
+ if (is_1.default.nonEmptyString(currentChartExistingPath) &&
41
+ is_1.default.nonEmptyString(newVersion)) {
42
+ logger_1.logger.debug(`Deleting previous helm chart: ${currentChartExistingPath}`);
43
+ await (0, fs_1.deleteLocalFile)(currentChartExistingPath);
44
+ }
45
+ const versionToPull = newVersion ?? currentVersion;
46
+ const versionToPullExistingPath = await localExistingChartPath(chartHome, depName, versionToPull);
47
+ if (is_1.default.nonEmptyString(versionToPullExistingPath)) {
48
+ logger_1.logger.debug(`Helm chart ${depName} version ${versionToPull} already exists at ${versionToPullExistingPath}`);
49
+ return;
50
+ }
51
+ const folderName = `${depName}-${versionToPull}`;
52
+ const untarDir = upath_1.default.join(chartHome, folderName);
53
+ logger_1.logger.debug(`Pulling helm chart ${depName} version ${versionToPull} to ${untarDir}`);
54
+ const cmd = `helm pull --untar --untardir ${(0, shlex_1.quote)(untarDir)} ` +
55
+ `--version ${(0, shlex_1.quote)(versionToPull)} ${helmRepositoryArgs(repository, depName, datasource)}`;
56
+ await (0, exec_1.exec)(cmd, execOptions);
57
+ }
58
+ async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileContent, config, }) {
59
+ logger_1.logger.debug(`kustomize.updateArtifacts(${packageFileName})`);
60
+ const project = (0, extract_1.parseKustomize)(newPackageFileContent);
61
+ const isUpdateOptionInflateChartArchives = config.postUpdateOptions?.includes('kustomizeInflateHelmCharts') === true;
62
+ if (is_1.default.nullOrUndefined(project)) {
63
+ return [
64
+ {
65
+ artifactError: {
66
+ stderr: 'Failed to parse new package file content',
67
+ },
68
+ },
69
+ ];
70
+ }
71
+ const chartHome = (0, fs_1.getSiblingFileName)(packageFileName, project.helmGlobals?.chartHome ?? 'charts');
72
+ try {
73
+ const helmToolConstraint = {
74
+ toolName: 'helm',
75
+ constraint: config.constraints?.helm,
76
+ };
77
+ const execOptions = {
78
+ docker: {},
79
+ extraEnv: (0, common_1.generateHelmEnvs)(config),
80
+ toolConstraints: [helmToolConstraint],
81
+ };
82
+ for (const dependency of updatedDeps) {
83
+ if (!dependency.currentVersion) {
84
+ continue;
85
+ }
86
+ if (dependency.newVersion === dependency.currentVersion) {
87
+ continue;
88
+ }
89
+ if (!is_1.default.nonEmptyString(dependency.depName)) {
90
+ continue;
91
+ }
92
+ if (dependency.depType !== 'HelmChart') {
93
+ continue;
94
+ }
95
+ let repository = null;
96
+ switch (dependency.datasource) {
97
+ case helm_1.HelmDatasource.id:
98
+ repository = dependency.registryUrls?.[0];
99
+ break;
100
+ case docker_1.DockerDatasource.id:
101
+ repository = dependency.packageName;
102
+ break;
103
+ }
104
+ if (is_1.default.nullOrUndefined(repository)) {
105
+ continue;
106
+ }
107
+ await inflateHelmChart(isUpdateOptionInflateChartArchives, execOptions, chartHome, dependency.depName, repository, dependency.currentVersion, dependency.newVersion, dependency.datasource);
108
+ }
109
+ const status = await (0, git_1.getRepoStatus)();
110
+ const chartsAddition = status?.not_added ?? [];
111
+ const chartsDeletion = status?.deleted ?? [];
112
+ const fileChanges = [];
113
+ for (const file of chartsAddition) {
114
+ // only add artifacts in the chartHome path
115
+ if (!file.startsWith(chartHome)) {
116
+ continue;
117
+ }
118
+ fileChanges.push({
119
+ file: {
120
+ type: 'addition',
121
+ path: file,
122
+ contents: await (0, fs_1.readLocalFile)(file),
123
+ },
124
+ });
125
+ }
126
+ for (const file of chartsDeletion) {
127
+ // only add artifacts in the chartHome path
128
+ if (!file.startsWith(chartHome)) {
129
+ continue;
130
+ }
131
+ fileChanges.push({
132
+ file: {
133
+ type: 'deletion',
134
+ path: file,
135
+ },
136
+ });
137
+ }
138
+ return fileChanges.length > 0 ? fileChanges : null;
139
+ }
140
+ catch (err) {
141
+ if (err.message === error_messages_1.TEMPORARY_ERROR) {
142
+ throw err;
143
+ }
144
+ logger_1.logger.debug({ err }, 'Failed to inflate helm chart');
145
+ return [
146
+ {
147
+ artifactError: {
148
+ stderr: err.message,
149
+ },
150
+ },
151
+ ];
152
+ }
153
+ }
154
+ //# sourceMappingURL=artifacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/kustomize/artifacts.ts"],"names":[],"mappings":";;AA0GA,0CAgIC;;AA1OD,kEAAkC;AAClC,iCAA8B;AAC9B,0DAA0B;AAC1B,sEAAoE;AACpE,4CAAyC;AACzC,6CAA0C;AAE1C,yCAK0B;AAC1B,2CAAkD;AAClD,oDAA2D;AAC3D,gDAAuD;AAEvD,qCAA4C;AAC5C,uCAA2C;AAE3C,KAAK,UAAU,sBAAsB,CACnC,SAAiB,EACjB,cAAsB,EACtB,OAAgB;IAEhB,MAAM,UAAU,GAAG,GAAG,cAAc,IAAI,OAAO,EAAE,CAAC;IAClD,MAAM,IAAI,GAAG,eAAK,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,MAAM,IAAA,oBAAe,EAAC,IAAI,CAAC,CAAC;IAE/C,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAClC,CAAC;AAED,SAAS,kBAAkB,CACzB,UAAkB,EAClB,OAAe,EACf,UAAmB;IAEnB,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,qBAAc,CAAC,EAAE;YACpB,OAAO,UAAU,IAAA,aAAK,EAAC,UAAU,CAAC,IAAI,OAAO,EAAE,CAAC;QAClD,KAAK,yBAAgB,CAAC,EAAE;YACtB,OAAO,IAAA,aAAK,E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AAC;gBAChC,SAAS;YACX,CAAC;YACD,WAAW,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,IAAI;oBACV,QAAQ,EAAE,MAAM,IAAA,kBAAa,EAAC,IAAI,CAAC;iBACpC;aACF,CAAC,CAAC;QACL,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,cAAc,EAAE,CAAC;YAClC,2CAA2C;YAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;gBAChC,SAAS;YACX,CAAC;YACD,WAAW,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,IAAI;iBACX;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,CAAC,OAAO,KAAK,gCAAe,EAAE,CAAC;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,8BAA8B,CAAC,CAAC;QACtD,OAAO;YACL;gBACE,aAAa,EAAE;oBACb,MAAM,EAAE,GAAG,CAAC,OAAO;iBACpB;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport upath from 'upath';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions, ToolConstraint } from '../../../util/exec/types';\nimport {\n deleteLocalFile,\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n} from '../../../util/fs';\nimport { getRepoStatus } from '../../../util/git';\nimport { DockerDatasource } from '../../datasource/docker';\nimport { HelmDatasource } from '../../datasource/helm';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { generateHelmEnvs } from './common';\nimport { parseKustomize } from './extract';\n\nasync function localExistingChartPath(\n chartHome: string,\n dependencyName: string,\n version?: string,\n): Promise<string | null> {\n const folderName = `${dependencyName}-${version}`;\n const path = upath.join(chartHome, folderName);\n const pathExists = await localPathExists(path);\n\n return pathExists ? path : null;\n}\n\nfunction helmRepositoryArgs(\n repository: string,\n depName: string,\n datasource?: string,\n): string {\n switch (datasource) {\n case HelmDatasource.id:\n return `--repo ${quote(repository)} ${depName}`;\n case DockerDatasource.id:\n return quote(`oci://${repository}`);\n /* v8 ignore next 2: should never happen */\n default:\n throw new Error(`Unknown datasource: ${datasource}`);\n }\n}\n\nasync function inflateHelmChart(\n flagEnabled: boolean,\n execOptions: ExecOptions,\n chartHome: string,\n depName: string,\n repository: string,\n currentVersion: string,\n newVersion?: string,\n datasource?: string,\n): Promise<void> {\n const currentChartExistingPath = await localExistingChartPath(\n chartHome,\n depName,\n currentVersion,\n );\n\n if (!flagEnabled && is.nullOrUndefined(currentChartExistingPath)) {\n logger.debug(\n `Not inflating Helm chart for ${depName} as kustomizeInflateHelmCharts is not enabled and the current version isn't inflated`,\n );\n return;\n }\n\n if (\n is.nonEmptyString(currentChartExistingPath) &&\n is.nonEmptyString(newVersion)\n ) {\n logger.debug(`Deleting previous helm chart: ${currentChartExistingPath}`);\n await deleteLocalFile(currentChartExistingPath);\n }\n\n const versionToPull = newVersion ?? currentVersion;\n const versionToPullExistingPath = await localExistingChartPath(\n chartHome,\n depName,\n versionToPull,\n );\n\n if (is.nonEmptyString(versionToPullExistingPath)) {\n logger.debug(\n `Helm chart ${depName} version ${versionToPull} already exists at ${versionToPullExistingPath}`,\n );\n return;\n }\n\n const folderName = `${depName}-${versionToPull}`;\n const untarDir = upath.join(chartHome, folderName);\n logger.debug(\n `Pulling helm chart ${depName} version ${versionToPull} to ${untarDir}`,\n );\n\n const cmd =\n `helm pull --untar --untardir ${quote(untarDir)} ` +\n `--version ${quote(versionToPull)} ${helmRepositoryArgs(repository, depName, datasource)}`;\n\n await exec(cmd, execOptions);\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`kustomize.updateArtifacts(${packageFileName})`);\n const project = parseKustomize(newPackageFileContent);\n const isUpdateOptionInflateChartArchives =\n config.postUpdateOptions?.includes('kustomizeInflateHelmCharts') === true;\n if (is.nullOrUndefined(project)) {\n return [\n {\n artifactError: {\n stderr: 'Failed to parse new package file content',\n },\n },\n ];\n }\n\n const chartHome = getSiblingFileName(\n packageFileName,\n project.helmGlobals?.chartHome ?? 'charts',\n );\n\n try {\n const helmToolConstraint: ToolConstraint = {\n toolName: 'helm',\n constraint: config.constraints?.helm,\n };\n\n const execOptions: ExecOptions = {\n docker: {},\n extraEnv: generateHelmEnvs(config),\n toolConstraints: [helmToolConstraint],\n };\n\n for (const dependency of updatedDeps) {\n if (!dependency.currentVersion) {\n continue;\n }\n\n if (dependency.newVersion === dependency.currentVersion) {\n continue;\n }\n\n if (!is.nonEmptyString(dependency.depName)) {\n continue;\n }\n\n if (dependency.depType !== 'HelmChart') {\n continue;\n }\n\n let repository = null;\n\n switch (dependency.datasource) {\n case HelmDatasource.id:\n repository = dependency.registryUrls?.[0];\n break;\n case DockerDatasource.id:\n repository = dependency.packageName;\n break;\n }\n\n if (is.nullOrUndefined(repository)) {\n continue;\n }\n\n await inflateHelmChart(\n isUpdateOptionInflateChartArchives,\n execOptions,\n chartHome,\n dependency.depName,\n repository,\n dependency.currentVersion,\n dependency.newVersion,\n dependency.datasource,\n );\n }\n\n const status = await getRepoStatus();\n const chartsAddition = status?.not_added ?? [];\n const chartsDeletion = status?.deleted ?? [];\n\n const fileChanges: UpdateArtifactsResult[] = [];\n\n for (const file of chartsAddition) {\n // only add artifacts in the chartHome path\n if (!file.startsWith(chartHome)) {\n continue;\n }\n fileChanges.push({\n file: {\n type: 'addition',\n path: file,\n contents: await readLocalFile(file),\n },\n });\n }\n\n for (const file of chartsDeletion) {\n // only add artifacts in the chartHome path\n if (!file.startsWith(chartHome)) {\n continue;\n }\n fileChanges.push({\n file: {\n type: 'deletion',\n path: file,\n },\n });\n }\n\n return fileChanges.length > 0 ? fileChanges : null;\n } catch (err) {\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to inflate helm chart');\n return [\n {\n artifactError: {\n stderr: err.message,\n },\n },\n ];\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { ExtraEnv } from '../../../util/exec/types';
2
+ import type { UpdateArtifactsConfig } from '../types';
3
+ export declare function generateHelmEnvs(config: UpdateArtifactsConfig): ExtraEnv;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateHelmEnvs = generateHelmEnvs;
4
+ const tslib_1 = require("tslib");
5
+ const semver_1 = tslib_1.__importDefault(require("semver"));
6
+ const upath_1 = tslib_1.__importDefault(require("upath"));
7
+ const fs_1 = require("../../../util/fs");
8
+ function generateHelmEnvs(config) {
9
+ const cacheDir = (0, fs_1.privateCacheDir)();
10
+ const envs = {
11
+ // set cache and config files to a path in privateCacheDir to prevent file and credential leakage
12
+ HELM_REGISTRY_CONFIG: upath_1.default.join(cacheDir, 'registry.json'),
13
+ HELM_REPOSITORY_CONFIG: upath_1.default.join(cacheDir, 'repositories.yaml'),
14
+ HELM_REPOSITORY_CACHE: upath_1.default.join(cacheDir, 'repositories'),
15
+ };
16
+ if (config.constraints?.helm &&
17
+ !semver_1.default.intersects(config.constraints.helm, '>=3.8.0')) {
18
+ envs.HELM_EXPERIMENTAL_OCI = '1';
19
+ }
20
+ return envs;
21
+ }
22
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../lib/modules/manager/kustomize/common.ts"],"names":[],"mappings":";;AAMA,4CAkBC;;AAxBD,4DAA4B;AAC5B,0DAA0B;AAE1B,yCAAmD;AAGnD,SAAgB,gBAAgB,CAAC,MAA6B;IAC5D,MAAM,QAAQ,GAAG,IAAA,oBAAe,GAAE,CAAC;IAEnC,MAAM,IAAI,GAAa;QACrB,iGAAiG;QACjG,oBAAoB,EAAE,eAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC;QAC3D,sBAAsB,EAAE,eAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC;QACjE,qBAAqB,EAAE,eAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC;KAC5D,CAAC;IAEF,IACE,MAAM,CAAC,WAAW,EAAE,IAAI;QACxB,CAAC,gBAAM,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,EACtD,CAAC;QACD,IAAI,CAAC,qBAAqB,GAAG,GAAG,CAAC;IACnC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import semver from 'semver';\nimport upath from 'upath';\nimport type { ExtraEnv } from '../../../util/exec/types';\nimport { privateCacheDir } from '../../../util/fs';\nimport type { UpdateArtifactsConfig } from '../types';\n\nexport function generateHelmEnvs(config: UpdateArtifactsConfig): ExtraEnv {\n const cacheDir = privateCacheDir();\n\n const envs: ExtraEnv = {\n // set cache and config files to a path in privateCacheDir to prevent file and credential leakage\n HELM_REGISTRY_CONFIG: upath.join(cacheDir, 'registry.json'),\n HELM_REPOSITORY_CONFIG: upath.join(cacheDir, 'repositories.yaml'),\n HELM_REPOSITORY_CACHE: upath.join(cacheDir, 'repositories'),\n };\n\n if (\n config.constraints?.helm &&\n !semver.intersects(config.constraints.helm, '>=3.8.0')\n ) {\n envs.HELM_EXPERIMENTAL_OCI = '1';\n }\n\n return envs;\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import type { Category } from '../../../constants';
2
+ export { updateArtifacts } from './artifacts';
2
3
  export { extractPackageFile } from './extract';
3
4
  export declare const url = "https://kubectl.docs.kubernetes.io/references/kustomize";
4
5
  export declare const categories: Category[];
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supportedDatasources = exports.defaultConfig = exports.categories = exports.url = exports.extractPackageFile = void 0;
3
+ exports.supportedDatasources = exports.defaultConfig = exports.categories = exports.url = exports.extractPackageFile = exports.updateArtifacts = void 0;
4
4
  const docker_1 = require("../../datasource/docker");
5
5
  const git_tags_1 = require("../../datasource/git-tags");
6
6
  const github_tags_1 = require("../../datasource/github-tags");
7
7
  const helm_1 = require("../../datasource/helm");
8
+ var artifacts_1 = require("./artifacts");
9
+ Object.defineProperty(exports, "updateArtifacts", { enumerable: true, get: function () { return artifacts_1.updateArtifacts; } });
8
10
  var extract_1 = require("./extract");
9
11
  Object.defineProperty(exports, "extractPackageFile", { enumerable: true, get: function () { return extract_1.extractPackageFile; } });
10
12
  exports.url = 'https://kubectl.docs.kubernetes.io/references/kustomize';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/kustomize/index.ts"],"names":[],"mappings":";;;AACA,oDAA2D;AAC3D,wDAA8D;AAC9D,8DAAoE;AACpE,gDAAuD;AACvD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,GAAG,GAAG,yDAAyD,CAAC;AAChE,QAAA,UAAU,GAAe,CAAC,YAAY,CAAC,CAAC;AAExC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,6BAA6B,CAAC;IAC1C,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,yBAAgB,CAAC,EAAE;IACnB,4BAAiB,CAAC,EAAE;IACpB,kCAAoB,CAAC,EAAE;IACvB,qBAAc,CAAC,EAAE;CAClB,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { DockerDatasource } from '../../datasource/docker';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { GithubTagsDatasource } from '../../datasource/github-tags';\nimport { HelmDatasource } from '../../datasource/helm';\nexport { extractPackageFile } from './extract';\n\nexport const url = 'https://kubectl.docs.kubernetes.io/references/kustomize';\nexport const categories: Category[] = ['kubernetes'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)kustomization\\\\.ya?ml$'],\n pinDigests: false,\n};\n\nexport const supportedDatasources = [\n DockerDatasource.id,\n GitTagsDatasource.id,\n GithubTagsDatasource.id,\n HelmDatasource.id,\n];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/kustomize/index.ts"],"names":[],"mappings":";;;AACA,oDAA2D;AAC3D,wDAA8D;AAC9D,8DAAoE;AACpE,gDAAuD;AACvD,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,GAAG,GAAG,yDAAyD,CAAC;AAChE,QAAA,UAAU,GAAe,CAAC,YAAY,CAAC,CAAC;AAExC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,6BAA6B,CAAC;IAC1C,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,yBAAgB,CAAC,EAAE;IACnB,4BAAiB,CAAC,EAAE;IACpB,kCAAoB,CAAC,EAAE;IACvB,qBAAc,CAAC,EAAE;CAClB,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { DockerDatasource } from '../../datasource/docker';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { GithubTagsDatasource } from '../../datasource/github-tags';\nimport { HelmDatasource } from '../../datasource/helm';\nexport { updateArtifacts } from './artifacts';\nexport { extractPackageFile } from './extract';\n\nexport const url = 'https://kubectl.docs.kubernetes.io/references/kustomize';\nexport const categories: Category[] = ['kubernetes'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)kustomization\\\\.ya?ml$'],\n pinDigests: false,\n};\n\nexport const supportedDatasources = [\n DockerDatasource.id,\n GitTagsDatasource.id,\n GithubTagsDatasource.id,\n HelmDatasource.id,\n];\n"]}
@@ -9,6 +9,9 @@ export interface HelmChart {
9
9
  repo: string;
10
10
  version: string;
11
11
  }
12
+ export interface HelmGlobals {
13
+ chartHome?: string;
14
+ }
12
15
  export interface Kustomize {
13
16
  kind?: string;
14
17
  bases?: string[];
@@ -16,4 +19,5 @@ export interface Kustomize {
16
19
  components?: string[];
17
20
  images?: Image[];
18
21
  helmCharts?: HelmChart[];
22
+ helmGlobals?: HelmGlobals;
19
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../lib/modules/manager/kustomize/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface Image {\n name: string;\n newTag?: string;\n newName?: string;\n digest?: string;\n}\n\nexport interface HelmChart {\n name: string;\n repo: string;\n version: string;\n}\n\nexport interface Kustomize {\n kind?: string;\n bases?: string[]; // deprecated since kustomize v2.1.0\n resources?: string[];\n components?: string[];\n images?: Image[];\n helmCharts?: HelmChart[];\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../lib/modules/manager/kustomize/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface Image {\n name: string;\n newTag?: string;\n newName?: string;\n digest?: string;\n}\n\nexport interface HelmChart {\n name: string;\n repo: string;\n version: string;\n}\n\nexport interface HelmGlobals {\n chartHome?: string;\n}\n\nexport interface Kustomize {\n kind?: string;\n bases?: string[]; // deprecated since kustomize v2.1.0\n resources?: string[];\n components?: string[];\n images?: Image[];\n helmCharts?: HelmChart[];\n helmGlobals?: HelmGlobals;\n}\n"]}
@@ -189,9 +189,7 @@ function applyPropsInternal(dep, depPackageFile, props, previouslySeenProps) {
189
189
  // TODO: wrong types here, props is already `MavenProp`
190
190
  const propValue = props[propKey];
191
191
  if (propValue) {
192
- if (!sharedVariableName) {
193
- sharedVariableName = propKey;
194
- }
192
+ sharedVariableName ??= propKey;
195
193
  fileReplacePosition = propValue.fileReplacePosition;
196
194
  propSource =
197
195
  propValue.packageFile ??
@@ -395,7 +393,9 @@ function resolveParents(packages) {
395
393
  const dep = applyProps(rawDep, name, extractedProps[name]);
396
394
  if (dep.depType === 'parent') {
397
395
  const parentPkg = extractedPackages[pkg.parent];
398
- if (parentPkg && !parentPkg.parent) {
396
+ const hasParentWithNoParent = parentPkg && !parentPkg.parent;
397
+ const hasParentWithExternalParent = parentPkg && !packageFileNames.includes(parentPkg.parent);
398
+ if (hasParentWithNoParent || hasParentWithExternalParent) {
399
399
  rootDeps.add(dep.depName);
400
400
  }
401
401
  }
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/maven/extract.ts"],"names":[],"mappings":";;AAsSA,wCA8DC;AAED,8CAsBC;AAgBD,sCAeC;AAED,wCAmFC;AAeD,8CAsBC;AAED,wDA8CC;;AArkBD,kEAAkC;AAClC,0DAA0B;AAE1B,mCAAqC;AACrC,4CAAyC;AACzC,yCAAiD;AACjD,+CAA4C;AAC5C,kDAAyD;AACzD,0DAA2D;AAI3D,MAAM,mBAAmB,GAAG;IAC1B,wCAAwC;IACxC,wCAAwC;IACxC,wCAAwC;CACzC,CAAC;AAEF,MAAM,6BAA6B,GAAG;IACpC,0CAA0C;IAC1C,0CAA0C;IAC1C,0CAA0C;CAC3C,CAAC;AAEF,SAAS,QAAQ,CAAC,GAAW,EAAE,WAAmB;IAChD,IAAI,OAAoB,CAAC;IACzB,IAAI,CAAC;QACH,OAAO,GAAG,IAAI,oBAAW,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,eAAM,CAAC,IAAI,CACT,qGAAqG,CACtG,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE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sB,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport upath from 'upath';\nimport type { XmlElement } from 'xmldoc';\nimport { XmlDocument } from 'xmldoc';\nimport { logger } from '../../../logger';\nimport { readLocalFile } from '../../../util/fs';\nimport { regEx } from '../../../util/regex';\nimport { MavenDatasource } from '../../datasource/maven';\nimport { MAVEN_REPO } from '../../datasource/maven/common';\nimport type { ExtractConfig, PackageDependency, PackageFile } from '../types';\nimport type { MavenProp } from './types';\n\nconst supportedNamespaces = [\n 'http://maven.apache.org/SETTINGS/1.0.0',\n 'http://maven.apache.org/SETTINGS/1.1.0',\n 'http://maven.apache.org/SETTINGS/1.2.0',\n];\n\nconst supportedExtensionsNamespaces = [\n 'http://maven.apache.org/EXTENSIONS/1.0.0',\n 'http://maven.apache.org/EXTENSIONS/1.1.0',\n 'http://maven.apache.org/EXTENSIONS/1.2.0',\n];\n\nfunction parsePom(raw: string, packageFile: string): XmlDocument | null {\n let project: XmlDocument;\n try {\n project = new XmlDocument(raw);\n if (raw.includes('\\r\\n')) {\n logger.warn(\n 'Your pom.xml contains windows line endings. This is not supported and may result in parsing issues.',\n );\n }\n } catch {\n logger.debug({ packageFile }, `Failed to parse as XML`);\n return null;\n }\n const { name, attr, children } = project;\n if (name !== 'project') {\n return null;\n }\n if (attr.xmlns === 'http://maven.apache.org/POM/4.0.0') {\n return project;\n }\n if (\n is.nonEmptyArray(children) &&\n children.some((c: any) => c.name === 'modelVersion' && c.val === '4.0.0')\n ) {\n return project;\n }\n return null;\n}\n\nfunction parseExtensions(raw: string, packageFile: string): XmlDocument | null {\n let extensions: XmlDocument;\n try {\n extensions = new XmlDocument(raw);\n } catch {\n logger.debug({ packageFile }, `Failed to parse as XML`);\n return null;\n }\n const { name, attr, children } = extensions;\n if (name !== 'extensions') {\n return null;\n }\n if (!supportedExtensionsNamespaces.includes(attr.xmlns)) {\n return null;\n }\n if (!is.nonEmptyArray(children)) {\n return null;\n }\n return extensions;\n}\n\nfunction containsPlaceholder(str: string | null | undefined): boolean {\n return !!str && regEx(/\\${[^}]*?}/).test(str);\n}\n\nfunction depFromNode(\n node: XmlElement,\n underBuildSettingsElement: boolean,\n): PackageDependency | null {\n if (!('valueWithPath' in node)) {\n return null;\n }\n let groupId = node.valueWithPath('groupId')?.trim();\n const artifactId = node.valueWithPath('artifactId')?.trim();\n const currentValue = node.valueWithPath('version')?.trim();\n let depType: string | undefined;\n\n if (!groupId && node.name === 'plugin') {\n groupId = 'org.apache.maven.plugins';\n }\n\n if (groupId && artifactId && currentValue) {\n const depName = `${groupId}:${artifactId}`;\n const versionNode = node.descendantWithPath('version')!;\n const fileReplacePosition = versionNode.position;\n const datasource = MavenDatasource.id;\n const result: PackageDependency = {\n datasource,\n depName,\n currentValue,\n fileReplacePosition,\n registryUrls: [],\n };\n\n switch (node.name) {\n case 'plugin':\n case 'extension':\n depType = 'build';\n break;\n case 'parent':\n depType = 'parent';\n break;\n case 'dependency':\n if (underBuildSettingsElement) {\n depType = 'build';\n } else if (node.valueWithPath('optional')?.trim() === 'true') {\n depType = 'optional';\n } else {\n depType = node.valueWithPath('scope')?.trim() ?? 'compile'; // maven default scope is compile\n }\n break;\n }\n\n if (depType) {\n result.depType = depType;\n }\n\n return result;\n }\n return null;\n}\n\nfunction deepExtract(\n node: XmlElement,\n result: PackageDependency[] = [],\n isRoot = true,\n underBuildSettingsElement = false,\n): PackageDependency[] {\n const dep = depFromNode(node, underBuildSettingsElement);\n if (dep && !isRoot) {\n result.push(dep);\n }\n if (node.children) {\n for (const child of node.children) {\n deepExtract(\n child as XmlElement,\n result,\n false,\n node.name === 'build' ||\n node.name === 'reporting' ||\n underBuildSettingsElement,\n );\n }\n }\n return result;\n}\n\nfunction applyProps(\n dep: PackageDependency<Record<string, any>>,\n depPackageFile: string,\n props: MavenProp,\n): PackageDependency<Record<string, any>> {\n let result = dep;\n let anyChange = false;\n const alreadySeenProps = new Set<string>();\n\n do {\n const [returnedResult, returnedAnyChange, fatal] = applyPropsInternal(\n result,\n depPackageFile,\n props,\n alreadySeenProps,\n );\n if (fatal) {\n dep.skipReason = 'recursive-placeholder';\n return dep;\n }\n result = returnedResult;\n anyChange = returnedAnyChange;\n } while (anyChange);\n\n if (containsPlaceholder(result.depName)) {\n result.skipReason = 'name-placeholder';\n } else if (containsPlaceholder(result.currentValue)) {\n result.skipReason = 'version-placeholder';\n }\n\n return result;\n}\n\nfunction applyPropsInternal(\n dep: PackageDependency<Record<string, any>>,\n depPackageFile: string,\n props: MavenProp,\n previouslySeenProps: Set<string>,\n): [PackageDependency<Record<string, any>>, boolean, boolean] {\n let anyChange = false;\n let fatal = false;\n\n const seenProps = new Set<string>();\n\n const replaceAll = (str: string): string =>\n str.replace(regEx(/\\${[^}]*?}/g), (substr) => {\n const propKey = substr.slice(2, -1).trim();\n // TODO: wrong types here, props is already `MavenProp`\n const propValue = (props as any)[propKey] as MavenProp;\n if (propValue) {\n anyChange = true;\n if (previouslySeenProps.has(propKey)) {\n fatal = true;\n } else {\n seenProps.add(propKey);\n }\n return propValue.val;\n }\n return substr;\n });\n\n const depName = replaceAll(dep.depName!);\n const registryUrls = dep.registryUrls!.map((url) => replaceAll(url));\n\n let fileReplacePosition = dep.fileReplacePosition;\n let propSource = dep.propSource;\n let sharedVariableName: string | null = null;\n const currentValue = dep.currentValue!.replace(\n regEx(/^\\${[^}]*?}$/),\n (substr) => {\n const propKey = substr.slice(2, -1).trim();\n // TODO: wrong types here, props is already `MavenProp`\n const propValue = (props as any)[propKey] as MavenProp;\n if (propValue) {\n if (!sharedVariableName) {\n sharedVariableName = propKey;\n }\n fileReplacePosition = propValue.fileReplacePosition;\n propSource =\n propValue.packageFile ??\n // istanbul ignore next\n undefined;\n anyChange = true;\n if (previouslySeenProps.has(propKey)) {\n fatal = true;\n } else {\n seenProps.add(propKey);\n }\n return propValue.val;\n }\n return substr;\n },\n );\n\n const result: PackageDependency = {\n ...dep,\n depName,\n registryUrls,\n fileReplacePosition,\n propSource,\n currentValue,\n };\n\n if (sharedVariableName) {\n result.sharedVariableName = sharedVariableName;\n }\n\n if (propSource && depPackageFile !== propSource) {\n result.editFile = propSource;\n }\n\n for (const prop of seenProps) {\n previouslySeenProps.add(prop);\n }\n return [result, anyChange, fatal];\n}\n\nfunction resolveParentFile(packageFile: string, parentPath: string): string {\n let parentFile = 'pom.xml';\n let parentDir = parentPath;\n const parentBasename = upath.basename(parentPath);\n if (parentBasename === 'pom.xml' || parentBasename.endsWith('.pom.xml')) {\n parentFile = parentBasename;\n parentDir = upath.dirname(parentPath);\n }\n const dir = upath.dirname(packageFile);\n return upath.normalize(upath.join(dir, parentDir, parentFile));\n}\n\ninterface MavenInterimPackageFile extends PackageFile {\n mavenProps?: Record<string, any>;\n parent?: string;\n}\n\nexport function extractPackage(\n rawContent: string,\n packageFile: string,\n): PackageFile | null {\n if (!rawContent) {\n return null;\n }\n\n const project = parsePom(rawContent, packageFile);\n if (!project) {\n return null;\n }\n\n const result: MavenInterimPackageFile = {\n datasource: MavenDatasource.id,\n packageFile,\n deps: [],\n };\n\n result.deps = deepExtract(project);\n\n const propsNode = project.childNamed('properties');\n const props: Record<string, MavenProp> = {};\n if (propsNode?.children) {\n for (const propNode of propsNode.children as XmlElement[]) {\n const key = propNode.name;\n const val = propNode?.val?.trim();\n if (key && val) {\n const fileReplacePosition = propNode.position;\n props[key] = { val, fileReplacePosition, packageFile };\n }\n }\n }\n result.mavenProps = props;\n\n const repositories = project.childNamed('repositories');\n if (repositories?.children) {\n const repoUrls: string[] = [];\n for (const repo of repositories.childrenNamed('repository')) {\n const repoUrl = repo.valueWithPath('url')?.trim();\n if (repoUrl) {\n repoUrls.push(repoUrl);\n }\n }\n result.deps.forEach((dep) => {\n if (is.array(dep.registryUrls)) {\n repoUrls.forEach((url) => dep.registryUrls!.push(url));\n }\n });\n }\n\n if (packageFile && project.childNamed('parent')) {\n const parentPath =\n project.valueWithPath('parent.relativePath')?.trim() ?? '../pom.xml';\n result.parent = resolveParentFile(packageFile, parentPath);\n }\n\n if (project.childNamed('version')) {\n result.packageFileVersion = project.valueWithPath('version')!.trim();\n }\n\n return result;\n}\n\nexport function extractRegistries(rawContent: string): string[] {\n if (!rawContent) {\n return [];\n }\n\n const settings = parseSettings(rawContent);\n if (!settings) {\n return [];\n }\n\n const urls: string[] = [];\n\n const mirrorUrls = parseUrls(settings, 'mirrors');\n urls.push(...mirrorUrls);\n\n settings.childNamed('profiles')?.eachChild((profile) => {\n const repositoryUrls = parseUrls(profile, 'repositories');\n urls.push(...repositoryUrls);\n });\n\n // filter out duplicates\n return [...new Set(urls)];\n}\n\nfunction parseUrls(xmlNode: XmlElement, path: string): string[] {\n const children = xmlNode.descendantWithPath(path);\n const urls: string[] = [];\n if (children?.children) {\n children.eachChild((child) => {\n const url = child.valueWithPath('url');\n if (url) {\n urls.push(url);\n }\n });\n }\n return urls;\n}\n\nexport function parseSettings(raw: string): XmlDocument | null {\n let settings: XmlDocument;\n try {\n settings = new XmlDocument(raw);\n } catch {\n return null;\n }\n const { name, attr } = settings;\n if (name !== 'settings') {\n return null;\n }\n if (supportedNamespaces.includes(attr.xmlns)) {\n return settings;\n }\n return null;\n}\n\nexport function resolveParents(packages: PackageFile[]): PackageFile[] {\n const packageFileNames: string[] = [];\n const extractedPackages: Record<string, MavenInterimPackageFile> = {};\n const extractedDeps: Record<string, PackageDependency[]> = {};\n const extractedProps: Record<string, MavenProp> = {};\n const registryUrls: Record<string, Set<string>> = {};\n packages.forEach((pkg) => {\n const name = pkg.packageFile;\n packageFileNames.push(name);\n extractedPackages[name] = pkg;\n extractedDeps[name] = [];\n });\n\n // Construct package-specific prop scopes\n // and merge them in reverse order,\n // which allows inheritance/overriding.\n packageFileNames.forEach((name) => {\n registryUrls[name] = new Set();\n const propsHierarchy: Record<string, MavenProp>[] = [];\n const visitedPackages = new Set<string>();\n let pkg: MavenInterimPackageFile | null = extractedPackages[name];\n while (pkg) {\n propsHierarchy.unshift(pkg.mavenProps!);\n\n if (pkg.deps) {\n pkg.deps.forEach((dep) => {\n if (dep.registryUrls) {\n dep.registryUrls.forEach((url) => {\n registryUrls[name].add(url);\n });\n }\n });\n }\n\n if (pkg.parent && !visitedPackages.has(pkg.parent)) {\n visitedPackages.add(pkg.parent);\n pkg = extractedPackages[pkg.parent];\n } else {\n pkg = null;\n }\n }\n propsHierarchy.unshift({});\n extractedProps[name] = Object.assign.apply(null, propsHierarchy as any);\n });\n\n // Resolve registryUrls\n packageFileNames.forEach((name) => {\n const pkg = extractedPackages[name];\n pkg.deps.forEach((rawDep) => {\n const urlsSet = new Set([...rawDep.registryUrls!, ...registryUrls[name]]);\n rawDep.registryUrls = [...urlsSet];\n });\n });\n\n const rootDeps = new Set<string>();\n // Resolve placeholders\n packageFileNames.forEach((name) => {\n const pkg = extractedPackages[name];\n pkg.deps.forEach((rawDep) => {\n const dep = applyProps(rawDep, name, extractedProps[name]);\n if (dep.depType === 'parent') {\n const parentPkg = extractedPackages[pkg.parent!];\n if (parentPkg && !parentPkg.parent) {\n rootDeps.add(dep.depName!);\n }\n }\n const sourceName = dep.propSource ?? name;\n extractedDeps[sourceName].push(dep);\n });\n });\n\n const packageFiles = packageFileNames.map((packageFile) => {\n const pkg = extractedPackages[packageFile];\n const deps = extractedDeps[packageFile];\n for (const dep of deps) {\n if (rootDeps.has(dep.depName!)) {\n dep.depType = 'parent-root';\n }\n }\n return { ...pkg, deps };\n });\n\n return packageFiles;\n}\n\nfunction cleanResult(packageFiles: MavenInterimPackageFile[]): PackageFile[] {\n packageFiles.forEach((packageFile) => {\n delete packageFile.mavenProps;\n delete packageFile.parent;\n packageFile.deps.forEach((dep) => {\n delete dep.propSource;\n //Add Registry From SuperPom\n dep.registryUrls!.push(MAVEN_REPO);\n });\n });\n return packageFiles;\n}\n\nexport function extractExtensions(\n rawContent: string,\n packageFile: string,\n): PackageFile | null {\n if (!rawContent) {\n return null;\n }\n\n const extensions = parseExtensions(rawContent, packageFile);\n if (!extensions) {\n return null;\n }\n\n const result: MavenInterimPackageFile = {\n datasource: MavenDatasource.id,\n packageFile,\n deps: [],\n };\n\n result.deps = deepExtract(extensions);\n\n return result;\n}\n\nexport async function extractAllPackageFiles(\n _config: ExtractConfig,\n packageFiles: string[],\n): Promise<PackageFile[]> {\n const packages: PackageFile[] = [];\n const additionalRegistryUrls: string[] = [];\n\n for (const packageFile of packageFiles) {\n const content = await readLocalFile(packageFile, 'utf8');\n if (!content) {\n logger.debug({ packageFile }, 'packageFile has no content');\n continue;\n }\n if (packageFile.endsWith('settings.xml')) {\n const registries = extractRegistries(content);\n if (registries) {\n logger.debug(\n { registries, packageFile },\n 'Found registryUrls in settings.xml',\n );\n additionalRegistryUrls.push(...registries);\n }\n } else if (packageFile.endsWith('.mvn/extensions.xml')) {\n const extensions = extractExtensions(content, packageFile);\n if (extensions) {\n packages.push(extensions);\n } else {\n logger.trace({ packageFile }, 'can not read extensions');\n }\n } else {\n const pkg = extractPackage(content, packageFile);\n if (pkg) {\n packages.push(pkg);\n } else {\n logger.trace({ packageFile }, 'can not read dependencies');\n }\n }\n }\n if (additionalRegistryUrls) {\n for (const pkgFile of packages) {\n for (const dep of pkgFile.deps) {\n dep.registryUrls!.unshift(...additionalRegistryUrls);\n }\n }\n }\n return cleanResult(resolveParents(packages));\n}\n"]}
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/maven/extract.ts"],"names":[],"mappings":";;AAoSA,wCA8DC;AAED,8CAsBC;AAgBD,sCAeC;AAED,wCAsFC;AAeD,8CAsBC;AAED,wDA8CC;;AAtkBD,kEAAkC;AAClC,0DAA0B;AAE1B,mCAAqC;AACrC,4CAAyC;AACzC,yCAAiD;AACjD,+CAA4C;AAC5C,kDAAyD;AACzD,0DAA2D;AAI3D,MAAM,mBAAmB,GAAG;IAC1B,wCAAwC;IACxC,wCAAwC;IACxC,w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EAAE,WAAW,EAAE,EAAE,yBAAyB,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YACjD,IAAI,GAAG,EAAE,CAAC;gBACR,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,EAAE,2BAA2B,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,sBAAsB,EAAE,CAAC;QAC3B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBAC/B,GAAG,CAAC,YAAa,CAAC,OAAO,CAAC,GAAG,sBAAsB,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport upath from 'upath';\nimport type { XmlElement } from 'xmldoc';\nimport { XmlDocument } from 'xmldoc';\nimport { logger } from '../../../logger';\nimport { readLocalFile } from '../../../util/fs';\nimport { regEx } from '../../../util/regex';\nimport { MavenDatasource } from '../../datasource/maven';\nimport { MAVEN_REPO } from '../../datasource/maven/common';\nimport type { ExtractConfig, PackageDependency, PackageFile } from '../types';\nimport type { MavenProp } from './types';\n\nconst supportedNamespaces = [\n 'http://maven.apache.org/SETTINGS/1.0.0',\n 'http://maven.apache.org/SETTINGS/1.1.0',\n 'http://maven.apache.org/SETTINGS/1.2.0',\n];\n\nconst supportedExtensionsNamespaces = [\n 'http://maven.apache.org/EXTENSIONS/1.0.0',\n 'http://maven.apache.org/EXTENSIONS/1.1.0',\n 'http://maven.apache.org/EXTENSIONS/1.2.0',\n];\n\nfunction parsePom(raw: string, packageFile: string): XmlDocument | null {\n let project: XmlDocument;\n try {\n project = new XmlDocument(raw);\n if (raw.includes('\\r\\n')) {\n logger.warn(\n 'Your pom.xml contains windows line endings. This is not supported and may result in parsing issues.',\n );\n }\n } catch {\n logger.debug({ packageFile }, `Failed to parse as XML`);\n return null;\n }\n const { name, attr, children } = project;\n if (name !== 'project') {\n return null;\n }\n if (attr.xmlns === 'http://maven.apache.org/POM/4.0.0') {\n return project;\n }\n if (\n is.nonEmptyArray(children) &&\n children.some((c: any) => c.name === 'modelVersion' && c.val === '4.0.0')\n ) {\n return project;\n }\n return null;\n}\n\nfunction parseExtensions(raw: string, packageFile: string): XmlDocument | null {\n let extensions: XmlDocument;\n try {\n extensions = new XmlDocument(raw);\n } catch {\n logger.debug({ packageFile }, `Failed to parse as XML`);\n return null;\n }\n const { name, attr, children } = extensions;\n if (name !== 'extensions') {\n return null;\n }\n if (!supportedExtensionsNamespaces.includes(attr.xmlns)) {\n return null;\n }\n if (!is.nonEmptyArray(children)) {\n return null;\n }\n return extensions;\n}\n\nfunction containsPlaceholder(str: string | null | undefined): boolean {\n return !!str && regEx(/\\${[^}]*?}/).test(str);\n}\n\nfunction depFromNode(\n node: XmlElement,\n underBuildSettingsElement: boolean,\n): PackageDependency | null {\n if (!('valueWithPath' in node)) {\n return null;\n }\n let groupId = node.valueWithPath('groupId')?.trim();\n const artifactId = node.valueWithPath('artifactId')?.trim();\n const currentValue = node.valueWithPath('version')?.trim();\n let depType: string | undefined;\n\n if (!groupId && node.name === 'plugin') {\n groupId = 'org.apache.maven.plugins';\n }\n\n if (groupId && artifactId && currentValue) {\n const depName = `${groupId}:${artifactId}`;\n const versionNode = node.descendantWithPath('version')!;\n const fileReplacePosition = versionNode.position;\n const datasource = MavenDatasource.id;\n const result: PackageDependency = {\n datasource,\n depName,\n currentValue,\n fileReplacePosition,\n registryUrls: [],\n };\n\n switch (node.name) {\n case 'plugin':\n case 'extension':\n depType = 'build';\n break;\n case 'parent':\n depType = 'parent';\n break;\n case 'dependency':\n if (underBuildSettingsElement) {\n depType = 'build';\n } else if (node.valueWithPath('optional')?.trim() === 'true') {\n depType = 'optional';\n } else {\n depType = node.valueWithPath('scope')?.trim() ?? 'compile'; // maven default scope is compile\n }\n break;\n }\n\n if (depType) {\n result.depType = depType;\n }\n\n return result;\n }\n return null;\n}\n\nfunction deepExtract(\n node: XmlElement,\n result: PackageDependency[] = [],\n isRoot = true,\n underBuildSettingsElement = false,\n): PackageDependency[] {\n const dep = depFromNode(node, underBuildSettingsElement);\n if (dep && !isRoot) {\n result.push(dep);\n }\n if (node.children) {\n for (const child of node.children) {\n deepExtract(\n child as XmlElement,\n result,\n false,\n node.name === 'build' ||\n node.name === 'reporting' ||\n underBuildSettingsElement,\n );\n }\n }\n return result;\n}\n\nfunction applyProps(\n dep: PackageDependency<Record<string, any>>,\n depPackageFile: string,\n props: MavenProp,\n): PackageDependency<Record<string, any>> {\n let result = dep;\n let anyChange = false;\n const alreadySeenProps = new Set<string>();\n\n do {\n const [returnedResult, returnedAnyChange, fatal] = applyPropsInternal(\n result,\n depPackageFile,\n props,\n alreadySeenProps,\n );\n if (fatal) {\n dep.skipReason = 'recursive-placeholder';\n return dep;\n }\n result = returnedResult;\n anyChange = returnedAnyChange;\n } while (anyChange);\n\n if (containsPlaceholder(result.depName)) {\n result.skipReason = 'name-placeholder';\n } else if (containsPlaceholder(result.currentValue)) {\n result.skipReason = 'version-placeholder';\n }\n\n return result;\n}\n\nfunction applyPropsInternal(\n dep: PackageDependency<Record<string, any>>,\n depPackageFile: string,\n props: MavenProp,\n previouslySeenProps: Set<string>,\n): [PackageDependency<Record<string, any>>, boolean, boolean] {\n let anyChange = false;\n let fatal = false;\n\n const seenProps = new Set<string>();\n\n const replaceAll = (str: string): string =>\n str.replace(regEx(/\\${[^}]*?}/g), (substr) => {\n const propKey = substr.slice(2, -1).trim();\n // TODO: wrong types here, props is already `MavenProp`\n const propValue = (props as any)[propKey] as MavenProp;\n if (propValue) {\n anyChange = true;\n if (previouslySeenProps.has(propKey)) {\n fatal = true;\n } else {\n seenProps.add(propKey);\n }\n return propValue.val;\n }\n return substr;\n });\n\n const depName = replaceAll(dep.depName!);\n const registryUrls = dep.registryUrls!.map((url) => replaceAll(url));\n\n let fileReplacePosition = dep.fileReplacePosition;\n let propSource = dep.propSource;\n let sharedVariableName: string | null = null;\n const currentValue = dep.currentValue!.replace(\n regEx(/^\\${[^}]*?}$/),\n (substr) => {\n const propKey = substr.slice(2, -1).trim();\n // TODO: wrong types here, props is already `MavenProp`\n const propValue = (props as any)[propKey] as MavenProp;\n if (propValue) {\n sharedVariableName ??= propKey;\n fileReplacePosition = propValue.fileReplacePosition;\n propSource =\n propValue.packageFile ??\n // istanbul ignore next\n undefined;\n anyChange = true;\n if (previouslySeenProps.has(propKey)) {\n fatal = true;\n } else {\n seenProps.add(propKey);\n }\n return propValue.val;\n }\n return substr;\n },\n );\n\n const result: PackageDependency = {\n ...dep,\n depName,\n registryUrls,\n fileReplacePosition,\n propSource,\n currentValue,\n };\n\n if (sharedVariableName) {\n result.sharedVariableName = sharedVariableName;\n }\n\n if (propSource && depPackageFile !== propSource) {\n result.editFile = propSource;\n }\n\n for (const prop of seenProps) {\n previouslySeenProps.add(prop);\n }\n return [result, anyChange, fatal];\n}\n\nfunction resolveParentFile(packageFile: string, parentPath: string): string {\n let parentFile = 'pom.xml';\n let parentDir = parentPath;\n const parentBasename = upath.basename(parentPath);\n if (parentBasename === 'pom.xml' || parentBasename.endsWith('.pom.xml')) {\n parentFile = parentBasename;\n parentDir = upath.dirname(parentPath);\n }\n const dir = upath.dirname(packageFile);\n return upath.normalize(upath.join(dir, parentDir, parentFile));\n}\n\ninterface MavenInterimPackageFile extends PackageFile {\n mavenProps?: Record<string, any>;\n parent?: string;\n}\n\nexport function extractPackage(\n rawContent: string,\n packageFile: string,\n): PackageFile | null {\n if (!rawContent) {\n return null;\n }\n\n const project = parsePom(rawContent, packageFile);\n if (!project) {\n return null;\n }\n\n const result: MavenInterimPackageFile = {\n datasource: MavenDatasource.id,\n packageFile,\n deps: [],\n };\n\n result.deps = deepExtract(project);\n\n const propsNode = project.childNamed('properties');\n const props: Record<string, MavenProp> = {};\n if (propsNode?.children) {\n for (const propNode of propsNode.children as XmlElement[]) {\n const key = propNode.name;\n const val = propNode?.val?.trim();\n if (key && val) {\n const fileReplacePosition = propNode.position;\n props[key] = { val, fileReplacePosition, packageFile };\n }\n }\n }\n result.mavenProps = props;\n\n const repositories = project.childNamed('repositories');\n if (repositories?.children) {\n const repoUrls: string[] = [];\n for (const repo of repositories.childrenNamed('repository')) {\n const repoUrl = repo.valueWithPath('url')?.trim();\n if (repoUrl) {\n repoUrls.push(repoUrl);\n }\n }\n result.deps.forEach((dep) => {\n if (is.array(dep.registryUrls)) {\n repoUrls.forEach((url) => dep.registryUrls!.push(url));\n }\n });\n }\n\n if (packageFile && project.childNamed('parent')) {\n const parentPath =\n project.valueWithPath('parent.relativePath')?.trim() ?? '../pom.xml';\n result.parent = resolveParentFile(packageFile, parentPath);\n }\n\n if (project.childNamed('version')) {\n result.packageFileVersion = project.valueWithPath('version')!.trim();\n }\n\n return result;\n}\n\nexport function extractRegistries(rawContent: string): string[] {\n if (!rawContent) {\n return [];\n }\n\n const settings = parseSettings(rawContent);\n if (!settings) {\n return [];\n }\n\n const urls: string[] = [];\n\n const mirrorUrls = parseUrls(settings, 'mirrors');\n urls.push(...mirrorUrls);\n\n settings.childNamed('profiles')?.eachChild((profile) => {\n const repositoryUrls = parseUrls(profile, 'repositories');\n urls.push(...repositoryUrls);\n });\n\n // filter out duplicates\n return [...new Set(urls)];\n}\n\nfunction parseUrls(xmlNode: XmlElement, path: string): string[] {\n const children = xmlNode.descendantWithPath(path);\n const urls: string[] = [];\n if (children?.children) {\n children.eachChild((child) => {\n const url = child.valueWithPath('url');\n if (url) {\n urls.push(url);\n }\n });\n }\n return urls;\n}\n\nexport function parseSettings(raw: string): XmlDocument | null {\n let settings: XmlDocument;\n try {\n settings = new XmlDocument(raw);\n } catch {\n return null;\n }\n const { name, attr } = settings;\n if (name !== 'settings') {\n return null;\n }\n if (supportedNamespaces.includes(attr.xmlns)) {\n return settings;\n }\n return null;\n}\n\nexport function resolveParents(packages: PackageFile[]): PackageFile[] {\n const packageFileNames: string[] = [];\n const extractedPackages: Record<string, MavenInterimPackageFile> = {};\n const extractedDeps: Record<string, PackageDependency[]> = {};\n const extractedProps: Record<string, MavenProp> = {};\n const registryUrls: Record<string, Set<string>> = {};\n packages.forEach((pkg) => {\n const name = pkg.packageFile;\n packageFileNames.push(name);\n extractedPackages[name] = pkg;\n extractedDeps[name] = [];\n });\n\n // Construct package-specific prop scopes\n // and merge them in reverse order,\n // which allows inheritance/overriding.\n packageFileNames.forEach((name) => {\n registryUrls[name] = new Set();\n const propsHierarchy: Record<string, MavenProp>[] = [];\n const visitedPackages = new Set<string>();\n let pkg: MavenInterimPackageFile | null = extractedPackages[name];\n while (pkg) {\n propsHierarchy.unshift(pkg.mavenProps!);\n\n if (pkg.deps) {\n pkg.deps.forEach((dep) => {\n if (dep.registryUrls) {\n dep.registryUrls.forEach((url) => {\n registryUrls[name].add(url);\n });\n }\n });\n }\n\n if (pkg.parent && !visitedPackages.has(pkg.parent)) {\n visitedPackages.add(pkg.parent);\n pkg = extractedPackages[pkg.parent];\n } else {\n pkg = null;\n }\n }\n propsHierarchy.unshift({});\n extractedProps[name] = Object.assign.apply(null, propsHierarchy as any);\n });\n\n // Resolve registryUrls\n packageFileNames.forEach((name) => {\n const pkg = extractedPackages[name];\n pkg.deps.forEach((rawDep) => {\n const urlsSet = new Set([...rawDep.registryUrls!, ...registryUrls[name]]);\n rawDep.registryUrls = [...urlsSet];\n });\n });\n\n const rootDeps = new Set<string>();\n // Resolve placeholders\n packageFileNames.forEach((name) => {\n const pkg = extractedPackages[name];\n pkg.deps.forEach((rawDep) => {\n const dep = applyProps(rawDep, name, extractedProps[name]);\n if (dep.depType === 'parent') {\n const parentPkg = extractedPackages[pkg.parent!];\n const hasParentWithNoParent = parentPkg && !parentPkg.parent;\n const hasParentWithExternalParent =\n parentPkg && !packageFileNames.includes(parentPkg.parent!);\n if (hasParentWithNoParent || hasParentWithExternalParent) {\n rootDeps.add(dep.depName!);\n }\n }\n const sourceName = dep.propSource ?? name;\n extractedDeps[sourceName].push(dep);\n });\n });\n\n const packageFiles = packageFileNames.map((packageFile) => {\n const pkg = extractedPackages[packageFile];\n const deps = extractedDeps[packageFile];\n for (const dep of deps) {\n if (rootDeps.has(dep.depName!)) {\n dep.depType = 'parent-root';\n }\n }\n return { ...pkg, deps };\n });\n\n return packageFiles;\n}\n\nfunction cleanResult(packageFiles: MavenInterimPackageFile[]): PackageFile[] {\n packageFiles.forEach((packageFile) => {\n delete packageFile.mavenProps;\n delete packageFile.parent;\n packageFile.deps.forEach((dep) => {\n delete dep.propSource;\n //Add Registry From SuperPom\n dep.registryUrls!.push(MAVEN_REPO);\n });\n });\n return packageFiles;\n}\n\nexport function extractExtensions(\n rawContent: string,\n packageFile: string,\n): PackageFile | null {\n if (!rawContent) {\n return null;\n }\n\n const extensions = parseExtensions(rawContent, packageFile);\n if (!extensions) {\n return null;\n }\n\n const result: MavenInterimPackageFile = {\n datasource: MavenDatasource.id,\n packageFile,\n deps: [],\n };\n\n result.deps = deepExtract(extensions);\n\n return result;\n}\n\nexport async function extractAllPackageFiles(\n _config: ExtractConfig,\n packageFiles: string[],\n): Promise<PackageFile[]> {\n const packages: PackageFile[] = [];\n const additionalRegistryUrls: string[] = [];\n\n for (const packageFile of packageFiles) {\n const content = await readLocalFile(packageFile, 'utf8');\n if (!content) {\n logger.debug({ packageFile }, 'packageFile has no content');\n continue;\n }\n if (packageFile.endsWith('settings.xml')) {\n const registries = extractRegistries(content);\n if (registries) {\n logger.debug(\n { registries, packageFile },\n 'Found registryUrls in settings.xml',\n );\n additionalRegistryUrls.push(...registries);\n }\n } else if (packageFile.endsWith('.mvn/extensions.xml')) {\n const extensions = extractExtensions(content, packageFile);\n if (extensions) {\n packages.push(extensions);\n } else {\n logger.trace({ packageFile }, 'can not read extensions');\n }\n } else {\n const pkg = extractPackage(content, packageFile);\n if (pkg) {\n packages.push(pkg);\n } else {\n logger.trace({ packageFile }, 'can not read dependencies');\n }\n }\n }\n if (additionalRegistryUrls) {\n for (const pkgFile of packages) {\n for (const dep of pkgFile.deps) {\n dep.registryUrls!.unshift(...additionalRegistryUrls);\n }\n }\n }\n return cleanResult(resolveParents(packages));\n}\n"]}
@@ -96,7 +96,6 @@ async function executeWrapperCommand(cmd, config, packageFileName, extraEnv) {
96
96
  const execOptions = {
97
97
  cwdFile: wrapperFullyQualifiedPath,
98
98
  docker: {},
99
- userConfiguredEnv: config.env,
100
99
  extraEnv,
101
100
  toolConstraints: [
102
101
  {
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/maven-wrapper/artifacts.ts"],"names":[],"mappings":";;AA2CA,0CA0DC;AAsBD,8CAYC;;AAtID,8DAAyB;AACzB,kEAAkC;AAClC,iCAAsC;AACtC,mDAAsD;AACtD,4CAAyC;AACzC,6CAA0C;AAE1C,yCAAgF;AAChF,2CAAkD;AAElD,+CAA4C;AAC5C,2EAAqD;AAQrD,MAAM,sBAAsB,GAAG,sCAAsC,CAAC;AAOtE,KAAK,UAAU,YAAY,CACzB,MAAoB,EACpB,eAAuB;IAEvB,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QAC9C,OAAO;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,eAAe;gBACrB,QAAQ,EAAE,MAAM,IAAA,kBAAa,EAAC,eAAe,CAAC;aAC/C;SACF,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,EACpC,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,MAAM,GACS;IACf,IAAI,CAAC;QACH,eAAM,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,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,OAAO,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC;IAC/B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { Stats } from 'node:fs';\nimport os from 'node:os';\nimport is from '@sindresorhus/is';\nimport { dirname, join } from 'upath';\nimport { GlobalConfig } from '../../../config/global';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions, ExtraEnv } from '../../../util/exec/types';\nimport { chmodLocalFile, readLocalFile, statLocalFile } from '../../../util/fs';\nimport { getRepoStatus } from '../../../util/git';\nimport type { StatusResult } from '../../../util/git/types';\nimport { regEx } from '../../../util/regex';\nimport mavenVersioning from '../../versioning/maven';\nimport type {\n PackageDependency,\n UpdateArtifact,\n UpdateArtifactsConfig,\n UpdateArtifactsResult,\n} from '../types';\n\nconst DEFAULT_MAVEN_REPO_URL = 'https://repo.maven.apache.org/maven2';\ninterface MavenWrapperPaths {\n wrapperExecutableFileName: string;\n localProjectDir: string;\n wrapperFullyQualifiedPath: string;\n}\n\nasync function addIfUpdated(\n status: StatusResult,\n fileProjectPath: string,\n): Promise<UpdateArtifactsResult | null> {\n if (status.modified.includes(fileProjectPath)) {\n return {\n file: {\n type: 'addition',\n path: fileProjectPath,\n contents: await readLocalFile(fileProjectPath),\n },\n };\n }\n return null;\n}\n\nexport async function updateArtifacts({\n packageFileName,\n newPackageFileContent,\n updatedDeps,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n try {\n logger.debug({ updatedDeps }, 'maven-wrapper.updateArtifacts()');\n\n if (!updatedDeps.some((dep) => dep.depName === 'maven-wrapper')) {\n logger.info(\n 'Maven wrapper version not updated - skipping Artifacts update',\n );\n return null;\n }\n\n const cmd = await createWrapperCommand(packageFileName);\n\n if (!cmd) {\n logger.info('No mvnw found - skipping Artifacts update');\n return null;\n }\n\n const extraEnv = getExtraEnvOptions(updatedDeps);\n await executeWrapperCommand(cmd, config, packageFileName, extraEnv);\n\n const status = await getRepoStatus();\n const artifactFileNames = [\n '.mvn/wrapper/maven-wrapper.properties',\n '.mvn/wrapper/maven-wrapper.jar',\n '.mvn/wrapper/MavenWrapperDownloader.java',\n 'mvnw',\n 'mvnw.cmd',\n ].map(\n (filename) =>\n packageFileName.replace('.mvn/wrapper/maven-wrapper.properties', '') +\n filename,\n );\n const updateArtifactsResult = (\n await getUpdatedArtifacts(status, artifactFileNames)\n ).filter(is.truthy);\n\n logger.debug(\n { files: updateArtifactsResult.map((r) => r.file?.path) },\n `Returning updated maven-wrapper files`,\n );\n return updateArtifactsResult;\n } catch (err) {\n logger.debug({ err }, 'Error setting new Maven Wrapper release value');\n return [\n {\n artifactError: {\n lockFile: packageFileName,\n stderr: err.message,\n },\n },\n ];\n }\n}\n\nasync function getUpdatedArtifacts(\n status: StatusResult,\n artifactFileNames: string[],\n): Promise<UpdateArtifactsResult[]> {\n const updatedResults: UpdateArtifactsResult[] = [];\n for (const artifactFileName of artifactFileNames) {\n const updatedResult = await addIfUpdated(status, artifactFileName);\n if (updatedResult !== null) {\n updatedResults.push(updatedResult);\n }\n }\n return updatedResults;\n}\n\n/**\n * Find compatible java version for maven.\n * see https://maven.apache.org/developers/compatibility-plan.html\n * @param mavenWrapperVersion current maven version\n * @returns A Java semver range\n */\nexport function getJavaConstraint(\n mavenWrapperVersion: string | null | undefined,\n): string | null {\n const major = mavenWrapperVersion\n ? mavenVersioning.getMajor(mavenWrapperVersion)\n : null;\n\n if (major && major >= 3) {\n return '^17.0.0';\n }\n\n return '^8.0.0';\n}\n\nasync function executeWrapperCommand(\n cmd: string,\n config: UpdateArtifactsConfig,\n packageFileName: string,\n extraEnv: ExtraEnv,\n): Promise<void> {\n logger.debug(`Updating maven wrapper: \"${cmd}\"`);\n const { wrapperFullyQualifiedPath } = getMavenPaths(packageFileName);\n\n const execOptions: ExecOptions = {\n cwdFile: wrapperFullyQualifiedPath,\n docker: {},\n userConfiguredEnv: config.env,\n extraEnv,\n toolConstraints: [\n {\n toolName: 'java',\n constraint:\n config.constraints?.java ?? getJavaConstraint(config.currentValue),\n },\n ],\n };\n\n try {\n await exec(cmd, execOptions);\n } catch (err) {\n logger.error({ err }, 'Error executing maven wrapper update command.');\n throw err;\n }\n}\n\nfunction getExtraEnvOptions(deps: PackageDependency[]): ExtraEnv {\n const customMavenWrapperUrl = getCustomMavenWrapperRepoUrl(deps);\n if (customMavenWrapperUrl) {\n return { MVNW_REPOURL: customMavenWrapperUrl };\n }\n return {};\n}\n\nfunction getCustomMavenWrapperRepoUrl(\n deps: PackageDependency[],\n): string | null {\n const replaceString = deps.find(\n (dep) => dep.depName === 'maven-wrapper',\n )?.replaceString;\n\n if (!replaceString) {\n return null;\n }\n\n const match = regEx(/^(.*?)\\/org\\/apache\\/maven\\/wrapper\\//).exec(\n replaceString,\n );\n\n if (!match) {\n return null;\n }\n\n return match[1] === DEFAULT_MAVEN_REPO_URL ? null : match[1];\n}\n\nasync function createWrapperCommand(\n packageFileName: string,\n): Promise<string | null> {\n const {\n wrapperExecutableFileName,\n localProjectDir,\n wrapperFullyQualifiedPath,\n } = getMavenPaths(packageFileName);\n\n return await prepareCommand(\n wrapperExecutableFileName,\n localProjectDir,\n await statLocalFile(wrapperFullyQualifiedPath),\n 'wrapper:wrapper',\n );\n}\n\nfunction mavenWrapperFileName(): string {\n if (\n os.platform() === 'win32' &&\n GlobalConfig.get('binarySource') !== 'docker'\n ) {\n return 'mvnw.cmd';\n }\n return './mvnw';\n}\n\nfunction getMavenPaths(packageFileName: string): MavenWrapperPaths {\n const wrapperExecutableFileName = mavenWrapperFileName();\n const localProjectDir = join(dirname(packageFileName), '../../');\n const wrapperFullyQualifiedPath = join(\n localProjectDir,\n wrapperExecutableFileName,\n );\n return {\n wrapperExecutableFileName,\n localProjectDir,\n wrapperFullyQualifiedPath,\n };\n}\n\nasync function prepareCommand(\n fileName: string,\n cwd: string | undefined,\n pathFileStats: Stats | null,\n args: string | null,\n): Promise<string | null> {\n // istanbul ignore if\n if (pathFileStats?.isFile() === true) {\n // if the file is not executable by others\n if (os.platform() !== 'win32' && (pathFileStats.mode & 0o1) === 0) {\n // add the execution permission to the owner, group and others\n logger.warn('Maven wrapper is missing the executable bit');\n await chmodLocalFile(join(cwd, fileName), pathFileStats.mode | 0o111);\n }\n if (args === null) {\n return fileName;\n }\n return `${fileName} ${args}`;\n }\n return null;\n}\n"]}
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/maven-wrapper/artifacts.ts"],"names":[],"mappings":";;AA2CA,0CA0DC;AAsBD,8CAYC;;AAtID,8DAAyB;AACzB,kEAAkC;AAClC,iCAAsC;AACtC,mDAAsD;AACtD,4CAAyC;AACzC,6CAA0C;AAE1C,yCAAgF;AAChF,2CAAkD;AAElD,+CAA4C;AAC5C,2EAAqD;AAQrD,MAAM,sBAAsB,GAAG,sCAAsC,CAAC;AAOtE,KAAK,UAAU,YAAY,CACzB,MAAoB,EACpB,eAAuB;IAEvB,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QAC9C,OAAO;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,eAAe;gBACrB,QAAQ,EAAE,MAAM,IAAA,kBAAa,EAAC,eAAe,CAAC;aAC/C;SACF,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,EACpC,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,MAAM,GACS;IACf,IAAI,CAAC;QACH,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,EAAE,iCAAiC,CAAC,CAAC;QAEjE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,eAAe,CAAC,EA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import is from '@sindresorhus/is';\nimport { dirname, join } from 'upath';\nimport { GlobalConfig } from '../../../config/global';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions, ExtraEnv } from '../../../util/exec/types';\nimport { chmodLocalFile, readLocalFile, statLocalFile } from '../../../util/fs';\nimport { getRepoStatus } from '../../../util/git';\nimport type { StatusResult } from '../../../util/git/types';\nimport { regEx } from '../../../util/regex';\nimport mavenVersioning from '../../versioning/maven';\nimport type {\n PackageDependency,\n UpdateArtifact,\n UpdateArtifactsConfig,\n UpdateArtifactsResult,\n} from '../types';\n\nconst DEFAULT_MAVEN_REPO_URL = 'https://repo.maven.apache.org/maven2';\ninterface MavenWrapperPaths {\n wrapperExecutableFileName: string;\n localProjectDir: string;\n wrapperFullyQualifiedPath: string;\n}\n\nasync function addIfUpdated(\n status: StatusResult,\n fileProjectPath: string,\n): Promise<UpdateArtifactsResult | null> {\n if (status.modified.includes(fileProjectPath)) {\n return {\n file: {\n type: 'addition',\n path: fileProjectPath,\n contents: await readLocalFile(fileProjectPath),\n },\n };\n }\n return null;\n}\n\nexport async function updateArtifacts({\n packageFileName,\n newPackageFileContent,\n updatedDeps,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n try {\n logger.debug({ updatedDeps }, 'maven-wrapper.updateArtifacts()');\n\n if (!updatedDeps.some((dep) => dep.depName === 'maven-wrapper')) {\n logger.info(\n 'Maven wrapper version not updated - skipping Artifacts update',\n );\n return null;\n }\n\n const cmd = await createWrapperCommand(packageFileName);\n\n if (!cmd) {\n logger.info('No mvnw found - skipping Artifacts update');\n return null;\n }\n\n const extraEnv = getExtraEnvOptions(updatedDeps);\n await executeWrapperCommand(cmd, config, packageFileName, extraEnv);\n\n const status = await getRepoStatus();\n const artifactFileNames = [\n '.mvn/wrapper/maven-wrapper.properties',\n '.mvn/wrapper/maven-wrapper.jar',\n '.mvn/wrapper/MavenWrapperDownloader.java',\n 'mvnw',\n 'mvnw.cmd',\n ].map(\n (filename) =>\n packageFileName.replace('.mvn/wrapper/maven-wrapper.properties', '') +\n filename,\n );\n const updateArtifactsResult = (\n await getUpdatedArtifacts(status, artifactFileNames)\n ).filter(is.truthy);\n\n logger.debug(\n { files: updateArtifactsResult.map((r) => r.file?.path) },\n `Returning updated maven-wrapper files`,\n );\n return updateArtifactsResult;\n } catch (err) {\n logger.debug({ err }, 'Error setting new Maven Wrapper release value');\n return [\n {\n artifactError: {\n lockFile: packageFileName,\n stderr: err.message,\n },\n },\n ];\n }\n}\n\nasync function getUpdatedArtifacts(\n status: StatusResult,\n artifactFileNames: string[],\n): Promise<UpdateArtifactsResult[]> {\n const updatedResults: UpdateArtifactsResult[] = [];\n for (const artifactFileName of artifactFileNames) {\n const updatedResult = await addIfUpdated(status, artifactFileName);\n if (updatedResult !== null) {\n updatedResults.push(updatedResult);\n }\n }\n return updatedResults;\n}\n\n/**\n * Find compatible java version for maven.\n * see https://maven.apache.org/developers/compatibility-plan.html\n * @param mavenWrapperVersion current maven version\n * @returns A Java semver range\n */\nexport function getJavaConstraint(\n mavenWrapperVersion: string | null | undefined,\n): string | null {\n const major = mavenWrapperVersion\n ? mavenVersioning.getMajor(mavenWrapperVersion)\n : null;\n\n if (major && major >= 3) {\n return '^17.0.0';\n }\n\n return '^8.0.0';\n}\n\nasync function executeWrapperCommand(\n cmd: string,\n config: UpdateArtifactsConfig,\n packageFileName: string,\n extraEnv: ExtraEnv,\n): Promise<void> {\n logger.debug(`Updating maven wrapper: \"${cmd}\"`);\n const { wrapperFullyQualifiedPath } = getMavenPaths(packageFileName);\n\n const execOptions: ExecOptions = {\n cwdFile: wrapperFullyQualifiedPath,\n docker: {},\n extraEnv,\n toolConstraints: [\n {\n toolName: 'java',\n constraint:\n config.constraints?.java ?? getJavaConstraint(config.currentValue),\n },\n ],\n };\n\n try {\n await exec(cmd, execOptions);\n } catch (err) {\n logger.error({ err }, 'Error executing maven wrapper update command.');\n throw err;\n }\n}\n\nfunction getExtraEnvOptions(deps: PackageDependency[]): ExtraEnv {\n const customMavenWrapperUrl = getCustomMavenWrapperRepoUrl(deps);\n if (customMavenWrapperUrl) {\n return { MVNW_REPOURL: customMavenWrapperUrl };\n }\n return {};\n}\n\nfunction getCustomMavenWrapperRepoUrl(\n deps: PackageDependency[],\n): string | null {\n const replaceString = deps.find(\n (dep) => dep.depName === 'maven-wrapper',\n )?.replaceString;\n\n if (!replaceString) {\n return null;\n }\n\n const match = regEx(/^(.*?)\\/org\\/apache\\/maven\\/wrapper\\//).exec(\n replaceString,\n );\n\n if (!match) {\n return null;\n }\n\n return match[1] === DEFAULT_MAVEN_REPO_URL ? null : match[1];\n}\n\nasync function createWrapperCommand(\n packageFileName: string,\n): Promise<string | null> {\n const {\n wrapperExecutableFileName,\n localProjectDir,\n wrapperFullyQualifiedPath,\n } = getMavenPaths(packageFileName);\n\n return await prepareCommand(\n wrapperExecutableFileName,\n localProjectDir,\n await statLocalFile(wrapperFullyQualifiedPath),\n 'wrapper:wrapper',\n );\n}\n\nfunction mavenWrapperFileName(): string {\n if (\n os.platform() === 'win32' &&\n GlobalConfig.get('binarySource') !== 'docker'\n ) {\n return 'mvnw.cmd';\n }\n return './mvnw';\n}\n\nfunction getMavenPaths(packageFileName: string): MavenWrapperPaths {\n const wrapperExecutableFileName = mavenWrapperFileName();\n const localProjectDir = join(dirname(packageFileName), '../../');\n const wrapperFullyQualifiedPath = join(\n localProjectDir,\n wrapperExecutableFileName,\n );\n return {\n wrapperExecutableFileName,\n localProjectDir,\n wrapperFullyQualifiedPath,\n };\n}\n\nasync function prepareCommand(\n fileName: string,\n cwd: string | undefined,\n pathFileStats: Stats | null,\n args: string | null,\n): Promise<string | null> {\n // istanbul ignore if\n if (pathFileStats?.isFile() === true) {\n // if the file is not executable by others\n if (os.platform() !== 'win32' && (pathFileStats.mode & 0o1) === 0) {\n // add the execution permission to the owner, group and others\n logger.warn('Maven wrapper is missing the executable bit');\n await chmodLocalFile(join(cwd, fileName), pathFileStats.mode | 0o111);\n }\n if (args === null) {\n return fileName;\n }\n return `${fileName} ${args}`;\n }\n return null;\n}\n"]}
@@ -36,7 +36,7 @@ function parseVersion(toolData) {
36
36
  // e.g. 'erlang = ["23.3", "24.0"]'
37
37
  return toolData.length ? toolData[0] : null; // Get the first version in the array
38
38
  }
39
- if (is_1.default.nonEmptyString(toolData.version)) {
39
+ if (is_1.default.object(toolData) && is_1.default.nonEmptyString(toolData.version)) {
40
40
  // Handle the object case with a string version
41
41
  // e.g. 'python = { version = "3.11.2" }'
42
42
  return toolData.version;
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/mise/extract.ts"],"names":[],"mappings":";;AASA,gDAyBC;;AAlCD,kEAAkC;AAClC,4CAAyC;AAKzC,+DAAiE;AACjE,mCAAwC;AAExC,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB;IAEnB,eAAM,CAAC,KAAK,CAAC,2BAA2B,WAAW,GAAG,CAAC,CAAC;IAExD,MAAM,QAAQ,GAAG,IAAA,qBAAa,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACrD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAwB,EAAE,CAAC;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IAE7B,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACrD,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACvC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACnD,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,C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EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,4CAA4C;IAE9C,OAAO,CACL,CAAC,OAAO,cAAc,CAAC,MAAM,KAAK,UAAU;QAC1C,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC;QAChC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,IAAI,CACnC,CAAC,CAAC,+CAA+C;AACpD,CAAC;AAED,SAAS,gBAAgB,CACvB,IAAY,EACZ,OAAsB,EACtB,MAA4B;IAE5B,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,qBAAqB,EAAE,CAAC;IAC9D,CAAC;IACD,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,wBAAwB,EAAE,CAAC;IACjE,CAAC;IACD,OAAO;QACL,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,OAAO;QACrB,GAAG,MAAM;KACV,CAAC;AACJ,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport type { ToolingConfig } from '../asdf/upgradeable-tooling';\nimport type { PackageDependency, PackageFileContent } from '../types';\nimport type { MiseToolSchema } from './schema';\nimport type { ToolingDefinition } from './upgradeable-tooling';\nimport { asdfTooling, miseTooling } from './upgradeable-tooling';\nimport { parseTomlFile } from './utils';\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n): PackageFileContent | null {\n logger.trace(`mise.extractPackageFile(${packageFile})`);\n\n const misefile = parseTomlFile(content, packageFile);\n if (!misefile) {\n return null;\n }\n\n const deps: PackageDependency[] = [];\n const tools = misefile.tools;\n\n if (tools) {\n for (const [name, toolData] of Object.entries(tools)) {\n const version = parseVersion(toolData);\n const depName = name.trim();\n const toolConfig = getToolConfig(depName, version);\n const dep = createDependency(depName, version, toolConfig);\n deps.push(dep);\n }\n }\n\n return deps.length ? { deps } : null;\n}\n\nfunction parseVersion(toolData: MiseToolSchema): string | null {\n if (is.nonEmptyString(toolData)) {\n // Handle the string case\n // e.g. 'erlang = \"23.3\"'\n return toolData;\n }\n if (is.array(toolData, is.string)) {\n // Handle the array case\n // e.g. 'erlang = [\"23.3\", \"24.0\"]'\n return toolData.length ? toolData[0] : null; // Get the first version in the array\n }\n if (is.nonEmptyString(toolData.version)) {\n // Handle the object case with a string version\n // e.g. 'python = { version = \"3.11.2\" }'\n return toolData.version;\n }\n return null; // Return null if no version is found\n}\n\nfunction getToolConfig(\n name: string,\n version: string | null,\n): ToolingConfig | null {\n if (version === null) {\n return null; // Early return if version is null\n }\n\n // Try to get the config from miseTooling first, then asdfTooling\n return (\n getConfigFromTooling(miseTooling, name, version) ??\n getConfigFromTooling(asdfTooling, name, version)\n );\n}\n\nfunction getConfigFromTooling(\n toolingSource: Record<string, ToolingDefinition>,\n name: string,\n version: string,\n): ToolingConfig | null {\n const toolDefinition = toolingSource[name];\n if (!toolDefinition) {\n return null;\n } // Return null if no toolDefinition is found\n\n return (\n (typeof toolDefinition.config === 'function'\n ? toolDefinition.config(version)\n : toolDefinition.config) ?? null\n ); // Ensure null is returned instead of undefined\n}\n\nfunction createDependency(\n name: string,\n version: string | null,\n config: ToolingConfig | null,\n): PackageDependency {\n if (version === null) {\n return { depName: name, skipReason: 'unspecified-version' };\n }\n if (config === null) {\n return { depName: name, skipReason: 'unsupported-datasource' };\n }\n return {\n depName: name,\n currentValue: version,\n ...config,\n };\n}\n"]}
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/mise/extract.ts"],"names":[],"mappings":";;AASA,gDAyBC;;AAlCD,kEAAkC;AAClC,4CAAyC;AAKzC,+DAAiE;AACjE,mCAAwC;AAExC,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB;IAEnB,eAAM,CAAC,KAAK,CAAC,2BAA2B,WAAW,GAAG,CAAC,CAAC;IAExD,MAAM,Q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,OAAO;QACL,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,OAAO;QACrB,GAAG,MAAM;KACV,CAAC;AACJ,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport type { ToolingConfig } from '../asdf/upgradeable-tooling';\nimport type { PackageDependency, PackageFileContent } from '../types';\nimport type { MiseToolSchema } from './schema';\nimport type { ToolingDefinition } from './upgradeable-tooling';\nimport { asdfTooling, miseTooling } from './upgradeable-tooling';\nimport { parseTomlFile } from './utils';\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n): PackageFileContent | null {\n logger.trace(`mise.extractPackageFile(${packageFile})`);\n\n const misefile = parseTomlFile(content, packageFile);\n if (!misefile) {\n return null;\n }\n\n const deps: PackageDependency[] = [];\n const tools = misefile.tools;\n\n if (tools) {\n for (const [name, toolData] of Object.entries(tools)) {\n const version = parseVersion(toolData);\n const depName = name.trim();\n const toolConfig = getToolConfig(depName, version);\n const dep = createDependency(depName, version, toolConfig);\n deps.push(dep);\n }\n }\n\n return deps.length ? { deps } : null;\n}\n\nfunction parseVersion(toolData: MiseToolSchema): string | null {\n if (is.nonEmptyString(toolData)) {\n // Handle the string case\n // e.g. 'erlang = \"23.3\"'\n return toolData;\n }\n if (is.array(toolData, is.string)) {\n // Handle the array case\n // e.g. 'erlang = [\"23.3\", \"24.0\"]'\n return toolData.length ? toolData[0] : null; // Get the first version in the array\n }\n if (is.object(toolData) && is.nonEmptyString(toolData.version)) {\n // Handle the object case with a string version\n // e.g. 'python = { version = \"3.11.2\" }'\n return toolData.version;\n }\n return null; // Return null if no version is found\n}\n\nfunction getToolConfig(\n name: string,\n version: string | null,\n): ToolingConfig | null {\n if (version === null) {\n return null; // Early return if version is null\n }\n\n // Try to get the config from miseTooling first, then asdfTooling\n return (\n getConfigFromTooling(miseTooling, name, version) ??\n getConfigFromTooling(asdfTooling, name, version)\n );\n}\n\nfunction getConfigFromTooling(\n toolingSource: Record<string, ToolingDefinition>,\n name: string,\n version: string,\n): ToolingConfig | null {\n const toolDefinition = toolingSource[name];\n if (!toolDefinition) {\n return null;\n } // Return null if no toolDefinition is found\n\n return (\n (typeof toolDefinition.config === 'function'\n ? toolDefinition.config(version)\n : toolDefinition.config) ?? null\n ); // Ensure null is returned instead of undefined\n}\n\nfunction createDependency(\n name: string,\n version: string | null,\n config: ToolingConfig | null,\n): PackageDependency {\n if (version === null) {\n return { depName: name, skipReason: 'unspecified-version' };\n }\n if (config === null) {\n return { depName: name, skipReason: 'unsupported-datasource' };\n }\n return {\n depName: name,\n currentValue: version,\n ...config,\n };\n}\n"]}