renovate 40.0.0-next.3 → 40.0.0-next.31

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 (683) 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 +4 -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/gitea/index.js +0 -1
  17. package/dist/config/presets/gitea/index.js.map +1 -1
  18. package/dist/config/presets/github/index.js +0 -1
  19. package/dist/config/presets/github/index.js.map +1 -1
  20. package/dist/config/presets/gitlab/index.js +1 -1
  21. package/dist/config/presets/gitlab/index.js.map +1 -1
  22. package/dist/config/presets/http/index.js +1 -2
  23. package/dist/config/presets/http/index.js.map +1 -1
  24. package/dist/config/presets/index.js +0 -7
  25. package/dist/config/presets/index.js.map +1 -1
  26. package/dist/config/presets/internal/custom-managers.js +3 -4
  27. package/dist/config/presets/internal/custom-managers.js.map +1 -1
  28. package/dist/config/presets/internal/group.js +30 -1
  29. package/dist/config/presets/internal/group.js.map +1 -1
  30. package/dist/config/presets/internal/index.js +1 -3
  31. package/dist/config/presets/internal/index.js.map +1 -1
  32. package/dist/config/presets/internal/workarounds.js +1 -0
  33. package/dist/config/presets/internal/workarounds.js.map +1 -1
  34. package/dist/config/presets/parse.js +2 -1
  35. package/dist/config/presets/parse.js.map +1 -1
  36. package/dist/config/schema.d.ts +2 -2
  37. package/dist/config/types.d.ts +4 -1
  38. package/dist/config/types.js.map +1 -1
  39. package/dist/config/validation.js +3 -5
  40. package/dist/config/validation.js.map +1 -1
  41. package/dist/config-validator.js +0 -1
  42. package/dist/config-validator.js.map +1 -1
  43. package/dist/constants/category.js +0 -1
  44. package/dist/constants/category.js.map +1 -1
  45. package/dist/data/monorepo.json +5 -1
  46. package/dist/data/source-urls.json +1 -0
  47. package/dist/instrumentation/index.js +17 -13
  48. package/dist/instrumentation/index.js.map +1 -1
  49. package/dist/instrumentation/utils.js +1 -1
  50. package/dist/instrumentation/utils.js.map +1 -1
  51. package/dist/logger/cmd-serializer.js +0 -1
  52. package/dist/logger/cmd-serializer.js.map +1 -1
  53. package/dist/logger/config-serializer.js +0 -1
  54. package/dist/logger/config-serializer.js.map +1 -1
  55. package/dist/logger/index.js +1 -4
  56. package/dist/logger/index.js.map +1 -1
  57. package/dist/logger/once.js +4 -2
  58. package/dist/logger/once.js.map +1 -1
  59. package/dist/logger/pretty-stdout.js +0 -1
  60. package/dist/logger/pretty-stdout.js.map +1 -1
  61. package/dist/logger/renovate-logger.js +1 -1
  62. package/dist/logger/renovate-logger.js.map +1 -1
  63. package/dist/logger/utils.js +6 -11
  64. package/dist/logger/utils.js.map +1 -1
  65. package/dist/modules/datasource/api.js +2 -0
  66. package/dist/modules/datasource/api.js.map +1 -1
  67. package/dist/modules/datasource/artifactory/index.js +1 -2
  68. package/dist/modules/datasource/artifactory/index.js.map +1 -1
  69. package/dist/modules/datasource/aws-eks-addon/index.d.ts +11 -0
  70. package/dist/modules/datasource/aws-eks-addon/index.js +75 -0
  71. package/dist/modules/datasource/aws-eks-addon/index.js.map +1 -0
  72. package/dist/modules/datasource/aws-eks-addon/schema.d.ts +40 -0
  73. package/dist/modules/datasource/aws-eks-addon/schema.js +31 -0
  74. package/dist/modules/datasource/aws-eks-addon/schema.js.map +1 -0
  75. package/dist/modules/datasource/aws-machine-image/index.js +6 -5
  76. package/dist/modules/datasource/aws-machine-image/index.js.map +1 -1
  77. package/dist/modules/datasource/azure-pipelines-tasks/index.js +11 -1
  78. package/dist/modules/datasource/azure-pipelines-tasks/index.js.map +1 -1
  79. package/dist/modules/datasource/azure-pipelines-tasks/schema.d.ts +16 -0
  80. package/dist/modules/datasource/azure-pipelines-tasks/schema.js +2 -0
  81. package/dist/modules/datasource/azure-pipelines-tasks/schema.js.map +1 -1
  82. package/dist/modules/datasource/bazel/index.js +0 -1
  83. package/dist/modules/datasource/bazel/index.js.map +1 -1
  84. package/dist/modules/datasource/bitrise/index.js +1 -1
  85. package/dist/modules/datasource/bitrise/index.js.map +1 -1
  86. package/dist/modules/datasource/cdnjs/schema.d.ts +2 -2
  87. package/dist/modules/datasource/conda/index.js +18 -1
  88. package/dist/modules/datasource/conda/index.js.map +1 -1
  89. package/dist/modules/datasource/conda/prefix-dev.d.ts +3 -0
  90. package/dist/modules/datasource/conda/prefix-dev.js +83 -0
  91. package/dist/modules/datasource/conda/prefix-dev.js.map +1 -0
  92. package/dist/modules/datasource/conda/schema/prefix-dev.d.ts +189 -0
  93. package/dist/modules/datasource/conda/schema/prefix-dev.js +31 -0
  94. package/dist/modules/datasource/conda/schema/prefix-dev.js.map +1 -0
  95. package/dist/modules/datasource/conda/types.d.ts +1 -20
  96. package/dist/modules/datasource/conda/types.js.map +1 -1
  97. package/dist/modules/datasource/cpan/index.js +1 -1
  98. package/dist/modules/datasource/cpan/index.js.map +1 -1
  99. package/dist/modules/datasource/crate/index.js +3 -3
  100. package/dist/modules/datasource/crate/index.js.map +1 -1
  101. package/dist/modules/datasource/custom/formats/html.js +1 -1
  102. package/dist/modules/datasource/custom/formats/html.js.map +1 -1
  103. package/dist/modules/datasource/custom/formats/yaml.js +1 -1
  104. package/dist/modules/datasource/custom/formats/yaml.js.map +1 -1
  105. package/dist/modules/datasource/custom/index.js +4 -2
  106. package/dist/modules/datasource/custom/index.js.map +1 -1
  107. package/dist/modules/datasource/custom/schema.d.ts +22 -22
  108. package/dist/modules/datasource/custom/utils.js +1 -0
  109. package/dist/modules/datasource/custom/utils.js.map +1 -1
  110. package/dist/modules/datasource/dart/index.js +1 -1
  111. package/dist/modules/datasource/dart/index.js.map +1 -1
  112. package/dist/modules/datasource/dart-version/index.js +1 -1
  113. package/dist/modules/datasource/dart-version/index.js.map +1 -1
  114. package/dist/modules/datasource/datasource.js +0 -1
  115. package/dist/modules/datasource/datasource.js.map +1 -1
  116. package/dist/modules/datasource/deb/index.js +2 -2
  117. package/dist/modules/datasource/deb/index.js.map +1 -1
  118. package/dist/modules/datasource/deno/index.js +1 -1
  119. package/dist/modules/datasource/deno/index.js.map +1 -1
  120. package/dist/modules/datasource/deno/schema.d.ts +1 -1
  121. package/dist/modules/datasource/devbox/index.js +0 -1
  122. package/dist/modules/datasource/devbox/index.js.map +1 -1
  123. package/dist/modules/datasource/docker/common.js +5 -2
  124. package/dist/modules/datasource/docker/common.js.map +1 -1
  125. package/dist/modules/datasource/docker/index.js +10 -8
  126. package/dist/modules/datasource/docker/index.js.map +1 -1
  127. package/dist/modules/datasource/docker/schema.d.ts +5 -5
  128. package/dist/modules/datasource/docker/schema.js +2 -1
  129. package/dist/modules/datasource/docker/schema.js.map +1 -1
  130. package/dist/modules/datasource/flutter-version/index.js +1 -1
  131. package/dist/modules/datasource/flutter-version/index.js.map +1 -1
  132. package/dist/modules/datasource/galaxy/schema.d.ts +1 -1
  133. package/dist/modules/datasource/galaxy-collection/schema.d.ts +8 -8
  134. package/dist/modules/datasource/git-refs/index.js +1 -1
  135. package/dist/modules/datasource/git-refs/index.js.map +1 -1
  136. package/dist/modules/datasource/gitea-releases/schema.d.ts +2 -2
  137. package/dist/modules/datasource/gitea-tags/schema.d.ts +4 -4
  138. package/dist/modules/datasource/github-release-attachments/index.js +2 -2
  139. package/dist/modules/datasource/github-release-attachments/index.js.map +1 -1
  140. package/dist/modules/datasource/gitlab-packages/index.js +1 -1
  141. package/dist/modules/datasource/gitlab-packages/index.js.map +1 -1
  142. package/dist/modules/datasource/gitlab-releases/index.js +1 -3
  143. package/dist/modules/datasource/gitlab-releases/index.js.map +1 -1
  144. package/dist/modules/datasource/go/base.js +1 -1
  145. package/dist/modules/datasource/go/base.js.map +1 -1
  146. package/dist/modules/datasource/go/index.js +1 -1
  147. package/dist/modules/datasource/go/index.js.map +1 -1
  148. package/dist/modules/datasource/go/releases-direct.js +7 -4
  149. package/dist/modules/datasource/go/releases-direct.js.map +1 -1
  150. package/dist/modules/datasource/go/releases-goproxy.js +1 -1
  151. package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
  152. package/dist/modules/datasource/golang-version/index.js +2 -2
  153. package/dist/modules/datasource/golang-version/index.js.map +1 -1
  154. package/dist/modules/datasource/gradle-version/index.js +1 -1
  155. package/dist/modules/datasource/gradle-version/index.js.map +1 -1
  156. package/dist/modules/datasource/helm/index.js +1 -1
  157. package/dist/modules/datasource/helm/index.js.map +1 -1
  158. package/dist/modules/datasource/hex/index.js +1 -1
  159. package/dist/modules/datasource/hex/index.js.map +1 -1
  160. package/dist/modules/datasource/hex/schema.d.ts +11 -11
  161. package/dist/modules/datasource/hexpm-bob/index.js +1 -1
  162. package/dist/modules/datasource/hexpm-bob/index.js.map +1 -1
  163. package/dist/modules/datasource/index.js +4 -4
  164. package/dist/modules/datasource/index.js.map +1 -1
  165. package/dist/modules/datasource/java-version/index.js +0 -1
  166. package/dist/modules/datasource/java-version/index.js.map +1 -1
  167. package/dist/modules/datasource/jenkins-plugins/index.js +1 -1
  168. package/dist/modules/datasource/jenkins-plugins/index.js.map +1 -1
  169. package/dist/modules/datasource/maven/index.js +35 -27
  170. package/dist/modules/datasource/maven/index.js.map +1 -1
  171. package/dist/modules/datasource/maven/types.d.ts +3 -6
  172. package/dist/modules/datasource/maven/types.js.map +1 -1
  173. package/dist/modules/datasource/maven/util.d.ts +4 -5
  174. package/dist/modules/datasource/maven/util.js +94 -157
  175. package/dist/modules/datasource/maven/util.js.map +1 -1
  176. package/dist/modules/datasource/node-version/index.js +1 -1
  177. package/dist/modules/datasource/node-version/index.js.map +1 -1
  178. package/dist/modules/datasource/npm/index.js +1 -1
  179. package/dist/modules/datasource/npm/index.js.map +1 -1
  180. package/dist/modules/datasource/npm/npmrc.js +1 -1
  181. package/dist/modules/datasource/npm/npmrc.js.map +1 -1
  182. package/dist/modules/datasource/nuget/index.js +1 -1
  183. package/dist/modules/datasource/nuget/index.js.map +1 -1
  184. package/dist/modules/datasource/nuget/v2.js +1 -1
  185. package/dist/modules/datasource/nuget/v2.js.map +1 -1
  186. package/dist/modules/datasource/nuget/v3.js +6 -6
  187. package/dist/modules/datasource/nuget/v3.js.map +1 -1
  188. package/dist/modules/datasource/orb/index.js +1 -1
  189. package/dist/modules/datasource/orb/index.js.map +1 -1
  190. package/dist/modules/datasource/packagist/index.js +2 -2
  191. package/dist/modules/datasource/packagist/index.js.map +1 -1
  192. package/dist/modules/datasource/packagist/schema.d.ts +25 -25
  193. package/dist/modules/datasource/pod/index.js +2 -2
  194. package/dist/modules/datasource/pod/index.js.map +1 -1
  195. package/dist/modules/datasource/postprocess-release.js +1 -1
  196. package/dist/modules/datasource/postprocess-release.js.map +1 -1
  197. package/dist/modules/datasource/pypi/index.js +1 -1
  198. package/dist/modules/datasource/pypi/index.js.map +1 -1
  199. package/dist/modules/datasource/python-version/index.js +1 -1
  200. package/dist/modules/datasource/python-version/index.js.map +1 -1
  201. package/dist/modules/datasource/repology/index.js +1 -1
  202. package/dist/modules/datasource/repology/index.js.map +1 -1
  203. package/dist/modules/datasource/ruby-version/index.js +1 -1
  204. package/dist/modules/datasource/ruby-version/index.js.map +1 -1
  205. package/dist/modules/datasource/rubygems/index.js +2 -2
  206. package/dist/modules/datasource/rubygems/index.js.map +1 -1
  207. package/dist/modules/datasource/rubygems/versions-endpoint-cache.js +2 -2
  208. package/dist/modules/datasource/rubygems/versions-endpoint-cache.js.map +1 -1
  209. package/dist/modules/datasource/sbt-package/index.js +1 -1
  210. package/dist/modules/datasource/sbt-package/index.js.map +1 -1
  211. package/dist/modules/datasource/sbt-plugin/index.js +1 -1
  212. package/dist/modules/datasource/sbt-plugin/index.js.map +1 -1
  213. package/dist/modules/datasource/schema.d.ts +4 -4
  214. package/dist/modules/datasource/terraform-module/index.js +1 -1
  215. package/dist/modules/datasource/terraform-module/index.js.map +1 -1
  216. package/dist/modules/datasource/terraform-provider/index.js +2 -3
  217. package/dist/modules/datasource/terraform-provider/index.js.map +1 -1
  218. package/dist/modules/datasource/types.d.ts +1 -0
  219. package/dist/modules/datasource/types.js.map +1 -1
  220. package/dist/modules/datasource/unity3d/index.d.ts +4 -1
  221. package/dist/modules/datasource/unity3d/index.js +36 -42
  222. package/dist/modules/datasource/unity3d/index.js.map +1 -1
  223. package/dist/modules/datasource/unity3d/schema.d.ts +47 -0
  224. package/dist/modules/datasource/unity3d/schema.js +17 -0
  225. package/dist/modules/datasource/unity3d/schema.js.map +1 -0
  226. package/dist/modules/manager/api.js +2 -0
  227. package/dist/modules/manager/api.js.map +1 -1
  228. package/dist/modules/manager/argocd/extract.js +1 -1
  229. package/dist/modules/manager/argocd/extract.js.map +1 -1
  230. package/dist/modules/manager/argocd/schema.d.ts +10 -10
  231. package/dist/modules/manager/asdf/upgradeable-tooling.js +94 -0
  232. package/dist/modules/manager/asdf/upgradeable-tooling.js.map +1 -1
  233. package/dist/modules/manager/azure-pipelines/schema.d.ts +32 -32
  234. package/dist/modules/manager/batect/schema.d.ts +4 -4
  235. package/dist/modules/manager/batect-wrapper/artifacts.js +1 -1
  236. package/dist/modules/manager/batect-wrapper/artifacts.js.map +1 -1
  237. package/dist/modules/manager/bazel/rules/docker.d.ts +6 -6
  238. package/dist/modules/manager/bazel/rules/git.d.ts +10 -10
  239. package/dist/modules/manager/bazel/rules/git.js +9 -2
  240. package/dist/modules/manager/bazel/rules/git.js.map +1 -1
  241. package/dist/modules/manager/bazel/rules/go.d.ts +5 -5
  242. package/dist/modules/manager/bazel/rules/maven.d.ts +7 -7
  243. package/dist/modules/manager/bazel/rules/oci.d.ts +6 -6
  244. package/dist/modules/manager/bazel-module/parser/fragments.d.ts +40 -40
  245. package/dist/modules/manager/bazel-module/parser/maven.d.ts +40 -40
  246. package/dist/modules/manager/bazel-module/parser/oci.d.ts +17 -17
  247. package/dist/modules/manager/bazel-module/rules.d.ts +40 -40
  248. package/dist/modules/manager/bun/artifacts.js +0 -1
  249. package/dist/modules/manager/bun/artifacts.js.map +1 -1
  250. package/dist/modules/manager/bundler/artifacts.js +0 -1
  251. package/dist/modules/manager/bundler/artifacts.js.map +1 -1
  252. package/dist/modules/manager/bundler/extract.js +2 -1
  253. package/dist/modules/manager/bundler/extract.js.map +1 -1
  254. package/dist/modules/manager/cake/index.js +4 -2
  255. package/dist/modules/manager/cake/index.js.map +1 -1
  256. package/dist/modules/manager/cargo/artifacts.js +5 -7
  257. package/dist/modules/manager/cargo/artifacts.js.map +1 -1
  258. package/dist/modules/manager/cargo/schema.d.ts +114 -114
  259. package/dist/modules/manager/cocoapods/artifacts.js +1 -2
  260. package/dist/modules/manager/cocoapods/artifacts.js.map +1 -1
  261. package/dist/modules/manager/composer/artifacts.js +1 -2
  262. package/dist/modules/manager/composer/artifacts.js.map +1 -1
  263. package/dist/modules/manager/composer/schema.d.ts +26 -26
  264. package/dist/modules/manager/composer/schema.js +1 -1
  265. package/dist/modules/manager/composer/schema.js.map +1 -1
  266. package/dist/modules/manager/composer/utils.d.ts +1 -0
  267. package/dist/modules/manager/composer/utils.js +18 -6
  268. package/dist/modules/manager/composer/utils.js.map +1 -1
  269. package/dist/modules/manager/copier/artifacts.js +0 -1
  270. package/dist/modules/manager/copier/artifacts.js.map +1 -1
  271. package/dist/modules/manager/crossplane/schema.d.ts +2 -2
  272. package/dist/modules/manager/custom/jsonata/index.js +4 -0
  273. package/dist/modules/manager/custom/jsonata/index.js.map +1 -1
  274. package/dist/modules/manager/custom/jsonata/schema.d.ts +21 -21
  275. package/dist/modules/manager/custom/regex/index.js +2 -0
  276. package/dist/modules/manager/custom/regex/index.js.map +1 -1
  277. package/dist/modules/manager/deps-edn/extract.js +2 -1
  278. package/dist/modules/manager/deps-edn/extract.js.map +1 -1
  279. package/dist/modules/manager/devbox/artifacts.d.ts +1 -1
  280. package/dist/modules/manager/devbox/artifacts.js +28 -11
  281. package/dist/modules/manager/devbox/artifacts.js.map +1 -1
  282. package/dist/modules/manager/devbox/schema.js +1 -1
  283. package/dist/modules/manager/devbox/schema.js.map +1 -1
  284. package/dist/modules/manager/devcontainer/extract.js +43 -1
  285. package/dist/modules/manager/devcontainer/extract.js.map +1 -1
  286. package/dist/modules/manager/devcontainer/index.js +11 -1
  287. package/dist/modules/manager/devcontainer/index.js.map +1 -1
  288. package/dist/modules/manager/devcontainer/schema.d.ts +7 -3
  289. package/dist/modules/manager/devcontainer/schema.js +3 -1
  290. package/dist/modules/manager/devcontainer/schema.js.map +1 -1
  291. package/dist/modules/manager/docker-compose/schema.d.ts +6 -6
  292. package/dist/modules/manager/fingerprint.generated.js +86 -85
  293. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  294. package/dist/modules/manager/flux/artifacts.js +0 -1
  295. package/dist/modules/manager/flux/artifacts.js.map +1 -1
  296. package/dist/modules/manager/flux/extract.js +27 -24
  297. package/dist/modules/manager/flux/extract.js.map +1 -1
  298. package/dist/modules/manager/flux/schema.d.ts +94 -94
  299. package/dist/modules/manager/github-actions/extract.js +60 -39
  300. package/dist/modules/manager/github-actions/extract.js.map +1 -1
  301. package/dist/modules/manager/github-actions/schema.d.ts +66 -0
  302. package/dist/modules/manager/github-actions/schema.js +38 -0
  303. package/dist/modules/manager/github-actions/schema.js.map +1 -0
  304. package/dist/modules/manager/gitlabci/extract.d.ts +1 -5
  305. package/dist/modules/manager/gitlabci/extract.js +27 -126
  306. package/dist/modules/manager/gitlabci/extract.js.map +1 -1
  307. package/dist/modules/manager/gitlabci/schema.d.ts +55 -0
  308. package/dist/modules/manager/gitlabci/schema.js +63 -0
  309. package/dist/modules/manager/gitlabci/schema.js.map +1 -0
  310. package/dist/modules/manager/gitlabci-include/extract.js +6 -54
  311. package/dist/modules/manager/gitlabci-include/extract.js.map +1 -1
  312. package/dist/modules/manager/gitlabci-include/schema.d.ts +13 -0
  313. package/dist/modules/manager/gitlabci-include/schema.js +46 -0
  314. package/dist/modules/manager/gitlabci-include/schema.js.map +1 -0
  315. package/dist/modules/manager/glasskube/schema.d.ts +8 -8
  316. package/dist/modules/manager/gomod/artifacts.js +24 -10
  317. package/dist/modules/manager/gomod/artifacts.js.map +1 -1
  318. package/dist/modules/manager/gomod/extract.js +23 -0
  319. package/dist/modules/manager/gomod/extract.js.map +1 -1
  320. package/dist/modules/manager/gomod/line-parser.js +16 -0
  321. package/dist/modules/manager/gomod/line-parser.js.map +1 -1
  322. package/dist/modules/manager/gomod/update.js +2 -2
  323. package/dist/modules/manager/gomod/update.js.map +1 -1
  324. package/dist/modules/manager/gradle/artifacts.js +0 -1
  325. package/dist/modules/manager/gradle/artifacts.js.map +1 -1
  326. package/dist/modules/manager/gradle/extract/catalog.js +1 -1
  327. package/dist/modules/manager/gradle/extract/catalog.js.map +1 -1
  328. package/dist/modules/manager/gradle/parser/assignments.js +2 -2
  329. package/dist/modules/manager/gradle/parser/assignments.js.map +1 -1
  330. package/dist/modules/manager/gradle/parser/handlers.d.ts +1 -2
  331. package/dist/modules/manager/gradle/parser/handlers.js +10 -25
  332. package/dist/modules/manager/gradle/parser/handlers.js.map +1 -1
  333. package/dist/modules/manager/gradle/parser/registry-urls.js +11 -3
  334. package/dist/modules/manager/gradle/parser/registry-urls.js.map +1 -1
  335. package/dist/modules/manager/gradle-wrapper/artifacts.js +1 -2
  336. package/dist/modules/manager/gradle-wrapper/artifacts.js.map +1 -1
  337. package/dist/modules/manager/helmfile/artifacts.js +0 -1
  338. package/dist/modules/manager/helmfile/artifacts.js.map +1 -1
  339. package/dist/modules/manager/helmfile/extract.js +4 -0
  340. package/dist/modules/manager/helmfile/extract.js.map +1 -1
  341. package/dist/modules/manager/helmfile/schema.d.ts +9 -9
  342. package/dist/modules/manager/helmv3/artifacts.js +0 -1
  343. package/dist/modules/manager/helmv3/artifacts.js.map +1 -1
  344. package/dist/modules/manager/helmv3/utils.js +3 -1
  345. package/dist/modules/manager/helmv3/utils.js.map +1 -1
  346. package/dist/modules/manager/hermit/artifacts.js +0 -1
  347. package/dist/modules/manager/hermit/artifacts.js.map +1 -1
  348. package/dist/modules/manager/homebrew/extract.js +0 -1
  349. package/dist/modules/manager/homebrew/extract.js.map +1 -1
  350. package/dist/modules/manager/jsonnet-bundler/artifacts.js +0 -1
  351. package/dist/modules/manager/jsonnet-bundler/artifacts.js.map +1 -1
  352. package/dist/modules/manager/kustomize/artifacts.d.ts +2 -0
  353. package/dist/modules/manager/kustomize/artifacts.js +154 -0
  354. package/dist/modules/manager/kustomize/artifacts.js.map +1 -0
  355. package/dist/modules/manager/kustomize/common.d.ts +3 -0
  356. package/dist/modules/manager/kustomize/common.js +22 -0
  357. package/dist/modules/manager/kustomize/common.js.map +1 -0
  358. package/dist/modules/manager/kustomize/index.d.ts +1 -0
  359. package/dist/modules/manager/kustomize/index.js +3 -1
  360. package/dist/modules/manager/kustomize/index.js.map +1 -1
  361. package/dist/modules/manager/kustomize/types.d.ts +4 -0
  362. package/dist/modules/manager/kustomize/types.js.map +1 -1
  363. package/dist/modules/manager/maven/extract.js +3 -1
  364. package/dist/modules/manager/maven/extract.js.map +1 -1
  365. package/dist/modules/manager/maven-wrapper/artifacts.js +0 -1
  366. package/dist/modules/manager/maven-wrapper/artifacts.js.map +1 -1
  367. package/dist/modules/manager/mise/extract.js +1 -1
  368. package/dist/modules/manager/mise/extract.js.map +1 -1
  369. package/dist/modules/manager/mix/artifacts.js +64 -14
  370. package/dist/modules/manager/mix/artifacts.js.map +1 -1
  371. package/dist/modules/manager/mix/index.d.ts +1 -0
  372. package/dist/modules/manager/mix/index.js +2 -1
  373. package/dist/modules/manager/mix/index.js.map +1 -1
  374. package/dist/modules/manager/nix/artifacts.js +0 -1
  375. package/dist/modules/manager/nix/artifacts.js.map +1 -1
  376. package/dist/modules/manager/nix/extract.js +1 -1
  377. package/dist/modules/manager/nix/extract.js.map +1 -1
  378. package/dist/modules/manager/nix/schema.d.ts +18 -18
  379. package/dist/modules/manager/npm/artifacts.js +0 -1
  380. package/dist/modules/manager/npm/artifacts.js.map +1 -1
  381. package/dist/modules/manager/npm/extract/yarn.js +2 -2
  382. package/dist/modules/manager/npm/extract/yarn.js.map +1 -1
  383. package/dist/modules/manager/npm/post-update/npm.js +0 -1
  384. package/dist/modules/manager/npm/post-update/npm.js.map +1 -1
  385. package/dist/modules/manager/npm/post-update/pnpm.js +13 -2
  386. package/dist/modules/manager/npm/post-update/pnpm.js.map +1 -1
  387. package/dist/modules/manager/npm/post-update/rules.js +11 -1
  388. package/dist/modules/manager/npm/post-update/rules.js.map +1 -1
  389. package/dist/modules/manager/npm/post-update/yarn.js +0 -1
  390. package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
  391. package/dist/modules/manager/npm/schema.d.ts +13 -13
  392. package/dist/modules/manager/npm/update/dependency/index.js +1 -1
  393. package/dist/modules/manager/npm/update/dependency/index.js.map +1 -1
  394. package/dist/modules/manager/nuget/artifacts.js +1 -2
  395. package/dist/modules/manager/nuget/artifacts.js.map +1 -1
  396. package/dist/modules/manager/nuget/package-tree.js +4 -0
  397. package/dist/modules/manager/nuget/package-tree.js.map +1 -1
  398. package/dist/modules/manager/nuget/schema.d.ts +8 -8
  399. package/dist/modules/manager/nuget/util.js +4 -1
  400. package/dist/modules/manager/nuget/util.js.map +1 -1
  401. package/dist/modules/manager/ocb/schema.d.ts +6 -6
  402. package/dist/modules/manager/pep621/processors/pdm.js +0 -1
  403. package/dist/modules/manager/pep621/processors/pdm.js.map +1 -1
  404. package/dist/modules/manager/pep621/processors/uv.js +0 -1
  405. package/dist/modules/manager/pep621/processors/uv.js.map +1 -1
  406. package/dist/modules/manager/pep621/schema.d.ts +59 -54
  407. package/dist/modules/manager/pep621/schema.js +2 -0
  408. package/dist/modules/manager/pep621/schema.js.map +1 -1
  409. package/dist/modules/manager/pep621/utils.js +1 -1
  410. package/dist/modules/manager/pep621/utils.js.map +1 -1
  411. package/dist/modules/manager/pip-compile/common.js +0 -1
  412. package/dist/modules/manager/pip-compile/common.js.map +1 -1
  413. package/dist/modules/manager/pip_requirements/artifacts.js +0 -1
  414. package/dist/modules/manager/pip_requirements/artifacts.js.map +1 -1
  415. package/dist/modules/manager/pipenv/artifacts.js +0 -1
  416. package/dist/modules/manager/pipenv/artifacts.js.map +1 -1
  417. package/dist/modules/manager/pixi/artifacts.d.ts +3 -0
  418. package/dist/modules/manager/pixi/artifacts.js +84 -0
  419. package/dist/modules/manager/pixi/artifacts.js.map +1 -0
  420. package/dist/modules/manager/pixi/extract.d.ts +2 -0
  421. package/dist/modules/manager/pixi/extract.js +53 -0
  422. package/dist/modules/manager/pixi/extract.js.map +1 -0
  423. package/dist/modules/manager/pixi/index.d.ts +11 -0
  424. package/dist/modules/manager/pixi/index.js +22 -0
  425. package/dist/modules/manager/pixi/index.js.map +1 -0
  426. package/dist/modules/manager/pixi/lockfile.d.ts +6 -0
  427. package/dist/modules/manager/pixi/lockfile.js +25 -0
  428. package/dist/modules/manager/pixi/lockfile.js.map +1 -0
  429. package/dist/modules/manager/pixi/schema.d.ts +14 -0
  430. package/dist/modules/manager/pixi/schema.js +14 -0
  431. package/dist/modules/manager/pixi/schema.js.map +1 -0
  432. package/dist/modules/manager/poetry/artifacts.js +3 -4
  433. package/dist/modules/manager/poetry/artifacts.js.map +1 -1
  434. package/dist/modules/manager/poetry/extract.js +2 -1
  435. package/dist/modules/manager/poetry/extract.js.map +1 -1
  436. package/dist/modules/manager/poetry/schema.d.ts +48 -48
  437. package/dist/modules/manager/pub/artifacts.js +0 -1
  438. package/dist/modules/manager/pub/artifacts.js.map +1 -1
  439. package/dist/modules/manager/pub/schema.d.ts +8 -8
  440. package/dist/modules/manager/scalafmt/extract.js +1 -1
  441. package/dist/modules/manager/scalafmt/extract.js.map +1 -1
  442. package/dist/modules/manager/sveltos/schema.d.ts +12 -12
  443. package/dist/modules/manager/terraform/lockfile/hash.d.ts +1 -1
  444. package/dist/modules/manager/types.d.ts +6 -2
  445. package/dist/modules/manager/types.js.map +1 -1
  446. package/dist/modules/manager/vendir/schema.d.ts +4 -4
  447. package/dist/modules/platform/api.d.ts +1 -1
  448. package/dist/modules/platform/azure/azure-helper.js +2 -2
  449. package/dist/modules/platform/azure/azure-helper.js.map +1 -1
  450. package/dist/modules/platform/azure/index.js +14 -14
  451. package/dist/modules/platform/azure/index.js.map +1 -1
  452. package/dist/modules/platform/bitbucket/comments.js +4 -4
  453. package/dist/modules/platform/bitbucket/comments.js.map +1 -1
  454. package/dist/modules/platform/bitbucket/index.d.ts +1 -0
  455. package/dist/modules/platform/bitbucket/index.js +54 -44
  456. package/dist/modules/platform/bitbucket/index.js.map +1 -1
  457. package/dist/modules/platform/bitbucket/schema.d.ts +11 -11
  458. package/dist/modules/platform/bitbucket/utils.js +3 -3
  459. package/dist/modules/platform/bitbucket/utils.js.map +1 -1
  460. package/dist/modules/platform/bitbucket-server/index.d.ts +3 -3
  461. package/dist/modules/platform/bitbucket-server/index.js +81 -81
  462. package/dist/modules/platform/bitbucket-server/index.js.map +1 -1
  463. package/dist/modules/platform/bitbucket-server/pr-cache.d.ts +23 -0
  464. package/dist/modules/platform/bitbucket-server/pr-cache.js +125 -0
  465. package/dist/modules/platform/bitbucket-server/pr-cache.js.map +1 -0
  466. package/dist/modules/platform/bitbucket-server/schema.d.ts +75 -0
  467. package/dist/modules/platform/bitbucket-server/schema.js +14 -1
  468. package/dist/modules/platform/bitbucket-server/schema.js.map +1 -1
  469. package/dist/modules/platform/bitbucket-server/types.d.ts +8 -2
  470. package/dist/modules/platform/bitbucket-server/types.js.map +1 -1
  471. package/dist/modules/platform/bitbucket-server/utils.d.ts +0 -2
  472. package/dist/modules/platform/bitbucket-server/utils.js +6 -52
  473. package/dist/modules/platform/bitbucket-server/utils.js.map +1 -1
  474. package/dist/modules/platform/codecommit/codecommit-client.js +6 -6
  475. package/dist/modules/platform/codecommit/codecommit-client.js.map +1 -1
  476. package/dist/modules/platform/codecommit/index.js +24 -24
  477. package/dist/modules/platform/codecommit/index.js.map +1 -1
  478. package/dist/modules/platform/gerrit/client.js +13 -2
  479. package/dist/modules/platform/gerrit/client.js.map +1 -1
  480. package/dist/modules/platform/gerrit/utils.js +1 -1
  481. package/dist/modules/platform/gerrit/utils.js.map +1 -1
  482. package/dist/modules/platform/gitea/gitea-helper.d.ts +1 -0
  483. package/dist/modules/platform/gitea/gitea-helper.js +16 -0
  484. package/dist/modules/platform/gitea/gitea-helper.js.map +1 -1
  485. package/dist/modules/platform/gitea/index.d.ts +1 -0
  486. package/dist/modules/platform/gitea/index.js +26 -7
  487. package/dist/modules/platform/gitea/index.js.map +1 -1
  488. package/dist/modules/platform/gitea/schema.d.ts +8 -8
  489. package/dist/modules/platform/gitea/types.d.ts +1 -1
  490. package/dist/modules/platform/gitea/types.js.map +1 -1
  491. package/dist/modules/platform/github/common.d.ts +2 -0
  492. package/dist/modules/platform/github/common.js +16 -0
  493. package/dist/modules/platform/github/common.js.map +1 -1
  494. package/dist/modules/platform/github/index.d.ts +1 -1
  495. package/dist/modules/platform/github/index.js +87 -82
  496. package/dist/modules/platform/github/index.js.map +1 -1
  497. package/dist/modules/platform/github/issue.d.ts +12 -12
  498. package/dist/modules/platform/github/massage-markdown-links.js +2 -2
  499. package/dist/modules/platform/github/massage-markdown-links.js.map +1 -1
  500. package/dist/modules/platform/github/pr.js +3 -3
  501. package/dist/modules/platform/github/pr.js.map +1 -1
  502. package/dist/modules/platform/github/schema.d.ts +76 -76
  503. package/dist/modules/platform/github/schema.js +3 -1
  504. package/dist/modules/platform/github/schema.js.map +1 -1
  505. package/dist/modules/platform/gitlab/index.d.ts +1 -0
  506. package/dist/modules/platform/gitlab/index.js +70 -43
  507. package/dist/modules/platform/gitlab/index.js.map +1 -1
  508. package/dist/modules/platform/index.js +0 -1
  509. package/dist/modules/platform/index.js.map +1 -1
  510. package/dist/modules/platform/scm.d.ts +1 -1
  511. package/dist/modules/versioning/api.js +2 -0
  512. package/dist/modules/versioning/api.js.map +1 -1
  513. package/dist/modules/versioning/composer/index.js +10 -0
  514. package/dist/modules/versioning/composer/index.js.map +1 -1
  515. package/dist/modules/versioning/conda/index.d.ts +41 -0
  516. package/dist/modules/versioning/conda/index.js +178 -0
  517. package/dist/modules/versioning/conda/index.js.map +1 -0
  518. package/dist/modules/versioning/hashicorp/convertor.d.ts +2 -1
  519. package/dist/modules/versioning/hashicorp/convertor.js +13 -8
  520. package/dist/modules/versioning/hashicorp/convertor.js.map +1 -1
  521. package/dist/modules/versioning/hex/index.js +3 -3
  522. package/dist/modules/versioning/hex/index.js.map +1 -1
  523. package/dist/modules/versioning/npm/index.js +2 -1
  524. package/dist/modules/versioning/npm/index.js.map +1 -1
  525. package/dist/modules/versioning/schema.js +1 -1
  526. package/dist/modules/versioning/schema.js.map +1 -1
  527. package/dist/modules/versioning/types.d.ts +4 -0
  528. package/dist/modules/versioning/types.js.map +1 -1
  529. package/dist/proxy.js +2 -1
  530. package/dist/proxy.js.map +1 -1
  531. package/dist/renovate.js +2 -2
  532. package/dist/renovate.js.map +1 -1
  533. package/dist/util/cache/package/decorator.js +2 -2
  534. package/dist/util/cache/package/decorator.js.map +1 -1
  535. package/dist/util/cache/package/redis.js +0 -1
  536. package/dist/util/cache/package/redis.js.map +1 -1
  537. package/dist/util/cache/package/types.d.ts +1 -1
  538. package/dist/util/cache/package/types.js.map +1 -1
  539. package/dist/util/cache/repository/impl/base.d.ts +1 -1
  540. package/dist/util/cache/repository/schema.d.ts +4 -4
  541. package/dist/util/cache/repository/types.d.ts +3 -0
  542. package/dist/util/cache/repository/types.js.map +1 -1
  543. package/dist/util/env.d.ts +4 -0
  544. package/dist/util/env.js +22 -0
  545. package/dist/util/env.js.map +1 -0
  546. package/dist/util/exec/containerbase.js +18 -12
  547. package/dist/util/exec/containerbase.js.map +1 -1
  548. package/dist/util/exec/index.js +5 -2
  549. package/dist/util/exec/index.js.map +1 -1
  550. package/dist/util/exec/types.d.ts +0 -2
  551. package/dist/util/exec/types.js.map +1 -1
  552. package/dist/util/exec/utils.d.ts +1 -1
  553. package/dist/util/exec/utils.js +6 -5
  554. package/dist/util/exec/utils.js.map +1 -1
  555. package/dist/util/git/author.js +1 -1
  556. package/dist/util/git/author.js.map +1 -1
  557. package/dist/util/git/config.js +0 -1
  558. package/dist/util/git/config.js.map +1 -1
  559. package/dist/util/git/error.js +4 -2
  560. package/dist/util/git/error.js.map +1 -1
  561. package/dist/util/git/index.js +73 -46
  562. package/dist/util/git/index.js.map +1 -1
  563. package/dist/util/git/private-key.js +1 -1
  564. package/dist/util/git/private-key.js.map +1 -1
  565. package/dist/util/github/graphql/query-adapters/releases-query-adapter.d.ts +2 -2
  566. package/dist/util/github/graphql/query-adapters/tags-query-adapter.d.ts +2 -2
  567. package/dist/util/http/auth.js +0 -1
  568. package/dist/util/http/auth.js.map +1 -1
  569. package/dist/util/http/bitbucket-server.d.ts +5 -4
  570. package/dist/util/http/bitbucket-server.js +21 -20
  571. package/dist/util/http/bitbucket-server.js.map +1 -1
  572. package/dist/util/http/bitbucket.d.ts +6 -5
  573. package/dist/util/http/bitbucket.js +34 -31
  574. package/dist/util/http/bitbucket.js.map +1 -1
  575. package/dist/util/http/cache/abstract-http-cache-provider.js +2 -2
  576. package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
  577. package/dist/util/http/cache/memory-http-cache-provider.d.ts +10 -0
  578. package/dist/util/http/cache/memory-http-cache-provider.js +29 -0
  579. package/dist/util/http/cache/memory-http-cache-provider.js.map +1 -0
  580. package/dist/util/http/cache/schema.d.ts +2 -2
  581. package/dist/util/http/errors.d.ts +2 -0
  582. package/dist/util/http/errors.js +8 -0
  583. package/dist/util/http/errors.js.map +1 -0
  584. package/dist/util/http/gerrit.d.ts +6 -4
  585. package/dist/util/http/gerrit.js +11 -12
  586. package/dist/util/http/gerrit.js.map +1 -1
  587. package/dist/util/http/gitea.d.ts +5 -4
  588. package/dist/util/http/gitea.js +14 -13
  589. package/dist/util/http/gitea.js.map +1 -1
  590. package/dist/util/http/github.d.ts +14 -8
  591. package/dist/util/http/github.js +65 -60
  592. package/dist/util/http/github.js.map +1 -1
  593. package/dist/util/http/gitlab.d.ts +7 -5
  594. package/dist/util/http/gitlab.js +58 -46
  595. package/dist/util/http/gitlab.js.map +1 -1
  596. package/dist/util/http/got.d.ts +9 -0
  597. package/dist/util/http/got.js +54 -0
  598. package/dist/util/http/got.js.map +1 -0
  599. package/dist/util/http/host-rules.d.ts +2 -1
  600. package/dist/util/http/host-rules.js +5 -4
  601. package/dist/util/http/host-rules.js.map +1 -1
  602. package/dist/util/http/http.d.ts +93 -0
  603. package/dist/util/http/http.js +346 -0
  604. package/dist/util/http/http.js.map +1 -0
  605. package/dist/util/http/index.d.ts +6 -74
  606. package/dist/util/http/index.js +5 -359
  607. package/dist/util/http/index.js.map +1 -1
  608. package/dist/util/http/legacy.js +4 -1
  609. package/dist/util/http/legacy.js.map +1 -1
  610. package/dist/util/http/types.d.ts +9 -16
  611. package/dist/util/http/types.js.map +1 -1
  612. package/dist/util/stats.d.ts +10 -0
  613. package/dist/util/stats.js +45 -1
  614. package/dist/util/stats.js.map +1 -1
  615. package/dist/util/string.d.ts +15 -0
  616. package/dist/util/string.js +75 -0
  617. package/dist/util/string.js.map +1 -1
  618. package/dist/util/toml.d.ts +1 -0
  619. package/dist/util/toml.js +6 -0
  620. package/dist/util/toml.js.map +1 -1
  621. package/dist/util/url.js +3 -8
  622. package/dist/util/url.js.map +1 -1
  623. package/dist/util/yaml.js +2 -6
  624. package/dist/util/yaml.js.map +1 -1
  625. package/dist/workers/global/config/parse/env.js +3 -2
  626. package/dist/workers/global/config/parse/env.js.map +1 -1
  627. package/dist/workers/global/config/parse/file.js +19 -9
  628. package/dist/workers/global/config/parse/file.js.map +1 -1
  629. package/dist/workers/global/config/parse/host-rules-from-env.js +6 -2
  630. package/dist/workers/global/config/parse/host-rules-from-env.js.map +1 -1
  631. package/dist/workers/global/config/parse/index.js +5 -0
  632. package/dist/workers/global/config/parse/index.js.map +1 -1
  633. package/dist/workers/repository/cache.js +1 -2
  634. package/dist/workers/repository/cache.js.map +1 -1
  635. package/dist/workers/repository/config-migration/branch/migrated-data.js +2 -0
  636. package/dist/workers/repository/config-migration/branch/migrated-data.js.map +1 -1
  637. package/dist/workers/repository/index.js +1 -0
  638. package/dist/workers/repository/index.js.map +1 -1
  639. package/dist/workers/repository/init/merge.js +6 -3
  640. package/dist/workers/repository/init/merge.js.map +1 -1
  641. package/dist/workers/repository/onboarding/pr/config-description.js +3 -1
  642. package/dist/workers/repository/onboarding/pr/config-description.js.map +1 -1
  643. package/dist/workers/repository/process/extract-update.js +0 -1
  644. package/dist/workers/repository/process/extract-update.js.map +1 -1
  645. package/dist/workers/repository/process/fingerprint-fields.js +0 -1
  646. package/dist/workers/repository/process/fingerprint-fields.js.map +1 -1
  647. package/dist/workers/repository/process/libyear.js +2 -2
  648. package/dist/workers/repository/process/libyear.js.map +1 -1
  649. package/dist/workers/repository/process/lookup/index.js +13 -4
  650. package/dist/workers/repository/process/lookup/index.js.map +1 -1
  651. package/dist/workers/repository/process/vulnerabilities.js +1 -1
  652. package/dist/workers/repository/process/vulnerabilities.js.map +1 -1
  653. package/dist/workers/repository/process/write.js +1 -8
  654. package/dist/workers/repository/process/write.js.map +1 -1
  655. package/dist/workers/repository/reconfigure/validate.js +1 -0
  656. package/dist/workers/repository/reconfigure/validate.js.map +1 -1
  657. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +10 -1
  658. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js.map +1 -1
  659. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js +1 -1
  660. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js.map +1 -1
  661. package/dist/workers/repository/update/pr/changelog/github/index.js +6 -3
  662. package/dist/workers/repository/update/pr/changelog/github/index.js.map +1 -1
  663. package/dist/workers/repository/update/pr/changelog/gitlab/index.js +1 -1
  664. package/dist/workers/repository/update/pr/changelog/gitlab/index.js.map +1 -1
  665. package/dist/workers/repository/update/pr/changelog/source.js +1 -0
  666. package/dist/workers/repository/update/pr/changelog/source.js.map +1 -1
  667. package/dist/workers/repository/updates/flatten.js +8 -4
  668. package/dist/workers/repository/updates/flatten.js.map +1 -1
  669. package/dist/workers/repository/updates/generate.js +1 -2
  670. package/dist/workers/repository/updates/generate.js.map +1 -1
  671. package/dist/workers/types.d.ts +1 -4
  672. package/dist/workers/types.js.map +1 -1
  673. package/package.json +69 -72
  674. package/renovate-schema.json +15 -1
  675. package/dist/modules/manager/github-actions/types.d.ts +0 -30
  676. package/dist/modules/manager/github-actions/types.js +0 -3
  677. package/dist/modules/manager/github-actions/types.js.map +0 -1
  678. package/dist/modules/manager/gitlabci/common.d.ts +0 -6
  679. package/dist/modules/manager/gitlabci/common.js +0 -30
  680. package/dist/modules/manager/gitlabci/common.js.map +0 -1
  681. package/dist/modules/manager/gitlabci/types.d.ts +0 -35
  682. package/dist/modules/manager/gitlabci/types.js +0 -3
  683. package/dist/modules/manager/gitlabci/types.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/composer/artifacts.ts"],"names":[],"mappings":";;AAyGA,0CA+JC;;AAxQD,kEAAkC;AAClC,iCAA8B;AAC9B,6BAAwB;AACxB,sEAG2C;AAC3C,4CAAyC;AACzC,2DAGmC;AACnC,6CAA0C;AAE1C,yCAO0B;AAC1B,2CAAkD;AAClD,4EAAsD;AACtD,+CAA4C;AAC5C,6DAAkD;AAClD,iDAAoD;AACpD,wDAA8D;AAC9D,0DAAiE;AAEjE,qCAAiD;AAEjD,mCAMiB;AAEjB,SAAS,WAAW;IAClB,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,MAAM,cAAc,GAAG,SAAS,CAAC,IAAI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C;YACL,CAAC;QACH,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC/B,GAAG,CAAC,IAAI,CAAC;gBACP,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,CAAC;iBACR;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,qBAAqB;QACrB,IAAI,GAAG,CAAC,OAAO,KAAK,gCAAe,EAAE,CAAC;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,IACE,GAAG,CAAC,OAAO,EAAE,QAAQ,CACnB,4EAA4E,CAC7E,EACD,CAAC;YACD,eAAM,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;QAC1D,CAAC;aAAM,IAAI,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,0BAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,+CAA8B,CAAC,CAAC;QAClD,CAAC;aAAM,CAAC;YACN,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,kCAAkC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO;YACL;gBACE,aAAa,EAAE;oBACb,QAAQ,EAAE,YAAY;oBACtB,MAAM,EAAE,GAAG,CAAC,OAAO;iBACpB;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { z } from 'zod';\nimport {\n SYSTEM_INSUFFICIENT_DISK_SPACE,\n TEMPORARY_ERROR,\n} from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport {\n findGithubToken,\n takePersonalAccessTokenIfPossible,\n} from '../../../util/check-token';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions, ToolConstraint } from '../../../util/exec/types';\nimport {\n ensureCacheDir,\n ensureLocalDir,\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs';\nimport { getRepoStatus } from '../../../util/git';\nimport * as hostRules from '../../../util/host-rules';\nimport { regEx } from '../../../util/regex';\nimport { Json } from '../../../util/schema-utils';\nimport { coerceString } from '../../../util/string';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { PackagistDatasource } from '../../datasource/packagist';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { Lockfile, PackageFile } from './schema';\nimport type { AuthJson } from './types';\nimport {\n extractConstraints,\n getComposerArguments,\n getPhpConstraint,\n isArtifactAuthEnabled,\n requireComposerDependencyInstallation,\n} from './utils';\n\nfunction getAuthJson(): string | null {\n const authJson: AuthJson = {};\n\n const githubHostRule = hostRules.find({\n hostType: 'github',\n url: 'https://api.github.com/',\n });\n\n const gitTagsHostRule = hostRules.find({\n hostType: GitTagsDatasource.id,\n url: 'https://github.com',\n });\n\n const selectedGithubToken = takePersonalAccessTokenIfPossible(\n isArtifactAuthEnabled(githubHostRule)\n ? findGithubToken(githubHostRule)\n : undefined,\n isArtifactAuthEnabled(gitTagsHostRule)\n ? findGithubToken(gitTagsHostRule)\n : undefined,\n );\n\n if (selectedGithubToken) {\n authJson['github-oauth'] = {\n 'github.com': selectedGithubToken,\n };\n }\n\n for (const gitlabHostRule of hostRules.findAll({ hostType: 'gitlab' })) {\n if (!isArtifactAuthEnabled(gitlabHostRule)) {\n continue;\n }\n\n if (gitlabHostRule?.token) {\n const host = coerceString(gitlabHostRule.resolvedHost, 'gitlab.com');\n authJson['gitlab-token'] = authJson['gitlab-token'] ?? {};\n authJson['gitlab-token'][host] = gitlabHostRule.token;\n // https://getcomposer.org/doc/articles/authentication-for-private-packages.md#gitlab-token\n authJson['gitlab-domains'] = [\n host,\n ...(authJson['gitlab-domains'] ?? []),\n ];\n }\n }\n\n for (const packagistHostRule of hostRules.findAll({\n hostType: PackagistDatasource.id,\n })) {\n if (!isArtifactAuthEnabled(packagistHostRule)) {\n continue;\n }\n\n const { resolvedHost, username, password, token } = packagistHostRule;\n if (resolvedHost && username && password) {\n authJson['http-basic'] = authJson['http-basic'] ?? {};\n authJson['http-basic'][resolvedHost] = { username, password };\n } else if (resolvedHost && token) {\n authJson.bearer = authJson.bearer ?? {};\n authJson.bearer[resolvedHost] = token;\n }\n }\n\n return is.emptyObject(authJson) ? null : JSON.stringify(authJson);\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`composer.updateArtifacts(${packageFileName})`);\n\n const file = Json.pipe(PackageFile).parse(newPackageFileContent);\n\n const lockFileName = packageFileName.replace(regEx(/\\.json$/), '.lock');\n const lockfile = await z\n .string()\n .transform((f) => readLocalFile(f, 'utf8'))\n .pipe(Json)\n .pipe(Lockfile)\n .nullable()\n .catch(null)\n .parseAsync(lockFileName);\n if (!lockfile) {\n logger.debug('Composer: unable to read lockfile');\n return null;\n }\n\n const vendorDir = getSiblingFileName(packageFileName, 'vendor');\n const commitVendorFiles = await localPathExists(vendorDir);\n await ensureLocalDir(vendorDir);\n try {\n await writeLocalFile(packageFileName, newPackageFileContent);\n\n const constraints = {\n ...extractConstraints(file, lockfile),\n ...config.constraints,\n };\n\n const composerToolConstraint: ToolConstraint = {\n toolName: 'composer',\n constraint: constraints.composer,\n };\n\n const phpToolConstraint: ToolConstraint = {\n toolName: 'php',\n constraint: getPhpConstraint(constraints),\n };\n\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n userConfiguredEnv: config.env,\n extraEnv: {\n COMPOSER_CACHE_DIR: await ensureCacheDir('composer'),\n COMPOSER_AUTH: getAuthJson(),\n },\n toolConstraints: [phpToolConstraint, composerToolConstraint],\n docker: {},\n };\n\n const commands: string[] = [];\n\n // Determine whether install is required before update\n if (requireComposerDependencyInstallation(lockfile)) {\n const preCmd = 'composer';\n const preArgs =\n 'install' + getComposerArguments(config, composerToolConstraint);\n logger.trace({ preCmd, preArgs }, 'composer pre-update command');\n commands.push('git stash -- composer.json');\n commands.push(`${preCmd} ${preArgs}`);\n commands.push('git stash pop || true');\n }\n\n const cmd = 'composer';\n let args: string;\n if (config.isLockFileMaintenance) {\n args = 'update';\n } else {\n args =\n (\n 'update ' +\n updatedDeps\n .map((dep) =>\n dep.newVersion\n ? quote(`${dep.depName}:${dep.newVersion}`)\n : quote(dep.depName!),\n )\n .filter(is.string)\n .map((dep) => quote(dep))\n .join(' ')\n ).trim() + ' --with-dependencies';\n }\n args += getComposerArguments(config, composerToolConstraint);\n logger.trace({ cmd, args }, 'composer command');\n commands.push(`${cmd} ${args}`);\n\n await exec(commands, execOptions);\n const status = await getRepoStatus();\n if (!status.modified.includes(lockFileName)) {\n return null;\n }\n logger.debug('Returning updated composer.lock');\n const res: UpdateArtifactsResult[] = [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: await readLocalFile(lockFileName),\n },\n },\n ];\n\n if (!commitVendorFiles) {\n return res;\n }\n\n logger.debug(`Committing vendor files in ${vendorDir}`);\n for (const f of [...status.modified, ...status.not_added]) {\n if (f.startsWith(vendorDir)) {\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n for (const f of status.deleted) {\n res.push({\n file: {\n type: 'deletion',\n path: f,\n },\n });\n }\n\n return res;\n } catch (err) {\n // istanbul ignore if\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n if (\n err.message?.includes(\n 'Your requirements could not be resolved to an installable set of packages.',\n )\n ) {\n logger.info('Composer requirements cannot be resolved');\n } else if (err.message?.includes('write error (disk full?)')) {\n throw new Error(SYSTEM_INSUFFICIENT_DISK_SPACE);\n } else {\n logger.debug({ err }, 'Failed to generate composer.lock');\n }\n return [\n {\n artifactError: {\n lockFile: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n}\n"]}
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/composer/artifacts.ts"],"names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;AACH,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { z } from 'zod';\nimport {\n SYSTEM_INSUFFICIENT_DISK_SPACE,\n TEMPORARY_ERROR,\n} from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport {\n findGithubToken,\n takePersonalAccessTokenIfPossible,\n} from '../../../util/check-token';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions, ToolConstraint } from '../../../util/exec/types';\nimport {\n ensureCacheDir,\n ensureLocalDir,\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs';\nimport { getRepoStatus } from '../../../util/git';\nimport * as hostRules from '../../../util/host-rules';\nimport { regEx } from '../../../util/regex';\nimport { Json } from '../../../util/schema-utils';\nimport { coerceString } from '../../../util/string';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { PackagistDatasource } from '../../datasource/packagist';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { Lockfile, PackageFile } from './schema';\nimport type { AuthJson } from './types';\nimport {\n extractConstraints,\n getComposerArguments,\n getComposerUpdateArguments,\n getPhpConstraint,\n isArtifactAuthEnabled,\n requireComposerDependencyInstallation,\n} from './utils';\n\nfunction getAuthJson(): string | null {\n const authJson: AuthJson = {};\n\n const githubHostRule = hostRules.find({\n hostType: 'github',\n url: 'https://api.github.com/',\n });\n\n const gitTagsHostRule = hostRules.find({\n hostType: GitTagsDatasource.id,\n url: 'https://github.com',\n });\n\n const selectedGithubToken = takePersonalAccessTokenIfPossible(\n isArtifactAuthEnabled(githubHostRule)\n ? findGithubToken(githubHostRule)\n : undefined,\n isArtifactAuthEnabled(gitTagsHostRule)\n ? findGithubToken(gitTagsHostRule)\n : undefined,\n );\n\n if (selectedGithubToken) {\n authJson['github-oauth'] = {\n 'github.com': selectedGithubToken,\n };\n }\n\n for (const gitlabHostRule of hostRules.findAll({ hostType: 'gitlab' })) {\n if (!isArtifactAuthEnabled(gitlabHostRule)) {\n continue;\n }\n\n if (gitlabHostRule?.token) {\n const host = coerceString(gitlabHostRule.resolvedHost, 'gitlab.com');\n authJson['gitlab-token'] = authJson['gitlab-token'] ?? {};\n authJson['gitlab-token'][host] = gitlabHostRule.token;\n // https://getcomposer.org/doc/articles/authentication-for-private-packages.md#gitlab-token\n authJson['gitlab-domains'] = [\n host,\n ...(authJson['gitlab-domains'] ?? []),\n ];\n }\n }\n\n for (const packagistHostRule of hostRules.findAll({\n hostType: PackagistDatasource.id,\n })) {\n if (!isArtifactAuthEnabled(packagistHostRule)) {\n continue;\n }\n\n const { resolvedHost, username, password, token } = packagistHostRule;\n if (resolvedHost && username && password) {\n authJson['http-basic'] = authJson['http-basic'] ?? {};\n authJson['http-basic'][resolvedHost] = { username, password };\n } else if (resolvedHost && token) {\n authJson.bearer = authJson.bearer ?? {};\n authJson.bearer[resolvedHost] = token;\n }\n }\n\n return is.emptyObject(authJson) ? null : JSON.stringify(authJson);\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`composer.updateArtifacts(${packageFileName})`);\n\n const file = Json.pipe(PackageFile).parse(newPackageFileContent);\n\n const lockFileName = packageFileName.replace(regEx(/\\.json$/), '.lock');\n const lockfile = await z\n .string()\n .transform((f) => readLocalFile(f, 'utf8'))\n .pipe(Json)\n .pipe(Lockfile)\n .nullable()\n .catch(null)\n .parseAsync(lockFileName);\n if (!lockfile) {\n logger.debug('Composer: unable to read lockfile');\n return null;\n }\n\n const vendorDir = getSiblingFileName(packageFileName, 'vendor');\n const commitVendorFiles = await localPathExists(vendorDir);\n await ensureLocalDir(vendorDir);\n try {\n await writeLocalFile(packageFileName, newPackageFileContent);\n\n const constraints = {\n ...extractConstraints(file, lockfile),\n ...config.constraints,\n };\n\n const composerToolConstraint: ToolConstraint = {\n toolName: 'composer',\n constraint: constraints.composer,\n };\n\n const phpToolConstraint: ToolConstraint = {\n toolName: 'php',\n constraint: getPhpConstraint(constraints),\n };\n\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv: {\n COMPOSER_CACHE_DIR: await ensureCacheDir('composer'),\n COMPOSER_AUTH: getAuthJson(),\n },\n toolConstraints: [phpToolConstraint, composerToolConstraint],\n docker: {},\n };\n\n const commands: string[] = [];\n\n // Determine whether install is required before update\n if (requireComposerDependencyInstallation(lockfile)) {\n const preCmd = 'composer';\n const preArgs =\n 'install' + getComposerArguments(config, composerToolConstraint);\n logger.trace({ preCmd, preArgs }, 'composer pre-update command');\n commands.push('git stash -- composer.json');\n commands.push(`${preCmd} ${preArgs}`);\n commands.push('git stash pop || true');\n }\n\n const cmd = 'composer';\n let args: string;\n if (config.isLockFileMaintenance) {\n args = 'update';\n } else {\n args =\n (\n 'update ' +\n updatedDeps\n .map((dep) =>\n dep.newVersion\n ? quote(`${dep.depName}:${dep.newVersion}`)\n : quote(dep.depName!),\n )\n .filter(is.string)\n .map((dep) => quote(dep))\n .join(' ')\n ).trim() + ' --with-dependencies';\n }\n args += getComposerUpdateArguments(config, composerToolConstraint);\n logger.trace({ cmd, args }, 'composer command');\n commands.push(`${cmd} ${args}`);\n\n await exec(commands, execOptions);\n const status = await getRepoStatus();\n if (!status.modified.includes(lockFileName)) {\n return null;\n }\n logger.debug('Returning updated composer.lock');\n const res: UpdateArtifactsResult[] = [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: await readLocalFile(lockFileName),\n },\n },\n ];\n\n if (!commitVendorFiles) {\n return res;\n }\n\n logger.debug(`Committing vendor files in ${vendorDir}`);\n for (const f of [...status.modified, ...status.not_added]) {\n if (f.startsWith(vendorDir)) {\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n for (const f of status.deleted) {\n res.push({\n file: {\n type: 'deletion',\n path: f,\n },\n });\n }\n\n return res;\n } catch (err) {\n // istanbul ignore if\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n if (\n err.message?.includes(\n 'Your requirements could not be resolved to an installable set of packages.',\n )\n ) {\n logger.info('Composer requirements cannot be resolved');\n } else if (err.message?.includes('write error (disk full?)')) {\n throw new Error(SYSTEM_INSUFFICIENT_DISK_SPACE);\n } else {\n logger.debug({ err }, 'Failed to generate composer.lock');\n }\n return [\n {\n artifactError: {\n lockFile: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n}\n"]}
@@ -125,13 +125,13 @@ export declare const NamedRepo: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
125
125
  }, {
126
126
  name: z.ZodString;
127
127
  }>, "strip", z.ZodTypeAny, {
128
- name: string;
129
128
  type: "git";
130
129
  url: string;
131
- }, {
132
130
  name: string;
131
+ }, {
133
132
  type: "git" | "vcs";
134
133
  url: string;
134
+ name: string;
135
135
  }>, z.ZodObject<z.objectUtil.extendShape<{
136
136
  type: z.ZodLiteral<"path">;
137
137
  url: z.ZodString;
@@ -139,13 +139,13 @@ export declare const NamedRepo: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
139
139
  }, {
140
140
  name: z.ZodString;
141
141
  }>, "strip", z.ZodTypeAny, {
142
- name: string;
143
142
  type: "path";
144
143
  url: string;
145
- }, {
146
144
  name: string;
145
+ }, {
147
146
  type: "path";
148
147
  url: string;
148
+ name: string;
149
149
  }>, z.ZodObject<{
150
150
  type: z.ZodLiteral<"package">;
151
151
  }, "strip", z.ZodTypeAny, {
@@ -181,13 +181,13 @@ export declare const ReposRecord: z.ZodEffects<z.ZodEffects<z.ZodRecord<z.ZodStr
181
181
  } | {
182
182
  type: "package";
183
183
  } | {
184
- name: string;
185
184
  type: "git";
186
185
  url: string;
187
- } | {
188
186
  name: string;
187
+ } | {
189
188
  type: "path";
190
189
  url: string;
190
+ name: string;
191
191
  } | {
192
192
  type: "disable-packagist";
193
193
  })[], Record<string, any>>;
