renovate 40.0.0-next.9 → 40.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (816) 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/global.js +0 -1
  7. package/dist/config/global.js.map +1 -1
  8. package/dist/config/migrate-validate.js +3 -2
  9. package/dist/config/migrate-validate.js.map +1 -1
  10. package/dist/config/migration.js +2 -1
  11. package/dist/config/migration.js.map +1 -1
  12. package/dist/config/migrations/custom/rebase-stale-prs-migration.js +1 -1
  13. package/dist/config/migrations/custom/rebase-stale-prs-migration.js.map +1 -1
  14. package/dist/config/migrations/migrations-service.js +3 -2
  15. package/dist/config/migrations/migrations-service.js.map +1 -1
  16. package/dist/config/options/index.js +18 -11
  17. package/dist/config/options/index.js.map +1 -1
  18. package/dist/config/parse.js +2 -2
  19. package/dist/config/parse.js.map +1 -1
  20. package/dist/config/presets/common.js +1 -0
  21. package/dist/config/presets/common.js.map +1 -1
  22. package/dist/config/presets/gitea/index.js +0 -1
  23. package/dist/config/presets/gitea/index.js.map +1 -1
  24. package/dist/config/presets/github/index.js +4 -2
  25. package/dist/config/presets/github/index.js.map +1 -1
  26. package/dist/config/presets/gitlab/index.js +1 -1
  27. package/dist/config/presets/gitlab/index.js.map +1 -1
  28. package/dist/config/presets/http/index.js +2 -2
  29. package/dist/config/presets/http/index.js.map +1 -1
  30. package/dist/config/presets/index.js +0 -7
  31. package/dist/config/presets/index.js.map +1 -1
  32. package/dist/config/presets/internal/custom-managers.js +18 -4
  33. package/dist/config/presets/internal/custom-managers.js.map +1 -1
  34. package/dist/config/presets/internal/group.js +30 -1
  35. package/dist/config/presets/internal/group.js.map +1 -1
  36. package/dist/config/presets/internal/index.js +1 -3
  37. package/dist/config/presets/internal/index.js.map +1 -1
  38. package/dist/config/presets/internal/workarounds.js +1 -0
  39. package/dist/config/presets/internal/workarounds.js.map +1 -1
  40. package/dist/config/presets/npm/index.js +4 -1
  41. package/dist/config/presets/npm/index.js.map +1 -1
  42. package/dist/config/presets/parse.js +2 -1
  43. package/dist/config/presets/parse.js.map +1 -1
  44. package/dist/config/schema.d.ts +2 -2
  45. package/dist/config/types.d.ts +4 -2
  46. package/dist/config/types.js.map +1 -1
  47. package/dist/config/validation.js +3 -5
  48. package/dist/config/validation.js.map +1 -1
  49. package/dist/config-validator.js +0 -1
  50. package/dist/config-validator.js.map +1 -1
  51. package/dist/constants/category.js +0 -1
  52. package/dist/constants/category.js.map +1 -1
  53. package/dist/constants/platforms.js +5 -1
  54. package/dist/constants/platforms.js.map +1 -1
  55. package/dist/data/monorepo.json +9 -2
  56. package/dist/data/replacements.json +13 -0
  57. package/dist/data/source-urls.json +1 -0
  58. package/dist/data-files.generated.js +2 -2
  59. package/dist/data-files.generated.js.map +1 -1
  60. package/dist/instrumentation/index.js +39 -15
  61. package/dist/instrumentation/index.js.map +1 -1
  62. package/dist/instrumentation/utils.js +1 -1
  63. package/dist/instrumentation/utils.js.map +1 -1
  64. package/dist/logger/cmd-serializer.js +0 -1
  65. package/dist/logger/cmd-serializer.js.map +1 -1
  66. package/dist/logger/config-serializer.js +0 -1
  67. package/dist/logger/config-serializer.js.map +1 -1
  68. package/dist/logger/index.js +1 -4
  69. package/dist/logger/index.js.map +1 -1
  70. package/dist/logger/once.js +4 -2
  71. package/dist/logger/once.js.map +1 -1
  72. package/dist/logger/pretty-stdout.js +0 -1
  73. package/dist/logger/pretty-stdout.js.map +1 -1
  74. package/dist/logger/renovate-logger.js +1 -1
  75. package/dist/logger/renovate-logger.js.map +1 -1
  76. package/dist/logger/utils.js +5 -10
  77. package/dist/logger/utils.js.map +1 -1
  78. package/dist/modules/datasource/api.js +4 -0
  79. package/dist/modules/datasource/api.js.map +1 -1
  80. package/dist/modules/datasource/artifactory/index.js +1 -2
  81. package/dist/modules/datasource/artifactory/index.js.map +1 -1
  82. package/dist/modules/datasource/aws-eks-addon/index.d.ts +11 -0
  83. package/dist/modules/datasource/aws-eks-addon/index.js +75 -0
  84. package/dist/modules/datasource/aws-eks-addon/index.js.map +1 -0
  85. package/dist/modules/datasource/aws-eks-addon/schema.d.ts +40 -0
  86. package/dist/modules/datasource/aws-eks-addon/schema.js +31 -0
  87. package/dist/modules/datasource/aws-eks-addon/schema.js.map +1 -0
  88. package/dist/modules/datasource/aws-machine-image/index.js +6 -5
  89. package/dist/modules/datasource/aws-machine-image/index.js.map +1 -1
  90. package/dist/modules/datasource/azure-pipelines-tasks/index.js +15 -1
  91. package/dist/modules/datasource/azure-pipelines-tasks/index.js.map +1 -1
  92. package/dist/modules/datasource/azure-pipelines-tasks/schema.d.ts +24 -0
  93. package/dist/modules/datasource/azure-pipelines-tasks/schema.js +3 -0
  94. package/dist/modules/datasource/azure-pipelines-tasks/schema.js.map +1 -1
  95. package/dist/modules/datasource/bazel/index.js +18 -2
  96. package/dist/modules/datasource/bazel/index.js.map +1 -1
  97. package/dist/modules/datasource/bazel/schema.d.ts +1 -0
  98. package/dist/modules/datasource/bazel/schema.js.map +1 -1
  99. package/dist/modules/datasource/bitbucket-server-tags/index.d.ts +19 -0
  100. package/dist/modules/datasource/bitbucket-server-tags/index.js +133 -0
  101. package/dist/modules/datasource/bitbucket-server-tags/index.js.map +1 -0
  102. package/dist/modules/datasource/bitbucket-server-tags/schema.d.ts +28 -0
  103. package/dist/modules/datasource/bitbucket-server-tags/schema.js +13 -0
  104. package/dist/modules/datasource/bitbucket-server-tags/schema.js.map +1 -0
  105. package/dist/modules/datasource/bitrise/index.js +1 -1
  106. package/dist/modules/datasource/bitrise/index.js.map +1 -1
  107. package/dist/modules/datasource/cdnjs/schema.d.ts +2 -2
  108. package/dist/modules/datasource/conda/index.js +18 -1
  109. package/dist/modules/datasource/conda/index.js.map +1 -1
  110. package/dist/modules/datasource/conda/prefix-dev.d.ts +3 -0
  111. package/dist/modules/datasource/conda/prefix-dev.js +81 -0
  112. package/dist/modules/datasource/conda/prefix-dev.js.map +1 -0
  113. package/dist/modules/datasource/conda/schema/prefix-dev.d.ts +189 -0
  114. package/dist/modules/datasource/conda/schema/prefix-dev.js +31 -0
  115. package/dist/modules/datasource/conda/schema/prefix-dev.js.map +1 -0
  116. package/dist/modules/datasource/conda/types.d.ts +1 -20
  117. package/dist/modules/datasource/conda/types.js.map +1 -1
  118. package/dist/modules/datasource/cpan/index.js +2 -4
  119. package/dist/modules/datasource/cpan/index.js.map +1 -1
  120. package/dist/modules/datasource/crate/index.js +3 -3
  121. package/dist/modules/datasource/crate/index.js.map +1 -1
  122. package/dist/modules/datasource/custom/formats/html.js +1 -1
  123. package/dist/modules/datasource/custom/formats/html.js.map +1 -1
  124. package/dist/modules/datasource/custom/formats/yaml.js +1 -1
  125. package/dist/modules/datasource/custom/formats/yaml.js.map +1 -1
  126. package/dist/modules/datasource/custom/index.js +4 -2
  127. package/dist/modules/datasource/custom/index.js.map +1 -1
  128. package/dist/modules/datasource/custom/schema.d.ts +22 -22
  129. package/dist/modules/datasource/custom/utils.js +1 -0
  130. package/dist/modules/datasource/custom/utils.js.map +1 -1
  131. package/dist/modules/datasource/dart/index.js +1 -1
  132. package/dist/modules/datasource/dart/index.js.map +1 -1
  133. package/dist/modules/datasource/dart-version/index.js +1 -1
  134. package/dist/modules/datasource/dart-version/index.js.map +1 -1
  135. package/dist/modules/datasource/datasource.js +0 -1
  136. package/dist/modules/datasource/datasource.js.map +1 -1
  137. package/dist/modules/datasource/deb/index.d.ts +4 -5
  138. package/dist/modules/datasource/deb/index.js +10 -11
  139. package/dist/modules/datasource/deb/index.js.map +1 -1
  140. package/dist/modules/datasource/deb/url.d.ts +3 -3
  141. package/dist/modules/datasource/deb/url.js +17 -13
  142. package/dist/modules/datasource/deb/url.js.map +1 -1
  143. package/dist/modules/datasource/deno/index.js +1 -1
  144. package/dist/modules/datasource/deno/index.js.map +1 -1
  145. package/dist/modules/datasource/deno/schema.d.ts +1 -1
  146. package/dist/modules/datasource/devbox/index.js +0 -1
  147. package/dist/modules/datasource/devbox/index.js.map +1 -1
  148. package/dist/modules/datasource/docker/common.js +5 -2
  149. package/dist/modules/datasource/docker/common.js.map +1 -1
  150. package/dist/modules/datasource/docker/index.js +8 -6
  151. package/dist/modules/datasource/docker/index.js.map +1 -1
  152. package/dist/modules/datasource/docker/schema.d.ts +77 -101
  153. package/dist/modules/datasource/docker/schema.js +2 -1
  154. package/dist/modules/datasource/docker/schema.js.map +1 -1
  155. package/dist/modules/datasource/flutter-version/index.js +1 -1
  156. package/dist/modules/datasource/flutter-version/index.js.map +1 -1
  157. package/dist/modules/datasource/galaxy/schema.d.ts +1 -1
  158. package/dist/modules/datasource/galaxy-collection/schema.d.ts +8 -8
  159. package/dist/modules/datasource/git-refs/index.js +1 -1
  160. package/dist/modules/datasource/git-refs/index.js.map +1 -1
  161. package/dist/modules/datasource/gitea-releases/schema.d.ts +6 -6
  162. package/dist/modules/datasource/gitea-tags/schema.d.ts +4 -4
  163. package/dist/modules/datasource/github-release-attachments/index.js +2 -2
  164. package/dist/modules/datasource/github-release-attachments/index.js.map +1 -1
  165. package/dist/modules/datasource/github-runners/index.js +2 -2
  166. package/dist/modules/datasource/github-runners/index.js.map +1 -1
  167. package/dist/modules/datasource/github-tags/index.js +4 -1
  168. package/dist/modules/datasource/github-tags/index.js.map +1 -1
  169. package/dist/modules/datasource/gitlab-packages/index.js +1 -1
  170. package/dist/modules/datasource/gitlab-packages/index.js.map +1 -1
  171. package/dist/modules/datasource/gitlab-releases/index.js +1 -3
  172. package/dist/modules/datasource/gitlab-releases/index.js.map +1 -1
  173. package/dist/modules/datasource/go/base.js +1 -1
  174. package/dist/modules/datasource/go/base.js.map +1 -1
  175. package/dist/modules/datasource/go/index.js +1 -1
  176. package/dist/modules/datasource/go/index.js.map +1 -1
  177. package/dist/modules/datasource/go/releases-direct.js +7 -4
  178. package/dist/modules/datasource/go/releases-direct.js.map +1 -1
  179. package/dist/modules/datasource/go/releases-goproxy.js +1 -1
  180. package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
  181. package/dist/modules/datasource/golang-version/index.js +2 -2
  182. package/dist/modules/datasource/golang-version/index.js.map +1 -1
  183. package/dist/modules/datasource/gradle-version/index.js +1 -1
  184. package/dist/modules/datasource/gradle-version/index.js.map +1 -1
  185. package/dist/modules/datasource/helm/index.js +1 -1
  186. package/dist/modules/datasource/helm/index.js.map +1 -1
  187. package/dist/modules/datasource/hex/index.js +1 -1
  188. package/dist/modules/datasource/hex/index.js.map +1 -1
  189. package/dist/modules/datasource/hex/schema.d.ts +11 -11
  190. package/dist/modules/datasource/hexpm-bob/index.js +1 -1
  191. package/dist/modules/datasource/hexpm-bob/index.js.map +1 -1
  192. package/dist/modules/datasource/index.js +46 -5
  193. package/dist/modules/datasource/index.js.map +1 -1
  194. package/dist/modules/datasource/java-version/index.js +0 -1
  195. package/dist/modules/datasource/java-version/index.js.map +1 -1
  196. package/dist/modules/datasource/jenkins-plugins/index.js +1 -1
  197. package/dist/modules/datasource/jenkins-plugins/index.js.map +1 -1
  198. package/dist/modules/datasource/maven/index.d.ts +2 -2
  199. package/dist/modules/datasource/maven/index.js +56 -33
  200. package/dist/modules/datasource/maven/index.js.map +1 -1
  201. package/dist/modules/datasource/maven/types.d.ts +7 -6
  202. package/dist/modules/datasource/maven/types.js.map +1 -1
  203. package/dist/modules/datasource/maven/util.d.ts +4 -5
  204. package/dist/modules/datasource/maven/util.js +94 -157
  205. package/dist/modules/datasource/maven/util.js.map +1 -1
  206. package/dist/modules/datasource/metadata.js +9 -1
  207. package/dist/modules/datasource/metadata.js.map +1 -1
  208. package/dist/modules/datasource/node-version/index.js +1 -1
  209. package/dist/modules/datasource/node-version/index.js.map +1 -1
  210. package/dist/modules/datasource/npm/get.d.ts +0 -1
  211. package/dist/modules/datasource/npm/get.js +14 -68
  212. package/dist/modules/datasource/npm/get.js.map +1 -1
  213. package/dist/modules/datasource/npm/index.js +1 -1
  214. package/dist/modules/datasource/npm/index.js.map +1 -1
  215. package/dist/modules/datasource/npm/npmrc.js +1 -1
  216. package/dist/modules/datasource/npm/npmrc.js.map +1 -1
  217. package/dist/modules/datasource/npm/types.d.ts +0 -8
  218. package/dist/modules/datasource/npm/types.js.map +1 -1
  219. package/dist/modules/datasource/nuget/index.js +1 -1
  220. package/dist/modules/datasource/nuget/index.js.map +1 -1
  221. package/dist/modules/datasource/nuget/v2.js +1 -1
  222. package/dist/modules/datasource/nuget/v2.js.map +1 -1
  223. package/dist/modules/datasource/nuget/v3.js +8 -6
  224. package/dist/modules/datasource/nuget/v3.js.map +1 -1
  225. package/dist/modules/datasource/orb/index.js +1 -1
  226. package/dist/modules/datasource/orb/index.js.map +1 -1
  227. package/dist/modules/datasource/packagist/index.js +2 -2
  228. package/dist/modules/datasource/packagist/index.js.map +1 -1
  229. package/dist/modules/datasource/packagist/schema.d.ts +32 -32
  230. package/dist/modules/datasource/pod/index.js +2 -2
  231. package/dist/modules/datasource/pod/index.js.map +1 -1
  232. package/dist/modules/datasource/postprocess-release.js +1 -1
  233. package/dist/modules/datasource/postprocess-release.js.map +1 -1
  234. package/dist/modules/datasource/pypi/index.js +1 -1
  235. package/dist/modules/datasource/pypi/index.js.map +1 -1
  236. package/dist/modules/datasource/python-version/index.js +1 -1
  237. package/dist/modules/datasource/python-version/index.js.map +1 -1
  238. package/dist/modules/datasource/repology/index.js +1 -1
  239. package/dist/modules/datasource/repology/index.js.map +1 -1
  240. package/dist/modules/datasource/ruby-version/index.js +1 -1
  241. package/dist/modules/datasource/ruby-version/index.js.map +1 -1
  242. package/dist/modules/datasource/rubygems/index.js +2 -2
  243. package/dist/modules/datasource/rubygems/index.js.map +1 -1
  244. package/dist/modules/datasource/rubygems/versions-endpoint-cache.js +2 -2
  245. package/dist/modules/datasource/rubygems/versions-endpoint-cache.js.map +1 -1
  246. package/dist/modules/datasource/sbt-package/index.js +1 -1
  247. package/dist/modules/datasource/sbt-package/index.js.map +1 -1
  248. package/dist/modules/datasource/sbt-plugin/index.js +1 -1
  249. package/dist/modules/datasource/sbt-plugin/index.js.map +1 -1
  250. package/dist/modules/datasource/schema.d.ts +4 -4
  251. package/dist/modules/datasource/terraform-module/index.js +1 -1
  252. package/dist/modules/datasource/terraform-module/index.js.map +1 -1
  253. package/dist/modules/datasource/terraform-provider/index.js +2 -3
  254. package/dist/modules/datasource/terraform-provider/index.js.map +1 -1
  255. package/dist/modules/datasource/types.d.ts +2 -0
  256. package/dist/modules/datasource/types.js.map +1 -1
  257. package/dist/modules/manager/api.js +2 -0
  258. package/dist/modules/manager/api.js.map +1 -1
  259. package/dist/modules/manager/argocd/extract.js +1 -1
  260. package/dist/modules/manager/argocd/extract.js.map +1 -1
  261. package/dist/modules/manager/argocd/schema.d.ts +22 -22
  262. package/dist/modules/manager/asdf/upgradeable-tooling.js +94 -0
  263. package/dist/modules/manager/asdf/upgradeable-tooling.js.map +1 -1
  264. package/dist/modules/manager/azure-pipelines/schema.d.ts +32 -32
  265. package/dist/modules/manager/batect/schema.d.ts +4 -4
  266. package/dist/modules/manager/batect-wrapper/artifacts.js +1 -1
  267. package/dist/modules/manager/batect-wrapper/artifacts.js.map +1 -1
  268. package/dist/modules/manager/bazel/rules/docker.d.ts +6 -6
  269. package/dist/modules/manager/bazel/rules/git.d.ts +10 -10
  270. package/dist/modules/manager/bazel/rules/git.js +9 -2
  271. package/dist/modules/manager/bazel/rules/git.js.map +1 -1
  272. package/dist/modules/manager/bazel/rules/go.d.ts +5 -5
  273. package/dist/modules/manager/bazel/rules/maven.d.ts +7 -7
  274. package/dist/modules/manager/bazel/rules/oci.d.ts +6 -6
  275. package/dist/modules/manager/bazel-module/parser/fragments.d.ts +40 -40
  276. package/dist/modules/manager/bazel-module/parser/maven.d.ts +44 -90
  277. package/dist/modules/manager/bazel-module/parser/oci.d.ts +19 -42
  278. package/dist/modules/manager/bazel-module/rules.d.ts +50 -160
  279. package/dist/modules/manager/buildpacks/extract.d.ts +6 -1
  280. package/dist/modules/manager/buildpacks/extract.js +24 -14
  281. package/dist/modules/manager/buildpacks/extract.js.map +1 -1
  282. package/dist/modules/manager/bun/artifacts.js +0 -1
  283. package/dist/modules/manager/bun/artifacts.js.map +1 -1
  284. package/dist/modules/manager/bun/extract.d.ts +1 -0
  285. package/dist/modules/manager/bun/extract.js +53 -27
  286. package/dist/modules/manager/bun/extract.js.map +1 -1
  287. package/dist/modules/manager/bun/index.js +1 -1
  288. package/dist/modules/manager/bun/index.js.map +1 -1
  289. package/dist/modules/manager/bun/utils.d.ts +2 -0
  290. package/dist/modules/manager/bun/utils.js +22 -0
  291. package/dist/modules/manager/bun/utils.js.map +1 -0
  292. package/dist/modules/manager/bundler/artifacts.js +0 -1
  293. package/dist/modules/manager/bundler/artifacts.js.map +1 -1
  294. package/dist/modules/manager/bundler/extract.js +2 -1
  295. package/dist/modules/manager/bundler/extract.js.map +1 -1
  296. package/dist/modules/manager/cake/index.js +4 -2
  297. package/dist/modules/manager/cake/index.js.map +1 -1
  298. package/dist/modules/manager/cargo/artifacts.js +5 -7
  299. package/dist/modules/manager/cargo/artifacts.js.map +1 -1
  300. package/dist/modules/manager/cargo/schema.d.ts +166 -166
  301. package/dist/modules/manager/circleci/extract.js +21 -30
  302. package/dist/modules/manager/circleci/extract.js.map +1 -1
  303. package/dist/modules/manager/circleci/schema.d.ts +33 -144
  304. package/dist/modules/manager/circleci/schema.js +21 -17
  305. package/dist/modules/manager/circleci/schema.js.map +1 -1
  306. package/dist/modules/manager/cocoapods/artifacts.js +1 -2
  307. package/dist/modules/manager/cocoapods/artifacts.js.map +1 -1
  308. package/dist/modules/manager/composer/artifacts.js +1 -2
  309. package/dist/modules/manager/composer/artifacts.js.map +1 -1
  310. package/dist/modules/manager/composer/schema.d.ts +32 -34
  311. package/dist/modules/manager/composer/schema.js +1 -1
  312. package/dist/modules/manager/composer/schema.js.map +1 -1
  313. package/dist/modules/manager/composer/utils.d.ts +1 -0
  314. package/dist/modules/manager/composer/utils.js +18 -6
  315. package/dist/modules/manager/composer/utils.js.map +1 -1
  316. package/dist/modules/manager/conan/artifacts.d.ts +2 -0
  317. package/dist/modules/manager/conan/artifacts.js +76 -0
  318. package/dist/modules/manager/conan/artifacts.js.map +1 -0
  319. package/dist/modules/manager/conan/index.d.ts +2 -0
  320. package/dist/modules/manager/conan/index.js +4 -1
  321. package/dist/modules/manager/conan/index.js.map +1 -1
  322. package/dist/modules/manager/copier/artifacts.js +0 -1
  323. package/dist/modules/manager/copier/artifacts.js.map +1 -1
  324. package/dist/modules/manager/crossplane/schema.d.ts +2 -2
  325. package/dist/modules/manager/custom/jsonata/schema.d.ts +21 -21
  326. package/dist/modules/manager/custom/regex/index.js +2 -0
  327. package/dist/modules/manager/custom/regex/index.js.map +1 -1
  328. package/dist/modules/manager/deps-edn/extract.js +2 -1
  329. package/dist/modules/manager/deps-edn/extract.js.map +1 -1
  330. package/dist/modules/manager/devbox/artifacts.d.ts +1 -1
  331. package/dist/modules/manager/devbox/artifacts.js +35 -11
  332. package/dist/modules/manager/devbox/artifacts.js.map +1 -1
  333. package/dist/modules/manager/devbox/schema.js +1 -1
  334. package/dist/modules/manager/devbox/schema.js.map +1 -1
  335. package/dist/modules/manager/devcontainer/extract.js +43 -1
  336. package/dist/modules/manager/devcontainer/extract.js.map +1 -1
  337. package/dist/modules/manager/devcontainer/index.js +11 -1
  338. package/dist/modules/manager/devcontainer/index.js.map +1 -1
  339. package/dist/modules/manager/devcontainer/schema.d.ts +7 -3
  340. package/dist/modules/manager/devcontainer/schema.js +3 -1
  341. package/dist/modules/manager/devcontainer/schema.js.map +1 -1
  342. package/dist/modules/manager/docker-compose/schema.d.ts +6 -6
  343. package/dist/modules/manager/dockerfile/extract.js +2 -6
  344. package/dist/modules/manager/dockerfile/extract.js.map +1 -1
  345. package/dist/modules/manager/fingerprint.generated.js +86 -85
  346. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  347. package/dist/modules/manager/fleet/schema.d.ts +4 -4
  348. package/dist/modules/manager/flux/artifacts.js +0 -1
  349. package/dist/modules/manager/flux/artifacts.js.map +1 -1
  350. package/dist/modules/manager/flux/extract.js +27 -24
  351. package/dist/modules/manager/flux/extract.js.map +1 -1
  352. package/dist/modules/manager/flux/schema.d.ts +130 -154
  353. package/dist/modules/manager/github-actions/extract.js +60 -39
  354. package/dist/modules/manager/github-actions/extract.js.map +1 -1
  355. package/dist/modules/manager/github-actions/schema.d.ts +66 -0
  356. package/dist/modules/manager/github-actions/schema.js +38 -0
  357. package/dist/modules/manager/github-actions/schema.js.map +1 -0
  358. package/dist/modules/manager/gitlabci/extract.d.ts +1 -5
  359. package/dist/modules/manager/gitlabci/extract.js +27 -126
  360. package/dist/modules/manager/gitlabci/extract.js.map +1 -1
  361. package/dist/modules/manager/gitlabci/schema.d.ts +55 -0
  362. package/dist/modules/manager/gitlabci/schema.js +63 -0
  363. package/dist/modules/manager/gitlabci/schema.js.map +1 -0
  364. package/dist/modules/manager/gitlabci-include/extract.js +6 -54
  365. package/dist/modules/manager/gitlabci-include/extract.js.map +1 -1
  366. package/dist/modules/manager/gitlabci-include/schema.d.ts +13 -0
  367. package/dist/modules/manager/gitlabci-include/schema.js +46 -0
  368. package/dist/modules/manager/gitlabci-include/schema.js.map +1 -0
  369. package/dist/modules/manager/glasskube/schema.d.ts +8 -8
  370. package/dist/modules/manager/gomod/artifacts-extra.js +12 -4
  371. package/dist/modules/manager/gomod/artifacts-extra.js.map +1 -1
  372. package/dist/modules/manager/gomod/artifacts.js +24 -10
  373. package/dist/modules/manager/gomod/artifacts.js.map +1 -1
  374. package/dist/modules/manager/gomod/extract.js +23 -0
  375. package/dist/modules/manager/gomod/extract.js.map +1 -1
  376. package/dist/modules/manager/gomod/line-parser.js +16 -0
  377. package/dist/modules/manager/gomod/line-parser.js.map +1 -1
  378. package/dist/modules/manager/gomod/update.js +5 -3
  379. package/dist/modules/manager/gomod/update.js.map +1 -1
  380. package/dist/modules/manager/gradle/artifacts.js +0 -1
  381. package/dist/modules/manager/gradle/artifacts.js.map +1 -1
  382. package/dist/modules/manager/gradle/extract/catalog.js +1 -1
  383. package/dist/modules/manager/gradle/extract/catalog.js.map +1 -1
  384. package/dist/modules/manager/gradle/extract.js +8 -13
  385. package/dist/modules/manager/gradle/extract.js.map +1 -1
  386. package/dist/modules/manager/gradle/parser/assignments.js +2 -2
  387. package/dist/modules/manager/gradle/parser/assignments.js.map +1 -1
  388. package/dist/modules/manager/gradle/parser/handlers.d.ts +1 -2
  389. package/dist/modules/manager/gradle/parser/handlers.js +17 -24
  390. package/dist/modules/manager/gradle/parser/handlers.js.map +1 -1
  391. package/dist/modules/manager/gradle/parser/registry-urls.js +46 -12
  392. package/dist/modules/manager/gradle/parser/registry-urls.js.map +1 -1
  393. package/dist/modules/manager/gradle/types.d.ts +1 -0
  394. package/dist/modules/manager/gradle/types.js.map +1 -1
  395. package/dist/modules/manager/gradle-wrapper/artifacts.js +1 -2
  396. package/dist/modules/manager/gradle-wrapper/artifacts.js.map +1 -1
  397. package/dist/modules/manager/helmfile/artifacts.js +0 -1
  398. package/dist/modules/manager/helmfile/artifacts.js.map +1 -1
  399. package/dist/modules/manager/helmfile/extract.js +4 -0
  400. package/dist/modules/manager/helmfile/extract.js.map +1 -1
  401. package/dist/modules/manager/helmfile/schema.d.ts +9 -9
  402. package/dist/modules/manager/helmv3/artifacts.js +0 -1
  403. package/dist/modules/manager/helmv3/artifacts.js.map +1 -1
  404. package/dist/modules/manager/helmv3/utils.js +3 -1
  405. package/dist/modules/manager/helmv3/utils.js.map +1 -1
  406. package/dist/modules/manager/hermit/artifacts.js +0 -1
  407. package/dist/modules/manager/hermit/artifacts.js.map +1 -1
  408. package/dist/modules/manager/homebrew/extract.js +0 -1
  409. package/dist/modules/manager/homebrew/extract.js.map +1 -1
  410. package/dist/modules/manager/jsonnet-bundler/artifacts.js +0 -1
  411. package/dist/modules/manager/jsonnet-bundler/artifacts.js.map +1 -1
  412. package/dist/modules/manager/kustomize/artifacts.d.ts +2 -0
  413. package/dist/modules/manager/kustomize/artifacts.js +154 -0
  414. package/dist/modules/manager/kustomize/artifacts.js.map +1 -0
  415. package/dist/modules/manager/kustomize/common.d.ts +3 -0
  416. package/dist/modules/manager/kustomize/common.js +22 -0
  417. package/dist/modules/manager/kustomize/common.js.map +1 -0
  418. package/dist/modules/manager/kustomize/index.d.ts +1 -0
  419. package/dist/modules/manager/kustomize/index.js +3 -1
  420. package/dist/modules/manager/kustomize/index.js.map +1 -1
  421. package/dist/modules/manager/kustomize/types.d.ts +4 -0
  422. package/dist/modules/manager/kustomize/types.js.map +1 -1
  423. package/dist/modules/manager/maven/extract.d.ts +2 -2
  424. package/dist/modules/manager/maven/extract.js +14 -9
  425. package/dist/modules/manager/maven/extract.js.map +1 -1
  426. package/dist/modules/manager/maven-wrapper/artifacts.js +0 -1
  427. package/dist/modules/manager/maven-wrapper/artifacts.js.map +1 -1
  428. package/dist/modules/manager/mise/extract.js +1 -1
  429. package/dist/modules/manager/mise/extract.js.map +1 -1
  430. package/dist/modules/manager/mix/artifacts.js +64 -14
  431. package/dist/modules/manager/mix/artifacts.js.map +1 -1
  432. package/dist/modules/manager/mix/index.d.ts +1 -0
  433. package/dist/modules/manager/mix/index.js +2 -1
  434. package/dist/modules/manager/mix/index.js.map +1 -1
  435. package/dist/modules/manager/nix/artifacts.js +0 -1
  436. package/dist/modules/manager/nix/artifacts.js.map +1 -1
  437. package/dist/modules/manager/nix/extract.js +1 -1
  438. package/dist/modules/manager/nix/extract.js.map +1 -1
  439. package/dist/modules/manager/nix/schema.d.ts +20 -20
  440. package/dist/modules/manager/nix/schema.js +1 -0
  441. package/dist/modules/manager/nix/schema.js.map +1 -1
  442. package/dist/modules/manager/npm/artifacts.js +0 -1
  443. package/dist/modules/manager/npm/artifacts.js.map +1 -1
  444. package/dist/modules/manager/npm/extract/common/package-file.js +1 -0
  445. package/dist/modules/manager/npm/extract/common/package-file.js.map +1 -1
  446. package/dist/modules/manager/npm/extract/yarn.js +2 -2
  447. package/dist/modules/manager/npm/extract/yarn.js.map +1 -1
  448. package/dist/modules/manager/npm/post-update/npm.js +0 -1
  449. package/dist/modules/manager/npm/post-update/npm.js.map +1 -1
  450. package/dist/modules/manager/npm/post-update/pnpm.js +13 -2
  451. package/dist/modules/manager/npm/post-update/pnpm.js.map +1 -1
  452. package/dist/modules/manager/npm/post-update/rules.js +11 -1
  453. package/dist/modules/manager/npm/post-update/rules.js.map +1 -1
  454. package/dist/modules/manager/npm/post-update/yarn.js +0 -1
  455. package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
  456. package/dist/modules/manager/npm/schema.d.ts +13 -13
  457. package/dist/modules/manager/npm/update/dependency/index.js +1 -1
  458. package/dist/modules/manager/npm/update/dependency/index.js.map +1 -1
  459. package/dist/modules/manager/nuget/artifacts.js +1 -2
  460. package/dist/modules/manager/nuget/artifacts.js.map +1 -1
  461. package/dist/modules/manager/nuget/extract.js +21 -18
  462. package/dist/modules/manager/nuget/extract.js.map +1 -1
  463. package/dist/modules/manager/nuget/package-tree.js +4 -0
  464. package/dist/modules/manager/nuget/package-tree.js.map +1 -1
  465. package/dist/modules/manager/nuget/schema.d.ts +8 -8
  466. package/dist/modules/manager/nuget/util.js +4 -1
  467. package/dist/modules/manager/nuget/util.js.map +1 -1
  468. package/dist/modules/manager/ocb/schema.d.ts +6 -6
  469. package/dist/modules/manager/pep621/extract.js +19 -3
  470. package/dist/modules/manager/pep621/extract.js.map +1 -1
  471. package/dist/modules/manager/pep621/processors/pdm.js +3 -2
  472. package/dist/modules/manager/pep621/processors/pdm.js.map +1 -1
  473. package/dist/modules/manager/pep621/processors/uv.js +4 -1
  474. package/dist/modules/manager/pep621/processors/uv.js.map +1 -1
  475. package/dist/modules/manager/pep621/schema.d.ts +341 -49
  476. package/dist/modules/manager/pep621/schema.js +3 -1
  477. package/dist/modules/manager/pep621/schema.js.map +1 -1
  478. package/dist/modules/manager/pep621/utils.js +1 -1
  479. package/dist/modules/manager/pep621/utils.js.map +1 -1
  480. package/dist/modules/manager/pip-compile/common.js +0 -1
  481. package/dist/modules/manager/pip-compile/common.js.map +1 -1
  482. package/dist/modules/manager/pip_requirements/artifacts.js +0 -1
  483. package/dist/modules/manager/pip_requirements/artifacts.js.map +1 -1
  484. package/dist/modules/manager/pip_requirements/common.js +2 -6
  485. package/dist/modules/manager/pip_requirements/common.js.map +1 -1
  486. package/dist/modules/manager/pipenv/artifacts.js +0 -1
  487. package/dist/modules/manager/pipenv/artifacts.js.map +1 -1
  488. package/dist/modules/manager/pixi/artifacts.d.ts +3 -0
  489. package/dist/modules/manager/pixi/artifacts.js +78 -0
  490. package/dist/modules/manager/pixi/artifacts.js.map +1 -0
  491. package/dist/modules/manager/pixi/extract.d.ts +4 -0
  492. package/dist/modules/manager/pixi/extract.js +131 -0
  493. package/dist/modules/manager/pixi/extract.js.map +1 -0
  494. package/dist/modules/manager/pixi/index.d.ts +10 -0
  495. package/dist/modules/manager/pixi/index.js +20 -0
  496. package/dist/modules/manager/pixi/index.js.map +1 -0
  497. package/dist/modules/manager/pixi/schema.d.ts +405 -0
  498. package/dist/modules/manager/pixi/schema.js +147 -0
  499. package/dist/modules/manager/pixi/schema.js.map +1 -0
  500. package/dist/modules/manager/poetry/artifacts.js +3 -4
  501. package/dist/modules/manager/poetry/artifacts.js.map +1 -1
  502. package/dist/modules/manager/poetry/extract.js +2 -1
  503. package/dist/modules/manager/poetry/extract.js.map +1 -1
  504. package/dist/modules/manager/poetry/schema.d.ts +44 -44
  505. package/dist/modules/manager/pub/artifacts.js +0 -1
  506. package/dist/modules/manager/pub/artifacts.js.map +1 -1
  507. package/dist/modules/manager/pub/schema.d.ts +8 -8
  508. package/dist/modules/manager/scalafmt/extract.js +1 -1
  509. package/dist/modules/manager/scalafmt/extract.js.map +1 -1
  510. package/dist/modules/manager/sveltos/schema.d.ts +30 -42
  511. package/dist/modules/manager/terraform/lockfile/hash.d.ts +1 -1
  512. package/dist/modules/manager/terraform/util.js +1 -3
  513. package/dist/modules/manager/terraform/util.js.map +1 -1
  514. package/dist/modules/manager/types.d.ts +6 -2
  515. package/dist/modules/manager/types.js.map +1 -1
  516. package/dist/modules/manager/vendir/schema.d.ts +7 -7
  517. package/dist/modules/platform/api.d.ts +1 -1
  518. package/dist/modules/platform/azure/azure-helper.js +2 -2
  519. package/dist/modules/platform/azure/azure-helper.js.map +1 -1
  520. package/dist/modules/platform/azure/index.js +14 -14
  521. package/dist/modules/platform/azure/index.js.map +1 -1
  522. package/dist/modules/platform/bitbucket/comments.js +4 -4
  523. package/dist/modules/platform/bitbucket/comments.js.map +1 -1
  524. package/dist/modules/platform/bitbucket/index.js +49 -44
  525. package/dist/modules/platform/bitbucket/index.js.map +1 -1
  526. package/dist/modules/platform/bitbucket/schema.d.ts +14 -14
  527. package/dist/modules/platform/bitbucket/utils.js +3 -3
  528. package/dist/modules/platform/bitbucket/utils.js.map +1 -1
  529. package/dist/modules/platform/bitbucket-server/index.d.ts +2 -2
  530. package/dist/modules/platform/bitbucket-server/index.js +81 -81
  531. package/dist/modules/platform/bitbucket-server/index.js.map +1 -1
  532. package/dist/modules/platform/bitbucket-server/pr-cache.d.ts +23 -0
  533. package/dist/modules/platform/bitbucket-server/pr-cache.js +125 -0
  534. package/dist/modules/platform/bitbucket-server/pr-cache.js.map +1 -0
  535. package/dist/modules/platform/bitbucket-server/schema.d.ts +76 -0
  536. package/dist/modules/platform/bitbucket-server/schema.js +15 -1
  537. package/dist/modules/platform/bitbucket-server/schema.js.map +1 -1
  538. package/dist/modules/platform/bitbucket-server/types.d.ts +8 -2
  539. package/dist/modules/platform/bitbucket-server/types.js.map +1 -1
  540. package/dist/modules/platform/bitbucket-server/utils.d.ts +0 -2
  541. package/dist/modules/platform/bitbucket-server/utils.js +6 -52
  542. package/dist/modules/platform/bitbucket-server/utils.js.map +1 -1
  543. package/dist/modules/platform/codecommit/codecommit-client.js +6 -6
  544. package/dist/modules/platform/codecommit/codecommit-client.js.map +1 -1
  545. package/dist/modules/platform/codecommit/index.js +24 -24
  546. package/dist/modules/platform/codecommit/index.js.map +1 -1
  547. package/dist/modules/platform/gerrit/client.d.ts +0 -3
  548. package/dist/modules/platform/gerrit/client.js +20 -29
  549. package/dist/modules/platform/gerrit/client.js.map +1 -1
  550. package/dist/modules/platform/gerrit/index.js +0 -6
  551. package/dist/modules/platform/gerrit/index.js.map +1 -1
  552. package/dist/modules/platform/gerrit/scm.js +5 -6
  553. package/dist/modules/platform/gerrit/scm.js.map +1 -1
  554. package/dist/modules/platform/gerrit/types.d.ts +1 -4
  555. package/dist/modules/platform/gerrit/types.js.map +1 -1
  556. package/dist/modules/platform/gerrit/utils.d.ts +3 -2
  557. package/dist/modules/platform/gerrit/utils.js +4 -8
  558. package/dist/modules/platform/gerrit/utils.js.map +1 -1
  559. package/dist/modules/platform/gitea/gitea-helper.d.ts +1 -0
  560. package/dist/modules/platform/gitea/gitea-helper.js +16 -0
  561. package/dist/modules/platform/gitea/gitea-helper.js.map +1 -1
  562. package/dist/modules/platform/gitea/index.js +22 -16
  563. package/dist/modules/platform/gitea/index.js.map +1 -1
  564. package/dist/modules/platform/gitea/schema.d.ts +8 -8
  565. package/dist/modules/platform/gitea/types.d.ts +1 -1
  566. package/dist/modules/platform/gitea/types.js.map +1 -1
  567. package/dist/modules/platform/github/common.d.ts +2 -0
  568. package/dist/modules/platform/github/common.js +16 -0
  569. package/dist/modules/platform/github/common.js.map +1 -1
  570. package/dist/modules/platform/github/index.d.ts +1 -1
  571. package/dist/modules/platform/github/index.js +87 -82
  572. package/dist/modules/platform/github/index.js.map +1 -1
  573. package/dist/modules/platform/github/issue.d.ts +18 -18
  574. package/dist/modules/platform/github/massage-markdown-links.js +2 -2
  575. package/dist/modules/platform/github/massage-markdown-links.js.map +1 -1
  576. package/dist/modules/platform/github/pr.js +3 -3
  577. package/dist/modules/platform/github/pr.js.map +1 -1
  578. package/dist/modules/platform/github/schema.d.ts +128 -128
  579. package/dist/modules/platform/github/schema.js +3 -1
  580. package/dist/modules/platform/github/schema.js.map +1 -1
  581. package/dist/modules/platform/gitlab/index.js +63 -49
  582. package/dist/modules/platform/gitlab/index.js.map +1 -1
  583. package/dist/modules/platform/index.js +0 -1
  584. package/dist/modules/platform/index.js.map +1 -1
  585. package/dist/modules/platform/scm.d.ts +1 -1
  586. package/dist/modules/versioning/api.js +2 -0
  587. package/dist/modules/versioning/api.js.map +1 -1
  588. package/dist/modules/versioning/composer/index.js +10 -0
  589. package/dist/modules/versioning/composer/index.js.map +1 -1
  590. package/dist/modules/versioning/conda/index.d.ts +41 -0
  591. package/dist/modules/versioning/conda/index.js +178 -0
  592. package/dist/modules/versioning/conda/index.js.map +1 -0
  593. package/dist/modules/versioning/distro.js +1 -3
  594. package/dist/modules/versioning/distro.js.map +1 -1
  595. package/dist/modules/versioning/hashicorp/convertor.d.ts +2 -1
  596. package/dist/modules/versioning/hashicorp/convertor.js +13 -8
  597. package/dist/modules/versioning/hashicorp/convertor.js.map +1 -1
  598. package/dist/modules/versioning/hex/index.js +3 -3
  599. package/dist/modules/versioning/hex/index.js.map +1 -1
  600. package/dist/modules/versioning/npm/index.js +2 -1
  601. package/dist/modules/versioning/npm/index.js.map +1 -1
  602. package/dist/modules/versioning/types.d.ts +4 -0
  603. package/dist/modules/versioning/types.js.map +1 -1
  604. package/dist/proxy.js +2 -1
  605. package/dist/proxy.js.map +1 -1
  606. package/dist/renovate.js +2 -2
  607. package/dist/renovate.js.map +1 -1
  608. package/dist/util/cache/package/redis.js +0 -1
  609. package/dist/util/cache/package/redis.js.map +1 -1
  610. package/dist/util/cache/package/types.d.ts +1 -1
  611. package/dist/util/cache/package/types.js.map +1 -1
  612. package/dist/util/cache/repository/impl/base.d.ts +1 -1
  613. package/dist/util/cache/repository/impl/base.js +4 -0
  614. package/dist/util/cache/repository/impl/base.js.map +1 -1
  615. package/dist/util/cache/repository/schema.d.ts +4 -4
  616. package/dist/util/cache/repository/types.d.ts +3 -0
  617. package/dist/util/cache/repository/types.js.map +1 -1
  618. package/dist/util/common.d.ts +4 -2
  619. package/dist/util/common.js +17 -3
  620. package/dist/util/common.js.map +1 -1
  621. package/dist/util/env.d.ts +4 -0
  622. package/dist/util/env.js +22 -0
  623. package/dist/util/env.js.map +1 -0
  624. package/dist/util/exec/containerbase.js +19 -14
  625. package/dist/util/exec/containerbase.js.map +1 -1
  626. package/dist/util/exec/index.js +5 -2
  627. package/dist/util/exec/index.js.map +1 -1
  628. package/dist/util/exec/types.d.ts +0 -2
  629. package/dist/util/exec/types.js.map +1 -1
  630. package/dist/util/exec/utils.d.ts +1 -1
  631. package/dist/util/exec/utils.js +6 -5
  632. package/dist/util/exec/utils.js.map +1 -1
  633. package/dist/util/git/auth.js +8 -5
  634. package/dist/util/git/auth.js.map +1 -1
  635. package/dist/util/git/author.js +1 -1
  636. package/dist/util/git/author.js.map +1 -1
  637. package/dist/util/git/config.js +0 -1
  638. package/dist/util/git/config.js.map +1 -1
  639. package/dist/util/git/error.js +4 -2
  640. package/dist/util/git/error.js.map +1 -1
  641. package/dist/util/git/index.js +75 -52
  642. package/dist/util/git/index.js.map +1 -1
  643. package/dist/util/git/private-key.js +2 -4
  644. package/dist/util/git/private-key.js.map +1 -1
  645. package/dist/util/git/types.d.ts +2 -0
  646. package/dist/util/git/types.js.map +1 -1
  647. package/dist/util/git/url.js +1 -1
  648. package/dist/util/git/url.js.map +1 -1
  649. package/dist/util/github/graphql/datasource-fetcher.js +3 -5
  650. package/dist/util/github/graphql/datasource-fetcher.js.map +1 -1
  651. package/dist/util/github/graphql/query-adapters/releases-query-adapter.d.ts +2 -2
  652. package/dist/util/github/graphql/query-adapters/tags-query-adapter.d.ts +2 -2
  653. package/dist/util/http/auth.js +0 -1
  654. package/dist/util/http/auth.js.map +1 -1
  655. package/dist/util/http/bitbucket-server.d.ts +7 -5
  656. package/dist/util/http/bitbucket-server.js +26 -23
  657. package/dist/util/http/bitbucket-server.js.map +1 -1
  658. package/dist/util/http/bitbucket.d.ts +6 -5
  659. package/dist/util/http/bitbucket.js +34 -31
  660. package/dist/util/http/bitbucket.js.map +1 -1
  661. package/dist/util/http/cache/abstract-http-cache-provider.js +2 -2
  662. package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
  663. package/dist/util/http/cache/memory-http-cache-provider.d.ts +10 -0
  664. package/dist/util/http/cache/memory-http-cache-provider.js +29 -0
  665. package/dist/util/http/cache/memory-http-cache-provider.js.map +1 -0
  666. package/dist/util/http/cache/package-http-cache-provider.d.ts +23 -0
  667. package/dist/util/http/cache/package-http-cache-provider.js +80 -0
  668. package/dist/util/http/cache/package-http-cache-provider.js.map +1 -0
  669. package/dist/util/http/cache/schema.d.ts +2 -2
  670. package/dist/util/http/errors.d.ts +2 -0
  671. package/dist/util/http/errors.js +8 -0
  672. package/dist/util/http/errors.js.map +1 -0
  673. package/dist/util/http/gerrit.d.ts +6 -4
  674. package/dist/util/http/gerrit.js +11 -12
  675. package/dist/util/http/gerrit.js.map +1 -1
  676. package/dist/util/http/gitea.d.ts +5 -4
  677. package/dist/util/http/gitea.js +14 -13
  678. package/dist/util/http/gitea.js.map +1 -1
  679. package/dist/util/http/github.d.ts +14 -8
  680. package/dist/util/http/github.js +65 -60
  681. package/dist/util/http/github.js.map +1 -1
  682. package/dist/util/http/gitlab.d.ts +7 -5
  683. package/dist/util/http/gitlab.js +58 -46
  684. package/dist/util/http/gitlab.js.map +1 -1
  685. package/dist/util/http/got.d.ts +9 -0
  686. package/dist/util/http/got.js +54 -0
  687. package/dist/util/http/got.js.map +1 -0
  688. package/dist/util/http/host-rules.d.ts +2 -1
  689. package/dist/util/http/host-rules.js +17 -4
  690. package/dist/util/http/host-rules.js.map +1 -1
  691. package/dist/util/http/http.d.ts +93 -0
  692. package/dist/util/http/http.js +346 -0
  693. package/dist/util/http/http.js.map +1 -0
  694. package/dist/util/http/index.d.ts +6 -74
  695. package/dist/util/http/index.js +5 -359
  696. package/dist/util/http/index.js.map +1 -1
  697. package/dist/util/http/legacy.js +4 -1
  698. package/dist/util/http/legacy.js.map +1 -1
  699. package/dist/util/http/types.d.ts +9 -16
  700. package/dist/util/http/types.js.map +1 -1
  701. package/dist/util/schema-utils.d.ts +1 -0
  702. package/dist/util/schema-utils.js +43 -8
  703. package/dist/util/schema-utils.js.map +1 -1
  704. package/dist/util/stats.d.ts +10 -0
  705. package/dist/util/stats.js +45 -1
  706. package/dist/util/stats.js.map +1 -1
  707. package/dist/util/string.d.ts +16 -0
  708. package/dist/util/string.js +79 -0
  709. package/dist/util/string.js.map +1 -1
  710. package/dist/util/toml.d.ts +1 -0
  711. package/dist/util/toml.js +6 -0
  712. package/dist/util/toml.js.map +1 -1
  713. package/dist/util/url.js +3 -8
  714. package/dist/util/url.js.map +1 -1
  715. package/dist/util/yaml.js +3 -8
  716. package/dist/util/yaml.js.map +1 -1
  717. package/dist/workers/global/autodiscover.js +1 -19
  718. package/dist/workers/global/autodiscover.js.map +1 -1
  719. package/dist/workers/global/config/parse/env.js +3 -3
  720. package/dist/workers/global/config/parse/env.js.map +1 -1
  721. package/dist/workers/global/config/parse/file.js +18 -8
  722. package/dist/workers/global/config/parse/file.js.map +1 -1
  723. package/dist/workers/global/config/parse/host-rules-from-env.js +6 -2
  724. package/dist/workers/global/config/parse/host-rules-from-env.js.map +1 -1
  725. package/dist/workers/global/config/parse/index.js +15 -0
  726. package/dist/workers/global/config/parse/index.js.map +1 -1
  727. package/dist/workers/global/index.js +4 -2
  728. package/dist/workers/global/index.js.map +1 -1
  729. package/dist/workers/repository/cache.js +1 -2
  730. package/dist/workers/repository/cache.js.map +1 -1
  731. package/dist/workers/repository/config-migration/branch/migrated-data.js +2 -0
  732. package/dist/workers/repository/config-migration/branch/migrated-data.js.map +1 -1
  733. package/dist/workers/repository/index.js +1 -0
  734. package/dist/workers/repository/index.js.map +1 -1
  735. package/dist/workers/repository/init/merge.js +6 -3
  736. package/dist/workers/repository/init/merge.js.map +1 -1
  737. package/dist/workers/repository/onboarding/pr/config-description.js +3 -1
  738. package/dist/workers/repository/onboarding/pr/config-description.js.map +1 -1
  739. package/dist/workers/repository/onboarding/pr/index.js +4 -0
  740. package/dist/workers/repository/onboarding/pr/index.js.map +1 -1
  741. package/dist/workers/repository/process/extract-update.js +0 -1
  742. package/dist/workers/repository/process/extract-update.js.map +1 -1
  743. package/dist/workers/repository/process/fingerprint-fields.js +0 -1
  744. package/dist/workers/repository/process/fingerprint-fields.js.map +1 -1
  745. package/dist/workers/repository/process/libyear.js +2 -2
  746. package/dist/workers/repository/process/libyear.js.map +1 -1
  747. package/dist/workers/repository/process/lookup/index.js +15 -4
  748. package/dist/workers/repository/process/lookup/index.js.map +1 -1
  749. package/dist/workers/repository/process/lookup/timestamps.d.ts +18 -0
  750. package/dist/workers/repository/process/lookup/timestamps.js +69 -0
  751. package/dist/workers/repository/process/lookup/timestamps.js.map +1 -0
  752. package/dist/workers/repository/process/lookup/types.d.ts +1 -0
  753. package/dist/workers/repository/process/lookup/types.js.map +1 -1
  754. package/dist/workers/repository/process/lookup/utils.js +20 -9
  755. package/dist/workers/repository/process/lookup/utils.js.map +1 -1
  756. package/dist/workers/repository/process/sort.js +1 -1
  757. package/dist/workers/repository/process/sort.js.map +1 -1
  758. package/dist/workers/repository/process/vulnerabilities.js +1 -1
  759. package/dist/workers/repository/process/vulnerabilities.js.map +1 -1
  760. package/dist/workers/repository/process/write.js +1 -8
  761. package/dist/workers/repository/process/write.js.map +1 -1
  762. package/dist/workers/repository/reconfigure/utils.d.ts +2 -0
  763. package/dist/workers/repository/reconfigure/utils.js +16 -0
  764. package/dist/workers/repository/reconfigure/utils.js.map +1 -1
  765. package/dist/workers/repository/reconfigure/validate.js +6 -17
  766. package/dist/workers/repository/reconfigure/validate.js.map +1 -1
  767. package/dist/workers/repository/update/branch/auto-replace.js +25 -5
  768. package/dist/workers/repository/update/branch/auto-replace.js.map +1 -1
  769. package/dist/workers/repository/update/branch/commit.js +2 -0
  770. package/dist/workers/repository/update/branch/commit.js.map +1 -1
  771. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +17 -8
  772. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js.map +1 -1
  773. package/dist/workers/repository/update/pr/body/config-description.js +26 -1
  774. package/dist/workers/repository/update/pr/body/config-description.js.map +1 -1
  775. package/dist/workers/repository/update/pr/body/index.js +21 -14
  776. package/dist/workers/repository/update/pr/body/index.js.map +1 -1
  777. package/dist/workers/repository/update/pr/changelog/api.js +8 -6
  778. package/dist/workers/repository/update/pr/changelog/api.js.map +1 -1
  779. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js +1 -1
  780. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js.map +1 -1
  781. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.d.ts +3 -0
  782. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.js +39 -0
  783. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.js.map +1 -0
  784. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.d.ts +8 -0
  785. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.js +31 -0
  786. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.js.map +1 -0
  787. package/dist/workers/repository/update/pr/changelog/github/index.js +6 -3
  788. package/dist/workers/repository/update/pr/changelog/github/index.js.map +1 -1
  789. package/dist/workers/repository/update/pr/changelog/gitlab/index.js +1 -1
  790. package/dist/workers/repository/update/pr/changelog/gitlab/index.js.map +1 -1
  791. package/dist/workers/repository/update/pr/changelog/release-notes.js +12 -8
  792. package/dist/workers/repository/update/pr/changelog/release-notes.js.map +1 -1
  793. package/dist/workers/repository/update/pr/changelog/source.d.ts +1 -1
  794. package/dist/workers/repository/update/pr/changelog/source.js +1 -0
  795. package/dist/workers/repository/update/pr/changelog/source.js.map +1 -1
  796. package/dist/workers/repository/update/pr/changelog/types.d.ts +1 -1
  797. package/dist/workers/repository/update/pr/changelog/types.js.map +1 -1
  798. package/dist/workers/repository/update/pr/index.js +2 -4
  799. package/dist/workers/repository/update/pr/index.js.map +1 -1
  800. package/dist/workers/repository/updates/flatten.js +8 -4
  801. package/dist/workers/repository/updates/flatten.js.map +1 -1
  802. package/dist/workers/repository/updates/generate.js +3 -2
  803. package/dist/workers/repository/updates/generate.js.map +1 -1
  804. package/dist/workers/types.d.ts +1 -4
  805. package/dist/workers/types.js.map +1 -1
  806. package/package.json +86 -83
  807. package/renovate-schema.json +25 -10
  808. package/dist/modules/manager/github-actions/types.d.ts +0 -30
  809. package/dist/modules/manager/github-actions/types.js +0 -3
  810. package/dist/modules/manager/github-actions/types.js.map +0 -1
  811. package/dist/modules/manager/gitlabci/common.d.ts +0 -6
  812. package/dist/modules/manager/gitlabci/common.js +0 -30
  813. package/dist/modules/manager/gitlabci/common.js.map +0 -1
  814. package/dist/modules/manager/gitlabci/types.d.ts +0 -35
  815. package/dist/modules/manager/gitlabci/types.js +0 -3
  816. package/dist/modules/manager/gitlabci/types.js.map +0 -1
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PackageHttpCacheProvider = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
6
+ const luxon_1 = require("luxon");
7
+ const global_1 = require("../../../config/global");
8
+ const package_1 = require("../../cache/package"); // Import the package cache functions
9
+ const ttl_1 = require("../../cache/package/ttl");
10
+ const regex_1 = require("../../regex");
11
+ const stats_1 = require("../../stats");
12
+ const abstract_http_cache_provider_1 = require("./abstract-http-cache-provider");
13
+ class PackageHttpCacheProvider extends abstract_http_cache_provider_1.AbstractHttpCacheProvider {
14
+ namespace;
15
+ softTtlMinutes;
16
+ hardTtlMinutes;
17
+ checkCacheControlHeader;
18
+ checkAuthorizationHeader;
19
+ constructor({ namespace, ttlMinutes = 15, checkCacheControlHeader = true, checkAuthorizationHeader = true, }) {
20
+ super();
21
+ this.namespace = namespace;
22
+ const { softTtlMinutes, hardTtlMinutes } = (0, ttl_1.resolveTtlValues)(this.namespace, ttlMinutes);
23
+ this.softTtlMinutes = softTtlMinutes;
24
+ this.hardTtlMinutes = hardTtlMinutes;
25
+ this.checkCacheControlHeader = checkCacheControlHeader;
26
+ this.checkAuthorizationHeader = checkAuthorizationHeader;
27
+ }
28
+ async load(url) {
29
+ return await (0, package_1.get)(this.namespace, url);
30
+ }
31
+ async persist(url, data) {
32
+ await (0, package_1.set)(this.namespace, url, data, this.hardTtlMinutes);
33
+ }
34
+ async bypassServer(url, ignoreSoftTtl = false) {
35
+ const cached = await this.get(url);
36
+ if (!cached) {
37
+ return null;
38
+ }
39
+ if (ignoreSoftTtl) {
40
+ return cached.httpResponse;
41
+ }
42
+ const cachedAt = luxon_1.DateTime.fromISO(cached.timestamp);
43
+ const deadline = cachedAt.plus({ minutes: this.softTtlMinutes });
44
+ const now = luxon_1.DateTime.now();
45
+ if (now >= deadline) {
46
+ stats_1.HttpCacheStats.incLocalMisses(url);
47
+ return null;
48
+ }
49
+ stats_1.HttpCacheStats.incLocalHits(url);
50
+ return cached.httpResponse;
51
+ }
52
+ cacheAllowed(resp) {
53
+ const allowedViaGlobalConfig = global_1.GlobalConfig.get('cachePrivatePackages', false);
54
+ if (allowedViaGlobalConfig) {
55
+ return true;
56
+ }
57
+ if (this.checkCacheControlHeader &&
58
+ is_1.default.string(resp.headers['cache-control'])) {
59
+ const isPublic = resp.headers['cache-control']
60
+ .toLocaleLowerCase()
61
+ .split((0, regex_1.regEx)(/\s*,\s*/))
62
+ .includes('public');
63
+ if (!isPublic) {
64
+ return false;
65
+ }
66
+ }
67
+ if (this.checkAuthorizationHeader && resp.authorization) {
68
+ return false;
69
+ }
70
+ return true;
71
+ }
72
+ async wrapServerResponse(url, resp) {
73
+ if (resp.statusCode === 200 && !this.cacheAllowed(resp)) {
74
+ return resp;
75
+ }
76
+ return await super.wrapServerResponse(url, resp);
77
+ }
78
+ }
79
+ exports.PackageHttpCacheProvider = PackageHttpCacheProvider;
80
+ //# sourceMappingURL=package-http-cache-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-http-cache-provider.js","sourceRoot":"","sources":["../../../../lib/util/http/cache/package-http-cache-provider.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,iCAAiC;AACjC,mDAAsD;AACtD,iDAA+C,CAAC,qCAAqC;AACrF,iDAA2D;AAE3D,uCAAoC;AACpC,uCAA6C;AAE7C,iFAA2E;AAU3E,MAAa,wBAAyB,SAAQ,wDAAyB;IAC7D,SAAS,CAAwB;IAEjC,cAAc,CAAS;IACvB,cAAc,CAAS;IAE/B,uBAAuB,CAAU;IACjC,wBAAwB,CAAU;IAElC,YAAY,EACV,SAAS,EACT,UAAU,GAAG,EAAE,EACf,uBAAuB,GAAG,IAAI,EAC9B,wBAAwB,GAAG,IAAI,GACC;QAChC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,IAAA,sBAAgB,EACzD,IAAI,CAAC,SAAS,EACd,UAAU,CACX,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAW;QACpB,OAAO,MAAM,IAAA,aAAG,EAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAW,EAAE,IAAe;QACxC,MAAM,IAAA,aAAG,EAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC5D,CAAC;IAEQ,KAAK,CAAC,YAAY,CACzB,GAAW,EACX,aAAa,GAAG,KAAK;QAErB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,aAAa,EAAE,CAAC;YAClB,OAAO,MAAM,CAAC,YAA+B,CAAC;QAChD,CAAC;QAED,MAAM,QAAQ,GAAG,gBAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QACjE,MAAM,GAAG,GAAG,gBAAQ,CAAC,GAAG,EAAE,CAAC;QAC3B,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;YACpB,sBAAc,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,sBAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,MAAM,CAAC,YAA+B,CAAC;IAChD,CAAC;IAED,YAAY,CAAI,IAAqB;QACnC,MAAM,sBAAsB,GAAG,qBAAY,CAAC,GAAG,CAC7C,sBAAsB,EACtB,KAAK,CACN,CAAC;QACF,IAAI,sBAAsB,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IACE,IAAI,CAAC,uBAAuB;YAC5B,YAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,EACxC,CAAC;YACD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC;iBAC3C,iBAAiB,EAAE;iBACnB,KAAK,CAAC,IAAA,aAAK,EAAC,SAAS,CAAC,CAAC;iBACvB,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAEtB,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,wBAAwB,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACxD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,KAAK,CAAC,kBAAkB,CAC/B,GAAW,EACX,IAAqB;QAErB,IAAI,IAAI,CAAC,UAAU,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;YACxD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,MAAM,KAAK,CAAC,kBAAkB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;CACF;AApGD,4DAoGC","sourcesContent":["import is from '@sindresorhus/is';\nimport { DateTime } from 'luxon';\nimport { GlobalConfig } from '../../../config/global';\nimport { get, set } from '../../cache/package'; // Import the package cache functions\nimport { resolveTtlValues } from '../../cache/package/ttl';\nimport type { PackageCacheNamespace } from '../../cache/package/types';\nimport { regEx } from '../../regex';\nimport { HttpCacheStats } from '../../stats';\nimport type { HttpResponse } from '../types';\nimport { AbstractHttpCacheProvider } from './abstract-http-cache-provider';\nimport type { HttpCache } from './schema';\n\nexport interface PackageHttpCacheProviderOptions {\n namespace: PackageCacheNamespace;\n ttlMinutes?: number;\n checkCacheControlHeader?: boolean;\n checkAuthorizationHeader?: boolean;\n}\n\nexport class PackageHttpCacheProvider extends AbstractHttpCacheProvider {\n private namespace: PackageCacheNamespace;\n\n private softTtlMinutes: number;\n private hardTtlMinutes: number;\n\n checkCacheControlHeader: boolean;\n checkAuthorizationHeader: boolean;\n\n constructor({\n namespace,\n ttlMinutes = 15,\n checkCacheControlHeader = true,\n checkAuthorizationHeader = true,\n }: PackageHttpCacheProviderOptions) {\n super();\n this.namespace = namespace;\n const { softTtlMinutes, hardTtlMinutes } = resolveTtlValues(\n this.namespace,\n ttlMinutes,\n );\n this.softTtlMinutes = softTtlMinutes;\n this.hardTtlMinutes = hardTtlMinutes;\n this.checkCacheControlHeader = checkCacheControlHeader;\n this.checkAuthorizationHeader = checkAuthorizationHeader;\n }\n\n async load(url: string): Promise<unknown> {\n return await get(this.namespace, url);\n }\n\n async persist(url: string, data: HttpCache): Promise<void> {\n await set(this.namespace, url, data, this.hardTtlMinutes);\n }\n\n override async bypassServer<T>(\n url: string,\n ignoreSoftTtl = false,\n ): Promise<HttpResponse<T> | null> {\n const cached = await this.get(url);\n if (!cached) {\n return null;\n }\n\n if (ignoreSoftTtl) {\n return cached.httpResponse as HttpResponse<T>;\n }\n\n const cachedAt = DateTime.fromISO(cached.timestamp);\n const deadline = cachedAt.plus({ minutes: this.softTtlMinutes });\n const now = DateTime.now();\n if (now >= deadline) {\n HttpCacheStats.incLocalMisses(url);\n return null;\n }\n\n HttpCacheStats.incLocalHits(url);\n return cached.httpResponse as HttpResponse<T>;\n }\n\n cacheAllowed<T>(resp: HttpResponse<T>): boolean {\n const allowedViaGlobalConfig = GlobalConfig.get(\n 'cachePrivatePackages',\n false,\n );\n if (allowedViaGlobalConfig) {\n return true;\n }\n\n if (\n this.checkCacheControlHeader &&\n is.string(resp.headers['cache-control'])\n ) {\n const isPublic = resp.headers['cache-control']\n .toLocaleLowerCase()\n .split(regEx(/\\s*,\\s*/))\n .includes('public');\n\n if (!isPublic) {\n return false;\n }\n }\n\n if (this.checkAuthorizationHeader && resp.authorization) {\n return false;\n }\n\n return true;\n }\n\n override async wrapServerResponse<T>(\n url: string,\n resp: HttpResponse<T>,\n ): Promise<HttpResponse<T>> {\n if (resp.statusCode === 200 && !this.cacheAllowed(resp)) {\n return resp;\n }\n\n return await super.wrapServerResponse(url, resp);\n }\n}\n"]}
@@ -6,13 +6,13 @@ export declare const HttpCacheSchema: z.ZodCatch<z.ZodNullable<z.ZodObject<{
6
6
  timestamp: z.ZodString;
7
7
  }, "strip", z.ZodTypeAny, {
8
8
  timestamp: string;
9
- lastModified?: string | undefined;
10
9
  etag?: string | undefined;
10
+ lastModified?: string | undefined;
11
11
  httpResponse?: unknown;
12
12
  }, {
13
13
  timestamp: string;
14
- lastModified?: string | undefined;
15
14
  etag?: string | undefined;
15
+ lastModified?: string | undefined;
16
16
  httpResponse?: unknown;
17
17
  }>>>;
