renovate 41.72.0 → 42.0.0-next.2

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 (220) hide show
  1. package/dist/modules/datasource/aws-eks-addon/schema.d.ts +8 -1
  2. package/dist/modules/datasource/aws-eks-addon/schema.js +5 -7
  3. package/dist/modules/datasource/aws-eks-addon/schema.js.map +1 -1
  4. package/dist/modules/datasource/buildpacks-registry/index.js +1 -1
  5. package/dist/modules/datasource/buildpacks-registry/index.js.map +1 -1
  6. package/dist/modules/datasource/buildpacks-registry/schema.d.ts +1 -1
  7. package/dist/modules/datasource/buildpacks-registry/schema.js +2 -2
  8. package/dist/modules/datasource/buildpacks-registry/schema.js.map +1 -1
  9. package/dist/modules/datasource/cdnjs/index.js +2 -2
  10. package/dist/modules/datasource/cdnjs/index.js.map +1 -1
  11. package/dist/modules/datasource/cdnjs/schema.d.ts +2 -2
  12. package/dist/modules/datasource/cdnjs/schema.js +3 -3
  13. package/dist/modules/datasource/cdnjs/schema.js.map +1 -1
  14. package/dist/modules/datasource/conda/prefix-dev.js +1 -1
  15. package/dist/modules/datasource/conda/prefix-dev.js.map +1 -1
  16. package/dist/modules/datasource/conda/schema/prefix-dev.d.ts +1 -1
  17. package/dist/modules/datasource/conda/schema/prefix-dev.js +2 -2
  18. package/dist/modules/datasource/conda/schema/prefix-dev.js.map +1 -1
  19. package/dist/modules/datasource/cpan/schema.js +2 -2
  20. package/dist/modules/datasource/cpan/schema.js.map +1 -1
  21. package/dist/modules/datasource/crate/index.js +1 -1
  22. package/dist/modules/datasource/crate/index.js.map +1 -1
  23. package/dist/modules/datasource/crate/schema.d.ts +1 -1
  24. package/dist/modules/datasource/crate/schema.js +2 -2
  25. package/dist/modules/datasource/crate/schema.js.map +1 -1
  26. package/dist/modules/datasource/custom/index.d.ts +1 -1
  27. package/dist/modules/datasource/custom/index.js +2 -2
  28. package/dist/modules/datasource/custom/index.js.map +1 -1
  29. package/dist/modules/datasource/custom/schema.d.ts +1 -1
  30. package/dist/modules/datasource/custom/schema.js +2 -2
  31. package/dist/modules/datasource/custom/schema.js.map +1 -1
  32. package/dist/modules/datasource/forgejo-releases/index.js +3 -3
  33. package/dist/modules/datasource/forgejo-releases/index.js.map +1 -1
  34. package/dist/modules/datasource/forgejo-releases/schema.d.ts +2 -2
  35. package/dist/modules/datasource/forgejo-releases/schema.js +3 -3
  36. package/dist/modules/datasource/forgejo-releases/schema.js.map +1 -1
  37. package/dist/modules/datasource/forgejo-tags/index.js +3 -3
  38. package/dist/modules/datasource/forgejo-tags/index.js.map +1 -1
  39. package/dist/modules/datasource/forgejo-tags/schema.d.ts +4 -4
  40. package/dist/modules/datasource/forgejo-tags/schema.js +7 -7
  41. package/dist/modules/datasource/forgejo-tags/schema.js.map +1 -1
  42. package/dist/modules/datasource/gitea-releases/index.js +3 -3
  43. package/dist/modules/datasource/gitea-releases/index.js.map +1 -1
  44. package/dist/modules/datasource/gitea-releases/schema.d.ts +2 -2
  45. package/dist/modules/datasource/gitea-releases/schema.js +3 -3
  46. package/dist/modules/datasource/gitea-releases/schema.js.map +1 -1
  47. package/dist/modules/datasource/gitea-tags/index.js +3 -3
  48. package/dist/modules/datasource/gitea-tags/index.js.map +1 -1
  49. package/dist/modules/datasource/gitea-tags/schema.d.ts +4 -4
  50. package/dist/modules/datasource/gitea-tags/schema.js +7 -7
  51. package/dist/modules/datasource/gitea-tags/schema.js.map +1 -1
  52. package/dist/modules/datasource/helm/index.js +1 -1
  53. package/dist/modules/datasource/helm/index.js.map +1 -1
  54. package/dist/modules/datasource/helm/schema.d.ts +2 -2
  55. package/dist/modules/datasource/helm/schema.js +4 -4
  56. package/dist/modules/datasource/helm/schema.js.map +1 -1
  57. package/dist/modules/manager/argocd/extract.js +1 -1
  58. package/dist/modules/manager/argocd/extract.js.map +1 -1
  59. package/dist/modules/manager/argocd/schema.d.ts +1 -1
  60. package/dist/modules/manager/argocd/schema.js +2 -2
  61. package/dist/modules/manager/argocd/schema.js.map +1 -1
  62. package/dist/modules/manager/batect/extract.js +1 -1
  63. package/dist/modules/manager/batect/extract.js.map +1 -1
  64. package/dist/modules/manager/batect/schema.d.ts +2 -2
  65. package/dist/modules/manager/batect/schema.js +2 -2
  66. package/dist/modules/manager/batect/schema.js.map +1 -1
  67. package/dist/modules/manager/bazel-module/parser/fragments.d.ts +21 -21
  68. package/dist/modules/manager/bazel-module/parser/fragments.js +32 -32
  69. package/dist/modules/manager/bazel-module/parser/fragments.js.map +1 -1
  70. package/dist/modules/manager/bazel-module/parser/maven.js +7 -7
  71. package/dist/modules/manager/bazel-module/parser/maven.js.map +1 -1
  72. package/dist/modules/manager/bazel-module/parser/oci.js +5 -5
  73. package/dist/modules/manager/bazel-module/parser/oci.js.map +1 -1
  74. package/dist/modules/manager/bazel-module/rules.js +18 -18
  75. package/dist/modules/manager/bazel-module/rules.js.map +1 -1
  76. package/dist/modules/manager/cargo/extract.js +2 -2
  77. package/dist/modules/manager/cargo/extract.js.map +1 -1
  78. package/dist/modules/manager/cargo/locked-version.d.ts +2 -2
  79. package/dist/modules/manager/cargo/locked-version.js +1 -1
  80. package/dist/modules/manager/cargo/locked-version.js.map +1 -1
  81. package/dist/modules/manager/cargo/schema.d.ts +32 -5
  82. package/dist/modules/manager/cargo/schema.js +8 -7
  83. package/dist/modules/manager/cargo/schema.js.map +1 -1
  84. package/dist/modules/manager/crossplane/extract.js +1 -1
  85. package/dist/modules/manager/crossplane/extract.js.map +1 -1
  86. package/dist/modules/manager/crossplane/schema.d.ts +2 -2
  87. package/dist/modules/manager/crossplane/schema.js +2 -2
  88. package/dist/modules/manager/crossplane/schema.js.map +1 -1
  89. package/dist/modules/manager/custom/jsonata/schema.d.ts +1 -1
  90. package/dist/modules/manager/custom/jsonata/schema.js +4 -4
  91. package/dist/modules/manager/custom/jsonata/schema.js.map +1 -1
  92. package/dist/modules/manager/custom/jsonata/utils.js +1 -1
  93. package/dist/modules/manager/custom/jsonata/utils.js.map +1 -1
  94. package/dist/modules/manager/devbox/extract.js +1 -1
  95. package/dist/modules/manager/devbox/extract.js.map +1 -1
  96. package/dist/modules/manager/devbox/schema.d.ts +1 -1
  97. package/dist/modules/manager/devbox/schema.js +2 -2
  98. package/dist/modules/manager/devbox/schema.js.map +1 -1
  99. package/dist/modules/manager/fingerprint.generated.js +2 -2
  100. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  101. package/dist/modules/manager/github-actions/community.js +10 -10
  102. package/dist/modules/manager/github-actions/community.js.map +1 -1
  103. package/dist/modules/manager/github-actions/extract.js +1 -1
  104. package/dist/modules/manager/github-actions/extract.js.map +1 -1
  105. package/dist/modules/manager/github-actions/schema.d.ts +3 -3
  106. package/dist/modules/manager/github-actions/schema.js +7 -7
  107. package/dist/modules/manager/github-actions/schema.js.map +1 -1
  108. package/dist/modules/manager/helmfile/extract.js.map +1 -1
  109. package/dist/modules/manager/mise/backends.d.ts +2 -2
  110. package/dist/modules/manager/mise/backends.js.map +1 -1
  111. package/dist/modules/manager/mise/extract.js.map +1 -1
  112. package/dist/modules/manager/mise/schema.d.ts +29 -6
  113. package/dist/modules/manager/mise/schema.js +8 -7
  114. package/dist/modules/manager/mise/schema.js.map +1 -1
  115. package/dist/modules/manager/mise/utils.d.ts +2 -2
  116. package/dist/modules/manager/mise/utils.js +1 -1
  117. package/dist/modules/manager/mise/utils.js.map +1 -1
  118. package/dist/modules/manager/npm/extract/index.js.map +1 -1
  119. package/dist/modules/manager/npm/extract/pnpm.d.ts +3 -4
  120. package/dist/modules/manager/npm/extract/pnpm.js +1 -1
  121. package/dist/modules/manager/npm/extract/pnpm.js.map +1 -1
  122. package/dist/modules/manager/npm/extract/yarnrc.d.ts +4 -4
  123. package/dist/modules/manager/npm/extract/yarnrc.js +2 -1
  124. package/dist/modules/manager/npm/extract/yarnrc.js.map +1 -1
  125. package/dist/modules/manager/npm/post-update/types.d.ts +5 -5
  126. package/dist/modules/manager/npm/post-update/types.js.map +1 -1
  127. package/dist/modules/manager/npm/post-update/utils.d.ts +4 -4
  128. package/dist/modules/manager/npm/post-update/utils.js.map +1 -1
  129. package/dist/modules/manager/npm/schema.d.ts +92 -10
  130. package/dist/modules/manager/npm/schema.js +16 -15
  131. package/dist/modules/manager/npm/schema.js.map +1 -1
  132. package/dist/modules/manager/npm/update/dependency/pnpm.js +1 -1
  133. package/dist/modules/manager/npm/update/dependency/pnpm.js.map +1 -1
  134. package/dist/modules/manager/nuget/schema.d.ts +55 -2
  135. package/dist/modules/manager/nuget/schema.js +6 -5
  136. package/dist/modules/manager/nuget/schema.js.map +1 -1
  137. package/dist/modules/manager/ocb/extract.js +1 -1
  138. package/dist/modules/manager/ocb/extract.js.map +1 -1
  139. package/dist/modules/manager/ocb/schema.d.ts +4 -4
  140. package/dist/modules/manager/ocb/schema.js +9 -9
  141. package/dist/modules/manager/ocb/schema.js.map +1 -1
  142. package/dist/modules/manager/pep621/extract.d.ts +1 -1
  143. package/dist/modules/manager/pep621/extract.js +1 -1
  144. package/dist/modules/manager/pep621/extract.js.map +1 -1
  145. package/dist/modules/manager/pep621/processors/pdm.js +1 -1
  146. package/dist/modules/manager/pep621/processors/pdm.js.map +1 -1
  147. package/dist/modules/manager/pep621/processors/uv.js +1 -1
  148. package/dist/modules/manager/pep621/processors/uv.js.map +1 -1
  149. package/dist/modules/manager/pep621/schema.d.ts +247 -9
  150. package/dist/modules/manager/pep621/schema.js +12 -10
  151. package/dist/modules/manager/pep621/schema.js.map +1 -1
  152. package/dist/modules/manager/pep723/extract.js +1 -1
  153. package/dist/modules/manager/pep723/extract.js.map +1 -1
  154. package/dist/modules/manager/pep723/schema.d.ts +1 -1
  155. package/dist/modules/manager/pep723/schema.js +2 -2
  156. package/dist/modules/manager/pep723/schema.js.map +1 -1
  157. package/dist/modules/manager/pixi/extract.js +7 -4
  158. package/dist/modules/manager/pixi/extract.js.map +1 -1
  159. package/dist/modules/manager/pixi/schema.d.ts +4 -296
  160. package/dist/modules/manager/pixi/schema.js +4 -11
  161. package/dist/modules/manager/pixi/schema.js.map +1 -1
  162. package/dist/modules/manager/poetry/artifacts.js +2 -2
  163. package/dist/modules/manager/poetry/artifacts.js.map +1 -1
  164. package/dist/modules/manager/poetry/extract.js +1 -1
  165. package/dist/modules/manager/poetry/extract.js.map +1 -1
  166. package/dist/modules/manager/poetry/schema.d.ts +107 -4
  167. package/dist/modules/manager/poetry/schema.js +6 -5
  168. package/dist/modules/manager/poetry/schema.js.map +1 -1
  169. package/dist/modules/manager/poetry/update-locked.js +2 -2
  170. package/dist/modules/manager/poetry/update-locked.js.map +1 -1
  171. package/dist/modules/manager/pub/extract.js.map +1 -1
  172. package/dist/modules/manager/pub/schema.d.ts +82 -4
  173. package/dist/modules/manager/pub/schema.js +10 -8
  174. package/dist/modules/manager/pub/schema.js.map +1 -1
  175. package/dist/modules/manager/pub/utils.d.ts +3 -3
  176. package/dist/modules/manager/pub/utils.js +2 -2
  177. package/dist/modules/manager/pub/utils.js.map +1 -1
  178. package/dist/modules/manager/renovate-config-presets/extract.js +1 -1
  179. package/dist/modules/manager/renovate-config-presets/extract.js.map +1 -1
  180. package/dist/modules/manager/renovate-config-presets/schema.d.ts +1 -1
  181. package/dist/modules/manager/renovate-config-presets/schema.js +2 -2
  182. package/dist/modules/manager/renovate-config-presets/schema.js.map +1 -1
  183. package/dist/modules/platform/azure/azure-helper.js +1 -1
  184. package/dist/modules/platform/azure/azure-helper.js.map +1 -1
  185. package/dist/modules/platform/azure/schema.d.ts +3 -3
  186. package/dist/modules/platform/azure/schema.js +4 -4
  187. package/dist/modules/platform/azure/schema.js.map +1 -1
  188. package/dist/modules/platform/bitbucket/schema.d.ts +1 -1
  189. package/dist/modules/platform/bitbucket/schema.js +7 -7
  190. package/dist/modules/platform/bitbucket/schema.js.map +1 -1
  191. package/dist/modules/platform/bitbucket-server/index.js +2 -2
  192. package/dist/modules/platform/bitbucket-server/index.js.map +1 -1
  193. package/dist/modules/platform/bitbucket-server/schema.d.ts +2 -2
  194. package/dist/modules/platform/bitbucket-server/schema.js +6 -6
  195. package/dist/modules/platform/bitbucket-server/schema.js.map +1 -1
  196. package/dist/modules/platform/gitea/schema.d.ts +3 -3
  197. package/dist/modules/platform/gitea/schema.js +3 -3
  198. package/dist/modules/platform/gitea/schema.js.map +1 -1
  199. package/dist/modules/platform/github/index.js +1 -1
  200. package/dist/modules/platform/github/index.js.map +1 -1
  201. package/dist/modules/platform/github/schema.d.ts +1 -2
  202. package/dist/modules/platform/github/schema.js +8 -8
  203. package/dist/modules/platform/github/schema.js.map +1 -1
  204. package/dist/util/cache/repository/http-cache.js +1 -1
  205. package/dist/util/cache/repository/http-cache.js.map +1 -1
  206. package/dist/util/emoji.js +2 -2
  207. package/dist/util/emoji.js.map +1 -1
  208. package/dist/util/http/cache/abstract-http-cache-provider.d.ts +1 -1
  209. package/dist/util/http/cache/abstract-http-cache-provider.js +2 -2
  210. package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
  211. package/dist/util/http/cache/schema.d.ts +2 -2
  212. package/dist/util/http/cache/schema.js +2 -2
  213. package/dist/util/http/cache/schema.js.map +1 -1
  214. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js +1 -1
  215. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js.map +1 -1
  216. package/dist/workers/repository/update/pr/changelog/forgejo/index.js +3 -3
  217. package/dist/workers/repository/update/pr/changelog/forgejo/index.js.map +1 -1
  218. package/dist/workers/repository/update/pr/changelog/gitea/index.js +3 -3
  219. package/dist/workers/repository/update/pr/changelog/gitea/index.js.map +1 -1
  220. package/package.json +1 -1