@@ -213,13 +213,13 @@ export declare const ReposArray: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodAny,
213
213
  } | {
214
214
  type: "package";
215
215
  } | {
216
- name: string;
217
216
  type: "git";
218
217
  url: string;
219
- } | {
220
218
  name: string;
219
+ } | {
221
220
  type: "path";
222
221
  url: string;
222
+ name: string;
223
223
  } | {
224
224
  type: "disable-packagist";
225
225
  })[], any[]>;
@@ -243,13 +243,13 @@ export declare const Repos: z.ZodEffects<z.ZodCatch<z.ZodDefault<z.ZodUnion<[z.Z
243
243
  } | {
244
244
  type: "package";
245
245
  } | {
246
- name: string;
247
246
  type: "git";
248
247
  url: string;
249
- } | {
250
248
  name: string;
249
+ } | {
251
250
  type: "path";
252
251
  url: string;
252
+ name: string;
253
253
  } | {
254
254
  type: "disable-packagist";
255
255
  })[], Record<string, any>>, z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodAny, "many">, ({
@@ -273,13 +273,13 @@ export declare const Repos: z.ZodEffects<z.ZodCatch<z.ZodDefault<z.ZodUnion<[z.Z
273
273
  } | {
274
274
  type: "package";
275
275
  } | {
276
- name: string;
277
276
  type: "git";
278
277
  url: string;
279
- } | {
280
278
  name: string;
279
+ } | {
281
280
  type: "path";
282
281
  url: string;
282
+ name: string;
283
283
  } | {
284
284
  type: "disable-packagist";
285
285
  })[], any[]>]>>>, {
@@ -334,13 +334,13 @@ export declare const PackageFile: z.ZodEffects<z.ZodObject<{
334
334
  } | {
335
335
  type: "package";
336
336
  } | {
337
- name: string;
338
337
  type: "git";
339
338
  url: string;
340
- } | {
341
339
  name: string;
340
+ } | {
342
341
  type: "path";
343
342
  url: string;
343
+ name: string;
344
344
  } | {
345
345
  type: "disable-packagist";
346
346
  })[], Record<string, any>>, z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodAny, "many">, ({
@@ -364,13 +364,13 @@ export declare const PackageFile: z.ZodEffects<z.ZodObject<{
364
364
  } | {
365
365
  type: "package";
366
366
  } | {
367
- name: string;
368
367
  type: "git";
369
368
  url: string;
370
- } | {
371
369
  name: string;
370
+ } | {
372
371
  type: "path";
373
372
  url: string;
373
+ name: string;
374
374
  } | {
375
375
  type: "disable-packagist";
376
376
  })[], any[]>]>>>, {
@@ -389,12 +389,12 @@ export declare const PackageFile: z.ZodEffects<z.ZodObject<{
389
389
  require: z.ZodCatch<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodAny>, Record<string, string>, Record<string, any>>>;
390
390
  'require-dev': z.ZodCatch<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodAny>, Record<string, string>, Record<string, any>>>;
391
391
  }, "strip", z.ZodTypeAny, {
392
- require: Record<string, string>;
393
392
  config: {
394
393
  platform: {
395
394
  php: string;
396
395
  };
397
396
  } | null;
397
+ require: Record<string, string>;
398
398
  repositories: {
399
399
  registryUrls: string[] | null;
400
400
  gitRepos: Record<string, {
@@ -412,8 +412,8 @@ export declare const PackageFile: z.ZodEffects<z.ZodObject<{
412
412
  type?: string | undefined;
413
413
  }, {
414
414
  type?: string | undefined;
415
- require?: unknown;
416
415
  config?: unknown;
416
+ require?: unknown;
417
417
  repositories?: unknown;
418
418
  'require-dev'?: unknown;
419
419
  }>, {
@@ -440,8 +440,8 @@ export declare const PackageFile: z.ZodEffects<z.ZodObject<{
440
440
  requireDev: Record<string, string>;
441
441
  }, {
442
442
  type?: string | undefined;
443
- require?: unknown;
444
443
  config?: unknown;
444
+ require?: unknown;
445
445
  repositories?: unknown;
446
446
  'require-dev'?: unknown;
447
447
  }>;
@@ -541,13 +541,13 @@ export declare const ComposerExtract: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.
541
541
  } | {
542
542
  type: "package";
543
543
  } | {
544
- name: string;
545
544
  type: "git";
546
545
  url: string;
547
- } | {
548
546
  name: string;
547
+ } | {
549
548
  type: "path";
550
549
  url: string;
550
+ name: string;
551
551
  } | {
552
552
  type: "disable-packagist";
553
553
  })[], Record<string, any>>, z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodAny, "many">, ({
@@ -571,13 +571,13 @@ export declare const ComposerExtract: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.
571
571
  } | {
572
572
  type: "package";
573
573
  } | {
574
- name: string;
575
574
  type: "git";
576
575
  url: string;
577
- } | {
578
576
  name: string;
577
+ } | {
579
578
  type: "path";
580
579
  url: string;
580
+ name: string;
581
581
  } | {
582
582
  type: "disable-packagist";
583
583
  })[], any[]>]>>>, {
@@ -596,12 +596,12 @@ export declare const ComposerExtract: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.
596
596
  require: z.ZodCatch<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodAny>, Record<string, string>, Record<string, any>>>;
597
597
  'require-dev': z.ZodCatch<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodAny>, Record<string, string>, Record<string, any>>>;
598
598
  }, "strip", z.ZodTypeAny, {
599
- require: Record<string, string>;
600
599
  config: {
601
600
  platform: {
602
601
  php: string;
603
602
  };
604
603
  } | null;
604
+ require: Record<string, string>;
605
605
  repositories: {
606
606
  registryUrls: string[] | null;
607
607
  gitRepos: Record<string, {
@@ -619,8 +619,8 @@ export declare const ComposerExtract: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.
619
619
  type?: string | undefined;
620
620
  }, {
621
621
  type?: string | undefined;
622
- require?: unknown;
623
622
  config?: unknown;
623
+ require?: unknown;
624
624
  repositories?: unknown;
625
625
  'require-dev'?: unknown;
626
626
  }>, {
@@ -647,8 +647,8 @@ export declare const ComposerExtract: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.
647
647
  requireDev: Record<string, string>;
648
648
  }, {
649
649
  type?: string | undefined;
650
- require?: unknown;
651
650
  config?: unknown;
651
+ require?: unknown;
652
652
  repositories?: unknown;
653
653
  'require-dev'?: unknown;
654
654
  }>>;
@@ -187,7 +187,7 @@ exports.ComposerExtract = zod_1.z
187
187
  .pipe(schema_utils_1.Json)
188
188
  .pipe(exports.Lockfile)
189
189
  .nullable()
190
- .catch((0, schema_utils_1.withDebugMessage)(null, 'Composer: lockfile parsing error')),
190
+ .catch((0, schema_utils_1.withDebugMessage)(null, 'Composer: does not match schema')),
191
191
  ])),
192
192
  }))