18
18
  export type HttpCache = z.infer<typeof HttpCacheSchema>;
@@ -0,0 +1,2 @@
1
+ export declare class EmptyResultError extends Error {
2
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmptyResultError = void 0;
4
+ // required for zod type safety with `Result.wrap`
5
+ class EmptyResultError extends Error {
6
+ }
7
+ exports.EmptyResultError = EmptyResultError;
8
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../lib/util/http/errors.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,MAAa,gBAAiB,SAAQ,KAAK;CAAG;AAA9C,4CAA8C","sourcesContent":["// required for zod type safety with `Result.wrap`\nexport class EmptyResultError extends Error {}\n"]}
@@ -1,12 +1,14 @@
1
- import type { HttpOptions, HttpResponse, InternalHttpOptions } from './types';
2
- import { Http } from './index';
1
+ import { HttpBase, type InternalHttpOptions } from './http';
2
+ import type { HttpOptions } from './types';
3
3
  export declare function setBaseUrl(url: string): void;
4
4
  /**
5
5
  * Access Gerrit REST-API and strip-of the "magic prefix" from responses.
6
6
  * @see https://gerrit-review.googlesource.com/Documentation/rest-api.html
7
7
  */
8
- export declare class GerritHttp extends Http {
8
+ export declare class GerritHttp extends HttpBase {
9
9
  private static magicPrefix;
10
+ protected get baseUrl(): string | undefined;
10
11
  constructor(options?: HttpOptions);
11
- protected request<T>(path: string, options?: InternalHttpOptions): Promise<HttpResponse<T>>;
12
+ protected resolveUrl(requestUrl: string | URL, options: HttpOptions | undefined): URL;
13
+ protected processOptions(url: URL, options: InternalHttpOptions): void;
12
14
  }
@@ -5,7 +5,7 @@ exports.setBaseUrl = setBaseUrl;
5
5
  const common_1 = require("../common");
6
6
  const regex_1 = require("../regex");
7
7
  const url_1 = require("../url");
8
- const index_1 = require("./index");
8
+ const http_1 = require("./http");
9
9
  let baseUrl;
10
10
  function setBaseUrl(url) {
11
11
  baseUrl = url;
@@ -14,21 +14,20 @@ function setBaseUrl(url) {
14
14
  * Access Gerrit REST-API and strip-of the "magic prefix" from responses.
15
15
  * @see https://gerrit-review.googlesource.com/Documentation/rest-api.html
16
16
  */
17
- class GerritHttp extends index_1.Http {
17
+ class GerritHttp extends http_1.HttpBase {
18
18
  static magicPrefix = (0, regex_1.regEx)(/^\)]}'\n/g);
19
+ get baseUrl() {
20
+ return baseUrl;
21
+ }
19
22
  constructor(options) {
20
23
  super('gerrit', options);
21
24
  }
22
- async request(path, options) {
23
- const url = (0, url_1.isHttpUrl)(path) ? path : baseUrl + path;
24
- const opts = {
25
- parseJson: (text) => (0, common_1.parseJson)(text.replace(GerritHttp.magicPrefix, ''), path),
26
- ...options,
27
- };
28
- opts.headers = {
29
- ...opts.headers,
30
- };
31
- return await super.request(url, opts);
25
+ resolveUrl(requestUrl, options) {
26
+ // ensure trailing slash for gerrit
27
+ return super.resolveUrl((0, url_1.isHttpUrl)(requestUrl) ? requestUrl : `${baseUrl}${requestUrl}`, options);
28
+ }
29
+ processOptions(url, options) {
30
+ options.parseJson = (text) => (0, common_1.parseJson)(text.replace(GerritHttp.magicPrefix, ''), url.pathname);
32
31
  }
33
32
  }
34
33
  exports.GerritHttp = GerritHttp;
@@ -1 +1 @@
1
- {"version":3,"file":"gerrit.js","sourceRoot":"","sources":["../../../lib/util/http/gerrit.ts"],"names":[],"mappings":";;;AAOA,gCAEC;AATD,sCAAsC;AACtC,oCAAiC;AACjC,gCAAmC;AAEnC,mCAA+B;AAE/B,IAAI,OAAe,CAAC;AACpB,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG,GAAG,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAa,UAAW,SAAQ,YAAI;IAC1B,MAAM,CAAC,WAAW,GAAG,IAAA,aAAK,EAAC,WAAW,CAAC,CAAC;IAEhD,YAAY,OAAqB;QAC/B,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3B,CAAC;IAEkB,KAAK,CAAC,OAAO,CAC9B,IAAY,EACZ,OAA6B;QAE7B,MAAM,GAAG,GAAG,IAAA,eAAS,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC;QACpD,MAAM,IAAI,GAAwB;YAChC,SAAS,EAAE,CAAC,IAAY,EAAE,EAAE,CAC1B,IAAA,kBAAS,EAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC;YAC3D,GAAG,OAAO;SACX,CAAC;QACF,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,IAAI,CAAC,OAAO;SAChB,CAAC;QACF,OAAO,MAAM,KAAK,CAAC,OAAO,CAAI,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;;AArBH,gCAsBC","sourcesContent":["import { parseJson } from '../common';\nimport { regEx } from '../regex';\nimport { isHttpUrl } from '../url';\nimport type { HttpOptions, HttpResponse, InternalHttpOptions } from './types';\nimport { Http } from './index';\n\nlet baseUrl: string;\nexport function setBaseUrl(url: string): void {\n baseUrl = url;\n}\n\n/**\n * Access Gerrit REST-API and strip-of the \"magic prefix\" from responses.\n * @see https://gerrit-review.googlesource.com/Documentation/rest-api.html\n */\nexport class GerritHttp extends Http {\n private static magicPrefix = regEx(/^\\)]}'\\n/g);\n\n constructor(options?: HttpOptions) {\n super('gerrit', options);\n }\n\n protected override async request<T>(\n path: string,\n options?: InternalHttpOptions,\n ): Promise<HttpResponse<T>> {\n const url = isHttpUrl(path) ? path : baseUrl + path;\n const opts: InternalHttpOptions = {\n parseJson: (text: string) =>\n parseJson(text.replace(GerritHttp.magicPrefix, ''), path),\n ...options,\n };\n opts.headers = {\n ...opts.headers,\n };\n return await super.request<T>(url, opts);\n }\n}\n"]}
1
+ {"version":3,"file":"gerrit.js","sourceRoot":"","sources":["../../../lib/util/http/gerrit.ts"],"names":[],"mappings":";;;AAOA,gCAEC;AATD,sCAAsC;AACtC,oCAAiC;AACjC,gCAAmC;AACnC,iCAA4D;AAG5D,IAAI,OAAe,CAAC;AACpB,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG,GAAG,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAa,UAAW,SAAQ,eAAQ;IAC9B,MAAM,CAAC,WAAW,GAAG,IAAA,aAAK,EAAC,WAAW,CAAC,CAAC;IAEhD,IAAuB,OAAO;QAC5B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,YAAY,OAAqB;QAC/B,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3B,CAAC;IAEkB,UAAU,CAC3B,UAAwB,EACxB,OAAgC;QAEhC,mCAAmC;QACnC,OAAO,KAAK,CAAC,UAAU,CACrB,IAAA,eAAS,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,UAAU,EAAE,EAC9D,OAAO,CACR,CAAC;IACJ,CAAC;IAEkB,cAAc,CAC/B,GAAQ,EACR,OAA4B;QAE5B,OAAO,CAAC,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CACnC,IAAA,kBAAS,EAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtE,CAAC;;AA5BH,gCA6BC","sourcesContent":["import { parseJson } from '../common';\nimport { regEx } from '../regex';\nimport { isHttpUrl } from '../url';\nimport { HttpBase, type InternalHttpOptions } from './http';\nimport type { HttpOptions } from './types';\n\nlet baseUrl: string;\nexport function setBaseUrl(url: string): void {\n baseUrl = url;\n}\n\n/**\n * Access Gerrit REST-API and strip-of the \"magic prefix\" from responses.\n * @see https://gerrit-review.googlesource.com/Documentation/rest-api.html\n */\nexport class GerritHttp extends HttpBase {\n private static magicPrefix = regEx(/^\\)]}'\\n/g);\n\n protected override get baseUrl(): string | undefined {\n return baseUrl;\n }\n\n constructor(options?: HttpOptions) {\n super('gerrit', options);\n }\n\n protected override resolveUrl(\n requestUrl: string | URL,\n options: HttpOptions | undefined,\n ): URL {\n // ensure trailing slash for gerrit\n return super.resolveUrl(\n isHttpUrl(requestUrl) ? requestUrl : `${baseUrl}${requestUrl}`,\n options,\n );\n }\n\n protected override processOptions(\n url: URL,\n options: InternalHttpOptions,\n ): void {\n options.parseJson = (text: string) =>\n parseJson(text.replace(GerritHttp.magicPrefix, ''), url.pathname);\n }\n}\n"]}
@@ -1,10 +1,11 @@
1
- import type { HttpOptions, HttpResponse, InternalHttpOptions } from './types';
2
- import { Http } from '.';
1
+ import { HttpBase, type InternalJsonUnsafeOptions } from './http';
2
+ import type { HttpMethod, HttpOptions, HttpResponse } from './types';
3
3
  export declare const setBaseUrl: (newBaseUrl: string) => void;
4
4
  export interface GiteaHttpOptions extends HttpOptions {
5
5
  paginate?: boolean;
6
6
  }
7
- export declare class GiteaHttp extends Http<GiteaHttpOptions> {
7
+ export declare class GiteaHttp extends HttpBase<GiteaHttpOptions> {
8
+ protected get baseUrl(): string | undefined;
8
9
  constructor(hostType?: string, options?: HttpOptions);
9
- protected request<T>(path: string, options?: InternalHttpOptions & GiteaHttpOptions): Promise<HttpResponse<T>>;
10
+ protected requestJsonUnsafe<T = unknown>(method: HttpMethod, options: InternalJsonUnsafeOptions<GiteaHttpOptions>): Promise<HttpResponse<T>>;
10
11
  }
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GiteaHttp = exports.setBaseUrl = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
6
- const url_1 = require("../url");
7
- const _1 = require(".");
6
+ const http_1 = require("./http");
8
7
  let baseUrl;
9
8
  const setBaseUrl = (newBaseUrl) => {
10
9
  baseUrl = newBaseUrl.replace(/\/*$/, '/'); // TODO #12875
@@ -19,29 +18,31 @@ function getPaginationContainer(body) {
19
18
  }
20
19
  return null;
21
20
  }
22
- function resolveUrl(path, base) {
23
- const resolvedUrlString = (0, url_1.resolveBaseUrl)(base, path);
24
- return new URL(resolvedUrlString);
25
- }
26
- class GiteaHttp extends _1.Http {
21
+ class GiteaHttp extends http_1.HttpBase {
22
+ get baseUrl() {
23
+ return baseUrl;
24
+ }
27
25
  constructor(hostType, options) {
28
26
  super(hostType ?? 'gitea', options);
29
27
  }
30
- async request(path, options) {
31
- const resolvedUrl = resolveUrl(path, options?.baseUrl ?? baseUrl);
28
+ async requestJsonUnsafe(method, options) {
29
+ const resolvedUrl = this.resolveUrl(options.url, options.httpOptions);
32
30
  const opts = {
33
- baseUrl,
34
31
  ...options,
32
+ url: resolvedUrl,
35
33
  };
36
- const res = await super.request(resolvedUrl, opts);
34
+ const res = await super.requestJsonUnsafe(method, opts);
37
35
  const pc = getPaginationContainer(res.body);
38
- if (opts.paginate && pc) {
36
+ if (opts.httpOptions?.paginate && pc) {
37
+ delete opts.httpOptions.cacheProvider;
38
+ opts.httpOptions.memCache = false;
39
+ delete opts.httpOptions.paginate;
39
40
  const total = parseInt(res.headers['x-total-count'], 10);
40
41
  let nextPage = parseInt(resolvedUrl.searchParams.get('page') ?? '1', 10);
41
42
  while (total && pc.length < total) {
42
43
  nextPage += 1;
43
44
  resolvedUrl.searchParams.set('page', nextPage.toString());
44
- const nextRes = await super.request(resolvedUrl.toString(), opts);
45
+ const nextRes = await super.requestJsonUnsafe(method, opts);
45
46
  const nextPc = getPaginationContainer(nextRes.body);
46
47
  if (nextPc === null) {
47
48
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"gitea.js","sourceRoot":"","sources":["../../../lib/util/http/gitea.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,gCAAwC;AAExC,wBAAyB;AAEzB,IAAI,OAAe,CAAC;AACb,MAAM,UAAU,GAAG,CAAC,UAAkB,EAAQ,EAAE;IACrD,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,cAAc;AAC3D,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB;AAMF,SAAS,sBAAsB,CAAc,IAAa;IACxD,IAAI,YAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,IAAW,CAAC;IACrB,CAAC;IAED,IAAI,YAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,YAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACrE,OAAO,IAAI,CAAC,IAAW,CAAC;IAC1B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,IAAY;IAC5C,MAAM,iBAAiB,GAAG,IAAA,oBAAc,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrD,OAAO,IAAI,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACpC,CAAC;AAED,MAAa,SAAU,SAAQ,OAAsB;IACnD,YAAY,QAAiB,EAAE,OAAqB;QAClD,KAAK,CAAC,QAAQ,IAAI,OAAO,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IAEkB,KAAK,CAAC,OAAO,CAC9B,IAAY,EACZ,OAAgD;QAEhD,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,CAAC,CAAC;QAClE,MAAM,IAAI,GAAG;YACX,OAAO;YACP,GAAG,OAAO;SACX,CAAC;QACF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,OAAO,CAAI,WAAW,EAAE,IAAI,CAAC,CAAC;QACtD,MAAM,EAAE,GAAG,sBAAsB,CAAI,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,IAAI,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAW,EAAE,EAAE,CAAC,CAAC;YACnE,IAAI,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC,CAAC;YAEzE,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;gBAClC,QAAQ,IAAI,CAAC,CAAC;gBACd,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAE1D,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;gBACrE,MAAM,MAAM,GAAG,sBAAsB,CAAI,OAAO,CAAC,IAAI,CAAC,CAAC;gBACvD,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;oBACpB,MAAM;gBACR,CAAC;gBAED,EAAE,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AApCD,8BAoCC","sourcesContent":["import is from '@sindresorhus/is';\nimport { resolveBaseUrl } from '../url';\nimport type { HttpOptions, HttpResponse, InternalHttpOptions } from './types';\nimport { Http } from '.';\n\nlet baseUrl: string;\nexport const setBaseUrl = (newBaseUrl: string): void => {\n baseUrl = newBaseUrl.replace(/\\/*$/, '/'); // TODO #12875\n};\n\nexport interface GiteaHttpOptions extends HttpOptions {\n paginate?: boolean;\n}\n\nfunction getPaginationContainer<T = unknown>(body: unknown): T[] | null {\n if (is.array(body) && body.length) {\n return body as T[];\n }\n\n if (is.plainObject(body) && is.array(body?.data) && body.data.length) {\n return body.data as T[];\n }\n\n return null;\n}\n\nfunction resolveUrl(path: string, base: string): URL {\n const resolvedUrlString = resolveBaseUrl(base, path);\n return new URL(resolvedUrlString);\n}\n\nexport class GiteaHttp extends Http<GiteaHttpOptions> {\n constructor(hostType?: string, options?: HttpOptions) {\n super(hostType ?? 'gitea', options);\n }\n\n protected override async request<T>(\n path: string,\n options?: InternalHttpOptions & GiteaHttpOptions,\n ): Promise<HttpResponse<T>> {\n const resolvedUrl = resolveUrl(path, options?.baseUrl ?? baseUrl);\n const opts = {\n baseUrl,\n ...options,\n };\n const res = await super.request<T>(resolvedUrl, opts);\n const pc = getPaginationContainer<T>(res.body);\n if (opts.paginate && pc) {\n const total = parseInt(res.headers['x-total-count'] as string, 10);\n let nextPage = parseInt(resolvedUrl.searchParams.get('page') ?? '1', 10);\n\n while (total && pc.length < total) {\n nextPage += 1;\n resolvedUrl.searchParams.set('page', nextPage.toString());\n\n const nextRes = await super.request<T>(resolvedUrl.toString(), opts);\n const nextPc = getPaginationContainer<T>(nextRes.body);\n if (nextPc === null) {\n break;\n }\n\n pc.push(...nextPc);\n }\n }\n\n return res;\n }\n}\n"]}
1
+ {"version":3,"file":"gitea.js","sourceRoot":"","sources":["../../../lib/util/http/gitea.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,iCAAkE;AAGlE,IAAI,OAAe,CAAC;AACb,MAAM,UAAU,GAAG,CAAC,UAAkB,EAAQ,EAAE;IACrD,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,cAAc;AAC3D,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB;AAMF,SAAS,sBAAsB,CAAc,IAAa;IACxD,IAAI,YAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,IAAW,CAAC;IACrB,CAAC;IAED,IAAI,YAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,YAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACrE,OAAO,IAAI,CAAC,IAAW,CAAC;IAC1B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAa,SAAU,SAAQ,eAA0B;IACvD,IAAuB,OAAO;QAC5B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,YAAY,QAAiB,EAAE,OAAqB;QAClD,KAAK,CAAC,QAAQ,IAAI,OAAO,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IAEkB,KAAK,CAAC,iBAAiB,CACxC,MAAkB,EAClB,OAAoD;QAEpD,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,IAAI,GAAG;YACX,GAAG,OAAO;YACV,GAAG,EAAE,WAAW;SACjB,CAAC;QACF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,iBAAiB,CAAI,MAAM,EAAE,IAAI,CAAC,CAAC;QAC3D,MAAM,EAAE,GAAG,sBAAsB,CAAI,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,IAAI,CAAC,WAAW,EAAE,QAAQ,IAAI,EAAE,EAAE,CAAC;YACrC,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;YACtC,IAAI,CAAC,WAAW,CAAC,QAAQ,GAAG,KAAK,CAAC;YAElC,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;YACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAW,EAAE,EAAE,CAAC,CAAC;YACnE,IAAI,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC,CAAC;YAEzE,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;gBAClC,QAAQ,IAAI,CAAC,CAAC;gBACd,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAE1D,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,iBAAiB,CAAI,MAAM,EAAE,IAAI,CAAC,CAAC;gBAC/D,MAAM,MAAM,GAAG,sBAAsB,CAAI,OAAO,CAAC,IAAI,CAAC,CAAC;gBACvD,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;oBACpB,MAAM;gBACR,CAAC;gBAED,EAAE,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AA5CD,8BA4CC","sourcesContent":["import is from '@sindresorhus/is';\nimport { HttpBase, type InternalJsonUnsafeOptions } from './http';\nimport type { HttpMethod, HttpOptions, HttpResponse } from './types';\n\nlet baseUrl: string;\nexport const setBaseUrl = (newBaseUrl: string): void => {\n baseUrl = newBaseUrl.replace(/\\/*$/, '/'); // TODO #12875\n};\n\nexport interface GiteaHttpOptions extends HttpOptions {\n paginate?: boolean;\n}\n\nfunction getPaginationContainer<T = unknown>(body: unknown): T[] | null {\n if (is.array(body) && body.length) {\n return body as T[];\n }\n\n if (is.plainObject(body) && is.array(body?.data) && body.data.length) {\n return body.data as T[];\n }\n\n return null;\n}\n\nexport class GiteaHttp extends HttpBase<GiteaHttpOptions> {\n protected override get baseUrl(): string | undefined {\n return baseUrl;\n }\n\n constructor(hostType?: string, options?: HttpOptions) {\n super(hostType ?? 'gitea', options);\n }\n\n protected override async requestJsonUnsafe<T = unknown>(\n method: HttpMethod,\n options: InternalJsonUnsafeOptions<GiteaHttpOptions>,\n ): Promise<HttpResponse<T>> {\n const resolvedUrl = this.resolveUrl(options.url, options.httpOptions);\n const opts = {\n ...options,\n url: resolvedUrl,\n };\n const res = await super.requestJsonUnsafe<T>(method, opts);\n const pc = getPaginationContainer<T>(res.body);\n if (opts.httpOptions?.paginate && pc) {\n delete opts.httpOptions.cacheProvider;\n opts.httpOptions.memCache = false;\n\n delete opts.httpOptions.paginate;\n const total = parseInt(res.headers['x-total-count'] as string, 10);\n let nextPage = parseInt(resolvedUrl.searchParams.get('page') ?? '1', 10);\n\n while (total && pc.length < total) {\n nextPage += 1;\n resolvedUrl.searchParams.set('page', nextPage.toString());\n\n const nextRes = await super.requestJsonUnsafe<T>(method, opts);\n const nextPc = getPaginationContainer<T>(nextRes.body);\n if (nextPc === null) {\n break;\n }\n\n pc.push(...nextPc);\n }\n }\n\n return res;\n }\n}\n"]}
@@ -1,11 +1,14 @@
1
- import type { GraphqlOptions, HttpOptions, HttpResponse, InternalHttpOptions } from './types';
2
- import { Http } from '.';
1
+ import { HttpBase, type InternalHttpOptions, type InternalJsonUnsafeOptions } from './http';
2
+ import type { GotLegacyError } from './legacy';
3
+ import type { GraphqlOptions, HttpMethod, HttpOptions, HttpResponse } from './types';
3
4
  export declare const setBaseUrl: (url: string) => void;
4
- export interface GithubHttpOptions extends HttpOptions {
5
+ export interface GithubBaseHttpOptions extends HttpOptions {
6
+ repository?: string;
7
+ }
8
+ export interface GithubHttpOptions extends GithubBaseHttpOptions {
5
9
  paginate?: boolean | string;
6
10
  paginationField?: string;
7
11
  pageLimit?: number;
8
- repository?: string;
9
12
  }
10
13
  export type GithubGraphqlResponse<T = unknown> = {
11
14
  data: T;
@@ -22,9 +25,12 @@ interface GraphqlPageCacheItem {
22
25
  pageSize: number;
23
26
  }
24
27
  export type GraphqlPageCache = Record<string, GraphqlPageCacheItem>;
25
- export declare class GithubHttp extends Http<GithubHttpOptions> {
26
- constructor(hostType?: string, options?: GithubHttpOptions);
27
- protected request<T>(url: string | URL, options?: InternalHttpOptions & GithubHttpOptions, okToRetry?: boolean): Promise<HttpResponse<T>>;
28
+ export declare class GithubHttp extends HttpBase<GithubHttpOptions> {
29
+ protected get baseUrl(): string | undefined;
30
+ constructor(hostType?: string, options?: HttpOptions);
31
+ protected processOptions(url: URL, opts: InternalHttpOptions & GithubBaseHttpOptions): void;
32
+ protected handleError(url: string | URL, opts: HttpOptions, err: GotLegacyError): never;
33
+ protected requestJsonUnsafe<T>(method: HttpMethod, options: InternalJsonUnsafeOptions<GithubHttpOptions>): Promise<HttpResponse<T>>;
28
34
  requestGraphql<T = unknown>(query: string, options?: GraphqlOptions): Promise<GithubGraphqlResponse<T> | null>;
29
35
  queryRepoField<T = Record<string, unknown>>(query: string, fieldName: string, options?: GraphqlOptions): Promise<T[]>;
30
36
  /**
@@ -38,6 +44,6 @@ export declare class GithubHttp extends Http<GithubHttpOptions> {
38
44
  * @example url = 'renovatebot/renovate/contents/package.json'
39
45
  * @example url = 'package.json' & options.repository = 'renovatebot/renovate'
40
46
  */
41
- getRawTextFile(url: string, options?: InternalHttpOptions & GithubHttpOptions): Promise<HttpResponse>;
47
+ getRawTextFile(url: string, options?: InternalHttpOptions & GithubBaseHttpOptions): Promise<HttpResponse>;
42
48
  }
43
49
  export {};
@@ -14,7 +14,7 @@ const range_1 = require("../range");
14
14
  const regex_1 = require("../regex");
15
15
  const url_1 = require("../url");
16
16
  const host_rules_1 = require("./host-rules");
17
- const _1 = require(".");
17
+ const http_1 = require("./http");
18
18
  const githubBaseUrl = 'https://api.github.com/';
19
19
  let baseUrl = githubBaseUrl;
20
20
  const setBaseUrl = (url) => {
@@ -164,18 +164,16 @@ function replaceUrlBase(url, baseUrl) {
164
164
  const relativeUrl = `${url.pathname}${url.search}`;
165
165
  return new URL(relativeUrl, baseUrl);
166
166
  }
167
- class GithubHttp extends _1.Http {
167
+ class GithubHttp extends http_1.HttpBase {
168
+ get baseUrl() {
169
+ return baseUrl;
170
+ }
168
171
  constructor(hostType = 'github', options) {
169
172
  super(hostType, options);
170
173
  }
171
- async request(url, options, okToRetry = true) {
172
- const opts = {
173
- baseUrl,
174
- ...options,
175
- throwHttpErrors: true,
176
- };
174
+ processOptions(url, opts) {
177
175
  if (!opts.token) {
178
- const authUrl = new URL((0, url_1.resolveBaseUrl)(opts.baseUrl, url));
176
+ const authUrl = new URL(url);
179
177
  if (opts.repository) {
180
178
  // set authUrl to https://api.github.com/repos/org/repo or https://gihub.domain.com/api/v3/repos/org/repo
181
179
  authUrl.hash = '';
@@ -199,62 +197,73 @@ class GithubHttp extends _1.Http {
199
197
  ...opts.headers,
200
198
  accept,
201
199
  };
202
- try {
203
- const result = await super.request(url, opts);
204
- if (opts.paginate) {
205
- // Check if result is paginated
206
- const pageLimit = opts.pageLimit ?? 10;
207
- const linkHeader = (0, url_1.parseLinkHeader)(result?.headers?.link);
208
- const next = linkHeader?.next;
209
- if (next?.url && linkHeader?.last?.page) {
210
- let lastPage = parseInt(linkHeader.last.page, 10);
211
- // istanbul ignore else: needs a test
212
- if (!process.env.RENOVATE_PAGINATE_ALL && opts.paginate !== 'all') {
213
- lastPage = Math.min(pageLimit, lastPage);
214
- }
215
- const baseUrl = opts.baseUrl;
216
- const parsedUrl = new URL(next.url, baseUrl);
217
- const rebasePagination = !!baseUrl &&
218
- !!process.env.RENOVATE_X_REBASE_PAGINATION_LINKS &&
219
- // Preserve github.com URLs for use cases like release notes
220
- parsedUrl.origin !== 'https://api.github.com';
221
- const firstPageUrl = rebasePagination
222
- ? replaceUrlBase(parsedUrl, baseUrl)
223
- : parsedUrl;
224
- const queue = [...(0, range_1.range)(2, lastPage)].map((pageNumber) => () => {
225
- // copy before modifying searchParams
226
- const nextUrl = new URL(firstPageUrl);
227
- nextUrl.searchParams.set('page', String(pageNumber));
228
- return this.request(nextUrl, { ...opts, paginate: false, cacheProvider: undefined }, okToRetry);
200
+ }
201
+ handleError(url, opts, err) {
202
+ throw handleGotError(err, url, opts);
203
+ }
204
+ async requestJsonUnsafe(method, options) {
205
+ const httpOptions = options.httpOptions ?? {};
206
+ const resolvedUrl = this.resolveUrl(options.url, httpOptions);
207
+ const opts = {
208
+ ...options,
209
+ url: resolvedUrl,
210
+ };
211
+ const result = await super.requestJsonUnsafe(method, opts);
212
+ if (httpOptions.paginate) {
213
+ delete httpOptions.cacheProvider;
214
+ httpOptions.memCache = false;
215
+ // Check if result is paginated
216
+ const pageLimit = httpOptions.pageLimit ?? 10;
217
+ const linkHeader = (0, url_1.parseLinkHeader)(result?.headers?.link);
218
+ const next = linkHeader?.next;
219
+ if (next?.url && linkHeader?.last?.page) {
220
+ let lastPage = parseInt(linkHeader.last.page, 10);
221
+ if (!process.env.RENOVATE_PAGINATE_ALL &&
222
+ httpOptions.paginate !== 'all') {
223
+ lastPage = Math.min(pageLimit, lastPage);
224
+ }
225
+ const baseUrl = httpOptions.baseUrl ?? this.baseUrl;
226
+ const parsedUrl = new URL(next.url, baseUrl);
227
+ const rebasePagination = !!baseUrl &&
228
+ !!process.env.RENOVATE_X_REBASE_PAGINATION_LINKS &&
229
+ // Preserve github.com URLs for use cases like release notes
230
+ parsedUrl.origin !== 'https://api.github.com';
231
+ const firstPageUrl = rebasePagination
232
+ ? replaceUrlBase(parsedUrl, baseUrl)
233
+ : parsedUrl;
234
+ const queue = [...(0, range_1.range)(2, lastPage)].map((pageNumber) => () => {
235
+ // copy before modifying searchParams
236
+ const nextUrl = new URL(firstPageUrl);
237
+ nextUrl.searchParams.set('page', String(pageNumber));
238
+ return super.requestJsonUnsafe(method, {
239
+ ...opts,
240
+ url: nextUrl,
229
241
  });
230
- const pages = await p.all(queue);
231
- if (opts.paginationField && is_1.default.plainObject(result.body)) {
232
- const paginatedResult = result.body[opts.paginationField];
233
- if (is_1.default.array(paginatedResult)) {
234
- for (const nextPage of pages) {
235
- if (is_1.default.plainObject(nextPage.body)) {
236
- const nextPageResults = nextPage.body[opts.paginationField];
237
- if (is_1.default.array(nextPageResults)) {
238
- paginatedResult.push(...nextPageResults);
239
- }
242
+ });
243
+ const pages = await p.all(queue);
244
+ if (httpOptions.paginationField && is_1.default.plainObject(result.body)) {
245
+ const paginatedResult = result.body[httpOptions.paginationField];
246
+ if (is_1.default.array(paginatedResult)) {
247
+ for (const nextPage of pages) {
248
+ if (is_1.default.plainObject(nextPage.body)) {
249
+ const nextPageResults = nextPage.body[httpOptions.paginationField];
250
+ if (is_1.default.array(nextPageResults)) {
251
+ paginatedResult.push(...nextPageResults);
240
252
  }
241
253
  }
242
254
  }
243
255
  }
244
- else if (is_1.default.array(result.body)) {
245
- for (const nextPage of pages) {
246
- if (is_1.default.array(nextPage.body)) {
247
- result.body.push(...nextPage.body);
248
- }
256
+ }
257
+ else if (is_1.default.array(result.body)) {
258
+ for (const nextPage of pages) {
259
+ if (is_1.default.array(nextPage.body)) {
260
+ result.body.push(...nextPage.body);
249
261
  }
250
262
  }
251
263
  }
252
264
  }
253
- return result;
254
- }
255
- catch (err) {
256
- throw handleGotError(err, url, opts);
257
265
  }
266
+ return result;
258
267
  }
259
268
  async requestGraphql(query, options = {}) {
260
269
  const path = 'graphql';
@@ -366,11 +375,7 @@ class GithubHttp extends _1.Http {
366
375
  if (options.repository && !httpRegex.test(options.repository)) {
367
376
  newURL = (0, url_1.joinUrlParts)(options.repository, 'contents', url);
368
377
  }
369
- const result = await this.get(newURL, newOptions);
370
- if (!is_1.default.string(result.body)) {
371
- throw new Error(`Expected raw text file but received ${typeof result.body}`);
372
- }
373
- return result;
378
+ return await this.getText(newURL, newOptions);
374
379
  }
375
380
  }
376
381
  exports.GithubHttp = GithubHttp;