@@ -5,7 +5,7 @@ exports.parsePubspecLock = parsePubspecLock;
5
5
  const logger_1 = require("../../../logger");
6
6
  const schema_1 = require("./schema");
7
7
  function parsePubspec(fileName, fileContent) {
8
- const res = schema_1.Pubspec.safeParse(fileContent);
8
+ const res = schema_1.PubspecYaml.safeParse(fileContent);
9
9
  if (res.success) {
10
10
  return res.data;
11
11
  }
@@ -15,7 +15,7 @@ function parsePubspec(fileName, fileContent) {
15
15
  return null;
16
16
  }
17
17
  function parsePubspecLock(fileName, fileContent) {
18
- const res = schema_1.PubspecLock.safeParse(fileContent);
18
+ const res = schema_1.PubspecLockYaml.safeParse(fileContent);
19
19
  if (res.success) {
20
20
  return res.data;
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pub/utils.ts"],"names":[],"mappings":";;AAGA,oCAWC;AAED,4CAcC;AA9BD,4CAAyC;AACzC,qCAAgD;AAEhD,SAAgB,YAAY,CAC1B,QAAgB,EAChB,WAAmB;IAEnB,MAAM,GAAG,GAAG,gBAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,wBAAwB,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,gBAAgB,CAC9B,QAAgB,EAChB,WAAmB;IAEnB,MAAM,GAAG,GAAG,oBAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC/C,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,eAAM,CAAC,KAAK,CACV,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAC5B,iCAAiC,CAClC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { logger } from '../../../logger';\nimport { Pubspec, PubspecLock } from './schema';\n\nexport function parsePubspec(\n fileName: string,\n fileContent: string,\n): Pubspec | null {\n const res = Pubspec.safeParse(fileContent);\n if (res.success) {\n return res.data;\n } else {\n logger.debug({ err: res.error, fileName }, 'Error parsing pubspec.');\n }\n return null;\n}\n\nexport function parsePubspecLock(\n fileName: string,\n fileContent: string,\n): PubspecLock | null {\n const res = PubspecLock.safeParse(fileContent);\n if (res.success) {\n return res.data;\n } else {\n logger.debug(\n { err: res.error, fileName },\n 'Error parsing pubspec lockfile.',\n );\n }\n return null;\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pub/utils.ts"],"names":[],"mappings":";;AAIA,oCAWC;AAED,4CAcC;AA/BD,4CAAyC;AAEzC,qCAAwD;AAExD,SAAgB,YAAY,CAC1B,QAAgB,EAChB,WAAmB;IAEnB,MAAM,GAAG,GAAG,oBAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC/C,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,wBAAwB,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,gBAAgB,CAC9B,QAAgB,EAChB,WAAmB;IAEnB,MAAM,GAAG,GAAG,wBAAe,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACnD,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,eAAM,CAAC,KAAK,CACV,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAC5B,iCAAiC,CAClC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { logger } from '../../../logger';\nimport type { PubspecLockSchema, PubspecSchema } from './schema';\nimport { PubspecLockYaml, PubspecYaml } from './schema';\n\nexport function parsePubspec(\n fileName: string,\n fileContent: string,\n): PubspecSchema | null {\n const res = PubspecYaml.safeParse(fileContent);\n if (res.success) {\n return res.data;\n } else {\n logger.debug({ err: res.error, fileName }, 'Error parsing pubspec.');\n }\n return null;\n}\n\nexport function parsePubspecLock(\n fileName: string,\n fileContent: string,\n): PubspecLockSchema | null {\n const res = PubspecLockYaml.safeParse(fileContent);\n if (res.success) {\n return res.data;\n } else {\n logger.debug(\n { err: res.error, fileName },\n 'Error parsing pubspec lockfile.',\n );\n }\n return null;\n}\n"]}
@@ -16,7 +16,7 @@ const supportedPresetSources = {
16
16
  };
17
17
  function extractPackageFile(content, packageFile) {
18
18
  logger_1.logger.trace(`renovate-config-presets.extractPackageFile(${packageFile})`);
19
- const config = schema_1.RenovateJson.safeParse(content);
19
+ const config = schema_1.RenovateJsonSchema.safeParse(content);
20
20
  if (!config.success) {
21
21
  logger_1.logger.debug({ packageFile, err: config.error }, 'Invalid Renovate Config');
22
22
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/renovate-config-presets/extract.ts"],"names":[],"mappings":";;AAeA,gDA2CC;;AA1DD,kEAAkC;AAClC,yDAA4D;AAC5D,4CAAyC;AACzC,4DAAkE;AAClE,8DAAoE;AACpE,8DAAoE;AAEpE,qCAAwC;AAExC,MAAM,sBAAsB,GAA2B;IACrD,MAAM,EAAE,kCAAoB,CAAC,EAAE;IAC/B,MAAM,EAAE,kCAAoB,CAAC,EAAE;IAC/B,KAAK,EAAE,gCAAmB,CAAC,EAAE;CAC9B,CAAC;AAEF,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB;IAEnB,eAAM,CAAC,KAAK,CAAC,8CAA8C,WAAW,GAAG,CAAC,CAAC;IAC3E,MAAM,MAAM,GAAG,qBAAY,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC/C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,yBAAyB,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAwB,EAAE,CAAC;IAErC,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC;QAC/C,MAAM,YAAY,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC,CAAC;QACzC,MAAM,UAAU,GAAG,sBAAsB,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QAErE,IAAI,YAAE,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;YACnC,IAAI,YAAY,CAAC,YAAY,KAAK,UAAU,EAAE,CAAC;gBAC7C,IAAI,CAAC,IAAI,CAAC;oBACR,OAAO,EAAE,YAAY,CAAC,IAAI;oBAC1B,UAAU,EAAE,wBAAwB;iBACrC,CAAC,CAAC;YACL,CAAC;YACD,SAAS;QACX,CAAC;QAED,IAAI,YAAE,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YACzC,IAAI,CAAC,IAAI,CAAC;gBACR,OAAO,EAAE,YAAY,CAAC,IAAI;gBAC1B,UAAU,EAAE,qBAAqB;aAClC,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QAED,IAAI,CAAC,IAAI,CAAC;YACR,OAAO,EAAE,YAAY,CAAC,IAAI;YAC1B,UAAU;YACV,YAAY,EAAE,YAAY,CAAC,GAAG;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,OAAO,YAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { parsePreset } from '../../../config/presets/parse';\nimport { logger } from '../../../logger';\nimport { GiteaTagsDatasource } from '../../datasource/gitea-tags';\nimport { GithubTagsDatasource } from '../../datasource/github-tags';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags';\nimport type { PackageDependency, PackageFileContent } from '../types';\nimport { RenovateJson } from './schema';\n\nconst supportedPresetSources: Record<string, string> = {\n github: GithubTagsDatasource.id,\n gitlab: GitlabTagsDatasource.id,\n gitea: GiteaTagsDatasource.id,\n};\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n): PackageFileContent | null {\n logger.trace(`renovate-config-presets.extractPackageFile(${packageFile})`);\n const config = RenovateJson.safeParse(content);\n if (!config.success) {\n logger.debug({ packageFile, err: config.error }, 'Invalid Renovate Config');\n return null;\n }\n\n const deps: PackageDependency[] = [];\n\n for (const preset of config.data.extends ?? []) {\n const parsedPreset = parsePreset(preset);\n const datasource = supportedPresetSources[parsedPreset.presetSource];\n\n if (is.nullOrUndefined(datasource)) {\n if (parsedPreset.presetSource !== 'internal') {\n deps.push({\n depName: parsedPreset.repo,\n skipReason: 'unsupported-datasource',\n });\n }\n continue;\n }\n\n if (is.nullOrUndefined(parsedPreset.tag)) {\n deps.push({\n depName: parsedPreset.repo,\n skipReason: 'unspecified-version',\n });\n continue;\n }\n\n deps.push({\n depName: parsedPreset.repo,\n datasource,\n currentValue: parsedPreset.tag,\n });\n }\n\n return is.nonEmptyArray(deps) ? { deps } : null;\n}\n"]}
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/renovate-config-presets/extract.ts"],"names":[],"mappings":";;AAeA,gDA2CC;;AA1DD,kEAAkC;AAClC,yDAA4D;AAC5D,4CAAyC;AACzC,4DAAkE;AAClE,8DAAoE;AACpE,8DAAoE;AAEpE,qCAA8C;AAE9C,MAAM,sBAAsB,GAA2B;IACrD,MAAM,EAAE,kCAAoB,CAAC,EAAE;IAC/B,MAAM,EAAE,kCAAoB,CAAC,EAAE;IAC/B,KAAK,EAAE,gCAAmB,CAAC,EAAE;CAC9B,CAAC;AAEF,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB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,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { parsePreset } from '../../../config/presets/parse';\nimport { logger } from '../../../logger';\nimport { GiteaTagsDatasource } from '../../datasource/gitea-tags';\nimport { GithubTagsDatasource } from '../../datasource/github-tags';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags';\nimport type { PackageDependency, PackageFileContent } from '../types';\nimport { RenovateJsonSchema } from './schema';\n\nconst supportedPresetSources: Record<string, string> = {\n github: GithubTagsDatasource.id,\n gitlab: GitlabTagsDatasource.id,\n gitea: GiteaTagsDatasource.id,\n};\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n): PackageFileContent | null {\n logger.trace(`renovate-config-presets.extractPackageFile(${packageFile})`);\n const config = RenovateJsonSchema.safeParse(content);\n if (!config.success) {\n logger.debug({ packageFile, err: config.error }, 'Invalid Renovate Config');\n return null;\n }\n\n const deps: PackageDependency[] = [];\n\n for (const preset of config.data.extends ?? []) {\n const parsedPreset = parsePreset(preset);\n const datasource = supportedPresetSources[parsedPreset.presetSource];\n\n if (is.nullOrUndefined(datasource)) {\n if (parsedPreset.presetSource !== 'internal') {\n deps.push({\n depName: parsedPreset.repo,\n skipReason: 'unsupported-datasource',\n });\n }\n continue;\n }\n\n if (is.nullOrUndefined(parsedPreset.tag)) {\n deps.push({\n depName: parsedPreset.repo,\n skipReason: 'unspecified-version',\n });\n continue;\n }\n\n deps.push({\n depName: parsedPreset.repo,\n datasource,\n currentValue: parsedPreset.tag,\n });\n }\n\n return is.nonEmptyArray(deps) ? { deps } : null;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const RenovateJson: z.ZodPipeline<z.ZodEffects<z.ZodString, string | number | boolean | import("type-fest").JsonObject | import("type-fest").JsonValue[] | readonly import("type-fest").JsonValue[] | null, string>, z.ZodObject<{
2
+ export declare const RenovateJsonSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, string | number | boolean | import("type-fest").JsonObject | import("type-fest").JsonValue[] | readonly import("type-fest").JsonValue[] | null, string>, z.ZodObject<{
3
3
  extends: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4
4
  }, "strip", z.ZodTypeAny, {
5
5
  extends?: string[] | undefined;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RenovateJson = void 0;
3
+ exports.RenovateJsonSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const schema_utils_1 = require("../../../util/schema-utils");
6
- exports.RenovateJson = schema_utils_1.Json5.pipe(zod_1.z.object({
6
+ exports.RenovateJsonSchema = schema_utils_1.Json5.pipe(zod_1.z.object({
7
7
  extends: zod_1.z.array(zod_1.z.string()).optional(),
8
8
  }));
9
9
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/manager/renovate-config-presets/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,6DAAmD;AAEtC,QAAA,YAAY,GAAG,oBAAK,CAAC,IAAI,CACpC,OAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC,CACH,CAAC","sourcesContent":["import { z } from 'zod';\nimport { Json5 } from '../../../util/schema-utils';\n\nexport const RenovateJson = Json5.pipe(\n z.object({\n extends: z.array(z.string()).optional(),\n }),\n);\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/manager/renovate-config-presets/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,6DAAmD;AAEtC,QAAA,kBAAkB,GAAG,oBAAK,CAAC,IAAI,CAC1C,OAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC,CACH,CAAC","sourcesContent":["import { z } from 'zod';\nimport { Json5 } from '../../../util/schema-utils';\n\nexport const RenovateJsonSchema = Json5.pipe(\n z.object({\n extends: z.array(z.string()).optional(),\n }),\n);\n"]}
@@ -51,7 +51,7 @@ async function getFile(repoId, filePath, branchName) {
51
51
  if (item?.readable) {
52
52
  const fileContent = await (0, streams_1.streamToString)(item);
53
53
  try {
54
- const result = schema_1.WrappedException.safeParse(fileContent);
54
+ const result = schema_1.WrappedExceptionSchema.safeParse(fileContent);
55
55
  if (result.success) {
56
56
  if (result.data.typeKey === 'GitItemNotFoundException') {
57
57
  logger_1.logger.warn({ filePath }, 'Unable to find file');
@@ -1 +1 @@
1
- {"version":3,"file":"azure-helper.js","sourceRoot":"","sources":["../../../../lib/modules/platform/azure/azure-helper.ts"],"names":[],"mappings":";;AAkBA,0BAYC;AAOD,8CAoBC;AAGD,0BA6CC;AAED,4CAQC;AAED,wCAgEC;AAED,gDAiBC;;AAnMD,wFAAgG;AAChG,4CAAyC;AACzC,mDAAuD;AACvD,kCAA2C;AAC3C,sEAAgD;AAChD,qCAA4C;AAC5C,iCAGgB;AAEhB,MAAM,eAAe,GAAG,sCAAsC,CAAC,CAAC,sDAAsD;AAE/G,KAAK,UAAU,OAAO,CAC3B,MAAc,EACd,UAAmB;IAEnB,eAAM,CAAC,KAAK,CAAC,WAAW,MAAM,KAAK,UAAW,GAAG,CAAC,CAAC;IACnD,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC5C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,OAAO,CACpC,MAAM,EACN,SAAS,EACT,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAC3C,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC;AAOM,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,UAAkB,EAClB,IAAa;IAEb,M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CAAC;IACnD,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACtC,SAAiB;IAEjB,MAAM,QAAQ,GAAiB,EAAE,CAAC;IAClC,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC9C,MAAM,GAAG,GAAG,GAAG,CAAC;IAChB,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,GAAG,CAAC;QACF,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3E,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QACtB,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QACxB,IAAI,IAAI,GAAG,CAAC;IACd,CAAC,QAAQ,GAAG,IAAI,MAAM,EAAE;IAExB,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import type { WebApiTeam } from 'azure-devops-node-api/interfaces/CoreInterfaces.js';\nimport type {\n GitCommit,\n GitRef,\n} from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport { GitPullRequestMergeStrategy } from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport { logger } from '../../../logger';\nimport { streamToString } from '../../../util/streams';\nimport { getNewBranchName } from '../util';\nimport * as azureApi from './azure-got-wrapper';\nimport { WrappedException } from './schema';\nimport {\n getBranchNameWithoutRefsPrefix,\n getBranchNameWithoutRefsheadsPrefix,\n} from './util';\n\nconst mergePolicyGuid = 'fa4e907d-c16b-4a4c-9dfa-4916e5d171ab'; // Magic GUID for merge strategy policy configurations\n\nexport async function getRefs(\n repoId: string,\n branchName?: string,\n): Promise<GitRef[]> {\n logger.debug(`getRefs(${repoId}, ${branchName!})`);\n const azureApiGit = await azureApi.gitApi();\n const refs = await azureApiGit.getRefs(\n repoId,\n undefined,\n getBranchNameWithoutRefsPrefix(branchName),\n );\n return refs;\n}\n\nexport interface AzureBranchObj {\n name: string;\n oldObjectId: string;\n}\n\nexport async function getAzureBranchObj(\n repoId: string,\n branchName: string,\n from?: string,\n): Promise<AzureBranchObj> {\n const fromBranchName = getNewBranchName(from);\n const refs = await getRefs(repoId, fromBranchName);\n if (refs.length === 0) {\n logger.debug(`getAzureBranchObj without a valid from, so initial commit.`);\n // TODO: fix undefined\n return {\n name: getNewBranchName(branchName)!,\n oldObjectId: '0000000000000000000000000000000000000000',\n };\n }\n return {\n // TODO: fix undefined (#22198)\n name: getNewBranchName(branchName)!,\n oldObjectId: refs[0].objectId!,\n };\n}\n\n// if no branchName, look globally\nexport async function getFile(\n repoId: string,\n filePath: string,\n branchName: string,\n): Promise<string | null> {\n logger.trace(`getFile(filePath=${filePath}, branchName=${branchName})`);\n const azureApiGit = await azureApi.gitApi();\n const item = await azureApiGit.getItemText(\n repoId,\n filePath,\n undefined,\n undefined,\n 0, // because we look for 1 file\n false,\n false,\n true,\n {\n versionType: 0, // branch\n versionOptions: 0,\n version: getBranchNameWithoutRefsheadsPrefix(branchName),\n },\n );\n\n if (item?.readable) {\n const fileContent = await streamToString(item);\n try {\n const result = WrappedException.safeParse(fileContent);\n if (result.success) {\n if (result.data.typeKey === 'GitItemNotFoundException') {\n logger.warn({ filePath }, 'Unable to find file');\n return null;\n }\n if (result.data.typeKey === 'GitUnresolvableToCommitException') {\n logger.warn({ branchName }, 'Unable to find branch');\n return null;\n }\n }\n } catch /* v8 ignore start */ {\n // it 's not a JSON, so I send the content directly with the line under\n } /* v8 ignore stop */\n\n return fileContent;\n }\n\n return null; // no file found\n}\n\nexport async function getCommitDetails(\n commit: string,\n repoId: string,\n): Promise<GitCommit> {\n logger.debug(`getCommitDetails(${commit}, ${repoId})`);\n const azureApiGit = await azureApi.gitApi();\n const results = await azureApiGit.getCommit(commit, repoId);\n return results;\n}\n\nexport async function getMergeMethod(\n repoId: string,\n project: string,\n branchRef?: string | null,\n defaultBranch?: string,\n): Promise<GitPullRequestMergeStrategy> {\n logger.debug(\n `getMergeMethod(branchRef=${branchRef}, defaultBranch=${defaultBranch})`,\n );\n interface Scope {\n repositoryId: string;\n refName?: string;\n matchKind: 'Prefix' | 'Exact' | 'DefaultBranch';\n }\n const isRelevantScope = (scope: Scope): boolean => {\n if (\n scope.matchKind === 'DefaultBranch' &&\n // TODO: types (#22198)\n (!branchRef || branchRef === `refs/heads/${defaultBranch!}`)\n ) {\n return true;\n }\n if (scope.repositoryId !== repoId && scope.repositoryId !== null) {\n return false;\n }\n if (!branchRef) {\n return true;\n }\n // TODO #22198\n return scope.matchKind === 'Exact'\n ? scope.refName === branchRef\n : branchRef.startsWith(scope.refName!);\n };\n\n const policyConfigurations = (\n await (\n await azureApi.policyApi()\n ).getPolicyConfigurations(project, undefined, mergePolicyGuid)\n )\n .filter((p) => p.settings.scope.some(isRelevantScope))\n .map((p) => p.settings)[0];\n\n logger.debug(\n // TODO: types (#22198)\n `getMergeMethod(branchRef=${branchRef!}) determining mergeMethod from matched policy:\\n${JSON.stringify(\n policyConfigurations,\n null,\n 4,\n )}`,\n );\n\n try {\n // TODO: fix me, wrong types\n return Object.keys(policyConfigurations)\n .map(\n (p) =>\n GitPullRequestMergeStrategy[\n p.slice(5) as never\n ] as never as GitPullRequestMergeStrategy,\n )\n .find((p) => p)!;\n } catch {\n return GitPullRequestMergeStrategy.NoFastForward;\n }\n}\n\nexport async function getAllProjectTeams(\n projectId: string,\n): Promise<WebApiTeam[]> {\n const allTeams: WebApiTeam[] = [];\n const azureApiCore = await azureApi.coreApi();\n const top = 100;\n let skip = 0;\n let length = 0;\n\n do {\n const teams = await azureApiCore.getTeams(projectId, undefined, top, skip);\n length = teams.length;\n allTeams.push(...teams);\n skip += top;\n } while (top <= length);\n\n return allTeams;\n}\n"]}
1
+ {"version":3,"file":"azure-helper.js","sourceRoot":"","sources":["../../../../lib/modules/platform/azure/azure-helper.ts"],"names":[],"mappings":";;AAkBA,0BAYC;AAOD,8CAoBC;AAGD,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ourcesContent":["import type { WebApiTeam } from 'azure-devops-node-api/interfaces/CoreInterfaces.js';\nimport type {\n GitCommit,\n GitRef,\n} from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport { GitPullRequestMergeStrategy } from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport { logger } from '../../../logger';\nimport { streamToString } from '../../../util/streams';\nimport { getNewBranchName } from '../util';\nimport * as azureApi from './azure-got-wrapper';\nimport { WrappedExceptionSchema } from './schema';\nimport {\n getBranchNameWithoutRefsPrefix,\n getBranchNameWithoutRefsheadsPrefix,\n} from './util';\n\nconst mergePolicyGuid = 'fa4e907d-c16b-4a4c-9dfa-4916e5d171ab'; // Magic GUID for merge strategy policy configurations\n\nexport async function getRefs(\n repoId: string,\n branchName?: string,\n): Promise<GitRef[]> {\n logger.debug(`getRefs(${repoId}, ${branchName!})`);\n const azureApiGit = await azureApi.gitApi();\n const refs = await azureApiGit.getRefs(\n repoId,\n undefined,\n getBranchNameWithoutRefsPrefix(branchName),\n );\n return refs;\n}\n\nexport interface AzureBranchObj {\n name: string;\n oldObjectId: string;\n}\n\nexport async function getAzureBranchObj(\n repoId: string,\n branchName: string,\n from?: string,\n): Promise<AzureBranchObj> {\n const fromBranchName = getNewBranchName(from);\n const refs = await getRefs(repoId, fromBranchName);\n if (refs.length === 0) {\n logger.debug(`getAzureBranchObj without a valid from, so initial commit.`);\n // TODO: fix undefined\n return {\n name: getNewBranchName(branchName)!,\n oldObjectId: '0000000000000000000000000000000000000000',\n };\n }\n return {\n // TODO: fix undefined (#22198)\n name: getNewBranchName(branchName)!,\n oldObjectId: refs[0].objectId!,\n };\n}\n\n// if no branchName, look globally\nexport async function getFile(\n repoId: string,\n filePath: string,\n branchName: string,\n): Promise<string | null> {\n logger.trace(`getFile(filePath=${filePath}, branchName=${branchName})`);\n const azureApiGit = await azureApi.gitApi();\n const item = await azureApiGit.getItemText(\n repoId,\n filePath,\n undefined,\n undefined,\n 0, // because we look for 1 file\n false,\n false,\n true,\n {\n versionType: 0, // branch\n versionOptions: 0,\n version: getBranchNameWithoutRefsheadsPrefix(branchName),\n },\n );\n\n if (item?.readable) {\n const fileContent = await streamToString(item);\n try {\n const result = WrappedExceptionSchema.safeParse(fileContent);\n if (result.success) {\n if (result.data.typeKey === 'GitItemNotFoundException') {\n logger.warn({ filePath }, 'Unable to find file');\n return null;\n }\n if (result.data.typeKey === 'GitUnresolvableToCommitException') {\n logger.warn({ branchName }, 'Unable to find branch');\n return null;\n }\n }\n } catch /* v8 ignore start */ {\n // it 's not a JSON, so I send the content directly with the line under\n } /* v8 ignore stop */\n\n return fileContent;\n }\n\n return null; // no file found\n}\n\nexport async function getCommitDetails(\n commit: string,\n repoId: string,\n): Promise<GitCommit> {\n logger.debug(`getCommitDetails(${commit}, ${repoId})`);\n const azureApiGit = await azureApi.gitApi();\n const results = await azureApiGit.getCommit(commit, repoId);\n return results;\n}\n\nexport async function getMergeMethod(\n repoId: string,\n project: string,\n branchRef?: string | null,\n defaultBranch?: string,\n): Promise<GitPullRequestMergeStrategy> {\n logger.debug(\n `getMergeMethod(branchRef=${branchRef}, defaultBranch=${defaultBranch})`,\n );\n interface Scope {\n repositoryId: string;\n refName?: string;\n matchKind: 'Prefix' | 'Exact' | 'DefaultBranch';\n }\n const isRelevantScope = (scope: Scope): boolean => {\n if (\n scope.matchKind === 'DefaultBranch' &&\n // TODO: types (#22198)\n (!branchRef || branchRef === `refs/heads/${defaultBranch!}`)\n ) {\n return true;\n }\n if (scope.repositoryId !== repoId && scope.repositoryId !== null) {\n return false;\n }\n if (!branchRef) {\n return true;\n }\n // TODO #22198\n return scope.matchKind === 'Exact'\n ? scope.refName === branchRef\n : branchRef.startsWith(scope.refName!);\n };\n\n const policyConfigurations = (\n await (\n await azureApi.policyApi()\n ).getPolicyConfigurations(project, undefined, mergePolicyGuid)\n )\n .filter((p) => p.settings.scope.some(isRelevantScope))\n .map((p) => p.settings)[0];\n\n logger.debug(\n // TODO: types (#22198)\n `getMergeMethod(branchRef=${branchRef!}) determining mergeMethod from matched policy:\\n${JSON.stringify(\n policyConfigurations,\n null,\n 4,\n )}`,\n );\n\n try {\n // TODO: fix me, wrong types\n return Object.keys(policyConfigurations)\n .map(\n (p) =>\n GitPullRequestMergeStrategy[\n p.slice(5) as never\n ] as never as GitPullRequestMergeStrategy,\n )\n .find((p) => p)!;\n } catch {\n return GitPullRequestMergeStrategy.NoFastForward;\n }\n}\n\nexport async function getAllProjectTeams(\n projectId: string,\n): Promise<WebApiTeam[]> {\n const allTeams: WebApiTeam[] = [];\n const azureApiCore = await azureApi.coreApi();\n const top = 100;\n let skip = 0;\n let length = 0;\n\n do {\n const teams = await azureApiCore.getTeams(projectId, undefined, top, skip);\n length = teams.length;\n allTeams.push(...teams);\n skip += top;\n } while (top <= length);\n\n return allTeams;\n}\n"]}
@@ -1,5 +1,5 @@
1
- import type { WrappedException as _WrappedException } from 'azure-devops-node-api/interfaces/common/VSSInterfaces';
1
+ import type { WrappedException } from 'azure-devops-node-api/interfaces/common/VSSInterfaces';
2
2
  import { z } from 'zod';
3
- declare const _WrappedException: z.ZodSchema<_WrappedException>;
4
- export declare const WrappedException: z.ZodPipeline<z.ZodEffects<z.ZodString, string | number | boolean | import("type-fest").JsonObject | import("type-fest").JsonValue[] | readonly import("type-fest").JsonValue[] | null, string>, z.ZodType<_WrappedException, z.ZodTypeDef, _WrappedException>>;
3
+ declare const WrappedException: z.ZodSchema<WrappedException>;
4
+ export declare const WrappedExceptionSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, string | number | boolean | import("type-fest").JsonObject | import("type-fest").JsonValue[] | readonly import("type-fest").JsonValue[] | null, string>, z.ZodType<WrappedException, z.ZodTypeDef, WrappedException>>;
5
5
  export {};
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WrappedException = void 0;
3
+ exports.WrappedExceptionSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const schema_utils_1 = require("../../../util/schema-utils");
6
- const _WrappedException = zod_1.z.lazy(() => zod_1.z.object({
6
+ const WrappedException = zod_1.z.lazy(() => zod_1.z.object({
7
7
  customProperties: zod_1.z.record(zod_1.z.any()).optional(),
8
8
  errorCode: zod_1.z.number().optional(),
9
9
  eventId: zod_1.z.number().optional(),
10
10
  helpLink: zod_1.z.string().optional(),
11
- innerException: _WrappedException.optional(),
11
+ innerException: WrappedException.optional(),
12
12
  message: zod_1.z.string().optional(),
13
13
  stackTrace: zod_1.z.string().optional(),
14
14
  typeKey: zod_1.z.string().optional(),
15
15
  typeName: zod_1.z.string().optional(),
16
16
  }));
17
- exports.WrappedException = schema_utils_1.Json.pipe(_WrappedException);
17
+ exports.WrappedExceptionSchema = schema_utils_1.Json.pipe(WrappedException);
18
18
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/platform/azure/schema.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AACxB,6DAAkD;AAElD,MAAM,iBAAiB,GAAmC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpE,OAAC,CAAC,MAAM,CAAC;IACP,gBAAgB,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,cAAc,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CACH,CAAC;AAEW,QAAA,gBAAgB,GAAG,mBAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import type { WrappedException as _WrappedException } from 'azure-devops-node-api/interfaces/common/VSSInterfaces';\nimport { z } from 'zod';\nimport { Json } from '../../../util/schema-utils';\n\nconst _WrappedException: z.ZodSchema<_WrappedException> = z.lazy(() =>\n z.object({\n customProperties: z.record(z.any()).optional(),\n errorCode: z.number().optional(),\n eventId: z.number().optional(),\n helpLink: z.string().optional(),\n innerException: _WrappedException.optional(),\n message: z.string().optional(),\n stackTrace: z.string().optional(),\n typeKey: z.string().optional(),\n typeName: z.string().optional(),\n }),\n);\n\nexport const WrappedException = Json.pipe(_WrappedException);\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/platform/azure/schema.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AACxB,6DAAkD;AAElD,MAAM,gBAAgB,GAAkC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAClE,OAAC,CAAC,MAAM,CAAC;IACP,gBAAgB,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,cAAc,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CACH,CAAC;AAEW,QAAA,sBAAsB,GAAG,mBAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import type { WrappedException } from 'azure-devops-node-api/interfaces/common/VSSInterfaces';\nimport { z } from 'zod';\nimport { Json } from '../../../util/schema-utils';\n\nconst WrappedException: z.ZodSchema<WrappedException> = z.lazy(() =>\n z.object({\n customProperties: z.record(z.any()).optional(),\n errorCode: z.number().optional(),\n eventId: z.number().optional(),\n helpLink: z.string().optional(),\n innerException: WrappedException.optional(),\n message: z.string().optional(),\n stackTrace: z.string().optional(),\n typeKey: z.string().optional(),\n typeName: z.string().optional(),\n }),\n);\n\nexport const WrappedExceptionSchema = Json.pipe(WrappedException);\n"]}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const PagedSourceResults: z.ZodObject<{
2
+ export declare const PagedSourceResultsSchema: z.ZodObject<{
3
3
  page: z.ZodOptional<z.ZodNumber>;
4
4
  pagelen: z.ZodNumber;
5
5
  size: z.ZodOptional<z.ZodNumber>;
@@ -1,25 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnresolvedPrTasks = exports.Repositories = exports.RepoInfo = exports.PagedSourceResults = void 0;
3
+ exports.UnresolvedPrTasks = exports.Repositories = exports.RepoInfo = exports.PagedSourceResultsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const logger_1 = require("../../../logger");
6
6
  const schema_utils_1 = require("../../../util/schema-utils");
7
- const BitbucketSourceType = zod_1.z.enum(['commit_directory', 'commit_file']);
8
- const SourceResults = zod_1.z.object({
7
+ const BitbucketSourceTypeSchema = zod_1.z.enum(['commit_directory', 'commit_file']);
8
+ const SourceResultsSchema = zod_1.z.object({
9
9
  path: zod_1.z.string(),
10
- type: BitbucketSourceType,
10
+ type: BitbucketSourceTypeSchema,
11
11
  commit: zod_1.z.object({
12
12
  hash: zod_1.z.string(),
13
13
  }),
14
14
  });
15
- const Paged = zod_1.z.object({
15
+ const PagedSchema = zod_1.z.object({
16
16
  page: zod_1.z.number().optional(),
17
17
  pagelen: zod_1.z.number(),
18
18
  size: zod_1.z.number().optional(),
19
19
  next: zod_1.z.string().optional(),
20
20
  });
21
- exports.PagedSourceResults = Paged.extend({
22
- values: zod_1.z.array(SourceResults),
21
+ exports.PagedSourceResultsSchema = PagedSchema.extend({
22
+ values: zod_1.z.array(SourceResultsSchema),
23
23
  });
24
24
  exports.RepoInfo = zod_1.z
25
25
  .object({
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/platform/bitbucket/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAyC;AACzC,6DAAwD;AAExD,MAAM,mBAAmB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC,CAAC;AAExE,MAAM,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,mBAAmB;IACzB,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;KACjB,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,KAAK,GAAG,OAAC,CAAC,MAAM,CAAC;IACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAEU,QAAA,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7C,MAAM,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EAAE,YAAY,CAAC,IAAI;QACvB,UAAU,EAAE,YAAY,CAAC,UAAU;QACnC,WAAW,EAAE,YAAY,CAAC,OAAO,EAAE,IAAI;KACxC,CAAC;AACJ,CAAC,CAAC,CAAC;AAGQ,QAAA,YAAY,GAAG,OAAC;KAC1B,MAAM,CAAC;IACN,MAAM,EAAE,IAAA,yBAAU,EAAC,gBAAQ,CAAC;CAC7B,CAAC;KACD,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAEpC,MAAM,SAAS,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAE5E,MAAM,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;IACtB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;KAChB,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,iBAAiB,GAAG,OAAC;KAC/B,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,MAAM,CAAC;CACxB,CAAC;KACD,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAClB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,CAC1D,CAAC","sourcesContent":["import { z } from 'zod';\nimport { logger } from '../../../logger';\nimport { LooseArray } from '../../../util/schema-utils';\n\nconst BitbucketSourceType = z.enum(['commit_directory', 'commit_file']);\n\nconst SourceResults = z.object({\n path: z.string(),\n type: BitbucketSourceType,\n commit: z.object({\n hash: z.string(),\n }),\n});\n\nconst Paged = z.object({\n page: z.number().optional(),\n pagelen: z.number(),\n size: z.number().optional(),\n next: z.string().optional(),\n});\n\nexport const PagedSourceResults = Paged.extend({\n values: z.array(SourceResults),\n});\n\nexport const RepoInfo = z\n .object({\n parent: z.unknown().optional().catch(undefined),\n mainbranch: z.object({\n name: z.string(),\n }),\n has_issues: z.boolean().catch(() => {\n return false;\n }),\n uuid: z.string(),\n full_name: z\n .string()\n .regex(\n /^[^/]+\\/[^/]+$/,\n 'Expected repository full_name to be in the format \"owner/repo\"',\n ),\n is_private: z.boolean().catch(() => {\n logger.once.warn('Bitbucket: \"is_private\" field missing from repo info');\n return true;\n }),\n project: z\n .object({\n name: z.string(),\n })\n .nullable()\n .catch(null),\n })\n .transform((repoInfoBody) => {\n const isFork = !!repoInfoBody.parent;\n const [owner, name] = repoInfoBody.full_name.split('/');\n\n return {\n isFork,\n owner,\n name,\n mainbranch: repoInfoBody.mainbranch.name,\n mergeMethod: 'merge',\n has_issues: repoInfoBody.has_issues,\n uuid: repoInfoBody.uuid,\n is_private: repoInfoBody.is_private,\n projectName: repoInfoBody.project?.name,\n };\n });\nexport type RepoInfo = z.infer<typeof RepoInfo>;\n\nexport const Repositories = z\n .object({\n values: LooseArray(RepoInfo),\n })\n .transform((body) => body.values);\n\nconst TaskState = z.union([z.literal('RESOLVED'), z.literal('UNRESOLVED')]);\n\nconst PrTask = z.object({\n id: z.number(),\n state: TaskState,\n content: z.object({\n raw: z.string(),\n }),\n});\n\nexport type PrTask = z.infer<typeof PrTask>;\n\nexport const UnresolvedPrTasks = z\n .object({\n values: z.array(PrTask),\n })\n .transform((data) =>\n data.values.filter((task) => task.state === 'UNRESOLVED'),\n );\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/platform/bitbucket/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAyC;AACzC,6DAAwD;AAExD,MAAM,yBAAyB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC,CAAC;AA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AC;QAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;KAChB,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,iBAAiB,GAAG,OAAC;KAC/B,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,MAAM,CAAC;CACxB,CAAC;KACD,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAClB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,CAC1D,CAAC","sourcesContent":["import { z } from 'zod';\nimport { logger } from '../../../logger';\nimport { LooseArray } from '../../../util/schema-utils';\n\nconst BitbucketSourceTypeSchema = z.enum(['commit_directory', 'commit_file']);\n\nconst SourceResultsSchema = z.object({\n path: z.string(),\n type: BitbucketSourceTypeSchema,\n commit: z.object({\n hash: z.string(),\n }),\n});\n\nconst PagedSchema = z.object({\n page: z.number().optional(),\n pagelen: z.number(),\n size: z.number().optional(),\n next: z.string().optional(),\n});\n\nexport const PagedSourceResultsSchema = PagedSchema.extend({\n values: z.array(SourceResultsSchema),\n});\n\nexport const RepoInfo = z\n .object({\n parent: z.unknown().optional().catch(undefined),\n mainbranch: z.object({\n name: z.string(),\n }),\n has_issues: z.boolean().catch(() => {\n return false;\n }),\n uuid: z.string(),\n full_name: z\n .string()\n .regex(\n /^[^/]+\\/[^/]+$/,\n 'Expected repository full_name to be in the format \"owner/repo\"',\n ),\n is_private: z.boolean().catch(() => {\n logger.once.warn('Bitbucket: \"is_private\" field missing from repo info');\n return true;\n }),\n project: z\n .object({\n name: z.string(),\n })\n .nullable()\n .catch(null),\n })\n .transform((repoInfoBody) => {\n const isFork = !!repoInfoBody.parent;\n const [owner, name] = repoInfoBody.full_name.split('/');\n\n return {\n isFork,\n owner,\n name,\n mainbranch: repoInfoBody.mainbranch.name,\n mergeMethod: 'merge',\n has_issues: repoInfoBody.has_issues,\n uuid: repoInfoBody.uuid,\n is_private: repoInfoBody.is_private,\n projectName: repoInfoBody.project?.name,\n };\n });\nexport type RepoInfo = z.infer<typeof RepoInfo>;\n\nexport const Repositories = z\n .object({\n values: LooseArray(RepoInfo),\n })\n .transform((body) => body.values);\n\nconst TaskState = z.union([z.literal('RESOLVED'), z.literal('UNRESOLVED')]);\n\nconst PrTask = z.object({\n id: z.number(),\n state: TaskState,\n content: z.object({\n raw: z.string(),\n }),\n});\n\nexport type PrTask = z.infer<typeof PrTask>;\n\nexport const UnresolvedPrTasks = z\n .object({\n values: z.array(PrTask),\n })\n .transform((data) =>\n data.values.filter((task) => task.state === 'UNRESOLVED'),\n );\n"]}
@@ -125,7 +125,7 @@ async function initPlatform({ endpoint, token, username, password, gitAuthor, })
125
125
  options.password = password;
126
126
  }
127
127
  try {
128
- const { displayName, emailAddress } = (await bitbucketServerHttp.getJson(`./rest/api/1.0/users/${username}`, options, schema_1.User)).body;
128
+ const { displayName, emailAddress } = (await bitbucketServerHttp.getJson(`./rest/api/1.0/users/${username}`, options, schema_1.UserSchema)).body;
129
129
  if (!emailAddress.length) {
130
130
  throw new Error(`No email address configured for username ${username}`);
131
131
  }
@@ -519,7 +519,7 @@ async function getUserSlugsByEmail(emailAddress) {
519
519
  `&permission.1=REPO_READ` +
520
520
  `&permission.1.projectKey=${config.projectKey}` +
521
521
  `&permission.1.repositorySlug=${config.repositorySlug}`;
522
- const users = await bitbucketServerHttp.getJson(filterUrl, { limit: 100 }, schema_1.Users);
522
+ const users = await bitbucketServerHttp.getJson(filterUrl, { limit: 100 }, schema_1.UsersSchema);
523
523
  if (users.body.length) {
524
524
  return users.body
525
525
  .filter((u) => u.active && u.emailAddress === emailAddress)