193
193
  .transform(({ file, lockfile, lockfileName }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/manager/composer/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAyC;AACzC,yCAAiD;AACjD,+CAA4C;AAC5C,6DAKoC;AACpC,oEAA0E;AAC1E,wDAA8D;AAC9D,8DAAoE;AACpE,0DAAiE;AACjE,wDAAkE;AAIrD,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B;;;;;;OAMG;IACH,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;CACzE,CAAC,CAAC;AAGU,QAAA,OAAO,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,KAAc,CAAC;IAC5D,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAGU,QAAA,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACvB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAGU,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAA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,GAAG,CAAC;gBAC9B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACf,SAAS;YACX,CAAC;YAED,GAAG,CAAC,UAAU,GAAG,+BAAmB,CAAC,EAAE,CAAC;YAExC,IAAI,YAAY,EAAE,CAAC;gBACjB,GAAG,CAAC,YAAY,GAAG,YAAY,CAAC;YAClC,CAAC;YAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,GAAG,GAA4C,EAAE,IAAI,EAAE,CAAC;IAE9D,IAAI,gBAAgB,EAAE,CAAC;QACrB,GAAG,CAAC,WAAW,GAAG,EAAE,gBAAgB,EAAE,CAAC;IACzC,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,GAAG,CAAC,oBAAoB,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;IAClD,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,GAAG,CAAC,SAAS,GAAG,CAAC,YAAY,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { logger } from '../../../logger';\nimport { readLocalFile } from '../../../util/fs';\nimport { regEx } from '../../../util/regex';\nimport {\n Json,\n LooseArray,\n LooseRecord,\n withDebugMessage,\n} from '../../../util/schema-utils';\nimport { BitbucketTagsDatasource } from '../../datasource/bitbucket-tags';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { GithubTagsDatasource } from '../../datasource/github-tags';\nimport { PackagistDatasource } from '../../datasource/packagist';\nimport { api as semverComposer } from '../../versioning/composer';\nimport type { PackageDependency, PackageFileContent } from '../types';\nimport type { ComposerManagerData } from './types';\n\nexport const ComposerRepo = z.object({\n type: z.literal('composer'),\n /**\n * The regUrl is expected to be a base URL. GitLab composer repository installation guide specifies\n * to use a base URL containing packages.json. Composer still works in this scenario by determining\n * whether to add / remove packages.json from the URL.\n *\n * See https://github.com/composer/composer/blob/750a92b4b7aecda0e5b2f9b963f1cb1421900675/src/Composer/Repository/ComposerRepository.php#L815\n */\n url: z.string().transform((url) => url.replace(/\\/packages\\.json$/, '')),\n});\nexport type ComposerRepo = z.infer<typeof ComposerRepo>;\n\nexport const GitRepo = z.object({\n type: z.enum(['vcs', 'git']).transform(() => 'git' as const),\n url: z.string(),\n name: z.string().optional(),\n});\nexport type GitRepo = z.infer<typeof GitRepo>;\n\nexport const PathRepo = z.object({\n type: z.literal('path'),\n url: z.string(),\n name: z.string().optional(),\n});\nexport type PathRepo = z.infer<typeof PathRepo>;\n\nexport const PackageRepo = z.object({\n type: z.literal('package'),\n});\n\nexport const Repo = z.discriminatedUnion('type', [\n ComposerRepo,\n GitRepo,\n PathRepo,\n PackageRepo,\n]);\nexport type Repo = z.infer<typeof ComposerRepo>;\n\nexport const NamedRepo = z.discriminatedUnion('type', [\n ComposerRepo,\n GitRepo.extend({ name: z.string() }),\n PathRepo.extend({ name: z.string() }),\n PackageRepo,\n]);\nexport type NamedRepo = z.infer<typeof NamedRepo>;\n\nconst DisablePackagist = z.object({ type: z.literal('disable-packagist') });\nexport type DisablePackagist = z.infer<typeof DisablePackagist>;\n\nconst bitbucketUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)bitbucket\\.org[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\n\nexport const ReposRecord = LooseRecord(z.union([Repo, z.literal(false)]), {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Composer: error parsing repositories object');\n },\n}).transform((repos) => {\n const result: (NamedRepo | DisablePackagist)[] = [];\n for (const [name, repo] of Object.entries(repos)) {\n if (repo === false) {\n if (name === 'packagist' || name === 'packagist.org') {\n result.push({ type: 'disable-packagist' });\n }\n continue;\n }\n\n if (repo.type === 'path' || repo.type === 'git') {\n result.push({ name, ...repo });\n continue;\n }\n\n if (repo.type === 'composer') {\n result.push(repo);\n continue;\n }\n }\n\n return result;\n});\nexport type ReposRecord = z.infer<typeof ReposRecord>;\n\nexport const ReposArray = LooseArray(\n z.union([\n Repo,\n z\n .union([\n z.object({ packagist: z.literal(false) }),\n z.object({ 'packagist.org': z.literal(false) }),\n ])\n .transform((): DisablePackagist => ({ type: 'disable-packagist' })),\n ]),\n {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Composer: error parsing repositories array');\n },\n },\n).transform((repos) => {\n const result: (NamedRepo | DisablePackagist)[] = [];\n for (let idx = 0; idx < repos.length; idx++) {\n const repo = repos[idx];\n if (repo.type === 'path' || repo.type === 'git') {\n result.push({ name: `__${idx}`, ...repo });\n } else {\n result.push(repo);\n }\n }\n return result;\n});\nexport type ReposArray = z.infer<typeof ReposArray>;\n\nexport const Repos = z\n .union([ReposRecord, ReposArray])\n .default([]) // Prevents warnings for packages without repositories field\n .catch(withDebugMessage([], 'Composer: invalid \"repositories\" field'))\n .transform((repos) => {\n let packagist = true;\n const repoUrls: string[] = [];\n const gitRepos: Record<string, GitRepo> = {};\n const pathRepos: Record<string, PathRepo> = {};\n\n for (const repo of repos) {\n if (repo.type === 'composer') {\n repoUrls.push(repo.url);\n } else if (repo.type === 'git') {\n gitRepos[repo.name] = repo;\n } else if (repo.type === 'path') {\n pathRepos[repo.name] = repo;\n } else if (repo.type === 'disable-packagist') {\n packagist = false;\n }\n }\n\n if (packagist && repoUrls.length) {\n repoUrls.push('https://packagist.org');\n }\n const registryUrls = repoUrls.length ? repoUrls : null;\n\n return { registryUrls, gitRepos, pathRepos };\n });\nexport type Repos = z.infer<typeof Repos>;\n\nconst RequireDefs = LooseRecord(z.string().transform((x) => x.trim())).catch(\n {},\n);\n\nexport const PackageFile = z\n .object({\n type: z.string().optional(),\n config: z\n .object({\n platform: z.object({\n php: z.string(),\n }),\n })\n .nullable()\n .catch(null),\n repositories: Repos,\n require: RequireDefs,\n 'require-dev': RequireDefs,\n })\n .transform(\n ({\n type: composerJsonType,\n config,\n repositories,\n require,\n 'require-dev': requireDev,\n }) => ({\n composerJsonType,\n config,\n repositories,\n require,\n requireDev,\n }),\n );\nexport type PackageFile = z.infer<typeof PackageFile>;\n\nconst LockedPackage = z.object({\n name: z.string(),\n version: z.string(),\n});\ntype LockedPackage = z.infer<typeof LockedPackage>;\n\nexport const Lockfile = z\n .object({\n 'plugin-api-version': z.string().optional(),\n packages: LooseArray(LockedPackage).catch([]),\n 'packages-dev': LooseArray(LockedPackage).catch([]),\n })\n .transform(\n ({\n 'plugin-api-version': pluginApiVersion,\n packages,\n 'packages-dev': packagesDev,\n }) => ({ pluginApiVersion, packages, packagesDev }),\n );\nexport type Lockfile = z.infer<typeof Lockfile>;\n\nexport const ComposerExtract = z\n .object({\n content: z.string(),\n fileName: z.string(),\n })\n .transform(({ content, fileName }) => {\n const lockfileName = fileName.replace(/\\.json$/, '.lock');\n return {\n file: content,\n lockfileName,\n lockfile: lockfileName,\n };\n })\n .pipe(\n z.object({\n file: Json.pipe(PackageFile),\n lockfileName: z.string(),\n lockfile: z\n .string()\n .transform((lockfileName) => readLocalFile(lockfileName, 'utf8'))\n .pipe(\n z.union([\n z.null(),\n z\n .string()\n .pipe(Json)\n .pipe(Lockfile)\n .nullable()\n .catch(\n withDebugMessage(null, 'Composer: lockfile parsing error'),\n ),\n ]),\n ),\n }),\n )\n .transform(({ file, lockfile, lockfileName }) => {\n const { composerJsonType, require, requireDev } = file;\n const { registryUrls, gitRepos, pathRepos } = file.repositories;\n\n const deps: PackageDependency[] = [];\n\n const profiles = [\n {\n depType: 'require',\n req: require,\n locked: lockfile?.packages ?? [],\n },\n {\n depType: 'require-dev',\n req: requireDev,\n locked: lockfile?.packagesDev ?? [],\n },\n ];\n\n for (const { depType, req, locked } of profiles) {\n for (const [depName, currentValue] of Object.entries(req)) {\n if (depName === 'php') {\n deps.push({\n depType,\n depName,\n currentValue,\n datasource: GithubTagsDatasource.id,\n packageName: 'containerbase/php-prebuild',\n });\n continue;\n }\n\n if (pathRepos[depName]) {\n deps.push({\n depType,\n depName,\n currentValue,\n skipReason: 'path-dependency',\n });\n continue;\n }\n\n const dep: PackageDependency = {\n depType,\n depName,\n currentValue,\n };\n\n if (!depName.includes('/')) {\n dep.skipReason = 'unsupported';\n }\n\n const lockedDep = locked.find((item) => item.name === depName);\n if (lockedDep && semverComposer.isVersion(lockedDep.version)) {\n dep.lockedVersion = lockedDep.version.replace(regEx(/^v/i), '');\n }\n\n const gitRepo = gitRepos[depName];\n if (gitRepo) {\n const bitbucketMatchGroups = bitbucketUrlRegex.exec(\n gitRepo.url,\n )?.groups;\n\n if (bitbucketMatchGroups) {\n dep.datasource = BitbucketTagsDatasource.id;\n dep.packageName = bitbucketMatchGroups.packageName;\n deps.push(dep);\n continue;\n }\n\n dep.datasource = GitTagsDatasource.id;\n dep.packageName = gitRepo.url;\n deps.push(dep);\n continue;\n }\n\n dep.datasource = PackagistDatasource.id;\n\n if (registryUrls) {\n dep.registryUrls = registryUrls;\n }\n\n deps.push(dep);\n }\n }\n\n if (!deps.length) {\n return null;\n }\n\n const res: PackageFileContent<ComposerManagerData> = { deps };\n\n if (composerJsonType) {\n res.managerData = { composerJsonType };\n }\n\n if (require.php) {\n res.extractedConstraints = { php: require.php };\n }\n\n if (lockfile) {\n res.lockFiles = [lockfileName];\n }\n\n return res;\n });\nexport type ComposerExtract = z.infer<typeof ComposerExtract>;\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/manager/composer/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAyC;AACzC,yCAAiD;AACjD,+CAA4C;AAC5C,6DAKoC;AACpC,oEAA0E;AAC1E,wDAA8D;AAC9D,8DAAoE;AACpE,0DAAiE;AACjE,wDAAkE;AAIrD,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,OAAC,CAAC,OAAO,CAA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AI,EAAE,CAAC;IAE9D,IAAI,gBAAgB,EAAE,CAAC;QACrB,GAAG,CAAC,WAAW,GAAG,EAAE,gBAAgB,EAAE,CAAC;IACzC,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,GAAG,CAAC,oBAAoB,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;IAClD,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,GAAG,CAAC,SAAS,GAAG,CAAC,YAAY,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { logger } from '../../../logger';\nimport { readLocalFile } from '../../../util/fs';\nimport { regEx } from '../../../util/regex';\nimport {\n Json,\n LooseArray,\n LooseRecord,\n withDebugMessage,\n} from '../../../util/schema-utils';\nimport { BitbucketTagsDatasource } from '../../datasource/bitbucket-tags';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { GithubTagsDatasource } from '../../datasource/github-tags';\nimport { PackagistDatasource } from '../../datasource/packagist';\nimport { api as semverComposer } from '../../versioning/composer';\nimport type { PackageDependency, PackageFileContent } from '../types';\nimport type { ComposerManagerData } from './types';\n\nexport const ComposerRepo = z.object({\n type: z.literal('composer'),\n /**\n * The regUrl is expected to be a base URL. GitLab composer repository installation guide specifies\n * to use a base URL containing packages.json. Composer still works in this scenario by determining\n * whether to add / remove packages.json from the URL.\n *\n * See https://github.com/composer/composer/blob/750a92b4b7aecda0e5b2f9b963f1cb1421900675/src/Composer/Repository/ComposerRepository.php#L815\n */\n url: z.string().transform((url) => url.replace(/\\/packages\\.json$/, '')),\n});\nexport type ComposerRepo = z.infer<typeof ComposerRepo>;\n\nexport const GitRepo = z.object({\n type: z.enum(['vcs', 'git']).transform(() => 'git' as const),\n url: z.string(),\n name: z.string().optional(),\n});\nexport type GitRepo = z.infer<typeof GitRepo>;\n\nexport const PathRepo = z.object({\n type: z.literal('path'),\n url: z.string(),\n name: z.string().optional(),\n});\nexport type PathRepo = z.infer<typeof PathRepo>;\n\nexport const PackageRepo = z.object({\n type: z.literal('package'),\n});\n\nexport const Repo = z.discriminatedUnion('type', [\n ComposerRepo,\n GitRepo,\n PathRepo,\n PackageRepo,\n]);\nexport type Repo = z.infer<typeof ComposerRepo>;\n\nexport const NamedRepo = z.discriminatedUnion('type', [\n ComposerRepo,\n GitRepo.extend({ name: z.string() }),\n PathRepo.extend({ name: z.string() }),\n PackageRepo,\n]);\nexport type NamedRepo = z.infer<typeof NamedRepo>;\n\nconst DisablePackagist = z.object({ type: z.literal('disable-packagist') });\nexport type DisablePackagist = z.infer<typeof DisablePackagist>;\n\nconst bitbucketUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)bitbucket\\.org[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\n\nexport const ReposRecord = LooseRecord(z.union([Repo, z.literal(false)]), {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Composer: error parsing repositories object');\n },\n}).transform((repos) => {\n const result: (NamedRepo | DisablePackagist)[] = [];\n for (const [name, repo] of Object.entries(repos)) {\n if (repo === false) {\n if (name === 'packagist' || name === 'packagist.org') {\n result.push({ type: 'disable-packagist' });\n }\n continue;\n }\n\n if (repo.type === 'path' || repo.type === 'git') {\n result.push({ name, ...repo });\n continue;\n }\n\n if (repo.type === 'composer') {\n result.push(repo);\n continue;\n }\n }\n\n return result;\n});\nexport type ReposRecord = z.infer<typeof ReposRecord>;\n\nexport const ReposArray = LooseArray(\n z.union([\n Repo,\n z\n .union([\n z.object({ packagist: z.literal(false) }),\n z.object({ 'packagist.org': z.literal(false) }),\n ])\n .transform((): DisablePackagist => ({ type: 'disable-packagist' })),\n ]),\n {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Composer: error parsing repositories array');\n },\n },\n).transform((repos) => {\n const result: (NamedRepo | DisablePackagist)[] = [];\n for (let idx = 0; idx < repos.length; idx++) {\n const repo = repos[idx];\n if (repo.type === 'path' || repo.type === 'git') {\n result.push({ name: `__${idx}`, ...repo });\n } else {\n result.push(repo);\n }\n }\n return result;\n});\nexport type ReposArray = z.infer<typeof ReposArray>;\n\nexport const Repos = z\n .union([ReposRecord, ReposArray])\n .default([]) // Prevents warnings for packages without repositories field\n .catch(withDebugMessage([], 'Composer: invalid \"repositories\" field'))\n .transform((repos) => {\n let packagist = true;\n const repoUrls: string[] = [];\n const gitRepos: Record<string, GitRepo> = {};\n const pathRepos: Record<string, PathRepo> = {};\n\n for (const repo of repos) {\n if (repo.type === 'composer') {\n repoUrls.push(repo.url);\n } else if (repo.type === 'git') {\n gitRepos[repo.name] = repo;\n } else if (repo.type === 'path') {\n pathRepos[repo.name] = repo;\n } else if (repo.type === 'disable-packagist') {\n packagist = false;\n }\n }\n\n if (packagist && repoUrls.length) {\n repoUrls.push('https://packagist.org');\n }\n const registryUrls = repoUrls.length ? repoUrls : null;\n\n return { registryUrls, gitRepos, pathRepos };\n });\nexport type Repos = z.infer<typeof Repos>;\n\nconst RequireDefs = LooseRecord(z.string().transform((x) => x.trim())).catch(\n {},\n);\n\nexport const PackageFile = z\n .object({\n type: z.string().optional(),\n config: z\n .object({\n platform: z.object({\n php: z.string(),\n }),\n })\n .nullable()\n .catch(null),\n repositories: Repos,\n require: RequireDefs,\n 'require-dev': RequireDefs,\n })\n .transform(\n ({\n type: composerJsonType,\n config,\n repositories,\n require,\n 'require-dev': requireDev,\n }) => ({\n composerJsonType,\n config,\n repositories,\n require,\n requireDev,\n }),\n );\nexport type PackageFile = z.infer<typeof PackageFile>;\n\nconst LockedPackage = z.object({\n name: z.string(),\n version: z.string(),\n});\ntype LockedPackage = z.infer<typeof LockedPackage>;\n\nexport const Lockfile = z\n .object({\n 'plugin-api-version': z.string().optional(),\n packages: LooseArray(LockedPackage).catch([]),\n 'packages-dev': LooseArray(LockedPackage).catch([]),\n })\n .transform(\n ({\n 'plugin-api-version': pluginApiVersion,\n packages,\n 'packages-dev': packagesDev,\n }) => ({ pluginApiVersion, packages, packagesDev }),\n );\nexport type Lockfile = z.infer<typeof Lockfile>;\n\nexport const ComposerExtract = z\n .object({\n content: z.string(),\n fileName: z.string(),\n })\n .transform(({ content, fileName }) => {\n const lockfileName = fileName.replace(/\\.json$/, '.lock');\n return {\n file: content,\n lockfileName,\n lockfile: lockfileName,\n };\n })\n .pipe(\n z.object({\n file: Json.pipe(PackageFile),\n lockfileName: z.string(),\n lockfile: z\n .string()\n .transform((lockfileName) => readLocalFile(lockfileName, 'utf8'))\n .pipe(\n z.union([\n z.null(),\n z\n .string()\n .pipe(Json)\n .pipe(Lockfile)\n .nullable()\n .catch(withDebugMessage(null, 'Composer: does not match schema')),\n ]),\n ),\n }),\n )\n .transform(({ file, lockfile, lockfileName }) => {\n const { composerJsonType, require, requireDev } = file;\n const { registryUrls, gitRepos, pathRepos } = file.repositories;\n\n const deps: PackageDependency[] = [];\n\n const profiles = [\n {\n depType: 'require',\n req: require,\n locked: lockfile?.packages ?? [],\n },\n {\n depType: 'require-dev',\n req: requireDev,\n locked: lockfile?.packagesDev ?? [],\n },\n ];\n\n for (const { depType, req, locked } of profiles) {\n for (const [depName, currentValue] of Object.entries(req)) {\n if (depName === 'php') {\n deps.push({\n depType,\n depName,\n currentValue,\n datasource: GithubTagsDatasource.id,\n packageName: 'containerbase/php-prebuild',\n });\n continue;\n }\n\n if (pathRepos[depName]) {\n deps.push({\n depType,\n depName,\n currentValue,\n skipReason: 'path-dependency',\n });\n continue;\n }\n\n const dep: PackageDependency = {\n depType,\n depName,\n currentValue,\n };\n\n if (!depName.includes('/')) {\n dep.skipReason = 'unsupported';\n }\n\n const lockedDep = locked.find((item) => item.name === depName);\n if (lockedDep && semverComposer.isVersion(lockedDep.version)) {\n dep.lockedVersion = lockedDep.version.replace(regEx(/^v/i), '');\n }\n\n const gitRepo = gitRepos[depName];\n if (gitRepo) {\n const bitbucketMatchGroups = bitbucketUrlRegex.exec(\n gitRepo.url,\n )?.groups;\n\n if (bitbucketMatchGroups) {\n dep.datasource = BitbucketTagsDatasource.id;\n dep.packageName = bitbucketMatchGroups.packageName;\n deps.push(dep);\n continue;\n }\n\n dep.datasource = GitTagsDatasource.id;\n dep.packageName = gitRepo.url;\n deps.push(dep);\n continue;\n }\n\n dep.datasource = PackagistDatasource.id;\n\n if (registryUrls) {\n dep.registryUrls = registryUrls;\n }\n\n deps.push(dep);\n }\n }\n\n if (!deps.length) {\n return null;\n }\n\n const res: PackageFileContent<ComposerManagerData> = { deps };\n\n if (composerJsonType) {\n res.managerData = { composerJsonType };\n }\n\n if (require.php) {\n res.extractedConstraints = { php: require.php };\n }\n\n if (lockfile) {\n res.lockFiles = [lockfileName];\n }\n\n return res;\n });\nexport type ComposerExtract = z.infer<typeof ComposerExtract>;\n"]}
@@ -5,6 +5,7 @@ import type { UpdateArtifactsConfig } from '../types';
5
5
  import type { Lockfile, PackageFile } from './schema';
6
6
  export { composerVersioningId };
7
7
  export declare function getComposerArguments(config: UpdateArtifactsConfig, toolConstraint: ToolConstraint): string;
8
+ export declare function getComposerUpdateArguments(config: UpdateArtifactsConfig, toolConstraint: ToolConstraint): string;
8
9
  export declare function getPhpConstraint(constraints: Record<string, string>): string | null;
9
10
  export declare function requireComposerDependencyInstallation({ packages, packagesDev, }: Lockfile): boolean;
10
11
  export declare function extractConstraints({ config, require, requireDev }: PackageFile, { pluginApiVersion }: Lockfile): Record<string, string>;
@@ -2,11 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.composerVersioningId = void 0;
4
4
  exports.getComposerArguments = getComposerArguments;
5
+ exports.getComposerUpdateArguments = getComposerUpdateArguments;
5
6
  exports.getPhpConstraint = getPhpConstraint;
6
7
  exports.requireComposerDependencyInstallation = requireComposerDependencyInstallation;
7
8
  exports.extractConstraints = extractConstraints;
8
9
  exports.isArtifactAuthEnabled = isArtifactAuthEnabled;
10
+ const tslib_1 = require("tslib");
9
11
  // TODO: types (#22198)
12
+ const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
10
13
  const shlex_1 = require("shlex");
11
14
  const global_1 = require("../../../config/global");
12
15
  const logger_1 = require("../../../logger");
@@ -18,12 +21,13 @@ function getComposerArguments(config, toolConstraint) {
18
21
  let args = '';
19
22
  if (config.composerIgnorePlatformReqs) {
20
23
  if (config.composerIgnorePlatformReqs.length === 0) {
21
- // TODO: toolConstraint.constraint can be null or undefined? (#22198)
22
- const major = composer_1.api.getMajor(toolConstraint.constraint);
23
- const minor = composer_1.api.getMinor(toolConstraint.constraint);
24
- args += composer_1.api.matches(`${major}.${minor}`, '^2.2')
25
- ? " --ignore-platform-req='ext-*' --ignore-platform-req='lib-*'"
26
- : ' --ignore-platform-reqs';
24
+ if (is_1.default.string(toolConstraint.constraint) &&
25
+ composer_1.api.intersects(toolConstraint.constraint, '^2.2')) {
26
+ args += " --ignore-platform-req='ext-*' --ignore-platform-req='lib-*'";
27
+ }
28
+ else {
29
+ args += ' --ignore-platform-reqs';
30
+ }
27
31
  }
28
32
  else {
29
33
  config.composerIgnorePlatformReqs.forEach((req) => {
@@ -40,6 +44,14 @@ function getComposerArguments(config, toolConstraint) {
40
44
  }
41
45
  return args;
42
46
  }
47
+ function getComposerUpdateArguments(config, toolConstraint) {
48
+ let args = getComposerArguments(config, toolConstraint);
49
+ if (is_1.default.string(toolConstraint.constraint) &&
50
+ composer_1.api.intersects(toolConstraint.constraint, '>=2.7')) {
51
+ args += ' --minimal-changes';
52
+ }
53
+ return args;
54
+ }
43
55
  function getPhpConstraint(constraints) {
44
56
  const { php } = constraints;
45
57
  if (php) {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/modules/manager/composer/utils.ts"],"names":[],"mappings":";;;AAeA,oDA+BC;AAED,4CAWC;AAED,sFAQC;AAED,gDA0CC;AAED,sDAEC;AArHD,uBAAuB;AACvB,iCAA8B;AAC9B,mDAAsD;AACtD,4CAAyC;AAGzC,iDAAoD;AACpD,wDAA4E;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Y,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACtE,CAAC","sourcesContent":["// TODO: types (#22198)\nimport { quote } from 'shlex';\nimport { GlobalConfig } from '../../../config/global';\nimport { logger } from '../../../logger';\nimport type { CombinedHostRule } from '../../../types';\nimport type { ToolConstraint } from '../../../util/exec/types';\nimport { coerceNumber } from '../../../util/number';\nimport { api, id as composerVersioningId } from '../../versioning/composer';\nimport type { UpdateArtifactsConfig } from '../types';\nimport type { Lockfile, PackageFile } from './schema';\n\nexport { composerVersioningId };\n\nconst depRequireInstall = new Set(['symfony/flex']);\n\nexport function getComposerArguments(\n config: UpdateArtifactsConfig,\n toolConstraint: ToolConstraint,\n): string {\n let args = '';\n\n if (config.composerIgnorePlatformReqs) {\n if (config.composerIgnorePlatformReqs.length === 0) {\n // TODO: toolConstraint.constraint can be null or undefined? (#22198)\n const major = api.getMajor(toolConstraint.constraint!);\n const minor = api.getMinor(toolConstraint.constraint!);\n args += api.matches(`${major}.${minor}`, '^2.2')\n ? \" --ignore-platform-req='ext-*' --ignore-platform-req='lib-*'\"\n : ' --ignore-platform-reqs';\n } else {\n config.composerIgnorePlatformReqs.forEach((req) => {\n args += ' --ignore-platform-req ' + quote(req);\n });\n }\n }\n\n args += ' --no-ansi --no-interaction';\n if (!GlobalConfig.get('allowScripts') || config.ignoreScripts) {\n args += ' --no-scripts --no-autoloader';\n }\n\n if (!GlobalConfig.get('allowPlugins') || config.ignorePlugins) {\n args += ' --no-plugins';\n }\n\n return args;\n}\n\nexport function getPhpConstraint(\n constraints: Record<string, string>,\n): string | null {\n const { php } = constraints;\n\n if (php) {\n logger.debug('Using php constraint from config');\n return php;\n }\n\n return null;\n}\n\nexport function requireComposerDependencyInstallation({\n packages,\n packagesDev,\n}: Lockfile): boolean {\n return (\n packages.some((p) => depRequireInstall.has(p.name)) === true ||\n packagesDev.some((p) => depRequireInstall.has(p.name)) === true\n );\n}\n\nexport function extractConstraints(\n { config, require, requireDev }: PackageFile,\n { pluginApiVersion }: Lockfile,\n): Record<string, string> {\n const res: Record<string, string> = { composer: '1.*' };\n\n // extract php\n const phpVersion = config?.platform.php;\n if (phpVersion) {\n const major = api.getMajor(phpVersion);\n const minor = coerceNumber(api.getMinor(phpVersion));\n const patch = coerceNumber(api.getPatch(phpVersion));\n res.php = `<=${major}.${minor}.${patch}`;\n } else if (require.php) {\n res.php = require.php;\n }\n\n // extract direct composer dependency\n if (require['composer/composer']) {\n res.composer = require['composer/composer'];\n } else if (requireDev['composer/composer']) {\n res.composer = requireDev['composer/composer'];\n }\n // composer platform package\n else if (require.composer) {\n res.composer = require.composer;\n } else if (requireDev.composer) {\n res.composer = requireDev.composer;\n }\n // check last used composer version\n else if (pluginApiVersion) {\n const major = api.getMajor(pluginApiVersion);\n const minor = api.getMinor(pluginApiVersion);\n res.composer = `^${major}.${minor}`;\n }\n // check composer api dependency\n else if (require['composer-runtime-api']) {\n const major = api.getMajor(require['composer-runtime-api']);\n const minor = api.getMinor(require['composer-runtime-api']);\n res.composer = `^${major}.${minor}`;\n }\n return res;\n}\n\nexport function isArtifactAuthEnabled(rule: CombinedHostRule): boolean {\n return !rule.artifactAuth || rule.artifactAuth.includes('composer');\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/modules/manager/composer/utils.ts"],"names":[],"mappings":";;;AAgBA,oDAiCC;AAED,gEAcC;AAED,4CAWC;AAED,sFAQC;AAED,gDA0CC;AAED,sDAEC;;AAxID,uBAAuB;AACvB,kEAAkC;AAClC,iCAA8B;AAC9B,mDAAsD;AACtD,4CAAyC;AAGzC,iDAAoD;AACpD,wDAA4E;AAInE,qGAJW,aAAoB,OAIX;AAE7B,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;AAEpD,SAAgB,oBAAoB,CAClC,MAA6B,EAC7B,cAA8B;IAE9B,IAAI,IAAI,GAAG,EAAE,CAAC;IAEd,IAAI,MAAM,CAAC,0BAA0B,EA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IAAI,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACtE,CAAC","sourcesContent":["// TODO: types (#22198)\nimport is from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { GlobalConfig } from '../../../config/global';\nimport { logger } from '../../../logger';\nimport type { CombinedHostRule } from '../../../types';\nimport type { ToolConstraint } from '../../../util/exec/types';\nimport { coerceNumber } from '../../../util/number';\nimport { api, id as composerVersioningId } from '../../versioning/composer';\nimport type { UpdateArtifactsConfig } from '../types';\nimport type { Lockfile, PackageFile } from './schema';\n\nexport { composerVersioningId };\n\nconst depRequireInstall = new Set(['symfony/flex']);\n\nexport function getComposerArguments(\n config: UpdateArtifactsConfig,\n toolConstraint: ToolConstraint,\n): string {\n let args = '';\n\n if (config.composerIgnorePlatformReqs) {\n if (config.composerIgnorePlatformReqs.length === 0) {\n if (\n is.string(toolConstraint.constraint) &&\n api.intersects!(toolConstraint.constraint, '^2.2')\n ) {\n args += \" --ignore-platform-req='ext-*' --ignore-platform-req='lib-*'\";\n } else {\n args += ' --ignore-platform-reqs';\n }\n } else {\n config.composerIgnorePlatformReqs.forEach((req) => {\n args += ' --ignore-platform-req ' + quote(req);\n });\n }\n }\n\n args += ' --no-ansi --no-interaction';\n if (!GlobalConfig.get('allowScripts') || config.ignoreScripts) {\n args += ' --no-scripts --no-autoloader';\n }\n\n if (!GlobalConfig.get('allowPlugins') || config.ignorePlugins) {\n args += ' --no-plugins';\n }\n\n return args;\n}\n\nexport function getComposerUpdateArguments(\n config: UpdateArtifactsConfig,\n toolConstraint: ToolConstraint,\n): string {\n let args = getComposerArguments(config, toolConstraint);\n\n if (\n is.string(toolConstraint.constraint) &&\n api.intersects!(toolConstraint.constraint, '>=2.7')\n ) {\n args += ' --minimal-changes';\n }\n\n return args;\n}\n\nexport function getPhpConstraint(\n constraints: Record<string, string>,\n): string | null {\n const { php } = constraints;\n\n if (php) {\n logger.debug('Using php constraint from config');\n return php;\n }\n\n return null;\n}\n\nexport function requireComposerDependencyInstallation({\n packages,\n packagesDev,\n}: Lockfile): boolean {\n return (\n packages.some((p) => depRequireInstall.has(p.name)) === true ||\n packagesDev.some((p) => depRequireInstall.has(p.name)) === true\n );\n}\n\nexport function extractConstraints(\n { config, require, requireDev }: PackageFile,\n { pluginApiVersion }: Lockfile,\n): Record<string, string> {\n const res: Record<string, string> = { composer: '1.*' };\n\n // extract php\n const phpVersion = config?.platform.php;\n if (phpVersion) {\n const major = api.getMajor(phpVersion);\n const minor = coerceNumber(api.getMinor(phpVersion));\n const patch = coerceNumber(api.getPatch(phpVersion));\n res.php = `<=${major}.${minor}.${patch}`;\n } else if (require.php) {\n res.php = require.php;\n }\n\n // extract direct composer dependency\n if (require['composer/composer']) {\n res.composer = require['composer/composer'];\n } else if (requireDev['composer/composer']) {\n res.composer = requireDev['composer/composer'];\n }\n // composer platform package\n else if (require.composer) {\n res.composer = require.composer;\n } else if (requireDev.composer) {\n res.composer = requireDev.composer;\n }\n // check last used composer version\n else if (pluginApiVersion) {\n const major = api.getMajor(pluginApiVersion);\n const minor = api.getMinor(pluginApiVersion);\n res.composer = `^${major}.${minor}`;\n }\n // check composer api dependency\n else if (require['composer-runtime-api']) {\n const major = api.getMajor(require['composer-runtime-api']);\n const minor = api.getMinor(require['composer-runtime-api']);\n res.composer = `^${major}.${minor}`;\n }\n return res;\n}\n\nexport function isArtifactAuthEnabled(rule: CombinedHostRule): boolean {\n return !rule.artifactAuth || rule.artifactAuth.includes('composer');\n}\n"]}
@@ -44,7 +44,6 @@ async function updateArtifacts({ packageFileName, updatedDeps, config, }) {
44
44
  const execOptions = {
45
45
  cwdFile: packageFileName,
46
46
  docker: {},
47
- userConfiguredEnv: config.env,
48
47
  extraEnv: gitEnv,
49
48
  toolConstraints: [
50
49
  {
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/copier/artifacts.ts"],"names":[],"mappings":";;AAqDA,0CAgHC;;AArKD,iCA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AC,CAAC;QACH,GAAG,CAAC,IAAI,CAAC;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,CAAC,CAAC,EAAE;gBACV,QAAQ,EAAE,MAAM,IAAA,kBAAa,EAAC,CAAC,CAAC,EAAE,CAAC;aACpC;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { quote } from 'shlex';\nimport upath from 'upath';\nimport { GlobalConfig } from '../../../config/global';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions } from '../../../util/exec/types';\nimport { readLocalFile } from '../../../util/fs';\nimport { getRepoStatus } from '../../../util/git';\nimport { getGitEnvironmentVariables } from '../../../util/git/auth';\nimport type {\n UpdateArtifact,\n UpdateArtifactsConfig,\n UpdateArtifactsResult,\n} from '../types';\nimport {\n getCopierVersionConstraint,\n getPythonVersionConstraint,\n} from './utils';\n\nconst DEFAULT_COMMAND_OPTIONS = ['--skip-answered', '--defaults'];\n\nfunction buildCommand(\n config: UpdateArtifactsConfig,\n packageFileName: string,\n newVersion: string,\n): string {\n const command = ['copier', 'update', ...DEFAULT_COMMAND_OPTIONS];\n if (GlobalConfig.get('allowScripts') && !config.ignoreScripts) {\n command.push('--trust');\n }\n command.push(\n '--answers-file',\n quote(upath.basename(packageFileName)),\n '--vcs-ref',\n quote(newVersion),\n );\n return command.join(' ');\n}\n\nfunction artifactError(\n packageFileName: string,\n message: string,\n): UpdateArtifactsResult[] {\n return [\n {\n artifactError: {\n lockFile: packageFileName,\n stderr: message,\n },\n },\n ];\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n if (!updatedDeps || updatedDeps.length !== 1) {\n // Each answers file (~ packageFileName) has exactly one dependency to update.\n return artifactError(\n packageFileName,\n `Unexpected number of dependencies: ${updatedDeps.length} (should be 1)`,\n );\n }\n\n const newVersion = updatedDeps[0]?.newVersion ?? updatedDeps[0]?.newValue;\n if (!newVersion) {\n return artifactError(\n packageFileName,\n 'Missing copier template version to update to',\n );\n }\n\n const command = buildCommand(config, packageFileName, newVersion);\n const gitEnv = getGitEnvironmentVariables(['git-tags']);\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n docker: {},\n userConfiguredEnv: config.env,\n extraEnv: gitEnv,\n toolConstraints: [\n {\n toolName: 'python',\n constraint: getPythonVersionConstraint(config),\n },\n {\n toolName: 'copier',\n constraint: getCopierVersionConstraint(config),\n },\n ],\n };\n try {\n await exec(command, execOptions);\n } catch (err) {\n logger.debug({ err }, `Failed to update copier template: ${err.message}`);\n return artifactError(packageFileName, err.message);\n }\n\n const status = await getRepoStatus();\n // If the answers file didn't change, Copier did not update anything.\n if (!status.modified.includes(packageFileName)) {\n return null;\n }\n\n if (status.conflicted.length > 0) {\n // Sometimes, Copier erroneously reports conflicts.\n const msg =\n `Updating the Copier template yielded ${status.conflicted.length} merge conflicts. ` +\n 'Please check the proposed changes carefully! Conflicting files:\\n * ' +\n status.conflicted.join('\\n * ');\n logger.debug({ packageFileName, depName: updatedDeps[0]?.depName }, msg);\n }\n\n const res: UpdateArtifactsResult[] = [];\n\n for (const f of [\n ...status.modified,\n ...status.not_added,\n ...status.conflicted,\n ]) {\n const fileRes: UpdateArtifactsResult = {\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n };\n if (status.conflicted.includes(f)) {\n // Make the reviewer aware of the conflicts.\n // This will be posted in a comment.\n fileRes.notice = {\n file: f,\n message:\n 'This file had merge conflicts. Please check the proposed changes carefully!',\n };\n }\n res.push(fileRes);\n }\n for (const f of status.deleted) {\n res.push({\n file: {\n type: 'deletion',\n path: f,\n },\n });\n }\n // `git status` might detect a rename, which is then not contained\n // in not_added/deleted. Ensure we respect renames as well if they happen.\n for (const f of status.renamed) {\n res.push({\n file: {\n type: 'deletion',\n path: f.from,\n },\n });\n res.push({\n file: {\n type: 'addition',\n path: f.to,\n contents: await readLocalFile(f.to),\n },\n });\n }\n return res;\n}\n"]}
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/copier/artifacts.ts"],"names":[],"mappings":";;AAqDA,0CA+GC;;AApKD,iCAA8B;AAC9B,0DAA0B;AAC1B,mDAAsD;AACtD,4CAAyC;AACzC,6CAA0C;AAE1C,yCAAiD;AACjD,2CAAkD;AAClD,iDAAoE;AAMpE,mCAGiB;AAEjB,MAAM,uBAAuB,GAAG,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AAElE,SAAS,YAAY,CACnB,MAA6B,EAC7B,eAAuB,EACvB,UAAkB;IAElB,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,uBAAuB,CAAC,CAAC;IACjE,IAAI,qBAAY,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;QAC9D,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,CAAC,IAAI,CACV,gBAAgB,EAChB,IAAA,aAAK,EAAC,eAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,EACtC,WAAW,EACX,IAAA,aAAK,EAAC,UAAU,CAAC,CAClB,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,aAAa,CACpB,eAAuB,EACvB,OAAe;IAEf,OAAO;QACL;YACE,aAAa,EAAE;gBACb,QAAQ,EAAE,eAAe;gBACzB,MAAM,EAAE,OAAO;aAChB;SACF;KACF,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,EACpC,eAAe,EACf,WAAW,EACX,MAAM,GACS;IACf,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7C,8EAA8E;QAC9E,OAAO,aAAa,CAClB,eAA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AE,CAAC;QAC/B,GAAG,CAAC,IAAI,CAAC;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,CAAC,CAAC,IAAI;aACb;SACF,CAAC,CAAC;QACH,GAAG,CAAC,IAAI,CAAC;YACP,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,CAAC,CAAC,EAAE;gBACV,QAAQ,EAAE,MAAM,IAAA,kBAAa,EAAC,CAAC,CAAC,EAAE,CAAC;aACpC;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { quote } from 'shlex';\nimport upath from 'upath';\nimport { GlobalConfig } from '../../../config/global';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions } from '../../../util/exec/types';\nimport { readLocalFile } from '../../../util/fs';\nimport { getRepoStatus } from '../../../util/git';\nimport { getGitEnvironmentVariables } from '../../../util/git/auth';\nimport type {\n UpdateArtifact,\n UpdateArtifactsConfig,\n UpdateArtifactsResult,\n} from '../types';\nimport {\n getCopierVersionConstraint,\n getPythonVersionConstraint,\n} from './utils';\n\nconst DEFAULT_COMMAND_OPTIONS = ['--skip-answered', '--defaults'];\n\nfunction buildCommand(\n config: UpdateArtifactsConfig,\n packageFileName: string,\n newVersion: string,\n): string {\n const command = ['copier', 'update', ...DEFAULT_COMMAND_OPTIONS];\n if (GlobalConfig.get('allowScripts') && !config.ignoreScripts) {\n command.push('--trust');\n }\n command.push(\n '--answers-file',\n quote(upath.basename(packageFileName)),\n '--vcs-ref',\n quote(newVersion),\n );\n return command.join(' ');\n}\n\nfunction artifactError(\n packageFileName: string,\n message: string,\n): UpdateArtifactsResult[] {\n return [\n {\n artifactError: {\n lockFile: packageFileName,\n stderr: message,\n },\n },\n ];\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n if (!updatedDeps || updatedDeps.length !== 1) {\n // Each answers file (~ packageFileName) has exactly one dependency to update.\n return artifactError(\n packageFileName,\n `Unexpected number of dependencies: ${updatedDeps.length} (should be 1)`,\n );\n }\n\n const newVersion = updatedDeps[0]?.newVersion ?? updatedDeps[0]?.newValue;\n if (!newVersion) {\n return artifactError(\n packageFileName,\n 'Missing copier template version to update to',\n );\n }\n\n const command = buildCommand(config, packageFileName, newVersion);\n const gitEnv = getGitEnvironmentVariables(['git-tags']);\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n docker: {},\n extraEnv: gitEnv,\n toolConstraints: [\n {\n toolName: 'python',\n constraint: getPythonVersionConstraint(config),\n },\n {\n toolName: 'copier',\n constraint: getCopierVersionConstraint(config),\n },\n ],\n };\n try {\n await exec(command, execOptions);\n } catch (err) {\n logger.debug({ err }, `Failed to update copier template: ${err.message}`);\n return artifactError(packageFileName, err.message);\n }\n\n const status = await getRepoStatus();\n // If the answers file didn't change, Copier did not update anything.\n if (!status.modified.includes(packageFileName)) {\n return null;\n }\n\n if (status.conflicted.length > 0) {\n // Sometimes, Copier erroneously reports conflicts.\n const msg =\n `Updating the Copier template yielded ${status.conflicted.length} merge conflicts. ` +\n 'Please check the proposed changes carefully! Conflicting files:\\n * ' +\n status.conflicted.join('\\n * ');\n logger.debug({ packageFileName, depName: updatedDeps[0]?.depName }, msg);\n }\n\n const res: UpdateArtifactsResult[] = [];\n\n for (const f of [\n ...status.modified,\n ...status.not_added,\n ...status.conflicted,\n ]) {\n const fileRes: UpdateArtifactsResult = {\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n };\n if (status.conflicted.includes(f)) {\n // Make the reviewer aware of the conflicts.\n // This will be posted in a comment.\n fileRes.notice = {\n file: f,\n message:\n 'This file had merge conflicts. Please check the proposed changes carefully!',\n };\n }\n res.push(fileRes);\n }\n for (const f of status.deleted) {\n res.push({\n file: {\n type: 'deletion',\n path: f,\n },\n });\n }\n // `git status` might detect a rename, which is then not contained\n // in not_added/deleted. Ensure we respect renames as well if they happen.\n for (const f of status.renamed) {\n res.push({\n file: {\n type: 'deletion',\n path: f.from,\n },\n });\n res.push({\n file: {\n type: 'addition',\n path: f.to,\n contents: await readLocalFile(f.to),\n },\n });\n }\n return res;\n}\n"]}
@@ -10,14 +10,14 @@ export declare const XPKGSchema: z.ZodObject<{
10
10
  package: string;
11
11
  }>;
12
12
  }, "strip", z.ZodTypeAny, {
13
- kind: "Function" | "Provider" | "Configuration";
14
13
  apiVersion: string;
14
+ kind: "Provider" | "Configuration" | "Function";
15
15
  spec: {
16
16
  package: string;
17
17
  };
18
18
  }, {
19
- kind: "Function" | "Provider" | "Configuration";
20
19
  apiVersion: string;
20
+ kind: "Provider" | "Configuration" | "Function";
21
21
  spec: {
22
22
  package: string;
23
23
  };
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
6
6
  const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
7
7
  const logger_1 = require("../../../../logger");
8
8
  const common_1 = require("../../../../util/common");
9
+ const toml_1 = require("../../../../util/toml");
9
10
  const yaml_1 = require("../../../../util/yaml");
10
11
  const utils_1 = require("../utils");
11
12
  const utils_2 = require("./utils");
@@ -25,6 +26,9 @@ async function extractPackageFile(content, packageFile, config) {
25
26
  case 'yaml':
26
27
  json = (0, yaml_1.parseYaml)(content);
27
28
  break;
29
+ case 'toml':
30
+ json = (0, toml_1.parse)(content);
31
+ break;
28
32
  }
29
33
  }
30
34
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lib/modules/manager/custom/jsonata/index.ts"],"names":[],"mappings":";;;AAkBA,gDAgDC;;AAlED,kEAAkC;AAElC,+CAA4C;AAC5C,oDAAoD;AACpD,gDAAkD;AAElD,oCAA4C;AAE5C,mCAAyC;AAE5B,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,UAAU,EAAE,KAAK;CAClB,CA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AAG,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport type { Category } from '../../../../constants';\nimport { logger } from '../../../../logger';\nimport { parseJson } from '../../../../util/common';\nimport { parseYaml } from '../../../../util/yaml';\nimport type { PackageFileContent } from '../../types';\nimport { validMatchFields } from '../utils';\nimport type { JSONataManagerTemplates, JsonataExtractConfig } from './types';\nimport { handleMatching } from './utils';\n\nexport const categories: Category[] = ['custom'];\n\nexport const defaultConfig = {\n pinDigests: false,\n};\nexport const supportedDatasources = ['*'];\nexport const displayName = 'JSONata';\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n config: JsonataExtractConfig,\n): Promise<PackageFileContent | null> {\n let json: unknown;\n try {\n switch (config.fileFormat) {\n case 'json':\n json = parseJson(content, packageFile);\n break;\n case 'yaml':\n json = parseYaml(content);\n break;\n }\n } catch (err) {\n logger.debug(\n { err, fileName: packageFile, fileFormat: config.fileFormat },\n 'Error while parsing file',\n );\n return null;\n }\n\n if (is.nullOrUndefined(json)) {\n return null;\n }\n\n const deps = await handleMatching(json, packageFile, config);\n if (!deps.length) {\n return null;\n }\n\n const res: PackageFileContent & JSONataManagerTemplates = {\n deps,\n matchStrings: config.matchStrings,\n fileFormat: config.fileFormat,\n };\n\n // copy over templates for autoreplace\n for (const field of validMatchFields.map(\n (f) => `${f}Template` as keyof JSONataManagerTemplates,\n )) {\n if (config[field]) {\n res[field] = config[field];\n }\n }\n\n return res;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lib/modules/manager/custom/jsonata/index.ts"],"names":[],"mappings":";;;AAmBA,gDAmDC;;AAtED,kEAAkC;AAElC,+CAA4C;AAC5C,oDAAoD;AACpD,gDAA2D;AAC3D,gDAAkD;AAElD,oCAA4C;AAE5C,mCAAyC;AAE5B,QAAA,UAAU,GAAe,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AK,MAAM,KAAK,IAAI,wBAAgB,CAAC,GAAG,CACtC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,UAA2C,CACvD,EAAE,CAAC;QACF,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAClB,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport type { Category } from '../../../../constants';\nimport { logger } from '../../../../logger';\nimport { parseJson } from '../../../../util/common';\nimport { parse as parseToml } from '../../../../util/toml';\nimport { parseYaml } from '../../../../util/yaml';\nimport type { PackageFileContent } from '../../types';\nimport { validMatchFields } from '../utils';\nimport type { JSONataManagerTemplates, JsonataExtractConfig } from './types';\nimport { handleMatching } from './utils';\n\nexport const categories: Category[] = ['custom'];\n\nexport const defaultConfig = {\n pinDigests: false,\n};\nexport const supportedDatasources = ['*'];\nexport const displayName = 'JSONata';\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n config: JsonataExtractConfig,\n): Promise<PackageFileContent | null> {\n let json: unknown;\n try {\n switch (config.fileFormat) {\n case 'json':\n json = parseJson(content, packageFile);\n break;\n case 'yaml':\n json = parseYaml(content);\n break;\n case 'toml':\n json = parseToml(content);\n break;\n }\n } catch (err) {\n logger.debug(\n { err, fileName: packageFile, fileFormat: config.fileFormat },\n 'Error while parsing file',\n );\n return null;\n }\n\n if (is.nullOrUndefined(json)) {\n return null;\n }\n\n const deps = await handleMatching(json, packageFile, config);\n if (!deps.length) {\n return null;\n }\n\n const res: PackageFileContent & JSONataManagerTemplates = {\n deps,\n matchStrings: config.matchStrings,\n fileFormat: config.fileFormat,\n };\n\n // copy over templates for autoreplace\n for (const field of validMatchFields.map(\n (f) => `${f}Template` as keyof JSONataManagerTemplates,\n )) {\n if (config[field]) {\n res[field] = config[field];\n }\n }\n\n return res;\n}\n"]}