renovate 44.60.1 → 44.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,9 @@
1
1
  import { logger } from "../../../logger/index.js";
2
- import { joinUrlParts } from "../../../util/url.js";
2
+ import { getQueryString, joinUrlParts } from "../../../util/url.js";
3
3
  import { withCache } from "../../../util/cache/package/with-cache.js";
4
- import { asTimestamp } from "../../../util/timestamp.js";
5
4
  import { Datasource } from "../datasource.js";
5
+ import { OrbPackagesResponse } from "./schema.js";
6
6
  //#region lib/modules/datasource/orb/index.ts
7
- const MAX_VERSIONS = 100;
8
- const query = `
9
- query($packageName: String!, $maxVersions: Int!) {
10
- orb(name: $packageName) {
11
- name,
12
- homeUrl,
13
- isPrivate,
14
- versions(count: $maxVersions) {
15
- version,
16
- createdAt
17
- }
18
- }
19
- }
20
- `;
21
7
  var OrbDatasource = class OrbDatasource extends Datasource {
22
8
  static id = "orb";
23
9
  constructor() {
@@ -27,41 +13,33 @@ var OrbDatasource = class OrbDatasource extends Datasource {
27
13
  defaultRegistryUrls = ["https://circleci.com/"];
28
14
  registryStrategy = "hunt";
29
15
  releaseTimestampSupport = true;
30
- releaseTimestampNote = "The release timestamp is determined from the `createdAt` field in the results.";
16
+ releaseTimestampNote = "The release timestamp is determined from the `created_at` field in the results.";
31
17
  async _getReleases({ packageName, registryUrl }) {
32
18
  /* v8 ignore next -- should never happen */
33
19
  if (!registryUrl) return null;
34
- const url = joinUrlParts(registryUrl, "graphql-unstable");
35
- const body = {
36
- query,
37
- variables: {
38
- packageName,
39
- maxVersions: MAX_VERSIONS
20
+ const url = `${joinUrlParts(registryUrl, "api/v3/orb/packages")}?${getQueryString({ "filter[name]": packageName })}`;
21
+ try {
22
+ const { body } = await this.http.getJson(url, OrbPackagesResponse);
23
+ const pkg = body.data[0];
24
+ if (!pkg) {
25
+ logger.debug({ packageName }, `Failed to look up orb ${packageName}`);
26
+ return null;
40
27
  }
41
- };
42
- const res = (await this.http.postJson(url, { body })).body;
43
- if (!res?.data?.orb) {
44
- logger.debug({ res }, `Failed to look up orb ${packageName}`);
45
- return null;
28
+ const dep = {
29
+ homepage: pkg.homeUrl?.length ? pkg.homeUrl : `https://circleci.com/developer/orbs/orb/${packageName}`,
30
+ isPrivate: pkg.isPrivate,
31
+ releases: pkg.releases
32
+ };
33
+ logger.trace({ dep }, "dep");
34
+ return dep;
35
+ } catch (err) {
36
+ this.handleGenericErrors(err);
46
37
  }
47
- const { orb } = res.data;
48
- const homepage = orb.homeUrl?.length ? orb.homeUrl : `https://circleci.com/developer/orbs/orb/${packageName}`;
49
- const releases = orb.versions.map(({ version, createdAt }) => ({
50
- version,
51
- releaseTimestamp: asTimestamp(createdAt)
52
- }));
53
- const dep = {
54
- homepage,
55
- isPrivate: !!orb.isPrivate,
56
- releases
57
- };
58
- logger.trace({ dep }, "dep");
59
- return dep;
60
38
  }
61
39
  getReleases(config) {
62
40
  return withCache({
63
41
  namespace: `datasource-${OrbDatasource.id}`,
64
- key: config.packageName,
42
+ key: `${config.registryUrl}:${config.packageName}`,
65
43
  fallback: true
66
44
  }, () => this._getReleases(config));
67
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/datasource/orb/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport { joinUrlParts } from '../../../util/url.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport type { OrbResponse } from './types.ts';\n\nconst MAX_VERSIONS = 100;\n\nconst query = `\nquery($packageName: String!, $maxVersions: Int!) {\n orb(name: $packageName) {\n name,\n homeUrl,\n isPrivate,\n versions(count: $maxVersions) {\n version,\n createdAt\n }\n }\n}\n`;\n\nexport class OrbDatasource extends Datasource {\n static readonly id = 'orb';\n\n constructor() {\n super(OrbDatasource.id);\n }\n\n override readonly customRegistrySupport = true;\n\n override readonly defaultRegistryUrls = ['https://circleci.com/'];\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `createdAt` field in the results.';\n\n private async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next -- should never happen */\n if (!registryUrl) {\n return null;\n }\n const url = joinUrlParts(registryUrl, 'graphql-unstable');\n const body = {\n query,\n variables: { packageName, maxVersions: MAX_VERSIONS },\n };\n const res = (\n await this.http.postJson<OrbResponse>(url, {\n body,\n })\n ).body;\n if (!res?.data?.orb) {\n logger.debug({ res }, `Failed to look up orb ${packageName}`);\n return null;\n }\n\n const { orb } = res.data;\n // Simplify response before caching and returning\n const homepage = orb.homeUrl?.length\n ? orb.homeUrl\n : `https://circleci.com/developer/orbs/orb/${packageName}`;\n const releases = orb.versions.map(({ version, createdAt }) => ({\n version,\n releaseTimestamp: asTimestamp(createdAt),\n }));\n\n const dep = { homepage, isPrivate: !!orb.isPrivate, releases };\n logger.trace({ dep }, 'dep');\n return dep;\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${OrbDatasource.id}`,\n key: config.packageName,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n}\n"],"mappings":";;;;;;AAQA,MAAM,eAAe;AAErB,MAAM,QAAQ;;;;;;;;;;;;;AAcd,IAAa,gBAAb,MAAa,sBAAsB,WAAW;CAC5C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,cAAc,EAAE;CACxB;CAEA,wBAA0C;CAE1C,sBAAwC,CAAC,uBAAuB;CAChE,mBAAqC;CAErC,0BAA4C;CAC5C,uBACE;CAEF,MAAc,aAAa,EACzB,aACA,eACmD;;EAEnD,IAAI,CAAC,aACH,OAAO;EAET,MAAM,MAAM,aAAa,aAAa,kBAAkB;EACxD,MAAM,OAAO;GACX;GACA,WAAW;IAAE;IAAa,aAAa;GAAa;EACtD;EACA,MAAM,OACJ,MAAM,KAAK,KAAK,SAAsB,KAAK,EACzC,KACF,CAAC,EAAA,CACD;EACF,IAAI,CAAC,KAAK,MAAM,KAAK;GACnB,OAAO,MAAM,EAAE,IAAI,GAAG,yBAAyB,aAAa;GAC5D,OAAO;EACT;EAEA,MAAM,EAAE,QAAQ,IAAI;EAEpB,MAAM,WAAW,IAAI,SAAS,SAC1B,IAAI,UACJ,2CAA2C;EAC/C,MAAM,WAAW,IAAI,SAAS,KAAK,EAAE,SAAS,iBAAiB;GAC7D;GACA,kBAAkB,YAAY,SAAS;EACzC,EAAE;EAEF,MAAM,MAAM;GAAE;GAAU,WAAW,CAAC,CAAC,IAAI;GAAW;EAAS;EAC7D,OAAO,MAAM,EAAE,IAAI,GAAG,KAAK;EAC3B,OAAO;CACT;CAEA,YAAY,QAA0D;EACpE,OAAO,UACL;GACE,WAAW,cAAc,cAAc;GACvC,KAAK,OAAO;GACZ,UAAU;EACZ,SACM,KAAK,aAAa,MAAM,CAChC;CACF;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/datasource/orb/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { getQueryString, joinUrlParts } from '../../../util/url.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport { OrbPackagesResponse } from './schema.ts';\n\nexport class OrbDatasource extends Datasource {\n static readonly id = 'orb';\n\n constructor() {\n super(OrbDatasource.id);\n }\n\n override readonly customRegistrySupport = true;\n\n override readonly defaultRegistryUrls = ['https://circleci.com/'];\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `created_at` field in the results.';\n\n private async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next -- should never happen */\n if (!registryUrl) {\n return null;\n }\n const url = `${joinUrlParts(\n registryUrl,\n 'api/v3/orb/packages',\n )}?${getQueryString({ 'filter[name]': packageName })}`;\n try {\n const { body } = await this.http.getJson(url, OrbPackagesResponse);\n const pkg = body.data[0];\n if (!pkg) {\n logger.debug({ packageName }, `Failed to look up orb ${packageName}`);\n return null;\n }\n\n // The homepage fallback uses the requested packageName, which the schema\n // has no access to, so it is built here rather than in the transform.\n const homepage = pkg.homeUrl?.length\n ? pkg.homeUrl\n : `https://circleci.com/developer/orbs/orb/${packageName}`;\n const dep = {\n homepage,\n isPrivate: pkg.isPrivate,\n releases: pkg.releases,\n };\n logger.trace({ dep }, 'dep');\n return dep;\n } catch (err) {\n this.handleGenericErrors(err);\n }\n }\n\n override getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${OrbDatasource.id}`,\n key: `${config.registryUrl}:${config.packageName}`,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n}\n"],"mappings":";;;;;;AAOA,IAAa,gBAAb,MAAa,sBAAsB,WAAW;CAC5C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,cAAc,EAAE;CACxB;CAEA,wBAA0C;CAE1C,sBAAwC,CAAC,uBAAuB;CAChE,mBAAqC;CAErC,0BAA4C;CAC5C,uBACE;CAEF,MAAc,aAAa,EACzB,aACA,eACmD;;EAEnD,IAAI,CAAC,aACH,OAAO;EAET,MAAM,MAAM,GAAG,aACb,aACA,qBACF,EAAE,GAAG,eAAe,EAAE,gBAAgB,YAAY,CAAC;EACnD,IAAI;GACF,MAAM,EAAE,SAAS,MAAM,KAAK,KAAK,QAAQ,KAAK,mBAAmB;GACjE,MAAM,MAAM,KAAK,KAAK;GACtB,IAAI,CAAC,KAAK;IACR,OAAO,MAAM,EAAE,YAAY,GAAG,yBAAyB,aAAa;IACpE,OAAO;GACT;GAOA,MAAM,MAAM;IACV,UAJe,IAAI,SAAS,SAC1B,IAAI,UACJ,2CAA2C;IAG7C,WAAW,IAAI;IACf,UAAU,IAAI;GAChB;GACA,OAAO,MAAM,EAAE,IAAI,GAAG,KAAK;GAC3B,OAAO;EACT,SAAS,KAAK;GACZ,KAAK,oBAAoB,GAAG;EAC9B;CACF;CAEA,YACE,QAC+B;EAC/B,OAAO,UACL;GACE,WAAW,cAAc,cAAc;GACvC,KAAK,GAAG,OAAO,YAAY,GAAG,OAAO;GACrC,UAAU;EACZ,SACM,KAAK,aAAa,MAAM,CAChC;CACF;AACF"}
@@ -0,0 +1,27 @@
1
+ import { DeepNullish, LooseArray } from "../../../util/schema-utils/index.js";
2
+ import { MaybeTimestamp } from "../../../util/timestamp.js";
3
+ import { z } from "zod/v4";
4
+ //#region lib/modules/datasource/orb/schema.ts
5
+ const OrbVersion = z.object({ attributes: z.object({
6
+ version: z.string(),
7
+ created_at: MaybeTimestamp
8
+ }) }).transform(({ attributes }) => ({
9
+ version: attributes.version,
10
+ releaseTimestamp: attributes.created_at
11
+ }));
12
+ const OrbPackage = z.object({
13
+ attributes: DeepNullish(z.object({
14
+ is_private: z.boolean().optional(),
15
+ home_url: z.string().optional()
16
+ })),
17
+ references: z.object({ orb_versions: LooseArray(OrbVersion).catch([]) }).default({ orb_versions: [] })
18
+ }).transform(({ attributes, references }) => ({
19
+ homeUrl: attributes.home_url,
20
+ isPrivate: !!attributes.is_private,
21
+ releases: references.orb_versions
22
+ }));
23
+ const OrbPackagesResponse = z.object({ data: z.array(OrbPackage) });
24
+ //#endregion
25
+ export { OrbPackagesResponse };
26
+
27
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/orb/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { DeepNullish, LooseArray } from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release } from '../types.ts';\n\nconst OrbVersion = z\n .object({\n attributes: z.object({\n version: z.string(),\n created_at: MaybeTimestamp,\n }),\n })\n .transform(\n ({ attributes }): Release => ({\n version: attributes.version,\n releaseTimestamp: attributes.created_at,\n }),\n );\n\nconst OrbPackage = z\n .object({\n attributes: DeepNullish(\n z.object({\n is_private: z.boolean().optional(),\n home_url: z.string().optional(),\n }),\n ),\n references: z\n .object({\n orb_versions: LooseArray(OrbVersion).catch([]),\n })\n .default({ orb_versions: [] }),\n })\n .transform(({ attributes, references }) => ({\n homeUrl: attributes.home_url,\n isPrivate: !!attributes.is_private,\n releases: references.orb_versions,\n }));\n\nexport const OrbPackagesResponse = z.object({\n data: z.array(OrbPackage),\n});\n"],"mappings":";;;;AAKA,MAAM,aAAa,EAChB,OAAO,EACN,YAAY,EAAE,OAAO;CACnB,SAAS,EAAE,OAAO;CAClB,YAAY;AACd,CAAC,EACH,CAAC,CAAC,CACD,WACE,EAAE,kBAA2B;CAC5B,SAAS,WAAW;CACpB,kBAAkB,WAAW;AAC/B,EACF;AAEF,MAAM,aAAa,EAChB,OAAO;CACN,YAAY,YACV,EAAE,OAAO;EACP,YAAY,EAAE,QAAQ,CAAC,CAAC,SAAS;EACjC,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAChC,CAAC,CACH;CACA,YAAY,EACT,OAAO,EACN,cAAc,WAAW,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,EAC/C,CAAC,CAAC,CACD,QAAQ,EAAE,cAAc,CAAC,EAAE,CAAC;AACjC,CAAC,CAAC,CACD,WAAW,EAAE,YAAY,kBAAkB;CAC1C,SAAS,WAAW;CACpB,WAAW,CAAC,CAAC,WAAW;CACxB,UAAU,WAAW;AACvB,EAAE;AAEJ,MAAa,sBAAsB,EAAE,OAAO,EAC1C,MAAM,EAAE,MAAM,UAAU,EAC1B,CAAC"}
@@ -6,7 +6,7 @@ hashMap.set("ant", "2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed51
6
6
  hashMap.set("apm", "5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d");
7
7
  hashMap.set("argocd", "5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce");
8
8
  hashMap.set("asdf", "430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb");
9
- hashMap.set("azure-pipelines", "4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796");
9
+ hashMap.set("azure-pipelines", "6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5");
10
10
  hashMap.set("batect", "bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e");
11
11
  hashMap.set("batect-wrapper", "d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939");
12
12
  hashMap.set("bazel", "4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a");
@@ -19,7 +19,7 @@ hashMap.set("buildkite", "a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1
19
19
  hashMap.set("buildpacks", "6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f");
20
20
  hashMap.set("bun", "691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94");
21
21
  hashMap.set("bun-version", "df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4");
22
- hashMap.set("bundler", "d14594256fa4fbc3b2b264437d67b718dbd2e30e1a7060cff5552c4257dec875");
22
+ hashMap.set("bundler", "62b58740b430430a6e1855a8f6601e97892a1c26f490679fb11c401d4a6f40eb");
23
23
  hashMap.set("cake", "ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1");
24
24
  hashMap.set("cargo", "637adb103a887ad496e469e25182c9cd7f3b4acb9eddfcbca9a1326bac3613cc");
25
25
  hashMap.set("cdnurl", "d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177");
@@ -39,21 +39,21 @@ hashMap.set("devcontainer", "24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f25
39
39
  hashMap.set("docker-compose", "5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb");
40
40
  hashMap.set("dockerfile", "54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478");
41
41
  hashMap.set("droneci", "237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee");
42
- hashMap.set("fleet", "d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e");
42
+ hashMap.set("fleet", "6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925");
43
43
  hashMap.set("flux", "70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5");
44
44
  hashMap.set("fvm", "9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90");
45
45
  hashMap.set("git-submodules", "f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815");
46
- hashMap.set("github-actions", "3dea0c91977c92d9c225c16cf27ce04a2dd7a1b652f0382c59d19b4685312cb3");
46
+ hashMap.set("github-actions", "f5d0459242ef89d72315f87bad2aac5744ee83341290eb771445ca4cbe77743d");
47
47
  hashMap.set("gitlabci", "33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125");
48
48
  hashMap.set("gitlabci-include", "ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb");
49
49
  hashMap.set("glasskube", "93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30");
50
50
  hashMap.set("gleam", "02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39");
51
51
  hashMap.set("gomod", "dc59f10824ae55ac4044ea2e487feb6e3ca2d365e1d518a61548d1dd1932e345");
52
52
  hashMap.set("gradle", "1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c");
53
- hashMap.set("gradle-wrapper", "e16500ce08dd35ecb3ddcc3c79989648087b8249c3a95413a991627d064657ca");
54
- hashMap.set("haskell-cabal", "f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891");
53
+ hashMap.set("gradle-wrapper", "f6c933eaa5cace6433d30f54ad5804e63a164399e2c1e8a3d3f1cb6218f39142");
54
+ hashMap.set("haskell-cabal", "f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2");
55
55
  hashMap.set("helm-requirements", "4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b");
56
- hashMap.set("helm-values", "b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af");
56
+ hashMap.set("helm-values", "c94d93b42874624b4fb166be16025f21dddc99a76fb69f858ac6603a554a22d2");
57
57
  hashMap.set("helmfile", "0adc0092400df2075e1c4580ebe35bbc3b638ebee67cc948a4338094cb16a8ae");
58
58
  hashMap.set("helmsman", "ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e");
59
59
  hashMap.set("helmv3", "572f7b0b746377e0c5d6f5ad5c0b78cbed6782a561be77263cf45620b6fdad0c");
@@ -62,8 +62,8 @@ hashMap.set("homeassistant-manifest", "05043c6db870cffbb6f8f3e351c025e3de227eaae
62
62
  hashMap.set("homebrew", "9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367");
63
63
  hashMap.set("html", "67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8");
64
64
  hashMap.set("jenkins", "268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3");
65
- hashMap.set("jsonnet-bundler", "e26b390528f2de43dc572bcee7cb15bb4671d2df75413a56caf1ddcee683a0ee");
66
- hashMap.set("kotlin-script", "8a327ba00370d0df5ee656033f0526b898204ef6805cc5692221a71ca2ad654d");
65
+ hashMap.set("jsonnet-bundler", "575e15b78c4e86c88407b80b5b321954df8d4b93e9a5f53fff5f119a2ff1930f");
66
+ hashMap.set("kotlin-script", "95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564");
67
67
  hashMap.set("kubernetes", "321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de");
68
68
  hashMap.set("kustomize", "14bc841079d278b8e03b1eb184d94fef3df8811fa25beddc7ac9e6e2697b43b5");
69
69
  hashMap.set("leiningen", "133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85");
@@ -75,11 +75,11 @@ hashMap.set("mise", "8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150
75
75
  hashMap.set("mix", "ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0");
76
76
  hashMap.set("nix", "f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7");
77
77
  hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
78
- hashMap.set("npm", "5241d7e7a2f7fa530fea4ba33166619f4166e48ca8f88b074c8ae5f10f00e079");
78
+ hashMap.set("npm", "d61de2851ca925fdbf964e9a6e4cefda727572a41b58344a0728709a0a3cc4a7");
79
79
  hashMap.set("nuget", "4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89");
80
80
  hashMap.set("nvm", "3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322");
81
81
  hashMap.set("ocb", "032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca");
82
- hashMap.set("osgi", "32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10");
82
+ hashMap.set("osgi", "d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024");
83
83
  hashMap.set("pep621", "db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9");
84
84
  hashMap.set("pep723", "b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1");
85
85
  hashMap.set("pip-compile", "a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048");
@@ -88,7 +88,7 @@ hashMap.set("pip_setup", "0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164
88
88
  hashMap.set("pipenv", "f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2");
89
89
  hashMap.set("pixi", "3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393");
90
90
  hashMap.set("poetry", "5a638977241e2a8d8a2ba310388b10db533612552ab2c93514cb0960a2b725cd");
91
- hashMap.set("pre-commit", "17a5f183985ebffe98785a541d3609bf25efedc387deb3d50e9f00f02b25f615");
91
+ hashMap.set("pre-commit", "215fdabbc5bae26dffca61a19be984a18386a1059a2220ee092d8efcfef46063");
92
92
  hashMap.set("proto", "412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843");
93
93
  hashMap.set("pub", "3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b");
94
94
  hashMap.set("puppet", "ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45");
@@ -98,14 +98,14 @@ hashMap.set("renovate-config", "ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12
98
98
  hashMap.set("ruby-version", "2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97");
99
99
  hashMap.set("runtime-version", "b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160");
100
100
  hashMap.set("rust-toolchain", "6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720");
101
- hashMap.set("sbt", "e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb");
101
+ hashMap.set("sbt", "9bf0529fde16a9c56c5f151e61622c1e56fe9e8bef27908bf4779da3387d8148");
102
102
  hashMap.set("scalafmt", "9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f");
103
103
  hashMap.set("setup-cfg", "7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785");
104
104
  hashMap.set("smithy", "9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100");
105
- hashMap.set("sveltos", "8d2558bce5fbcdfa4a96bf11de6f40bf6d93179025bbf6a9eeb0b7e02e8e9c00");
105
+ hashMap.set("sveltos", "e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5");
106
106
  hashMap.set("swift", "1e464136321889cdf9a4eb0cf32c459fbf897e0c75bbf44c2ba5a51c0a002bfe");
107
107
  hashMap.set("tekton", "fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd");
108
- hashMap.set("terraform", "73f9d1753d1077585bd264163b7bfacaf6cf20b586b233cbb8cf058a9fce0103");
108
+ hashMap.set("terraform", "8f4a70b1ee4dbbaee7e249d11912faa2b3ea4cc7c582310b5b636d224ab81fea");
109
109
  hashMap.set("terraform-version", "ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa");
110
110
  hashMap.set("terragrunt", "ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118");
111
111
  hashMap.set("terragrunt-version", "eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d");
@@ -1 +1 @@
1
- {"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','1d3568f42393d697f8f96d461b72077ee7a1044b654e87667a12f861b3083111');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','f7d369015f9028c40cb79f2367d0734f18c0647d1d446d0a165007c3723c3414');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','d14594256fa4fbc3b2b264437d67b718dbd2e30e1a7060cff5552c4257dec875');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','637adb103a887ad496e469e25182c9cd7f3b4acb9eddfcbca9a1326bac3613cc');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','3d3affcaab991e9a27916dfbc8bdddb1066be28303c37be781695bfc0645aa81');\nhashMap.set('composer','d84def5d2f07adb0b5c37195fa115a3a9d86194b57eae014d7b43d2d59fe7d1c');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','4ceb2d2ef2cea88d81ebf7c959cc8f36691ed148000b4ee7e64573a9ba4ae2c5');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','517b6d7cd75d8cf7a44d4dbac36474333e87a6e22b0f62a5228ee7c1f07e8282');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815');\nhashMap.set('github-actions','3dea0c91977c92d9c225c16cf27ce04a2dd7a1b652f0382c59d19b4685312cb3');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','dc59f10824ae55ac4044ea2e487feb6e3ca2d365e1d518a61548d1dd1932e345');\nhashMap.set('gradle','1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c');\nhashMap.set('gradle-wrapper','e16500ce08dd35ecb3ddcc3c79989648087b8249c3a95413a991627d064657ca');\nhashMap.set('haskell-cabal','f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','0adc0092400df2075e1c4580ebe35bbc3b638ebee67cc948a4338094cb16a8ae');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','572f7b0b746377e0c5d6f5ad5c0b78cbed6782a561be77263cf45620b6fdad0c');\nhashMap.set('hermit','61e132cfccbe4e3884801a3728f3391455c214811a33c1f733b0dea7122bbbb6');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','e26b390528f2de43dc572bcee7cb15bb4671d2df75413a56caf1ddcee683a0ee');\nhashMap.set('kotlin-script','8a327ba00370d0df5ee656033f0526b898204ef6805cc5692221a71ca2ad654d');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','14bc841079d278b8e03b1eb184d94fef3df8811fa25beddc7ac9e6e2697b43b5');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150d8b9b');\nhashMap.set('mix','ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0');\nhashMap.set('nix','f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','5241d7e7a2f7fa530fea4ba33166619f4166e48ca8f88b074c8ae5f10f00e079');\nhashMap.set('nuget','4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048');\nhashMap.set('pip_requirements','f07c39050e34e8da6084e7f43cb2222e7ef700bb66de895ee206505491cb8f4f');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','5a638977241e2a8d8a2ba310388b10db533612552ab2c93514cb0960a2b725cd');\nhashMap.set('pre-commit','17a5f183985ebffe98785a541d3609bf25efedc387deb3d50e9f00f02b25f615');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','8d2558bce5fbcdfa4a96bf11de6f40bf6d93179025bbf6a9eeb0b7e02e8e9c00');\nhashMap.set('swift','1e464136321889cdf9a4eb0cf32c459fbf897e0c75bbf44c2ba5a51c0a002bfe');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','73f9d1753d1077585bd264163b7bfacaf6cf20b586b233cbb8cf058a9fce0103');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','8901ee24116f7998bddcfc8d2492bff8138d9c66a23caea75c24d594ef4a504d');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','dbe6889ea021a05127fed06226d73366fdada2ae577147a5c027996fd325416e');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,eAAc,kEAAkE;AAC5F,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,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AAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
1
+ {"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','1d3568f42393d697f8f96d461b72077ee7a1044b654e87667a12f861b3083111');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','f7d369015f9028c40cb79f2367d0734f18c0647d1d446d0a165007c3723c3414');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','62b58740b430430a6e1855a8f6601e97892a1c26f490679fb11c401d4a6f40eb');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','637adb103a887ad496e469e25182c9cd7f3b4acb9eddfcbca9a1326bac3613cc');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','3d3affcaab991e9a27916dfbc8bdddb1066be28303c37be781695bfc0645aa81');\nhashMap.set('composer','d84def5d2f07adb0b5c37195fa115a3a9d86194b57eae014d7b43d2d59fe7d1c');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','4ceb2d2ef2cea88d81ebf7c959cc8f36691ed148000b4ee7e64573a9ba4ae2c5');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','517b6d7cd75d8cf7a44d4dbac36474333e87a6e22b0f62a5228ee7c1f07e8282');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815');\nhashMap.set('github-actions','f5d0459242ef89d72315f87bad2aac5744ee83341290eb771445ca4cbe77743d');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','dc59f10824ae55ac4044ea2e487feb6e3ca2d365e1d518a61548d1dd1932e345');\nhashMap.set('gradle','1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c');\nhashMap.set('gradle-wrapper','f6c933eaa5cace6433d30f54ad5804e63a164399e2c1e8a3d3f1cb6218f39142');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','c94d93b42874624b4fb166be16025f21dddc99a76fb69f858ac6603a554a22d2');\nhashMap.set('helmfile','0adc0092400df2075e1c4580ebe35bbc3b638ebee67cc948a4338094cb16a8ae');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','572f7b0b746377e0c5d6f5ad5c0b78cbed6782a561be77263cf45620b6fdad0c');\nhashMap.set('hermit','61e132cfccbe4e3884801a3728f3391455c214811a33c1f733b0dea7122bbbb6');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','575e15b78c4e86c88407b80b5b321954df8d4b93e9a5f53fff5f119a2ff1930f');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','14bc841079d278b8e03b1eb184d94fef3df8811fa25beddc7ac9e6e2697b43b5');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150d8b9b');\nhashMap.set('mix','ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0');\nhashMap.set('nix','f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','d61de2851ca925fdbf964e9a6e4cefda727572a41b58344a0728709a0a3cc4a7');\nhashMap.set('nuget','4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048');\nhashMap.set('pip_requirements','f07c39050e34e8da6084e7f43cb2222e7ef700bb66de895ee206505491cb8f4f');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','5a638977241e2a8d8a2ba310388b10db533612552ab2c93514cb0960a2b725cd');\nhashMap.set('pre-commit','215fdabbc5bae26dffca61a19be984a18386a1059a2220ee092d8efcfef46063');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','9bf0529fde16a9c56c5f151e61622c1e56fe9e8bef27908bf4779da3387d8148');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5');\nhashMap.set('swift','1e464136321889cdf9a4eb0cf32c459fbf897e0c75bbf44c2ba5a51c0a002bfe');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','8f4a70b1ee4dbbaee7e249d11912faa2b3ea4cc7c582310b5b636d224ab81fea');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','8901ee24116f7998bddcfc8d2492bff8138d9c66a23caea75c24d594ef4a504d');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','dbe6889ea021a05127fed06226d73366fdada2ae577147a5c027996fd325416e');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,eAAc,kEAAkE;AAC5F,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QA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I,WAAU,kEAAkE;AACxF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
@@ -16,8 +16,8 @@ function getAuthenticationHandler(config) {
16
16
  logger.debug("Using PAT authentication");
17
17
  return getPersonalAccessTokenHandler(config.token, true);
18
18
  }
19
- function azureObj() {
20
- const config = find({
19
+ function azureObj(credentials) {
20
+ const config = credentials ?? find({
21
21
  hostType,
22
22
  url: endpoint
23
23
  });
@@ -28,8 +28,8 @@ function azureObj() {
28
28
  maxRetries: 2
29
29
  });
30
30
  }
31
- function gitApi() {
32
- return azureObj().getGitApi();
31
+ function gitApi(credentials) {
32
+ return azureObj(credentials).getGitApi();
33
33
  }
34
34
  function coreApi() {
35
35
  return azureObj().getCoreApi();
@@ -40,6 +40,16 @@ function policyApi() {
40
40
  function workItemTrackingApi() {
41
41
  return azureObj().getWorkItemTrackingApi();
42
42
  }
43
+ async function getAuthenticatedUserId(credentials) {
44
+ try {
45
+ const { authenticatedUser } = await azureObj(credentials).connect();
46
+ if (!authenticatedUser?.id) logger.debug("Azure: authenticated user ID is unavailable");
47
+ return authenticatedUser?.id;
48
+ } catch (err) {
49
+ logger.debug({ err }, "Azure: could not determine authenticated user ID");
50
+ return;
51
+ }
52
+ }
43
53
  /**
44
54
  * Whether the endpoint is Azure DevOps Services (cloud) rather than Azure
45
55
  * DevOps Server (on-premises). Read from the location service's
@@ -60,6 +70,6 @@ function setEndpoint(e) {
60
70
  endpoint = e;
61
71
  }
62
72
  //#endregion
63
- export { azureObj, coreApi, gitApi, isHosted, policyApi, setEndpoint, workItemTrackingApi };
73
+ export { azureObj, coreApi, getAuthenticatedUserId, gitApi, isHosted, policyApi, setEndpoint, workItemTrackingApi };
64
74
 
65
75
  //# sourceMappingURL=azure-got-wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"azure-got-wrapper.js","names":["hostRules.find"],"sources":["../../../../lib/modules/platform/azure/azure-got-wrapper.ts"],"sourcesContent":["import * as azure from 'azure-devops-node-api';\nimport {\n getBasicHandler,\n getBearerHandler,\n getPersonalAccessTokenHandler,\n} from 'azure-devops-node-api';\nimport type { ICoreApi } from 'azure-devops-node-api/CoreApi.js';\nimport type { IGitApi } from 'azure-devops-node-api/GitApi.js';\nimport { DeploymentFlags } from 'azure-devops-node-api/interfaces/common/VSSInterfaces.js';\nimport type { IRequestHandler } from 'azure-devops-node-api/interfaces/common/VsoBaseInterfaces.js';\nimport type { IPolicyApi } from 'azure-devops-node-api/PolicyApi.js';\nimport type { IWorkItemTrackingApi } from 'azure-devops-node-api/WorkItemTrackingApi.js';\nimport { logger } from '../../../logger/index.ts';\nimport type { HostRule } from '../../../types/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { isProbablyJwt } from '../../../util/http/jwt.ts';\n\nconst hostType = 'azure';\nlet endpoint: string;\n\nfunction getAuthenticationHandler(config: HostRule): IRequestHandler {\n if (!config.token && config.username && config.password) {\n return getBasicHandler(config.username, config.password, true);\n }\n if (config.token && isProbablyJwt(config.token)) {\n logger.debug('Using Bearer authentication (JWT detected)');\n return getBearerHandler(config.token, true);\n }\n logger.debug('Using PAT authentication');\n // TODO: token can be undefined here (#22198)\n return getPersonalAccessTokenHandler(config.token!, true);\n}\n\nexport function azureObj(): azure.WebApi {\n const config = hostRules.find({ hostType, url: endpoint });\n if (!config.token && !(config.username && config.password)) {\n throw new Error(`No config found for azure`);\n }\n const authHandler = getAuthenticationHandler(config);\n return new azure.WebApi(endpoint, authHandler, {\n allowRetries: true,\n maxRetries: 2,\n });\n}\n\nexport function gitApi(): Promise<IGitApi> {\n return azureObj().getGitApi();\n}\n\nexport function coreApi(): Promise<ICoreApi> {\n return azureObj().getCoreApi();\n}\n\nexport function policyApi(): Promise<IPolicyApi> {\n return azureObj().getPolicyApi();\n}\n\nexport function workItemTrackingApi(): Promise<IWorkItemTrackingApi> {\n return azureObj().getWorkItemTrackingApi();\n}\n\n/**\n * Whether the endpoint is Azure DevOps Services (cloud) rather than Azure\n * DevOps Server (on-premises). Read from the location service's\n * `_apis/connectionData`, which reports the deployment type authoritatively.\n * Defaults to `false` (on-premises) when the type cannot be determined, so\n * callers stay on the behaviour that both products support.\n */\nexport async function isHosted(): Promise<boolean> {\n try {\n const { deploymentType } = await azureObj().connect();\n // `connect()` returns the response body as-is, without running the SDK\n // deserializer, so enums arrive as their name (`hosted`) instead of their\n // numeric value. Accept both forms.\n return (\n deploymentType === DeploymentFlags.Hosted ||\n String(deploymentType).toLowerCase() === 'hosted'\n );\n } catch (err) {\n logger.debug(\n { err },\n 'Azure: could not determine deployment type, assuming on-premises',\n );\n return false;\n }\n}\n\nexport function setEndpoint(e: string): void {\n endpoint = e;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-wrapper.js","names":["hostRules.find"],"sources":["../../../../lib/modules/platform/azure/azure-got-wrapper.ts"],"sourcesContent":["import * as azure from 'azure-devops-node-api';\nimport {\n getBasicHandler,\n getBearerHandler,\n getPersonalAccessTokenHandler,\n} from 'azure-devops-node-api';\nimport type { ICoreApi } from 'azure-devops-node-api/CoreApi.js';\nimport type { IGitApi } from 'azure-devops-node-api/GitApi.js';\nimport { DeploymentFlags } from 'azure-devops-node-api/interfaces/common/VSSInterfaces.js';\nimport type { IRequestHandler } from 'azure-devops-node-api/interfaces/common/VsoBaseInterfaces.js';\nimport type { IPolicyApi } from 'azure-devops-node-api/PolicyApi.js';\nimport type { IWorkItemTrackingApi } from 'azure-devops-node-api/WorkItemTrackingApi.js';\nimport { logger } from '../../../logger/index.ts';\nimport type { HostRule } from '../../../types/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { isProbablyJwt } from '../../../util/http/jwt.ts';\n\nconst hostType = 'azure';\nlet endpoint: string;\n\nfunction getAuthenticationHandler(config: HostRule): IRequestHandler {\n if (!config.token && config.username && config.password) {\n return getBasicHandler(config.username, config.password, true);\n }\n if (config.token && isProbablyJwt(config.token)) {\n logger.debug('Using Bearer authentication (JWT detected)');\n return getBearerHandler(config.token, true);\n }\n logger.debug('Using PAT authentication');\n // TODO: token can be undefined here (#22198)\n return getPersonalAccessTokenHandler(config.token!, true);\n}\n\nexport function azureObj(credentials?: HostRule): azure.WebApi {\n const config = credentials ?? hostRules.find({ hostType, url: endpoint });\n if (!config.token && !(config.username && config.password)) {\n throw new Error(`No config found for azure`);\n }\n const authHandler = getAuthenticationHandler(config);\n return new azure.WebApi(endpoint, authHandler, {\n allowRetries: true,\n maxRetries: 2,\n });\n}\n\nexport function gitApi(credentials?: HostRule): Promise<IGitApi> {\n return azureObj(credentials).getGitApi();\n}\n\nexport function coreApi(): Promise<ICoreApi> {\n return azureObj().getCoreApi();\n}\n\nexport function policyApi(): Promise<IPolicyApi> {\n return azureObj().getPolicyApi();\n}\n\nexport function workItemTrackingApi(): Promise<IWorkItemTrackingApi> {\n return azureObj().getWorkItemTrackingApi();\n}\n\nexport async function getAuthenticatedUserId(\n credentials: HostRule,\n): Promise<string | undefined> {\n try {\n const { authenticatedUser } = await azureObj(credentials).connect();\n if (!authenticatedUser?.id) {\n logger.debug('Azure: authenticated user ID is unavailable');\n }\n return authenticatedUser?.id;\n } catch (err) {\n logger.debug({ err }, 'Azure: could not determine authenticated user ID');\n return undefined;\n }\n}\n\n/**\n * Whether the endpoint is Azure DevOps Services (cloud) rather than Azure\n * DevOps Server (on-premises). Read from the location service's\n * `_apis/connectionData`, which reports the deployment type authoritatively.\n * Defaults to `false` (on-premises) when the type cannot be determined, so\n * callers stay on the behaviour that both products support.\n */\nexport async function isHosted(): Promise<boolean> {\n try {\n const { deploymentType } = await azureObj().connect();\n // `connect()` returns the response body as-is, without running the SDK\n // deserializer, so enums arrive as their name (`hosted`) instead of their\n // numeric value. Accept both forms.\n return (\n deploymentType === DeploymentFlags.Hosted ||\n String(deploymentType).toLowerCase() === 'hosted'\n );\n } catch (err) {\n logger.debug(\n { err },\n 'Azure: could not determine deployment type, assuming on-premises',\n );\n return false;\n }\n}\n\nexport function setEndpoint(e: string): void {\n endpoint = e;\n}\n"],"mappings":";;;;;;;AAiBA,MAAM,WAAW;AACjB,IAAI;AAEJ,SAAS,yBAAyB,QAAmC;CACnE,IAAI,CAAC,OAAO,SAAS,OAAO,YAAY,OAAO,UAC7C,OAAO,gBAAgB,OAAO,UAAU,OAAO,UAAU,IAAI;CAE/D,IAAI,OAAO,SAAS,cAAc,OAAO,KAAK,GAAG;EAC/C,OAAO,MAAM,4CAA4C;EACzD,OAAO,iBAAiB,OAAO,OAAO,IAAI;CAC5C;CACA,OAAO,MAAM,0BAA0B;CAEvC,OAAO,8BAA8B,OAAO,OAAQ,IAAI;AAC1D;AAEA,SAAgB,SAAS,aAAsC;CAC7D,MAAM,SAAS,eAAeA,KAAe;EAAE;EAAU,KAAK;CAAS,CAAC;CACxE,IAAI,CAAC,OAAO,SAAS,EAAE,OAAO,YAAY,OAAO,WAC/C,MAAM,IAAI,MAAM,2BAA2B;CAE7C,MAAM,cAAc,yBAAyB,MAAM;CACnD,OAAO,IAAI,MAAM,OAAO,UAAU,aAAa;EAC7C,cAAc;EACd,YAAY;CACd,CAAC;AACH;AAEA,SAAgB,OAAO,aAA0C;CAC/D,OAAO,SAAS,WAAW,CAAC,CAAC,UAAU;AACzC;AAEA,SAAgB,UAA6B;CAC3C,OAAO,SAAS,CAAC,CAAC,WAAW;AAC/B;AAEA,SAAgB,YAAiC;CAC/C,OAAO,SAAS,CAAC,CAAC,aAAa;AACjC;AAEA,SAAgB,sBAAqD;CACnE,OAAO,SAAS,CAAC,CAAC,uBAAuB;AAC3C;AAEA,eAAsB,uBACpB,aAC6B;CAC7B,IAAI;EACF,MAAM,EAAE,sBAAsB,MAAM,SAAS,WAAW,CAAC,CAAC,QAAQ;EAClE,IAAI,CAAC,mBAAmB,IACtB,OAAO,MAAM,6CAA6C;EAE5D,OAAO,mBAAmB;CAC5B,SAAS,KAAK;EACZ,OAAO,MAAM,EAAE,IAAI,GAAG,kDAAkD;EACxE;CACF;AACF;;;;;;;;AASA,eAAsB,WAA6B;CACjD,IAAI;EACF,MAAM,EAAE,mBAAmB,MAAM,SAAS,CAAC,CAAC,QAAQ;EAIpD,OACE,mBAAmB,gBAAgB,UACnC,OAAO,cAAc,CAAC,CAAC,YAAY,MAAM;CAE7C,SAAS,KAAK;EACZ,OAAO,MACL,EAAE,IAAI,GACN,kEACF;EACA,OAAO;CACT;AACF;AAEA,SAAgB,YAAY,GAAiB;CAC3C,WAAW;AACb"}
@@ -1,6 +1,7 @@
1
1
  import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
2
2
  import { REPOSITORY_ARCHIVED, REPOSITORY_EMPTY, REPOSITORY_NOT_FOUND } from "../../../constants/error-messages.js";
3
3
  import { regEx } from "../../../util/regex.js";
4
+ import { GlobalConfig } from "../../../config/global.js";
4
5
  import { sanitize } from "../../../util/sanitize.js";
5
6
  import { logger } from "../../../logger/index.js";
6
7
  import { ensureTrailingSlash } from "../../../util/url.js";
@@ -8,7 +9,7 @@ import { find } from "../../../util/host-rules.js";
8
9
  import { parseJson } from "../../../util/common.js";
9
10
  import { ExternalHostError } from "../../../types/errors/external-host-error.js";
10
11
  import { getConfig } from "../../../config/defaults.js";
11
- import { coreApi, gitApi, setEndpoint } from "./azure-got-wrapper.js";
12
+ import { coreApi, getAuthenticatedUserId, gitApi, setEndpoint } from "./azure-got-wrapper.js";
12
13
  import { initRepo as initRepo$1 } from "../../../util/git/index.js";
13
14
  import { getNewBranchName, repoFingerprint } from "../util.js";
14
15
  import { smartTruncate } from "../utils/pr-body.js";
@@ -53,6 +54,7 @@ var azure_exports = /* @__PURE__ */ __exportAll({
53
54
  });
54
55
  let config = {};
55
56
  let issueService;
57
+ let renovateUserId;
56
58
  const defaults = { hostType: "azure" };
57
59
  const id = "azure";
58
60
  function initPlatform({ endpoint, token, username, password }) {
@@ -61,8 +63,13 @@ function initPlatform({ endpoint, token, username, password }) {
61
63
  const res = { endpoint: ensureTrailingSlash(endpoint) };
62
64
  defaults.endpoint = res.endpoint;
63
65
  setEndpoint(res.endpoint);
64
- const platformConfig = { endpoint: defaults.endpoint };
65
- return Promise.resolve(platformConfig);
66
+ return getAuthenticatedUserId(token ? { token } : {
67
+ username,
68
+ password
69
+ }).then((userId) => {
70
+ renovateUserId = userId;
71
+ return res;
72
+ });
66
73
  }
67
74
  async function getRepos() {
68
75
  logger.debug("Autodiscovering Azure DevOps repositories");
@@ -105,7 +112,10 @@ async function getJsonFile(fileName, repoName, branchOrTag) {
105
112
  }
106
113
  async function initRepo({ repository, cloneSubmodules, cloneSubmodulesFilter, azureWorkItemType }) {
107
114
  logger.debug(`initRepo("${repository}")`);
108
- config = { repository };
115
+ config = {
116
+ ignorePrAuthor: GlobalConfig.get("ignorePrAuthor"),
117
+ repository
118
+ };
109
119
  const repos = await (await gitApi()).getRepositories();
110
120
  const repo = getRepoByName(repository, repos);
111
121
  if (!repo) {
@@ -166,8 +176,9 @@ async function getPrList() {
166
176
  let skip = 0;
167
177
  do {
168
178
  fetchedPrs = await azureApiGit.getPullRequests(config.repoId, {
169
- status: 4,
170
- sourceRepositoryId: config.project
179
+ status: PullRequestStatus.All,
180
+ sourceRepositoryId: config.repoId,
181
+ ...!config.ignorePrAuthor && renovateUserId && { creatorId: renovateUserId }
171
182
  }, config.project, 0, skip, 100);
172
183
  prs = prs.concat(fetchedPrs);
173
184
  skip += 100;
@@ -185,9 +196,18 @@ async function getPr(pullRequestId) {
185
196
  azurePr.labels = (await (await gitApi()).getPullRequestLabels(config.repoId, pullRequestId)).filter((label) => label.active).map((label) => label.name).filter(isString);
186
197
  return azurePr;
187
198
  }
188
- async function findPr({ branchName, prTitle, state = "all", targetBranch }) {
199
+ async function findPr({ branchName, prTitle, state = "all", targetBranch, includeOtherAuthors }) {
189
200
  let prsFiltered = [];
190
201
  try {
202
+ if (includeOtherAuthors) {
203
+ const [pr] = await (await gitApi()).getPullRequests(config.repoId, {
204
+ sourceRefName: getNewBranchName(branchName),
205
+ sourceRepositoryId: config.repoId,
206
+ status: PullRequestStatus.Active,
207
+ ...targetBranch && { targetRefName: getNewBranchName(targetBranch) }
208
+ }, config.project, 0, 0, 1);
209
+ return pr ? getRenovatePRFormat(pr) : null;
210
+ }
191
211
  prsFiltered = (await getPrList()).filter((item) => item.sourceRefName === getNewBranchName(branchName));
192
212
  if (prTitle) prsFiltered = prsFiltered.filter((item) => item.title.toUpperCase() === prTitle.toUpperCase());
193
213
  switch (state) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["azureApi.gitApi","hostRules.find","git.initRepo","azureHelper.getMergeMethod","azureHelper.getPolicyEvaluations","azureApi.coreApi","azureHelper.getAllProjectTeams"],"sources":["../../../../lib/modules/platform/azure/index.ts"],"sourcesContent":["import { setTimeout } from 'node:timers/promises';\nimport { isString } from '@sindresorhus/is';\nimport type {\n GitItem,\n GitPullRequest,\n GitPullRequestCommentThread,\n GitStatus,\n GitVersionDescriptor,\n} from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport {\n GitPullRequestMergeStrategy,\n GitStatusState,\n GitVersionType,\n PullRequestStatus,\n} from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport type { PolicyEvaluationRecord } from 'azure-devops-node-api/interfaces/PolicyInterfaces.js';\nimport { PolicyEvaluationStatus } from 'azure-devops-node-api/interfaces/PolicyInterfaces.js';\nimport { getConfig } from '../../../config/defaults.ts';\nimport {\n REPOSITORY_ARCHIVED,\n REPOSITORY_EMPTY,\n REPOSITORY_NOT_FOUND,\n} from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport type { BranchStatus } from '../../../types/index.ts';\nimport { parseJson } from '../../../util/common.ts';\nimport * as git from '../../../util/git/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { sanitize } from '../../../util/sanitize.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport type {\n BranchStatusConfig,\n CreatePRConfig,\n EnsureCommentConfig,\n EnsureCommentRemovalConfig,\n EnsureIssueConfig,\n EnsureIssueResult,\n FindPRConfig,\n Issue,\n MergePRConfig,\n PlatformParams,\n PlatformResult,\n Pr,\n RepoParams,\n RepoResult,\n UpdatePrConfig,\n} from '../types.ts';\nimport { getNewBranchName, repoFingerprint } from '../util.ts';\nimport { smartTruncate } from '../utils/pr-body.ts';\nimport { readOnlyIssueBody } from '../utils/read-only-issue-body.ts';\nimport * as azureApi from './azure-got-wrapper.ts';\nimport * as azureHelper from './azure-helper.ts';\nimport { IssueService } from './issue.ts';\nimport type { AzurePr, Config } from './types.ts';\nimport { AzurePrVote } from './types.ts';\nimport {\n getBranchNameWithoutRefsheadsPrefix,\n getGitStatusContextCombinedName,\n getGitStatusContextFromCombinedName,\n getRenovatePRFormat,\n getRepoByName,\n getStorageExtraCloneOpts,\n mapMergeStrategy,\n max4000Chars,\n} from './util.ts';\n\ninterface User {\n id: string;\n name: string;\n isRequired: boolean;\n}\n\nlet config: Config = {} as any;\nlet issueService: IssueService;\n\nconst defaults: {\n endpoint?: string;\n hostType: string;\n} = {\n hostType: 'azure',\n};\n\nexport const id = 'azure';\n\nexport function initPlatform({\n endpoint,\n token,\n username,\n password,\n}: PlatformParams): Promise<PlatformResult> {\n if (!endpoint) {\n throw new Error('Init: You must configure an Azure DevOps endpoint');\n }\n if (!token && !(username && password)) {\n throw new Error(\n 'Init: You must configure an Azure DevOps token, or a username and password',\n );\n }\n // TODO: Add a connection check that endpoint/token combination are valid (#9593)\n const res = {\n endpoint: ensureTrailingSlash(endpoint),\n };\n defaults.endpoint = res.endpoint;\n azureApi.setEndpoint(res.endpoint);\n const platformConfig: PlatformResult = {\n endpoint: defaults.endpoint,\n };\n return Promise.resolve(platformConfig);\n}\n\nexport async function getRepos(): Promise<string[]> {\n logger.debug('Autodiscovering Azure DevOps repositories');\n const azureApiGit = await azureApi.gitApi();\n const repos = await azureApiGit.getRepositories();\n return repos\n .filter((repo) => repo.isDisabled !== true)\n .map((repo) => `${repo.project?.name}/${repo.name}`);\n}\n\nexport async function getRawFile(\n fileName: string,\n repoName?: string,\n branchOrTag?: string,\n): Promise<string | null> {\n try {\n const azureApiGit = await azureApi.gitApi();\n\n let repoId: string | undefined;\n if (repoName) {\n const repos = await azureApiGit.getRepositories();\n const repo = getRepoByName(repoName, repos);\n repoId = repo?.id;\n } else {\n repoId = config.repoId;\n }\n\n if (!repoId) {\n logger.debug('No repoId so cannot getRawFile');\n return null;\n }\n\n let item: GitItem | undefined;\n const versionDescriptor: GitVersionDescriptor = {\n version: branchOrTag,\n } satisfies GitVersionDescriptor;\n // Try to get file from repo with tag first, if not found, then try with branch #36835\n for (const versionType of [GitVersionType.Tag, GitVersionType.Branch]) {\n versionDescriptor.versionType = versionType;\n\n item = await azureApiGit.getItem(\n repoId, // repositoryId\n fileName, // path\n undefined, // project\n undefined, // scopePath\n undefined, // recursionLevel\n undefined, // includeContentMetadata\n undefined, // latestProcessedChange\n undefined, // download\n branchOrTag ? versionDescriptor : undefined, // versionDescriptor\n true, // includeContent\n );\n if (item) {\n break; // exit loop if item is found\n } else {\n logger.debug(\n `File: ${fileName} not found in ${repoName} with ${versionType}: ${branchOrTag}`,\n );\n }\n }\n return item?.content ?? null;\n } catch (err) /* v8 ignore next -- Azure API failure modes (service unavailable, malformed items) are not mocked in specs */ {\n if (\n err.message?.includes('<title>Azure DevOps Services Unavailable</title>')\n ) {\n logger.debug(\n 'Azure DevOps is currently unavailable when attempting to fetch file - throwing ExternalHostError',\n );\n throw new ExternalHostError(err, id);\n }\n if (err.code === 'ECONNRESET' || err.code === 'ETIMEDOUT') {\n throw new ExternalHostError(err, id);\n }\n if (err.statusCode && err.statusCode >= 500 && err.statusCode < 600) {\n throw new ExternalHostError(err, id);\n }\n throw err;\n }\n}\n\nexport async function getJsonFile(\n fileName: string,\n repoName?: string,\n branchOrTag?: string,\n): Promise<any> {\n const raw = await getRawFile(fileName, repoName, branchOrTag);\n return parseJson(raw, fileName);\n}\n\nexport async function initRepo({\n repository,\n cloneSubmodules,\n cloneSubmodulesFilter,\n azureWorkItemType,\n}: RepoParams): Promise<RepoResult> {\n logger.debug(`initRepo(\"${repository}\")`);\n config = { repository } as Config;\n const azureApiGit = await azureApi.gitApi();\n const repos = await azureApiGit.getRepositories();\n const repo = getRepoByName(repository, repos);\n if (!repo) {\n logger.error({ repos, repo }, 'Could not find repo in repo list');\n throw new Error(REPOSITORY_NOT_FOUND);\n }\n logger.debug({ repositoryDetails: repo }, 'Repository details');\n if (repo.isDisabled) {\n logger.debug('Repository is disabled- throwing error to abort renovation');\n throw new Error(REPOSITORY_ARCHIVED);\n }\n /* v8 ignore next -- defensive: Azure omits defaultBranch only for empty repos, which abort earlier in specs */\n if (!repo.defaultBranch) {\n logger.debug('Repo is empty');\n throw new Error(REPOSITORY_EMPTY);\n }\n // TODO #22198\n config.repoId = repo.id!;\n\n config.project = repo.project!.name!;\n config.projectId = repo.project!.id!;\n config.workItemType = azureWorkItemType ?? getConfig().azureWorkItemType!;\n issueService = new IssueService(config);\n config.owner = '?owner?';\n logger.debug(`${repository} owner = ${config.owner}`);\n const defaultBranch = repo.defaultBranch.replace('refs/heads/', '');\n config.defaultBranch = defaultBranch;\n logger.debug(`${repository} default branch = ${defaultBranch}`);\n config.mergeMethods = {};\n config.repoForceRebase = false;\n\n const [projectName, repoName] = repository.split('/');\n const opts = hostRules.find({\n hostType: defaults.hostType,\n url: defaults.endpoint,\n });\n // TODO: types (#22198)\n const manualUrl = `${defaults.endpoint!}${encodeURIComponent(\n projectName,\n )}/_git/${encodeURIComponent(repoName)}`;\n const url = repo.remoteUrl ?? manualUrl;\n await git.initRepo({\n ...config,\n url,\n extraCloneOpts: getStorageExtraCloneOpts(opts),\n cloneSubmodules,\n cloneSubmodulesFilter,\n });\n const repoConfig: RepoResult = {\n defaultBranch,\n isFork: false,\n repoFingerprint: repoFingerprint(repo.id!, defaults.endpoint),\n };\n return repoConfig;\n}\n\nexport async function getPrList(): Promise<AzurePr[]> {\n logger.debug('getPrList()');\n if (!config.prList) {\n const azureApiGit = await azureApi.gitApi();\n let prs: GitPullRequest[] = [];\n let fetchedPrs: GitPullRequest[];\n let skip = 0;\n do {\n fetchedPrs = await azureApiGit.getPullRequests(\n config.repoId,\n {\n status: 4,\n // fetch only prs directly created on the repo and not by forks\n sourceRepositoryId: config.project,\n },\n config.project,\n 0,\n skip,\n 100,\n );\n prs = prs.concat(fetchedPrs);\n skip += 100;\n } while (fetchedPrs.length > 0);\n\n config.prList = prs.map(getRenovatePRFormat);\n logger.debug(`Retrieved Pull Requests count: ${config.prList.length}`);\n }\n return config.prList;\n}\n\nexport async function getPr(pullRequestId: number): Promise<Pr | null> {\n logger.debug(`getPr(${pullRequestId})`);\n if (!pullRequestId) {\n return null;\n }\n const azurePr = (await getPrList()).find(\n (item) => item.number === pullRequestId,\n );\n\n if (!azurePr) {\n return null;\n }\n\n const azureApiGit = await azureApi.gitApi();\n const labels = await azureApiGit.getPullRequestLabels(\n config.repoId,\n pullRequestId,\n );\n\n azurePr.labels = labels\n .filter((label) => label.active)\n .map((label) => label.name)\n .filter(isString);\n return azurePr;\n}\n\nexport async function findPr({\n branchName,\n prTitle,\n state = 'all',\n targetBranch,\n}: FindPRConfig): Promise<Pr | null> {\n let prsFiltered: Pr[] = [];\n try {\n const prs = await getPrList();\n\n prsFiltered = prs.filter(\n (item) => item.sourceRefName === getNewBranchName(branchName),\n );\n\n if (prTitle) {\n prsFiltered = prsFiltered.filter(\n (item) => item.title.toUpperCase() === prTitle.toUpperCase(),\n );\n }\n\n switch (state) {\n case 'all':\n // no more filter needed, we can go further...\n break;\n case '!open':\n prsFiltered = prsFiltered.filter((item) => item.state !== 'open');\n break;\n default:\n prsFiltered = prsFiltered.filter((item) => item.state === state);\n break;\n }\n } catch (err) {\n logger.error({ err }, 'findPr error');\n }\n if (prsFiltered.length === 0) {\n return null;\n }\n if (targetBranch && prsFiltered.length > 1) {\n const pr = prsFiltered.find((item) => item.targetBranch === targetBranch);\n if (pr) {\n return pr;\n }\n }\n return prsFiltered[0];\n}\n\nexport async function getBranchPr(\n branchName: string,\n targetBranch?: string,\n): Promise<Pr | null> {\n logger.debug(`getBranchPr(${branchName}, ${targetBranch})`);\n const existingPr = await findPr({\n branchName,\n state: 'open',\n targetBranch,\n });\n return existingPr ? getPr(existingPr.number) : null;\n}\n\nasync function getStatusCheck(branchName: string): Promise<GitStatus[]> {\n const azureApiGit = await azureApi.gitApi();\n const branch = await azureApiGit.getBranch(\n config.repoId,\n\n // TODO: fix undefined (#22198)\n getBranchNameWithoutRefsheadsPrefix(branchName)!,\n );\n // only grab the latest statuses, it will group any by context\n return azureApiGit.getStatuses(\n // TODO #22198\n branch.commit!.commitId!,\n config.repoId,\n undefined,\n undefined,\n undefined,\n true,\n );\n}\n\nconst azureToRenovateStatusMapping: Record<GitStatusState, BranchStatus> = {\n [GitStatusState.Succeeded]: 'green',\n [GitStatusState.NotApplicable]: 'green',\n [GitStatusState.NotSet]: 'yellow',\n [GitStatusState.Pending]: 'yellow',\n [GitStatusState.PartiallySucceeded]: 'yellow',\n [GitStatusState.Error]: 'red',\n [GitStatusState.Failed]: 'red',\n};\n\nexport async function getBranchStatusCheck(\n branchName: string,\n context: string,\n): Promise<BranchStatus | null> {\n const res = await getStatusCheck(branchName);\n for (const check of res) {\n if (getGitStatusContextCombinedName(check.context) === context) {\n // TODO #22198\n return azureToRenovateStatusMapping[check.state!] ?? 'yellow';\n }\n }\n return null;\n}\n\nexport async function getBranchStatus(\n branchName: string,\n internalChecksAsSuccess: boolean,\n): Promise<BranchStatus> {\n logger.debug(`getBranchStatus(${branchName})`);\n const statuses = await getStatusCheck(branchName);\n logger.debug({ branch: branchName, statuses }, 'branch status check result');\n if (!statuses.length) {\n logger.debug('empty branch status check result = returning \"pending\"');\n return 'yellow';\n }\n const noOfFailures = statuses.filter(\n (status) =>\n status.state === GitStatusState.Error ||\n status.state === GitStatusState.Failed,\n ).length;\n if (noOfFailures) {\n return 'red';\n }\n const noOfPending = statuses.filter(\n (status) =>\n status.state === GitStatusState.NotSet ||\n status.state === GitStatusState.Pending,\n ).length;\n if (noOfPending) {\n return 'yellow';\n }\n if (\n !internalChecksAsSuccess &&\n statuses.every(\n (status) =>\n status.state === GitStatusState.Succeeded &&\n status.context?.genre === 'renovate',\n )\n ) {\n logger.debug(\n 'Successful checks are all internal renovate/ checks, so returning \"pending\" branch status',\n );\n return 'yellow';\n }\n return 'green';\n}\n\nasync function getMergeStrategy(\n targetRefName: string,\n): Promise<GitPullRequestMergeStrategy> {\n return (\n config.mergeMethods[targetRefName] ??\n (config.mergeMethods[targetRefName] = await azureHelper.getMergeMethod(\n config.repoId,\n config.project,\n targetRefName,\n config.defaultBranch,\n ))\n );\n}\n\nasync function getPendingBlockingPolicyEvaluations(\n pullRequestId: number,\n): Promise<PolicyEvaluationRecord[]> {\n const artifactId = `vstfs:///CodeReview/CodeReviewId/${config.projectId}/${pullRequestId}`;\n const policyEvaluations = await azureHelper.getPolicyEvaluations(\n config.project,\n artifactId,\n );\n logger.debug(\n { pullRequestId, artifactId, policyEvaluations },\n 'Retrieved policy evaluations for PR',\n );\n return policyEvaluations.filter(\n (evaluation) =>\n evaluation.configuration?.isBlocking &&\n evaluation.status !== PolicyEvaluationStatus.Approved &&\n evaluation.status !== PolicyEvaluationStatus.NotApplicable,\n );\n}\n\nexport async function createPr({\n sourceBranch,\n targetBranch,\n prTitle: title,\n prBody: body,\n labels,\n draftPR = false,\n platformPrOptions,\n}: CreatePRConfig): Promise<Pr> {\n const sourceRefName = getNewBranchName(sourceBranch);\n const targetRefName = getNewBranchName(targetBranch);\n const description = max4000Chars(sanitize(body));\n const azureApiGit = await azureApi.gitApi();\n const workItemRefs = [\n {\n id: platformPrOptions?.azureWorkItemId?.toString(),\n },\n ];\n let pr: GitPullRequest = await azureApiGit.createPullRequest(\n {\n sourceRefName,\n targetRefName,\n title,\n description,\n workItemRefs,\n isDraft: draftPR,\n },\n config.repoId,\n );\n if (platformPrOptions?.usePlatformAutomerge) {\n const mergeStrategy =\n platformPrOptions.automergeStrategy === 'auto'\n ? await getMergeStrategy(pr.targetRefName!)\n : mapMergeStrategy(platformPrOptions.automergeStrategy);\n const prOptions: GitPullRequest = {\n autoCompleteSetBy: {\n // TODO #22198\n id: pr.createdBy!.id,\n },\n completionOptions: {\n mergeStrategy,\n deleteSourceBranch: true,\n mergeCommitMessage: title,\n },\n };\n\n logger.debug(\n {\n prOptions,\n repoId: config.repoId,\n pullRequestId: pr.pullRequestId!,\n },\n // TODO #22198\n `Updating PR ${pr.pullRequestId!} to specify platformAutomerge settings`,\n );\n\n pr = await azureApiGit.updatePullRequest(\n prOptions,\n config.repoId,\n // TODO #22198\n pr.pullRequestId!,\n );\n }\n if (platformPrOptions?.autoApprove) {\n const approver = {\n reviewerUrl: pr.createdBy!.url,\n vote: AzurePrVote.Approved,\n isFlagged: false,\n isRequired: false,\n };\n\n logger.debug(\n {\n approver,\n\n repoId: config.repoId,\n // TODO #22198\n pullRequestId: pr.pullRequestId!,\n prCreatedBy: {\n id: pr.createdBy!.id!,\n },\n },\n // TODO #22198\n `Auto-approving PR ${pr.pullRequestId!}`,\n );\n\n await azureApiGit.createPullRequestReviewer(\n approver,\n config.repoId,\n // TODO #22198\n pr.pullRequestId!,\n pr.createdBy!.id!,\n );\n }\n await Promise.all(\n labels!.map((label) =>\n azureApiGit.createPullRequestLabel(\n {\n name: label,\n },\n config.repoId,\n // TODO #22198\n pr.pullRequestId!,\n ),\n ),\n );\n\n const result = getRenovatePRFormat(pr);\n if (config.prList) {\n config.prList.push(result);\n }\n return result;\n}\n\nexport async function updatePr({\n number: prNo,\n prTitle: title,\n prBody: body,\n state,\n platformPrOptions,\n targetBranch,\n}: UpdatePrConfig): Promise<void> {\n logger.debug(`updatePr(${prNo}, ${title}, body)`);\n\n const azureApiGit = await azureApi.gitApi();\n const objToUpdate: GitPullRequest = {\n title,\n };\n\n if (targetBranch) {\n objToUpdate.targetRefName = getNewBranchName(targetBranch);\n }\n\n if (body) {\n objToUpdate.description = max4000Chars(sanitize(body));\n }\n\n if (state === 'open') {\n await azureApiGit.updatePullRequest(\n {\n status: PullRequestStatus.Active,\n },\n config.repoId,\n prNo,\n );\n } else if (state === 'closed') {\n objToUpdate.status = PullRequestStatus.Abandoned;\n }\n if (platformPrOptions?.autoApprove) {\n const pr = await azureApiGit.getPullRequestById(prNo, config.project);\n await azureApiGit.createPullRequestReviewer(\n {\n reviewerUrl: pr.createdBy!.url,\n vote: AzurePrVote.Approved,\n isFlagged: false,\n isRequired: false,\n },\n config.repoId,\n // TODO #22198\n pr.pullRequestId!,\n pr.createdBy!.id!,\n );\n }\n\n const updatedPr = await azureApiGit.updatePullRequest(\n objToUpdate,\n config.repoId,\n prNo,\n );\n if (config.prList) {\n const prToCache = getRenovatePRFormat(updatedPr);\n // We need to update the cached entry for this PR\n const existingIndex = config.prList.findIndex(\n (item) => item.number === prNo,\n );\n /* v8 ignore next: should not happen */\n if (existingIndex === -1) {\n logger.warn({ prNo }, 'PR not found in cache');\n // Add to cache\n config.prList.push(prToCache);\n } else {\n // overwrite existing PR in cache\n config.prList[existingIndex] = prToCache;\n }\n }\n}\n\nexport async function ensureComment({\n number,\n topic,\n content,\n}: EnsureCommentConfig): Promise<boolean> {\n logger.debug(`ensureComment(${number}, ${topic!}, content)`);\n const header = topic ? `### ${topic}\\n\\n` : '';\n const body = `${header}${sanitize(massageMarkdown(content))}`;\n const azureApiGit = await azureApi.gitApi();\n\n const threads = await azureApiGit.getThreads(config.repoId, number);\n let threadIdFound: number | undefined;\n let commentIdFound: number | undefined;\n let commentNeedsUpdating = false;\n threads.forEach((thread) => {\n const firstCommentContent = thread.comments?.[0].content;\n if (\n (topic && firstCommentContent?.startsWith(header)) === true ||\n (!topic && firstCommentContent === body)\n ) {\n threadIdFound = thread.id;\n commentIdFound = thread.comments?.[0].id;\n commentNeedsUpdating = firstCommentContent !== body;\n }\n });\n\n if (!threadIdFound) {\n await azureApiGit.createThread(\n {\n comments: [{ content: body, commentType: 1, parentCommentId: 0 }],\n status: 1,\n },\n config.repoId,\n number,\n );\n logger.info(\n { repository: config.repository, issueNo: number, topic },\n 'Comment added',\n );\n } else if (commentNeedsUpdating) {\n await azureApiGit.updateComment(\n {\n content: body,\n },\n config.repoId,\n number,\n threadIdFound,\n // TODO #22198\n commentIdFound!,\n );\n logger.debug(\n { repository: config.repository, issueNo: number, topic },\n 'Comment updated',\n );\n } else {\n logger.debug(\n { repository: config.repository, issueNo: number, topic },\n 'Comment is already up-to-date',\n );\n }\n\n return true;\n}\n\nexport async function ensureCommentRemoval(\n removeConfig: EnsureCommentRemovalConfig,\n): Promise<void> {\n const { number: issueNo } = removeConfig;\n const key =\n removeConfig.type === 'by-topic'\n ? removeConfig.topic\n : removeConfig.content;\n logger.debug(`Ensuring comment \"${key}\" in #${issueNo} is removed`);\n\n const azureApiGit = await azureApi.gitApi();\n const threads = await azureApiGit.getThreads(config.repoId, issueNo);\n\n let threadIdFound: number | null | undefined = null;\n if (removeConfig.type === 'by-topic') {\n const thread = threads.find(\n (thread: GitPullRequestCommentThread): boolean =>\n !!thread.comments?.[0].content?.startsWith(\n `### ${removeConfig.topic}\\n\\n`,\n ),\n );\n threadIdFound = thread?.id;\n } else {\n const thread = threads.find(\n (thread: GitPullRequestCommentThread): boolean =>\n thread.comments?.[0].content?.trim() === removeConfig.content,\n );\n threadIdFound = thread?.id;\n }\n\n if (threadIdFound) {\n await azureApiGit.updateThread(\n {\n status: 4, // close\n },\n config.repoId,\n issueNo,\n threadIdFound,\n );\n }\n}\n\nconst renovateToAzureStatusMapping: Record<BranchStatus, GitStatusState> = {\n ['green']: GitStatusState.Succeeded,\n ['yellow']: GitStatusState.Pending,\n ['red']: GitStatusState.Failed,\n};\n\nexport async function setBranchStatus({\n branchName,\n context,\n description,\n state,\n url: targetUrl,\n}: BranchStatusConfig): Promise<void> {\n logger.debug(\n `setBranchStatus(${branchName}, ${context}, ${description}, ${state}, ${targetUrl!})`,\n );\n const azureApiGit = await azureApi.gitApi();\n const branch = await azureApiGit.getBranch(\n config.repoId,\n getBranchNameWithoutRefsheadsPrefix(branchName)!,\n );\n const statusToCreate: GitStatus = {\n description,\n context: getGitStatusContextFromCombinedName(context),\n state: renovateToAzureStatusMapping[state],\n targetUrl,\n };\n await azureApiGit.createCommitStatus(\n statusToCreate,\n // TODO #22198\n branch.commit!.commitId!,\n config.repoId,\n );\n logger.trace(`Created commit status of ${state} on branch ${branchName}`);\n}\n\nexport async function mergePr({\n branchName,\n id: pullRequestId,\n strategy,\n}: MergePRConfig): Promise<boolean> {\n logger.debug(`mergePr(${pullRequestId}, ${branchName!})`);\n\n const pendingPolicyEvaluations =\n await getPendingBlockingPolicyEvaluations(pullRequestId);\n if (pendingPolicyEvaluations.length) {\n logger.debug(\n {\n pullRequestId,\n pendingPolicies: pendingPolicyEvaluations.map((evaluation) => ({\n name: evaluation.configuration?.type?.displayName,\n status: PolicyEvaluationStatus[evaluation.status!],\n })),\n },\n 'Not completing PR because branch policies have not been satisfied yet',\n );\n return false;\n }\n\n const azureApiGit = await azureApi.gitApi();\n\n let pr = await azureApiGit.getPullRequestById(pullRequestId, config.project);\n\n const mergeStrategy =\n strategy === 'auto'\n ? await getMergeStrategy(pr.targetRefName!)\n : mapMergeStrategy(strategy);\n const objToUpdate: GitPullRequest = {\n status: PullRequestStatus.Completed,\n lastMergeSourceCommit: pr.lastMergeSourceCommit,\n completionOptions: {\n mergeStrategy,\n deleteSourceBranch: true,\n mergeCommitMessage: pr.title,\n },\n };\n\n logger.trace(\n `Updating PR ${pullRequestId} to status ${PullRequestStatus.Completed} (${\n PullRequestStatus[PullRequestStatus.Completed]\n }) with lastMergeSourceCommit ${\n // TODO: types (#22198)\n pr.lastMergeSourceCommit?.commitId\n } using mergeStrategy ${mergeStrategy} (${\n GitPullRequestMergeStrategy[mergeStrategy]\n })`,\n );\n\n try {\n const response = await azureApiGit.updatePullRequest(\n objToUpdate,\n config.repoId,\n pullRequestId,\n );\n\n let retries = 0;\n let isClosed = response.status === PullRequestStatus.Completed;\n while (!isClosed && retries < 5) {\n retries += 1;\n const sleepMs = retries * 1000;\n logger.trace(\n { pullRequestId, status: pr.status, retries },\n `Updated PR to closed status but change has not taken effect yet. Retrying...`,\n );\n\n await setTimeout(sleepMs);\n pr = await azureApiGit.getPullRequestById(pullRequestId, config.project);\n isClosed = pr.status === PullRequestStatus.Completed;\n }\n\n if (!isClosed) {\n logger.warn(\n {\n pullRequestId,\n status: pr.status,\n expectedPRStatus: PullRequestStatus[PullRequestStatus.Completed],\n actualPRStatus: PullRequestStatus[pr.status!],\n },\n 'Expected PR to have completed status. However, the PR has a different status',\n );\n }\n return true;\n } catch (err) {\n logger.debug({ err }, 'Failed to set the PR as completed.');\n return false;\n }\n}\n\nexport function massageMarkdown(input: string): string {\n // Remove any HTML we use\n return (\n smartTruncate(readOnlyIssueBody(input), maxBodyLength())\n .replace(\n 'you tick the rebase/retry checkbox',\n 'PR is renamed to start with \"rebase!\"',\n )\n .replace(\n 'checking the rebase/retry box above',\n 'renaming the PR to start with \"rebase!\"',\n )\n .replace(regEx(`\\n---\\n\\n.*?<!-- rebase-check -->.*?\\n`), '')\n .replace(regEx(/<!--renovate-(?:debug|config-hash):.*?-->/g), '')\n // Replace GitHub-style PR links with Azure DevOps format\n .replace(regEx(/\\]\\(\\.\\.\\/pull\\//g), '](!')\n // Replace GitHub-style PR references (#123) with Azure DevOps format, needed for text linking config migration PR.\n // Only match a standalone reference (preceded by start, whitespace or `(`) so we don't corrupt\n // HTML entities like `&#8203;` or URL anchors like `CHANGELOG.md#4780`.\n .replace(regEx(/(^|[\\s(])#(\\d+)/g), '$1!$2')\n );\n}\n\nexport function maxBodyLength(): number {\n return 4000;\n}\n\nexport async function findIssue(title: string): Promise<Issue | null> {\n return await issueService.findIssue(title);\n}\n\nexport async function ensureIssue(\n issueConfig: EnsureIssueConfig,\n): Promise<EnsureIssueResult | null> {\n return await issueService.ensureIssue(issueConfig);\n}\n\nexport async function ensureIssueClosing(title: string): Promise<void> {\n return await issueService.ensureIssueClosing(title);\n}\n\nexport async function getIssueList(titleFilter?: string): Promise<Issue[]> {\n return await issueService.getIssueList(titleFilter);\n}\n\nasync function getUserIds(users: string[]): Promise<User[]> {\n const azureApiGit = await azureApi.gitApi();\n const azureApiCore = await azureApi.coreApi();\n const repos = await azureApiGit.getRepositories();\n const repo = repos.find((c) => c.id === config.repoId)!;\n const requiredReviewerPrefix = 'required:';\n const validReviewers = new Set<string>();\n\n // TODO #22198\n const teams = await azureHelper.getAllProjectTeams(repo.project!.id!);\n const members = await Promise.all(\n teams.map(\n async (t) =>\n await azureApiCore.getTeamMembersWithExtendedProperties(\n // TODO #22198\n repo.project!.id!,\n t.id!,\n ),\n ),\n );\n\n const ids: { id: string; name: string; isRequired: boolean }[] = [];\n members.forEach((listMembers) => {\n listMembers.forEach((m) => {\n users.forEach((r) => {\n let reviewer = r;\n let isRequired = false;\n if (reviewer.startsWith(requiredReviewerPrefix)) {\n reviewer = reviewer.replace(requiredReviewerPrefix, '');\n isRequired = true;\n }\n if (\n (reviewer.toLowerCase() === m.identity?.displayName?.toLowerCase() ||\n reviewer.toLowerCase() === m.identity?.uniqueName?.toLowerCase()) &&\n ids.filter((c) => c.id === m.identity?.id).length === 0\n ) {\n // TODO #22198\n ids.push({\n id: m.identity.id!,\n name: reviewer,\n isRequired,\n });\n\n validReviewers.add(reviewer);\n }\n });\n });\n });\n\n teams.forEach((t) => {\n users.forEach((r) => {\n let reviewer = r;\n let isRequired = false;\n if (reviewer.startsWith(requiredReviewerPrefix)) {\n reviewer = reviewer.replace(requiredReviewerPrefix, '');\n isRequired = true;\n }\n // v8 ignore else -- TODO: add test #40625\n if (\n reviewer.toLowerCase() === t.name?.toLowerCase() &&\n ids.filter((c) => c.id === t.id).length === 0\n ) {\n // TODO #22198\n ids.push({ id: t.id!, name: reviewer, isRequired });\n\n validReviewers.add(reviewer);\n }\n });\n });\n\n for (const u of users) {\n const reviewer = u.replace(requiredReviewerPrefix, '');\n if (!validReviewers.has(reviewer)) {\n logger.once.info(\n `${reviewer} is neither an Azure DevOps Team nor a user associated with a Team`,\n );\n }\n }\n\n return ids;\n}\n\n/**\n *\n * @param {number} issueNo\n * @param {string[]} assignees\n */\nexport async function addAssignees(\n issueNo: number,\n assignees: string[],\n): Promise<void> {\n logger.trace(`addAssignees(${issueNo}, [${assignees.join(', ')}])`);\n const ids = await getUserIds(assignees);\n await ensureComment({\n number: issueNo,\n topic: 'Add Assignees',\n content: ids.map((a) => `@<${a.id}>`).join(', '),\n });\n}\n\n/**\n *\n * @param {number} prNo\n * @param {string[]} reviewers\n */\nexport async function addReviewers(\n prNo: number,\n reviewers: string[],\n): Promise<void> {\n logger.trace(`addReviewers(${prNo}, [${reviewers.join(', ')}])`);\n const azureApiGit = await azureApi.gitApi();\n\n const ids = await getUserIds(reviewers);\n\n await Promise.all(\n ids.map(async (obj) => {\n await azureApiGit.createPullRequestReviewer(\n {\n isRequired: obj.isRequired,\n },\n config.repoId,\n prNo,\n obj.id,\n );\n logger.debug(`Reviewer added: ${obj.name}`);\n }),\n );\n}\n\nexport async function deleteLabel(\n prNumber: number,\n label: string,\n): Promise<void> {\n logger.debug(`Deleting label ${label} from #${prNumber}`);\n const azureApiGit = await azureApi.gitApi();\n await azureApiGit.deletePullRequestLabels(config.repoId, prNumber, label);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA,IAAI,SAAiB,CAAC;AACtB,IAAI;AAEJ,MAAM,WAGF,EACF,UAAU,QACZ;AAEA,MAAa,KAAK;AAElB,SAAgB,aAAa,EAC3B,UACA,OACA,UACA,YAC0C;CAC1C,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,IAAI,CAAC,SAAS,EAAE,YAAY,WAC1B,MAAM,IAAI,MACR,4EACF;CAGF,MAAM,MAAM,EACV,UAAU,oBAAoB,QAAQ,EACxC;CACA,SAAS,WAAW,IAAI;CACxB,YAAqB,IAAI,QAAQ;CACjC,MAAM,iBAAiC,EACrC,UAAU,SAAS,SACrB;CACA,OAAO,QAAQ,QAAQ,cAAc;AACvC;AAEA,eAAsB,WAA8B;CAClD,OAAO,MAAM,2CAA2C;CAGxD,QAAO,OADa,MADMA,OAAgB,EAAA,CACV,gBAAgB,EAAA,CAE7C,QAAQ,SAAS,KAAK,eAAe,IAAI,CAAC,CAC1C,KAAK,SAAS,GAAG,KAAK,SAAS,KAAK,GAAG,KAAK,MAAM;AACvD;AAEA,eAAsB,WACpB,UACA,UACA,aACwB;CACxB,IAAI;EACF,MAAM,cAAc,MAAMA,OAAgB;EAE1C,IAAI;EACJ,IAAI,UAAU;GACZ,MAAM,QAAQ,MAAM,YAAY,gBAAg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AAO;EACrB,MAAM,WAAW,EAAE,QAAQ,wBAAwB,EAAE;EACrD,IAAI,CAAC,eAAe,IAAI,QAAQ,GAC9B,OAAO,KAAK,KACV,GAAG,SAAS,mEACd;CAEJ;CAEA,OAAO;AACT;;;;;;AAOA,eAAsB,aACpB,SACA,WACe;CACf,OAAO,MAAM,gBAAgB,QAAQ,KAAK,UAAU,KAAK,IAAI,EAAE,GAAG;CAElE,MAAM,cAAc;EAClB,QAAQ;EACR,OAAO;EACP,UAAS,MAJO,WAAW,SAAS,EAAA,CAIvB,KAAK,MAAM,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,IAAI;CACjD,CAAC;AACH;;;;;;AAOA,eAAsB,aACpB,MACA,WACe;CACf,OAAO,MAAM,gBAAgB,KAAK,KAAK,UAAU,KAAK,IAAI,EAAE,GAAG;CAC/D,MAAM,cAAc,MAAMN,OAAgB;CAE1C,MAAM,MAAM,MAAM,WAAW,SAAS;CAEtC,MAAM,QAAQ,IACZ,IAAI,IAAI,OAAO,QAAQ;EACrB,MAAM,YAAY,0BAChB,EACE,YAAY,IAAI,WAClB,GACA,OAAO,QACP,MACA,IAAI,EACN;EACA,OAAO,MAAM,mBAAmB,IAAI,MAAM;CAC5C,CAAC,CACH;AACF;AAEA,eAAsB,YACpB,UACA,OACe;CACf,OAAO,MAAM,kBAAkB,MAAM,SAAS,UAAU;CAExD,OAAM,MADoBA,OAAgB,EAAA,CACxB,wBAAwB,OAAO,QAAQ,UAAU,KAAK;AAC1E"}
1
+ {"version":3,"file":"index.js","names":["azureApi.getAuthenticatedUserId","azureApi.gitApi","hostRules.find","git.initRepo","azureHelper.getMergeMethod","azureHelper.getPolicyEvaluations","azureApi.coreApi","azureHelper.getAllProjectTeams"],"sources":["../../../../lib/modules/platform/azure/index.ts"],"sourcesContent":["import { setTimeout } from 'node:timers/promises';\nimport { isString } from '@sindresorhus/is';\nimport type {\n GitItem,\n GitPullRequest,\n GitPullRequestCommentThread,\n GitStatus,\n GitVersionDescriptor,\n} from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport {\n GitPullRequestMergeStrategy,\n GitStatusState,\n GitVersionType,\n PullRequestStatus,\n} from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport type { PolicyEvaluationRecord } from 'azure-devops-node-api/interfaces/PolicyInterfaces.js';\nimport { PolicyEvaluationStatus } from 'azure-devops-node-api/interfaces/PolicyInterfaces.js';\nimport { getConfig } from '../../../config/defaults.ts';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport {\n REPOSITORY_ARCHIVED,\n REPOSITORY_EMPTY,\n REPOSITORY_NOT_FOUND,\n} from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport type { BranchStatus } from '../../../types/index.ts';\nimport { parseJson } from '../../../util/common.ts';\nimport * as git from '../../../util/git/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { sanitize } from '../../../util/sanitize.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport type {\n BranchStatusConfig,\n CreatePRConfig,\n EnsureCommentConfig,\n EnsureCommentRemovalConfig,\n EnsureIssueConfig,\n EnsureIssueResult,\n FindPRConfig,\n Issue,\n MergePRConfig,\n PlatformParams,\n PlatformResult,\n Pr,\n RepoParams,\n RepoResult,\n UpdatePrConfig,\n} from '../types.ts';\nimport { getNewBranchName, repoFingerprint } from '../util.ts';\nimport { smartTruncate } from '../utils/pr-body.ts';\nimport { readOnlyIssueBody } from '../utils/read-only-issue-body.ts';\nimport * as azureApi from './azure-got-wrapper.ts';\nimport * as azureHelper from './azure-helper.ts';\nimport { IssueService } from './issue.ts';\nimport type { AzurePr, Config } from './types.ts';\nimport { AzurePrVote } from './types.ts';\nimport {\n getBranchNameWithoutRefsheadsPrefix,\n getGitStatusContextCombinedName,\n getGitStatusContextFromCombinedName,\n getRenovatePRFormat,\n getRepoByName,\n getStorageExtraCloneOpts,\n mapMergeStrategy,\n max4000Chars,\n} from './util.ts';\n\ninterface User {\n id: string;\n name: string;\n isRequired: boolean;\n}\n\nlet config: Config = {} as any;\nlet issueService: IssueService;\nlet renovateUserId: string | undefined;\n\nconst defaults: {\n endpoint?: string;\n hostType: string;\n} = {\n hostType: 'azure',\n};\n\nexport const id = 'azure';\n\nexport function initPlatform({\n endpoint,\n token,\n username,\n password,\n}: PlatformParams): Promise<PlatformResult> {\n if (!endpoint) {\n throw new Error('Init: You must configure an Azure DevOps endpoint');\n }\n if (!token && !(username && password)) {\n throw new Error(\n 'Init: You must configure an Azure DevOps token, or a username and password',\n );\n }\n // TODO: Add a connection check that endpoint/token combination are valid (#9593)\n const res = {\n endpoint: ensureTrailingSlash(endpoint),\n };\n defaults.endpoint = res.endpoint;\n azureApi.setEndpoint(res.endpoint);\n const credentials = token\n ? { token }\n : { username: username!, password: password! };\n return azureApi.getAuthenticatedUserId(credentials).then((userId) => {\n renovateUserId = userId;\n return res;\n });\n}\n\nexport async function getRepos(): Promise<string[]> {\n logger.debug('Autodiscovering Azure DevOps repositories');\n const azureApiGit = await azureApi.gitApi();\n const repos = await azureApiGit.getRepositories();\n return repos\n .filter((repo) => repo.isDisabled !== true)\n .map((repo) => `${repo.project?.name}/${repo.name}`);\n}\n\nexport async function getRawFile(\n fileName: string,\n repoName?: string,\n branchOrTag?: string,\n): Promise<string | null> {\n try {\n const azureApiGit = await azureApi.gitApi();\n\n let repoId: string | undefined;\n if (repoName) {\n const repos = await azureApiGit.getRepositories();\n const repo = getRepoByName(repoName, repos);\n repoId = repo?.id;\n } else {\n repoId = config.repoId;\n }\n\n if (!repoId) {\n logger.debug('No repoId so cannot getRawFile');\n return null;\n }\n\n let item: GitItem | undefined;\n const versionDescriptor: GitVersionDescriptor = {\n version: branchOrTag,\n } satisfies GitVersionDescriptor;\n // Try to get file from repo with tag first, if not found, then try with branch #36835\n for (const versionType of [GitVersionType.Tag, GitVersionType.Branch]) {\n versionDescriptor.versionType = versionType;\n\n item = await azureApiGit.getItem(\n repoId, // repositoryId\n fileName, // path\n undefined, // project\n undefined, // scopePath\n undefined, // recursionLevel\n undefined, // includeContentMetadata\n undefined, // latestProcessedChange\n undefined, // download\n branchOrTag ? versionDescriptor : undefined, // versionDescriptor\n true, // includeContent\n );\n if (item) {\n break; // exit loop if item is found\n } else {\n logger.debug(\n `File: ${fileName} not found in ${repoName} with ${versionType}: ${branchOrTag}`,\n );\n }\n }\n return item?.content ?? null;\n } catch (err) /* v8 ignore next -- Azure API failure modes (service unavailable, malformed items) are not mocked in specs */ {\n if (\n err.message?.includes('<title>Azure DevOps Services Unavailable</title>')\n ) {\n logger.debug(\n 'Azure DevOps is currently unavailable when attempting to fetch file - throwing ExternalHostError',\n );\n throw new ExternalHostError(err, id);\n }\n if (err.code === 'ECONNRESET' || err.code === 'ETIMEDOUT') {\n throw new ExternalHostError(err, id);\n }\n if (err.statusCode && err.statusCode >= 500 && err.statusCode < 600) {\n throw new ExternalHostError(err, id);\n }\n throw err;\n }\n}\n\nexport async function getJsonFile(\n fileName: string,\n repoName?: string,\n branchOrTag?: string,\n): Promise<any> {\n const raw = await getRawFile(fileName, repoName, branchOrTag);\n return parseJson(raw, fileName);\n}\n\nexport async function initRepo({\n repository,\n cloneSubmodules,\n cloneSubmodulesFilter,\n azureWorkItemType,\n}: RepoParams): Promise<RepoResult> {\n logger.debug(`initRepo(\"${repository}\")`);\n config = {\n ignorePrAuthor: GlobalConfig.get('ignorePrAuthor'),\n repository,\n } as Config;\n const azureApiGit = await azureApi.gitApi();\n const repos = await azureApiGit.getRepositories();\n const repo = getRepoByName(repository, repos);\n if (!repo) {\n logger.error({ repos, repo }, 'Could not find repo in repo list');\n throw new Error(REPOSITORY_NOT_FOUND);\n }\n logger.debug({ repositoryDetails: repo }, 'Repository details');\n if (repo.isDisabled) {\n logger.debug('Repository is disabled- throwing error to abort renovation');\n throw new Error(REPOSITORY_ARCHIVED);\n }\n /* v8 ignore next -- defensive: Azure omits defaultBranch only for empty repos, which abort earlier in specs */\n if (!repo.defaultBranch) {\n logger.debug('Repo is empty');\n throw new Error(REPOSITORY_EMPTY);\n }\n // TODO #22198\n config.repoId = repo.id!;\n\n config.project = repo.project!.name!;\n config.projectId = repo.project!.id!;\n config.workItemType = azureWorkItemType ?? getConfig().azureWorkItemType!;\n issueService = new IssueService(config);\n config.owner = '?owner?';\n logger.debug(`${repository} owner = ${config.owner}`);\n const defaultBranch = repo.defaultBranch.replace('refs/heads/', '');\n config.defaultBranch = defaultBranch;\n logger.debug(`${repository} default branch = ${defaultBranch}`);\n config.mergeMethods = {};\n config.repoForceRebase = false;\n\n const [projectName, repoName] = repository.split('/');\n const opts = hostRules.find({\n hostType: defaults.hostType,\n url: defaults.endpoint,\n });\n // TODO: types (#22198)\n const manualUrl = `${defaults.endpoint!}${encodeURIComponent(\n projectName,\n )}/_git/${encodeURIComponent(repoName)}`;\n const url = repo.remoteUrl ?? manualUrl;\n await git.initRepo({\n ...config,\n url,\n extraCloneOpts: getStorageExtraCloneOpts(opts),\n cloneSubmodules,\n cloneSubmodulesFilter,\n });\n const repoConfig: RepoResult = {\n defaultBranch,\n isFork: false,\n repoFingerprint: repoFingerprint(repo.id!, defaults.endpoint),\n };\n return repoConfig;\n}\n\nexport async function getPrList(): Promise<AzurePr[]> {\n logger.debug('getPrList()');\n if (!config.prList) {\n const azureApiGit = await azureApi.gitApi();\n\n let prs: GitPullRequest[] = [];\n let fetchedPrs: GitPullRequest[];\n let skip = 0;\n do {\n fetchedPrs = await azureApiGit.getPullRequests(\n config.repoId,\n {\n status: PullRequestStatus.All,\n // fetch only prs directly created on the repo and not by forks\n sourceRepositoryId: config.repoId,\n ...(!config.ignorePrAuthor &&\n renovateUserId && { creatorId: renovateUserId }),\n },\n config.project,\n 0,\n skip,\n 100,\n );\n prs = prs.concat(fetchedPrs);\n skip += 100;\n } while (fetchedPrs.length > 0);\n\n config.prList = prs.map(getRenovatePRFormat);\n logger.debug(`Retrieved Pull Requests count: ${config.prList.length}`);\n }\n return config.prList;\n}\n\nexport async function getPr(pullRequestId: number): Promise<Pr | null> {\n logger.debug(`getPr(${pullRequestId})`);\n if (!pullRequestId) {\n return null;\n }\n const azurePr = (await getPrList()).find(\n (item) => item.number === pullRequestId,\n );\n\n if (!azurePr) {\n return null;\n }\n\n const azureApiGit = await azureApi.gitApi();\n const labels = await azureApiGit.getPullRequestLabels(\n config.repoId,\n pullRequestId,\n );\n\n azurePr.labels = labels\n .filter((label) => label.active)\n .map((label) => label.name)\n .filter(isString);\n return azurePr;\n}\n\nexport async function findPr({\n branchName,\n prTitle,\n state = 'all',\n targetBranch,\n includeOtherAuthors,\n}: FindPRConfig): Promise<Pr | null> {\n let prsFiltered: Pr[] = [];\n try {\n if (includeOtherAuthors) {\n const azureApiGit = await azureApi.gitApi();\n const [pr] = await azureApiGit.getPullRequests(\n config.repoId,\n {\n sourceRefName: getNewBranchName(branchName),\n sourceRepositoryId: config.repoId,\n status: PullRequestStatus.Active,\n ...(targetBranch && {\n targetRefName: getNewBranchName(targetBranch),\n }),\n },\n config.project,\n 0,\n 0,\n 1,\n );\n return pr ? getRenovatePRFormat(pr) : null;\n }\n\n const prs = await getPrList();\n\n prsFiltered = prs.filter(\n (item) => item.sourceRefName === getNewBranchName(branchName),\n );\n\n if (prTitle) {\n prsFiltered = prsFiltered.filter(\n (item) => item.title.toUpperCase() === prTitle.toUpperCase(),\n );\n }\n\n switch (state) {\n case 'all':\n // no more filter needed, we can go further...\n break;\n case '!open':\n prsFiltered = prsFiltered.filter((item) => item.state !== 'open');\n break;\n default:\n prsFiltered = prsFiltered.filter((item) => item.state === state);\n break;\n }\n } catch (err) {\n logger.error({ err }, 'findPr error');\n }\n if (prsFiltered.length === 0) {\n return null;\n }\n if (targetBranch && prsFiltered.length > 1) {\n const pr = prsFiltered.find((item) => item.targetBranch === targetBranch);\n if (pr) {\n return pr;\n }\n }\n return prsFiltered[0];\n}\n\nexport async function getBranchPr(\n branchName: string,\n targetBranch?: string,\n): Promise<Pr | null> {\n logger.debug(`getBranchPr(${branchName}, ${targetBranch})`);\n const existingPr = await findPr({\n branchName,\n state: 'open',\n targetBranch,\n });\n return existingPr ? getPr(existingPr.number) : null;\n}\n\nasync function getStatusCheck(branchName: string): Promise<GitStatus[]> {\n const azureApiGit = await azureApi.gitApi();\n const branch = await azureApiGit.getBranch(\n config.repoId,\n\n // TODO: fix undefined (#22198)\n getBranchNameWithoutRefsheadsPrefix(branchName)!,\n );\n // only grab the latest statuses, it will group any by context\n return azureApiGit.getStatuses(\n // TODO #22198\n branch.commit!.commitId!,\n config.repoId,\n undefined,\n undefined,\n undefined,\n true,\n );\n}\n\nconst azureToRenovateStatusMapping: Record<GitStatusState, BranchStatus> = {\n [GitStatusState.Succeeded]: 'green',\n [GitStatusState.NotApplicable]: 'green',\n [GitStatusState.NotSet]: 'yellow',\n [GitStatusState.Pending]: 'yellow',\n [GitStatusState.PartiallySucceeded]: 'yellow',\n [GitStatusState.Error]: 'red',\n [GitStatusState.Failed]: 'red',\n};\n\nexport async function getBranchStatusCheck(\n branchName: string,\n context: string,\n): Promise<BranchStatus | null> {\n const res = await getStatusCheck(branchName);\n for (const check of res) {\n if (getGitStatusContextCombinedName(check.context) === context) {\n // TODO #22198\n return azureToRenovateStatusMapping[check.state!] ?? 'yellow';\n }\n }\n return null;\n}\n\nexport async function getBranchStatus(\n branchName: string,\n internalChecksAsSuccess: boolean,\n): Promise<BranchStatus> {\n logger.debug(`getBranchStatus(${branchName})`);\n const statuses = await getStatusCheck(branchName);\n logger.debug({ branch: branchName, statuses }, 'branch status check result');\n if (!statuses.length) {\n logger.debug('empty branch status check result = returning \"pending\"');\n return 'yellow';\n }\n const noOfFailures = statuses.filter(\n (status) =>\n status.state === GitStatusState.Error ||\n status.state === GitStatusState.Failed,\n ).length;\n if (noOfFailures) {\n return 'red';\n }\n const noOfPending = statuses.filter(\n (status) =>\n status.state === GitStatusState.NotSet ||\n status.state === GitStatusState.Pending,\n ).length;\n if (noOfPending) {\n return 'yellow';\n }\n if (\n !internalChecksAsSuccess &&\n statuses.every(\n (status) =>\n status.state === GitStatusState.Succeeded &&\n status.context?.genre === 'renovate',\n )\n ) {\n logger.debug(\n 'Successful checks are all internal renovate/ checks, so returning \"pending\" branch status',\n );\n return 'yellow';\n }\n return 'green';\n}\n\nasync function getMergeStrategy(\n targetRefName: string,\n): Promise<GitPullRequestMergeStrategy> {\n return (\n config.mergeMethods[targetRefName] ??\n (config.mergeMethods[targetRefName] = await azureHelper.getMergeMethod(\n config.repoId,\n config.project,\n targetRefName,\n config.defaultBranch,\n ))\n );\n}\n\nasync function getPendingBlockingPolicyEvaluations(\n pullRequestId: number,\n): Promise<PolicyEvaluationRecord[]> {\n const artifactId = `vstfs:///CodeReview/CodeReviewId/${config.projectId}/${pullRequestId}`;\n const policyEvaluations = await azureHelper.getPolicyEvaluations(\n config.project,\n artifactId,\n );\n logger.debug(\n { pullRequestId, artifactId, policyEvaluations },\n 'Retrieved policy evaluations for PR',\n );\n return policyEvaluations.filter(\n (evaluation) =>\n evaluation.configuration?.isBlocking &&\n evaluation.status !== PolicyEvaluationStatus.Approved &&\n evaluation.status !== PolicyEvaluationStatus.NotApplicable,\n );\n}\n\nexport async function createPr({\n sourceBranch,\n targetBranch,\n prTitle: title,\n prBody: body,\n labels,\n draftPR = false,\n platformPrOptions,\n}: CreatePRConfig): Promise<Pr> {\n const sourceRefName = getNewBranchName(sourceBranch);\n const targetRefName = getNewBranchName(targetBranch);\n const description = max4000Chars(sanitize(body));\n const azureApiGit = await azureApi.gitApi();\n const workItemRefs = [\n {\n id: platformPrOptions?.azureWorkItemId?.toString(),\n },\n ];\n let pr: GitPullRequest = await azureApiGit.createPullRequest(\n {\n sourceRefName,\n targetRefName,\n title,\n description,\n workItemRefs,\n isDraft: draftPR,\n },\n config.repoId,\n );\n if (platformPrOptions?.usePlatformAutomerge) {\n const mergeStrategy =\n platformPrOptions.automergeStrategy === 'auto'\n ? await getMergeStrategy(pr.targetRefName!)\n : mapMergeStrategy(platformPrOptions.automergeStrategy);\n const prOptions: GitPullRequest = {\n autoCompleteSetBy: {\n // TODO #22198\n id: pr.createdBy!.id,\n },\n completionOptions: {\n mergeStrategy,\n deleteSourceBranch: true,\n mergeCommitMessage: title,\n },\n };\n\n logger.debug(\n {\n prOptions,\n repoId: config.repoId,\n pullRequestId: pr.pullRequestId!,\n },\n // TODO #22198\n `Updating PR ${pr.pullRequestId!} to specify platformAutomerge settings`,\n );\n\n pr = await azureApiGit.updatePullRequest(\n prOptions,\n config.repoId,\n // TODO #22198\n pr.pullRequestId!,\n );\n }\n if (platformPrOptions?.autoApprove) {\n const approver = {\n reviewerUrl: pr.createdBy!.url,\n vote: AzurePrVote.Approved,\n isFlagged: false,\n isRequired: false,\n };\n\n logger.debug(\n {\n approver,\n\n repoId: config.repoId,\n // TODO #22198\n pullRequestId: pr.pullRequestId!,\n prCreatedBy: {\n id: pr.createdBy!.id!,\n },\n },\n // TODO #22198\n `Auto-approving PR ${pr.pullRequestId!}`,\n );\n\n await azureApiGit.createPullRequestReviewer(\n approver,\n config.repoId,\n // TODO #22198\n pr.pullRequestId!,\n pr.createdBy!.id!,\n );\n }\n await Promise.all(\n labels!.map((label) =>\n azureApiGit.createPullRequestLabel(\n {\n name: label,\n },\n config.repoId,\n // TODO #22198\n pr.pullRequestId!,\n ),\n ),\n );\n\n const result = getRenovatePRFormat(pr);\n if (config.prList) {\n config.prList.push(result);\n }\n return result;\n}\n\nexport async function updatePr({\n number: prNo,\n prTitle: title,\n prBody: body,\n state,\n platformPrOptions,\n targetBranch,\n}: UpdatePrConfig): Promise<void> {\n logger.debug(`updatePr(${prNo}, ${title}, body)`);\n\n const azureApiGit = await azureApi.gitApi();\n const objToUpdate: GitPullRequest = {\n title,\n };\n\n if (targetBranch) {\n objToUpdate.targetRefName = getNewBranchName(targetBranch);\n }\n\n if (body) {\n objToUpdate.description = max4000Chars(sanitize(body));\n }\n\n if (state === 'open') {\n await azureApiGit.updatePullRequest(\n {\n status: PullRequestStatus.Active,\n },\n config.repoId,\n prNo,\n );\n } else if (state === 'closed') {\n objToUpdate.status = PullRequestStatus.Abandoned;\n }\n if (platformPrOptions?.autoApprove) {\n const pr = await azureApiGit.getPullRequestById(prNo, config.project);\n await azureApiGit.createPullRequestReviewer(\n {\n reviewerUrl: pr.createdBy!.url,\n vote: AzurePrVote.Approved,\n isFlagged: false,\n isRequired: false,\n },\n config.repoId,\n // TODO #22198\n pr.pullRequestId!,\n pr.createdBy!.id!,\n );\n }\n\n const updatedPr = await azureApiGit.updatePullRequest(\n objToUpdate,\n config.repoId,\n prNo,\n );\n if (config.prList) {\n const prToCache = getRenovatePRFormat(updatedPr);\n // We need to update the cached entry for this PR\n const existingIndex = config.prList.findIndex(\n (item) => item.number === prNo,\n );\n /* v8 ignore next: should not happen */\n if (existingIndex === -1) {\n logger.warn({ prNo }, 'PR not found in cache');\n // Add to cache\n config.prList.push(prToCache);\n } else {\n // overwrite existing PR in cache\n config.prList[existingIndex] = prToCache;\n }\n }\n}\n\nexport async function ensureComment({\n number,\n topic,\n content,\n}: EnsureCommentConfig): Promise<boolean> {\n logger.debug(`ensureComment(${number}, ${topic!}, content)`);\n const header = topic ? `### ${topic}\\n\\n` : '';\n const body = `${header}${sanitize(massageMarkdown(content))}`;\n const azureApiGit = await azureApi.gitApi();\n\n const threads = await azureApiGit.getThreads(config.repoId, number);\n let threadIdFound: number | undefined;\n let commentIdFound: number | undefined;\n let commentNeedsUpdating = false;\n threads.forEach((thread) => {\n const firstCommentContent = thread.comments?.[0].content;\n if (\n (topic && firstCommentContent?.startsWith(header)) === true ||\n (!topic && firstCommentContent === body)\n ) {\n threadIdFound = thread.id;\n commentIdFound = thread.comments?.[0].id;\n commentNeedsUpdating = firstCommentContent !== body;\n }\n });\n\n if (!threadIdFound) {\n await azureApiGit.createThread(\n {\n comments: [{ content: body, commentType: 1, parentCommentId: 0 }],\n status: 1,\n },\n config.repoId,\n number,\n );\n logger.info(\n { repository: config.repository, issueNo: number, topic },\n 'Comment added',\n );\n } else if (commentNeedsUpdating) {\n await azureApiGit.updateComment(\n {\n content: body,\n },\n config.repoId,\n number,\n threadIdFound,\n // TODO #22198\n commentIdFound!,\n );\n logger.debug(\n { repository: config.repository, issueNo: number, topic },\n 'Comment updated',\n );\n } else {\n logger.debug(\n { repository: config.repository, issueNo: number, topic },\n 'Comment is already up-to-date',\n );\n }\n\n return true;\n}\n\nexport async function ensureCommentRemoval(\n removeConfig: EnsureCommentRemovalConfig,\n): Promise<void> {\n const { number: issueNo } = removeConfig;\n const key =\n removeConfig.type === 'by-topic'\n ? removeConfig.topic\n : removeConfig.content;\n logger.debug(`Ensuring comment \"${key}\" in #${issueNo} is removed`);\n\n const azureApiGit = await azureApi.gitApi();\n const threads = await azureApiGit.getThreads(config.repoId, issueNo);\n\n let threadIdFound: number | null | undefined = null;\n if (removeConfig.type === 'by-topic') {\n const thread = threads.find(\n (thread: GitPullRequestCommentThread): boolean =>\n !!thread.comments?.[0].content?.startsWith(\n `### ${removeConfig.topic}\\n\\n`,\n ),\n );\n threadIdFound = thread?.id;\n } else {\n const thread = threads.find(\n (thread: GitPullRequestCommentThread): boolean =>\n thread.comments?.[0].content?.trim() === removeConfig.content,\n );\n threadIdFound = thread?.id;\n }\n\n if (threadIdFound) {\n await azureApiGit.updateThread(\n {\n status: 4, // close\n },\n config.repoId,\n issueNo,\n threadIdFound,\n );\n }\n}\n\nconst renovateToAzureStatusMapping: Record<BranchStatus, GitStatusState> = {\n ['green']: GitStatusState.Succeeded,\n ['yellow']: GitStatusState.Pending,\n ['red']: GitStatusState.Failed,\n};\n\nexport async function setBranchStatus({\n branchName,\n context,\n description,\n state,\n url: targetUrl,\n}: BranchStatusConfig): Promise<void> {\n logger.debug(\n `setBranchStatus(${branchName}, ${context}, ${description}, ${state}, ${targetUrl!})`,\n );\n const azureApiGit = await azureApi.gitApi();\n const branch = await azureApiGit.getBranch(\n config.repoId,\n getBranchNameWithoutRefsheadsPrefix(branchName)!,\n );\n const statusToCreate: GitStatus = {\n description,\n context: getGitStatusContextFromCombinedName(context),\n state: renovateToAzureStatusMapping[state],\n targetUrl,\n };\n await azureApiGit.createCommitStatus(\n statusToCreate,\n // TODO #22198\n branch.commit!.commitId!,\n config.repoId,\n );\n logger.trace(`Created commit status of ${state} on branch ${branchName}`);\n}\n\nexport async function mergePr({\n branchName,\n id: pullRequestId,\n strategy,\n}: MergePRConfig): Promise<boolean> {\n logger.debug(`mergePr(${pullRequestId}, ${branchName!})`);\n\n const pendingPolicyEvaluations =\n await getPendingBlockingPolicyEvaluations(pullRequestId);\n if (pendingPolicyEvaluations.length) {\n logger.debug(\n {\n pullRequestId,\n pendingPolicies: pendingPolicyEvaluations.map((evaluation) => ({\n name: evaluation.configuration?.type?.displayName,\n status: PolicyEvaluationStatus[evaluation.status!],\n })),\n },\n 'Not completing PR because branch policies have not been satisfied yet',\n );\n return false;\n }\n\n const azureApiGit = await azureApi.gitApi();\n\n let pr = await azureApiGit.getPullRequestById(pullRequestId, config.project);\n\n const mergeStrategy =\n strategy === 'auto'\n ? await getMergeStrategy(pr.targetRefName!)\n : mapMergeStrategy(strategy);\n const objToUpdate: GitPullRequest = {\n status: PullRequestStatus.Completed,\n lastMergeSourceCommit: pr.lastMergeSourceCommit,\n completionOptions: {\n mergeStrategy,\n deleteSourceBranch: true,\n mergeCommitMessage: pr.title,\n },\n };\n\n logger.trace(\n `Updating PR ${pullRequestId} to status ${PullRequestStatus.Completed} (${\n PullRequestStatus[PullRequestStatus.Completed]\n }) with lastMergeSourceCommit ${\n // TODO: types (#22198)\n pr.lastMergeSourceCommit?.commitId\n } using mergeStrategy ${mergeStrategy} (${\n GitPullRequestMergeStrategy[mergeStrategy]\n })`,\n );\n\n try {\n const response = await azureApiGit.updatePullRequest(\n objToUpdate,\n config.repoId,\n pullRequestId,\n );\n\n let retries = 0;\n let isClosed = response.status === PullRequestStatus.Completed;\n while (!isClosed && retries < 5) {\n retries += 1;\n const sleepMs = retries * 1000;\n logger.trace(\n { pullRequestId, status: pr.status, retries },\n `Updated PR to closed status but change has not taken effect yet. Retrying...`,\n );\n\n await setTimeout(sleepMs);\n pr = await azureApiGit.getPullRequestById(pullRequestId, config.project);\n isClosed = pr.status === PullRequestStatus.Completed;\n }\n\n if (!isClosed) {\n logger.warn(\n {\n pullRequestId,\n status: pr.status,\n expectedPRStatus: PullRequestStatus[PullRequestStatus.Completed],\n actualPRStatus: PullRequestStatus[pr.status!],\n },\n 'Expected PR to have completed status. However, the PR has a different status',\n );\n }\n return true;\n } catch (err) {\n logger.debug({ err }, 'Failed to set the PR as completed.');\n return false;\n }\n}\n\nexport function massageMarkdown(input: string): string {\n // Remove any HTML we use\n return (\n smartTruncate(readOnlyIssueBody(input), maxBodyLength())\n .replace(\n 'you tick the rebase/retry checkbox',\n 'PR is renamed to start with \"rebase!\"',\n )\n .replace(\n 'checking the rebase/retry box above',\n 'renaming the PR to start with \"rebase!\"',\n )\n .replace(regEx(`\\n---\\n\\n.*?<!-- rebase-check -->.*?\\n`), '')\n .replace(regEx(/<!--renovate-(?:debug|config-hash):.*?-->/g), '')\n // Replace GitHub-style PR links with Azure DevOps format\n .replace(regEx(/\\]\\(\\.\\.\\/pull\\//g), '](!')\n // Replace GitHub-style PR references (#123) with Azure DevOps format, needed for text linking config migration PR.\n // Only match a standalone reference (preceded by start, whitespace or `(`) so we don't corrupt\n // HTML entities like `&#8203;` or URL anchors like `CHANGELOG.md#4780`.\n .replace(regEx(/(^|[\\s(])#(\\d+)/g), '$1!$2')\n );\n}\n\nexport function maxBodyLength(): number {\n return 4000;\n}\n\nexport async function findIssue(title: string): Promise<Issue | null> {\n return await issueService.findIssue(title);\n}\n\nexport async function ensureIssue(\n issueConfig: EnsureIssueConfig,\n): Promise<EnsureIssueResult | null> {\n return await issueService.ensureIssue(issueConfig);\n}\n\nexport async function ensureIssueClosing(title: string): Promise<void> {\n return await issueService.ensureIssueClosing(title);\n}\n\nexport async function getIssueList(titleFilter?: string): Promise<Issue[]> {\n return await issueService.getIssueList(titleFilter);\n}\n\nasync function getUserIds(users: string[]): Promise<User[]> {\n const azureApiGit = await azureApi.gitApi();\n const azureApiCore = await azureApi.coreApi();\n const repos = await azureApiGit.getRepositories();\n const repo = repos.find((c) => c.id === config.repoId)!;\n const requiredReviewerPrefix = 'required:';\n const validReviewers = new Set<string>();\n\n // TODO #22198\n const teams = await azureHelper.getAllProjectTeams(repo.project!.id!);\n const members = await Promise.all(\n teams.map(\n async (t) =>\n await azureApiCore.getTeamMembersWithExtendedProperties(\n // TODO #22198\n repo.project!.id!,\n t.id!,\n ),\n ),\n );\n\n const ids: { id: string; name: string; isRequired: boolean }[] = [];\n members.forEach((listMembers) => {\n listMembers.forEach((m) => {\n users.forEach((r) => {\n let reviewer = r;\n let isRequired = false;\n if (reviewer.startsWith(requiredReviewerPrefix)) {\n reviewer = reviewer.replace(requiredReviewerPrefix, '');\n isRequired = true;\n }\n if (\n (reviewer.toLowerCase() === m.identity?.displayName?.toLowerCase() ||\n reviewer.toLowerCase() === m.identity?.uniqueName?.toLowerCase()) &&\n ids.filter((c) => c.id === m.identity?.id).length === 0\n ) {\n // TODO #22198\n ids.push({\n id: m.identity.id!,\n name: reviewer,\n isRequired,\n });\n\n validReviewers.add(reviewer);\n }\n });\n });\n });\n\n teams.forEach((t) => {\n users.forEach((r) => {\n let reviewer = r;\n let isRequired = false;\n if (reviewer.startsWith(requiredReviewerPrefix)) {\n reviewer = reviewer.replace(requiredReviewerPrefix, '');\n isRequired = true;\n }\n // v8 ignore else -- TODO: add test #40625\n if (\n reviewer.toLowerCase() === t.name?.toLowerCase() &&\n ids.filter((c) => c.id === t.id).length === 0\n ) {\n // TODO #22198\n ids.push({ id: t.id!, name: reviewer, isRequired });\n\n validReviewers.add(reviewer);\n }\n });\n });\n\n for (const u of users) {\n const reviewer = u.replace(requiredReviewerPrefix, '');\n if (!validReviewers.has(reviewer)) {\n logger.once.info(\n `${reviewer} is neither an Azure DevOps Team nor a user associated with a Team`,\n );\n }\n }\n\n return ids;\n}\n\n/**\n *\n * @param {number} issueNo\n * @param {string[]} assignees\n */\nexport async function addAssignees(\n issueNo: number,\n assignees: string[],\n): Promise<void> {\n logger.trace(`addAssignees(${issueNo}, [${assignees.join(', ')}])`);\n const ids = await getUserIds(assignees);\n await ensureComment({\n number: issueNo,\n topic: 'Add Assignees',\n content: ids.map((a) => `@<${a.id}>`).join(', '),\n });\n}\n\n/**\n *\n * @param {number} prNo\n * @param {string[]} reviewers\n */\nexport async function addReviewers(\n prNo: number,\n reviewers: string[],\n): Promise<void> {\n logger.trace(`addReviewers(${prNo}, [${reviewers.join(', ')}])`);\n const azureApiGit = await azureApi.gitApi();\n\n const ids = await getUserIds(reviewers);\n\n await Promise.all(\n ids.map(async (obj) => {\n await azureApiGit.createPullRequestReviewer(\n {\n isRequired: obj.isRequired,\n },\n config.repoId,\n prNo,\n obj.id,\n );\n logger.debug(`Reviewer added: ${obj.name}`);\n }),\n );\n}\n\nexport async function deleteLabel(\n prNumber: number,\n label: string,\n): Promise<void> {\n logger.debug(`Deleting label ${label} from #${prNumber}`);\n const azureApiGit = await azureApi.gitApi();\n await azureApiGit.deletePullRequestLabels(config.repoId, prNumber, label);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,IAAI,SAAiB,CAAC;AACtB,IAAI;AACJ,IAAI;AAEJ,MAAM,WAGF,EACF,UAAU,QACZ;AAEA,MAAa,KAAK;AAElB,SAAgB,aAAa,EAC3B,UACA,OACA,UACA,YAC0C;CAC1C,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,IAAI,CAAC,SAAS,EAAE,YAAY,WAC1B,MAAM,IAAI,MACR,4EACF;CAGF,MAAM,MAAM,EACV,UAAU,oBAAoB,QAAQ,EACxC;CACA,SAAS,WAAW,IAAI;CACxB,YAAqB,IAAI,QAAQ;CAIjC,OAAOA,uBAHa,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AK,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,IAAI;CACjD,CAAC;AACH;;;;;;AAOA,eAAsB,aACpB,MACA,WACe;CACf,OAAO,MAAM,gBAAgB,KAAK,KAAK,UAAU,KAAK,IAAI,EAAE,GAAG;CAC/D,MAAM,cAAc,MAAMN,OAAgB;CAE1C,MAAM,MAAM,MAAM,WAAW,SAAS;CAEtC,MAAM,QAAQ,IACZ,IAAI,IAAI,OAAO,QAAQ;EACrB,MAAM,YAAY,0BAChB,EACE,YAAY,IAAI,WAClB,GACA,OAAO,QACP,MACA,IAAI,EACN;EACA,OAAO,MAAM,mBAAmB,IAAI,MAAM;CAC5C,CAAC,CACH;AACF;AAEA,eAAsB,YACpB,UACA,OACe;CACf,OAAO,MAAM,kBAAkB,MAAM,SAAS,UAAU;CAExD,OAAM,MADoBA,OAAgB,EAAA,CACxB,wBAAwB,OAAO,QAAQ,UAAU,KAAK;AAC1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../lib/modules/platform/azure/types.ts"],"sourcesContent":["import type { GitPullRequestMergeStrategy } from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport type { Pr } from '../types.ts';\n\nexport interface AzurePr extends Pr {\n sourceRefName?: string;\n}\n\nexport const AzurePrVote = {\n NoVote: 0,\n Reject: -10,\n WaitingForAuthor: -5,\n ApprovedWithSuggestions: 5,\n Approved: 10,\n} as const;\n\nexport interface Config {\n repoForceRebase: boolean;\n mergeMethods: Record<string, GitPullRequestMergeStrategy>;\n owner: string;\n repoId: string;\n project: string;\n projectId: string;\n prList: AzurePr[];\n fileList: null;\n repository: string;\n defaultBranch: string;\n /** Work item type for issues; from `azureWorkItemType`, defaults to `Issue`. */\n workItemType: string;\n}\n\nexport interface AzureBranchObj {\n name: string;\n oldObjectId: string;\n}\n"],"mappings":";AAOA,MAAa,cAAc;CACzB,QAAQ;CACR,QAAQ;CACR,kBAAkB;CAClB,yBAAyB;CACzB,UAAU;AACZ"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../lib/modules/platform/azure/types.ts"],"sourcesContent":["import type { GitPullRequestMergeStrategy } from 'azure-devops-node-api/interfaces/GitInterfaces.js';\nimport type { Pr } from '../types.ts';\n\nexport interface AzurePr extends Pr {\n sourceRefName?: string;\n}\n\nexport const AzurePrVote = {\n NoVote: 0,\n Reject: -10,\n WaitingForAuthor: -5,\n ApprovedWithSuggestions: 5,\n Approved: 10,\n} as const;\n\nexport interface Config {\n ignorePrAuthor: boolean;\n repoForceRebase: boolean;\n mergeMethods: Record<string, GitPullRequestMergeStrategy>;\n owner: string;\n repoId: string;\n project: string;\n projectId: string;\n prList: AzurePr[];\n fileList: null;\n repository: string;\n defaultBranch: string;\n /** Work item type for issues; from `azureWorkItemType`, defaults to `Issue`. */\n workItemType: string;\n}\n\nexport interface AzureBranchObj {\n name: string;\n oldObjectId: string;\n}\n"],"mappings":";AAOA,MAAa,cAAc;CACzB,QAAQ;CACR,QAAQ;CACR,kBAAkB;CAClB,yBAAyB;CACzB,UAAU;AACZ"}
@@ -4,7 +4,7 @@ import { sanitize } from "../sanitize.js";
4
4
  import { logger } from "../../logger/index.js";
5
5
  import { instrument } from "../../instrumentation/index.js";
6
6
  import { asRawCommand, isCommandWithOptions } from "./utils.js";
7
- import { isFunction, isNullOrUndefined } from "@sindresorhus/is";
7
+ import { isNullOrUndefined } from "@sindresorhus/is";
8
8
  import { join, split } from "shlex";
9
9
  import { execa } from "execa";
10
10
  //#region lib/util/exec/common.ts
@@ -81,9 +81,9 @@ function exec(commandArgument, opts) {
81
81
  ...opts,
82
82
  detached: process.platform !== "win32",
83
83
  shell,
84
- extendEnv: false
84
+ extendEnv: false,
85
+ reject: false
85
86
  });
86
- if (isFunction(cp.catch)) cp.catch((err) => logger.warn({ err }, "execa promise rejection suppressed"));
87
87
  const [stdout, stderr] = initStreamListeners(cp, {
88
88
  ...opts,
89
89
  maxBuffer
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","names":[],"sources":["../../../lib/util/exec/common.ts"],"sourcesContent":["import type { ChildProcess } from 'node:child_process';\nimport type { Readable } from 'node:stream';\nimport { isFunction, isNullOrUndefined } from '@sindresorhus/is';\nimport { execa } from 'execa';\nimport { join, split } from 'shlex';\nimport { instrument } from '../../instrumentation/index.ts';\nimport { logger } from '../../logger/index.ts';\nimport { getEnv } from '../env.ts';\nimport { sanitize } from '../sanitize.ts';\nimport type { ExecErrorData } from './exec-error.ts';\nimport { ExecError } from './exec-error.ts';\nimport type {\n CommandWithOptions,\n DataListener,\n ExecResult,\n OutputWriter,\n RawExecOptions,\n} from './types.ts';\nimport { asRawCommand, isCommandWithOptions } from './utils.ts';\n\n// https://man7.org/linux/man-pages/man7/signal.7.html#NAME\n// Non TERM/CORE signals\n// The following is step 3. in https://github.com/renovatebot/renovate/issues/16197#issuecomment-1171423890\nconst NONTERM = [\n 'SIGCHLD',\n 'SIGCLD',\n 'SIGCONT',\n 'SIGSTOP',\n 'SIGTSTP',\n 'SIGTTIN',\n 'SIGTTOU',\n 'SIGURG',\n 'SIGWINCH',\n];\n\nconst encoding = 'utf8';\n\nfunction stringify(list: Buffer[], writer: OutputWriter | undefined): string {\n return writer?.toString() ?? Buffer.concat(list).toString(encoding);\n}\n\nfunction initStreamListeners(\n cp: ChildProcess,\n opts: RawExecOptions & { maxBuffer: number },\n): [Buffer[], Buffer[]] {\n const stdout: Buffer[] = [];\n const stderr: Buffer[] = [];\n let stdoutLen = 0;\n let stderrLen = 0;\n\n registerDataListeners(cp.stdout, opts.outputListeners?.stdout);\n registerDataListeners(cp.stderr, opts.outputListeners?.stderr);\n\n cp.stdout?.on('data', (chunk: Buffer) => {\n // process.stdout.write(data.toString());\n if (opts.outputWriters?.stdout) {\n opts.outputWriters.stdout.write(chunk);\n return;\n }\n\n const len = Buffer.byteLength(chunk, encoding);\n stdoutLen += len;\n if (stdoutLen > opts.maxBuffer) {\n cp.emit('error', new Error('stdout maxBuffer exceeded'));\n } else {\n stdout.push(chunk);\n }\n });\n\n cp.stderr?.on('data', (chunk: Buffer) => {\n // process.stderr.write(data.toString());\n if (opts.outputWriters?.stderr) {\n opts.outputWriters.stderr.write(chunk);\n return;\n }\n\n const len = Buffer.byteLength(chunk, encoding);\n stderrLen += len;\n if (stderrLen > opts.maxBuffer) {\n cp.emit('error', new Error('stderr maxBuffer exceeded'));\n } else {\n stderr.push(chunk);\n }\n });\n return [stdout, stderr];\n}\n\nfunction registerDataListeners(\n readable: Readable | null,\n dataListeners: DataListener[] | undefined,\n): void {\n if (isNullOrUndefined(readable) || isNullOrUndefined(dataListeners)) {\n return;\n }\n\n for (const listener of dataListeners) {\n readable.on('data', listener);\n }\n}\n\nexport function exec(\n commandArgument: string | CommandWithOptions,\n opts: RawExecOptions,\n): Promise<ExecResult> {\n let theCmd = commandArgument;\n let ignoreFailure = false;\n if (isCommandWithOptions(commandArgument)) {\n theCmd = join(commandArgument.command);\n if (commandArgument.ignoreFailure !== undefined) {\n ignoreFailure = commandArgument.ignoreFailure;\n }\n }\n\n return new Promise((resolve, reject) => {\n let cmd = asRawCommand(theCmd);\n let args: string[] = [];\n const maxBuffer = opts.maxBuffer ?? 10 * 1024 * 1024; // Set default max buffer size to 10MB\n\n // don't use shell by default, as it leads to potential security issues\n let shell = opts.shell ?? false;\n if (\n isCommandWithOptions(commandArgument) &&\n commandArgument.shell !== undefined\n ) {\n shell = commandArgument.shell;\n }\n\n // if we're not in shell mode, we need to provide the command and arguments\n if (shell === false) {\n const parts = split(cmd);\n // v8 ignore else -- TODO: add test #40625\n if (parts) {\n cmd = parts[0];\n args = parts.slice(1);\n }\n }\n\n const cp = execa(cmd, args, {\n ...opts,\n // force detached on non WIN platforms\n // https://github.com/nodejs/node/issues/21825#issuecomment-611328888\n detached: process.platform !== 'win32',\n shell,\n extendEnv: false,\n });\n\n // Suppress execa's internal promise rejection (e.g., from timeout).\n // We handle all exit scenarios via 'exit' and 'error' event listeners below,\n // so the promise rejection would otherwise surface as an unhandledRejection.\n if (isFunction(cp.catch)) {\n cp.catch((err) =>\n logger.warn({ err }, 'execa promise rejection suppressed'),\n );\n }\n\n // handle streams\n const [stdout, stderr] = initStreamListeners(cp, {\n ...opts,\n maxBuffer,\n });\n\n // handle process events\n void cp.on('error', (error) => {\n kill(cp, 'SIGTERM');\n // rethrowing, use originally emitted error message\n reject(new ExecError(error.message, rejectInfo(), error));\n });\n\n void cp.on('exit', (code: number, signal: NodeJS.Signals) => {\n if (NONTERM.includes(signal)) {\n return;\n }\n if (signal) {\n kill(cp, signal);\n reject(\n new ExecError(\n `Command failed: ${cp.spawnargs.join(' ')}\\nInterrupted by ${signal}`,\n {\n ...rejectInfo(),\n signal,\n },\n ),\n );\n return;\n }\n if (code !== 0) {\n if (ignoreFailure === undefined || ignoreFailure === false) {\n reject(\n new ExecError(\n `Command failed: ${cp.spawnargs.join(' ')}\\n${stringify(stderr, opts.outputWriters?.stderr)}`,\n {\n ...rejectInfo(),\n exitCode: code,\n },\n ),\n );\n return;\n }\n\n logger.once.debug(\n {\n command: cp.spawnargs.join(' '),\n stdout: stringify(stdout, opts.outputWriters?.stdout),\n stderr: stringify(stderr, opts.outputWriters?.stderr),\n exitCode: code,\n },\n `Ignoring failure to execute comamnd \\`${cp.spawnargs.join(' ')}\\`, as ignoreFailure=true is set`,\n );\n\n resolve({\n stderr: stringify(stderr, opts.outputWriters?.stderr),\n stdout: stringify(stdout, opts.outputWriters?.stdout),\n exitCode: code,\n });\n return;\n }\n resolve({\n stderr: stringify(stderr, opts.outputWriters?.stderr),\n stdout: stringify(stdout, opts.outputWriters?.stdout),\n });\n });\n\n function rejectInfo(): ExecErrorData {\n return {\n cmd: cp.spawnargs.join(' '),\n options: opts,\n stdout: stringify(stdout, opts.outputWriters?.stdout),\n stderr: stringify(stderr, opts.outputWriters?.stderr),\n };\n }\n });\n}\n\nfunction kill(cp: ChildProcess, signal: NodeJS.Signals): boolean {\n try {\n if (cp.pid && getEnv().RENOVATE_X_EXEC_GPID_HANDLE) {\n /**\n * If `pid` is negative, but not `-1`, signal shall be sent to all processes\n * (excluding an unspecified set of system processes),\n * whose process group ID (pgid) is equal to the absolute value of pid,\n * and for which the process has permission to send a signal.\n */\n return process.kill(-cp.pid, signal);\n }\n // destroying stdio is needed for unref to work\n // https://nodejs.org/api/child_process.html#subprocessunref\n // https://github.com/nodejs/node/blob/4d5ff25a813fd18939c9f76b17e36291e3ea15c3/lib/child_process.js#L412-L426\n cp.stderr?.destroy();\n cp.stdout?.destroy();\n cp.unref();\n return cp.kill(signal);\n } catch {\n // cp is a single node tree, therefore -pid is invalid as there is no such pgid,\n return false;\n }\n}\n\nexport function rawExec(\n cmd: string | CommandWithOptions,\n opts: RawExecOptions,\n): Promise<ExecResult> {\n return instrument(`rawExec: ${sanitize(asRawCommand(cmd))}`, () =>\n exec(cmd, opts),\n );\n}\n"],"mappings":";;;;;;;;;;AAuBA,MAAM,UAAU;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,WAAW;AAEjB,SAAS,UAAU,MAAgB,QAA0C;CAC3E,OAAO,QAAQ,SAAS,KAAK,OAAO,OAAO,IAAI,CAAC,CAAC,SAAS,QAAQ;AACpE;AAEA,SAAS,oBACP,IACA,MACsB;CACtB,MAAM,SAAmB,CAAC;CAC1B,MAAM,SAAmB,CAAC;CAC1B,IAAI,YAAY;CAChB,IAAI,YAAY;CAEhB,sBAAsB,GAAG,QAAQ,KAAK,iBAAiB,MAAM;CAC7D,sBAAsB,GAAG,QAAQ,KAAK,iBAAiB,MAAM;CAE7D,GAAG,QAAQ,GAAG,SAAS,UAAkB;EAEvC,IAAI,KAAK,eAAe,QAAQ;GAC9B,KAAK,cAAc,OAAO,MAAM,KAAK;GACrC;EACF;EAEA,MAAM,MAAM,OAAO,WAAW,OAAO,QAAQ;EAC7C,aAAa;EACb,IAAI,YAAY,KAAK,WACnB,GAAG,KAAK,yBAAS,IAAI,MAAM,2BAA2B,CAAC;OAEvD,OAAO,KAAK,KAAK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AS;IACT,QAAQ,UAAU,QAAQ,KAAK,eAAe,MAAM;IACpD,QAAQ,UAAU,QAAQ,KAAK,eAAe,MAAM;GACtD;EACF;CACF,CAAC;AACH;AAEA,SAAS,KAAK,IAAkB,QAAiC;CAC/D,IAAI;EACF,IAAI,GAAG,OAAO,OAAO,CAAC,CAAC;;;;;;;EAOrB,OAAO,QAAQ,KAAK,CAAC,GAAG,KAAK,MAAM;EAKrC,GAAG,QAAQ,QAAQ;EACnB,GAAG,QAAQ,QAAQ;EACnB,GAAG,MAAM;EACT,OAAO,GAAG,KAAK,MAAM;CACvB,QAAQ;EAEN,OAAO;CACT;AACF;AAEA,SAAgB,QACd,KACA,MACqB;CACrB,OAAO,WAAW,YAAY,SAAS,aAAa,GAAG,CAAC,WACtD,KAAK,KAAK,IAAI,CAChB;AACF"}
1
+ {"version":3,"file":"common.js","names":[],"sources":["../../../lib/util/exec/common.ts"],"sourcesContent":["import type { ChildProcess } from 'node:child_process';\nimport type { Readable } from 'node:stream';\nimport { isNullOrUndefined } from '@sindresorhus/is';\nimport { execa } from 'execa';\nimport { join, split } from 'shlex';\nimport { instrument } from '../../instrumentation/index.ts';\nimport { logger } from '../../logger/index.ts';\nimport { getEnv } from '../env.ts';\nimport { sanitize } from '../sanitize.ts';\nimport type { ExecErrorData } from './exec-error.ts';\nimport { ExecError } from './exec-error.ts';\nimport type {\n CommandWithOptions,\n DataListener,\n ExecResult,\n OutputWriter,\n RawExecOptions,\n} from './types.ts';\nimport { asRawCommand, isCommandWithOptions } from './utils.ts';\n\n// https://man7.org/linux/man-pages/man7/signal.7.html#NAME\n// Non TERM/CORE signals\n// The following is step 3. in https://github.com/renovatebot/renovate/issues/16197#issuecomment-1171423890\nconst NONTERM = [\n 'SIGCHLD',\n 'SIGCLD',\n 'SIGCONT',\n 'SIGSTOP',\n 'SIGTSTP',\n 'SIGTTIN',\n 'SIGTTOU',\n 'SIGURG',\n 'SIGWINCH',\n];\n\nconst encoding = 'utf8';\n\nfunction stringify(list: Buffer[], writer: OutputWriter | undefined): string {\n return writer?.toString() ?? Buffer.concat(list).toString(encoding);\n}\n\nfunction initStreamListeners(\n cp: ChildProcess,\n opts: RawExecOptions & { maxBuffer: number },\n): [Buffer[], Buffer[]] {\n const stdout: Buffer[] = [];\n const stderr: Buffer[] = [];\n let stdoutLen = 0;\n let stderrLen = 0;\n\n registerDataListeners(cp.stdout, opts.outputListeners?.stdout);\n registerDataListeners(cp.stderr, opts.outputListeners?.stderr);\n\n cp.stdout?.on('data', (chunk: Buffer) => {\n // process.stdout.write(data.toString());\n if (opts.outputWriters?.stdout) {\n opts.outputWriters.stdout.write(chunk);\n return;\n }\n\n const len = Buffer.byteLength(chunk, encoding);\n stdoutLen += len;\n if (stdoutLen > opts.maxBuffer) {\n cp.emit('error', new Error('stdout maxBuffer exceeded'));\n } else {\n stdout.push(chunk);\n }\n });\n\n cp.stderr?.on('data', (chunk: Buffer) => {\n // process.stderr.write(data.toString());\n if (opts.outputWriters?.stderr) {\n opts.outputWriters.stderr.write(chunk);\n return;\n }\n\n const len = Buffer.byteLength(chunk, encoding);\n stderrLen += len;\n if (stderrLen > opts.maxBuffer) {\n cp.emit('error', new Error('stderr maxBuffer exceeded'));\n } else {\n stderr.push(chunk);\n }\n });\n return [stdout, stderr];\n}\n\nfunction registerDataListeners(\n readable: Readable | null,\n dataListeners: DataListener[] | undefined,\n): void {\n if (isNullOrUndefined(readable) || isNullOrUndefined(dataListeners)) {\n return;\n }\n\n for (const listener of dataListeners) {\n readable.on('data', listener);\n }\n}\n\nexport function exec(\n commandArgument: string | CommandWithOptions,\n opts: RawExecOptions,\n): Promise<ExecResult> {\n let theCmd = commandArgument;\n let ignoreFailure = false;\n if (isCommandWithOptions(commandArgument)) {\n theCmd = join(commandArgument.command);\n if (commandArgument.ignoreFailure !== undefined) {\n ignoreFailure = commandArgument.ignoreFailure;\n }\n }\n\n return new Promise((resolve, reject) => {\n let cmd = asRawCommand(theCmd);\n let args: string[] = [];\n const maxBuffer = opts.maxBuffer ?? 10 * 1024 * 1024; // Set default max buffer size to 10MB\n\n // don't use shell by default, as it leads to potential security issues\n let shell = opts.shell ?? false;\n if (\n isCommandWithOptions(commandArgument) &&\n commandArgument.shell !== undefined\n ) {\n shell = commandArgument.shell;\n }\n\n // if we're not in shell mode, we need to provide the command and arguments\n if (shell === false) {\n const parts = split(cmd);\n // v8 ignore else -- TODO: add test #40625\n if (parts) {\n cmd = parts[0];\n args = parts.slice(1);\n }\n }\n\n const cp = execa(cmd, args, {\n ...opts,\n // force detached on non WIN platforms\n // https://github.com/nodejs/node/issues/21825#issuecomment-611328888\n detached: process.platform !== 'win32',\n shell,\n extendEnv: false,\n // Suppress execa's internal promise rejection (e.g., from timeout).\n // We handle all exit scenarios via 'exit' and 'error' event listeners below,\n // so the promise rejection would otherwise surface as an unhandledRejection.\n // TODO: Refactor to await execa result (#45650)\n reject: false,\n });\n\n // handle streams\n const [stdout, stderr] = initStreamListeners(cp, {\n ...opts,\n maxBuffer,\n });\n\n // handle process events\n void cp.on('error', (error) => {\n kill(cp, 'SIGTERM');\n // rethrowing, use originally emitted error message\n reject(new ExecError(error.message, rejectInfo(), error));\n });\n\n void cp.on('exit', (code: number, signal: NodeJS.Signals) => {\n if (NONTERM.includes(signal)) {\n return;\n }\n if (signal) {\n kill(cp, signal);\n reject(\n new ExecError(\n `Command failed: ${cp.spawnargs.join(' ')}\\nInterrupted by ${signal}`,\n {\n ...rejectInfo(),\n signal,\n },\n ),\n );\n return;\n }\n if (code !== 0) {\n if (ignoreFailure === undefined || ignoreFailure === false) {\n reject(\n new ExecError(\n `Command failed: ${cp.spawnargs.join(' ')}\\n${stringify(stderr, opts.outputWriters?.stderr)}`,\n {\n ...rejectInfo(),\n exitCode: code,\n },\n ),\n );\n return;\n }\n\n logger.once.debug(\n {\n command: cp.spawnargs.join(' '),\n stdout: stringify(stdout, opts.outputWriters?.stdout),\n stderr: stringify(stderr, opts.outputWriters?.stderr),\n exitCode: code,\n },\n `Ignoring failure to execute comamnd \\`${cp.spawnargs.join(' ')}\\`, as ignoreFailure=true is set`,\n );\n\n resolve({\n stderr: stringify(stderr, opts.outputWriters?.stderr),\n stdout: stringify(stdout, opts.outputWriters?.stdout),\n exitCode: code,\n });\n return;\n }\n resolve({\n stderr: stringify(stderr, opts.outputWriters?.stderr),\n stdout: stringify(stdout, opts.outputWriters?.stdout),\n });\n });\n\n function rejectInfo(): ExecErrorData {\n return {\n cmd: cp.spawnargs.join(' '),\n options: opts,\n stdout: stringify(stdout, opts.outputWriters?.stdout),\n stderr: stringify(stderr, opts.outputWriters?.stderr),\n };\n }\n });\n}\n\nfunction kill(cp: ChildProcess, signal: NodeJS.Signals): boolean {\n try {\n if (cp.pid && getEnv().RENOVATE_X_EXEC_GPID_HANDLE) {\n /**\n * If `pid` is negative, but not `-1`, signal shall be sent to all processes\n * (excluding an unspecified set of system processes),\n * whose process group ID (pgid) is equal to the absolute value of pid,\n * and for which the process has permission to send a signal.\n */\n return process.kill(-cp.pid, signal);\n }\n // destroying stdio is needed for unref to work\n // https://nodejs.org/api/child_process.html#subprocessunref\n // https://github.com/nodejs/node/blob/4d5ff25a813fd18939c9f76b17e36291e3ea15c3/lib/child_process.js#L412-L426\n cp.stderr?.destroy();\n cp.stdout?.destroy();\n cp.unref();\n return cp.kill(signal);\n } catch {\n // cp is a single node tree, therefore -pid is invalid as there is no such pgid,\n return false;\n }\n}\n\nexport function rawExec(\n cmd: string | CommandWithOptions,\n opts: RawExecOptions,\n): Promise<ExecResult> {\n return instrument(`rawExec: ${sanitize(asRawCommand(cmd))}`, () =>\n exec(cmd, opts),\n );\n}\n"],"mappings":";;;;;;;;;;AAuBA,MAAM,UAAU;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,WAAW;AAEjB,SAAS,UAAU,MAAgB,QAA0C;CAC3E,OAAO,QAAQ,SAAS,KAAK,OAAO,OAAO,IAAI,CAAC,CAAC,SAAS,QAAQ;AACpE;AAEA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;KACpD,UAAU;IACZ,GACA,yCAAyC,GAAG,UAAU,KAAK,GAAG,EAAE,iCAClE;IAEA,QAAQ;KACN,QAAQ,UAAU,QAAQ,KAAK,eAAe,MAAM;KACpD,QAAQ,UAAU,QAAQ,KAAK,eAAe,MAAM;KACpD,UAAU;IACZ,CAAC;IACD;GACF;GACA,QAAQ;IACN,QAAQ,UAAU,QAAQ,KAAK,eAAe,MAAM;IACpD,QAAQ,UAAU,QAAQ,KAAK,eAAe,MAAM;GACtD,CAAC;EACH,CAAC;EAED,SAAS,aAA4B;GACnC,OAAO;IACL,KAAK,GAAG,UAAU,KAAK,GAAG;IAC1B,SAAS;IACT,QAAQ,UAAU,QAAQ,KAAK,eAAe,MAAM;IACpD,QAAQ,UAAU,QAAQ,KAAK,eAAe,MAAM;GACtD;EACF;CACF,CAAC;AACH;AAEA,SAAS,KAAK,IAAkB,QAAiC;CAC/D,IAAI;EACF,IAAI,GAAG,OAAO,OAAO,CAAC,CAAC;;;;;;;EAOrB,OAAO,QAAQ,KAAK,CAAC,GAAG,KAAK,MAAM;EAKrC,GAAG,QAAQ,QAAQ;EACnB,GAAG,QAAQ,QAAQ;EACnB,GAAG,MAAM;EACT,OAAO,GAAG,KAAK,MAAM;CACvB,QAAQ;EAEN,OAAO;CACT;AACF;AAEA,SAAgB,QACd,KACA,MACqB;CACrB,OAAO,WAAW,YAAY,SAAS,aAAa,GAAG,CAAC,WACtD,KAAK,KAAK,IAAI,CAChB;AACF"}
@@ -18,6 +18,7 @@ async function matchesRule(inputConfig, packageRule) {
18
18
  async function applyPackageRules(inputConfig, stageName) {
19
19
  let config = { ...inputConfig };
20
20
  const packageRules = coerceArray(config.packageRules);
21
+ delete config.packageRules;
21
22
  logger.trace({
22
23
  dependency: config.depName,
23
24
  packageRules
@@ -51,6 +52,8 @@ async function applyPackageRules(inputConfig, stageName) {
51
52
  delete toApply.overridePackageName;
52
53
  config = mergeChildConfig(config, toApply);
53
54
  }
55
+ if (config.packageRules) config.packageRules = packageRules.concat(config.packageRules);
56
+ else if ("packageRules" in inputConfig) config.packageRules = inputConfig.packageRules;
54
57
  return config;
55
58
  }
56
59
  function removeMatchers(packageRule) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../lib/util/package-rules/index.ts"],"sourcesContent":["import { isNullOrUndefined, isString, isTruthy } from '@sindresorhus/is';\nimport _slugify from 'slugify';\nimport type {\n PackageRule,\n PackageRuleInputConfig,\n} from '../../config/types.ts';\nimport { mergeChildConfig } from '../../config/utils.ts';\nimport { logger } from '../../logger/index.ts';\nimport type { StageName } from '../../types/skip-reason.ts';\nimport { coerceArray } from '../array.ts';\nimport { compile } from '../template/index.ts';\nimport matchers from './matchers.ts';\n\nconst slugify = _slugify;\n\nasync function matchesRule(\n inputConfig: PackageRuleInputConfig,\n packageRule: PackageRule,\n): Promise<boolean> {\n for (const matcher of matchers) {\n const isMatch = await matcher.matches(inputConfig, packageRule);\n\n // no rules are defined\n if (isNullOrUndefined(isMatch)) {\n continue;\n }\n\n if (!isTruthy(isMatch)) {\n return false;\n }\n }\n\n return true;\n}\n\nexport async function applyPackageRules<T extends PackageRuleInputConfig>(\n inputConfig: T,\n stageName?: StageName,\n): Promise<T> {\n let config = { ...inputConfig };\n const packageRules = coerceArray(config.packageRules);\n logger.trace(\n { dependency: config.depName, packageRules },\n `Checking against ${packageRules.length} packageRules`,\n );\n for (const packageRule of packageRules) {\n // This rule is considered matched if there was at least one positive match and no negative matches\n if (await matchesRule(config, packageRule)) {\n // Package rule config overrides any existing config\n const toApply = removeMatchers({ ...packageRule });\n if (config.groupSlug && packageRule.groupName && !packageRule.groupSlug) {\n // Need to apply groupSlug otherwise the existing one will take precedence\n toApply.groupSlug = slugify(packageRule.groupName, {\n lower: true,\n });\n }\n\n if (\n // if it's got higher precedence, as it's a force'd config option\n // multiple force'd config options are \"last defined wins\"\n toApply.force?.enabled === false ||\n // otherwise, if it has regular precedence, compare\n (toApply.enabled === false && config.enabled !== false)\n ) {\n config.skipReason = 'package-rules';\n if (stageName) {\n config.skipStage = stageName;\n }\n }\n\n if (toApply.force?.enabled || toApply.enabled) {\n delete config.skipReason;\n delete config.skipStage;\n }\n if (\n isString(toApply.overrideDatasource) &&\n toApply.overrideDatasource !== config.datasource\n ) {\n logger.debug(\n `Overriding datasource from ${config.datasource} to ${toApply.overrideDatasource} for ${config.depName}`,\n );\n config.datasource = toApply.overrideDatasource;\n }\n if (\n isString(toApply.overrideDepName) &&\n toApply.overrideDepName !== config.depName\n ) {\n logger.debug(\n `Overriding depName from ${config.depName} to ${toApply.overrideDepName}`,\n );\n config.depName = compile(toApply.overrideDepName, config);\n }\n if (\n isString(toApply.overridePackageName) &&\n toApply.overridePackageName !== config.packageName\n ) {\n logger.debug(\n `Overriding packageName from ${config.packageName} to ${toApply.overridePackageName} for ${config.depName}`,\n );\n config.packageName = compile(toApply.overridePackageName, config);\n }\n if (isString(toApply.sourceUrl)) {\n toApply.sourceUrl = compile(toApply.sourceUrl, config);\n }\n delete toApply.overrideDatasource;\n delete toApply.overrideDepName;\n delete toApply.overridePackageName;\n config = mergeChildConfig(config, toApply);\n }\n }\n return config;\n}\n\nfunction removeMatchers<T extends Record<string, unknown>>(\n packageRule: T,\n): Record<string, unknown> & {\n force?: Record<string, unknown>;\n} {\n for (const key of Object.keys(packageRule)) {\n if (key.startsWith('match') || key.startsWith('exclude')) {\n delete packageRule[key];\n }\n }\n\n return packageRule;\n}\n"],"mappings":";;;;;;;;AAaA,MAAM,UAAU;AAEhB,eAAe,YACb,aACA,aACkB;CAClB,KAAK,MAAM,WAAW,UAAU;EAC9B,MAAM,UAAU,MAAM,QAAQ,QAAQ,aAAa,WAAW;EAG9D,IAAI,kBAAkB,OAAO,GAC3B;EAGF,IAAI,CAAC,SAAS,OAAO,GACnB,OAAO;CAEX;CAEA,OAAO;AACT;AAEA,eAAsB,kBACpB,aACA,WACY;CACZ,IAAI,SAAS,EAAE,GAAG,YAAY;CAC9B,MAAM,eAAe,YAAY,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,OAAO;CAC3C;CAEF,OAAO;AACT;AAEA,SAAS,eACP,aAGA;CACA,KAAK,MAAM,OAAO,OAAO,KAAK,WAAW,GACvC,IAAI,IAAI,WAAW,OAAO,KAAK,IAAI,WAAW,SAAS,GACrD,OAAO,YAAY;CAIvB,OAAO;AACT"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../lib/util/package-rules/index.ts"],"sourcesContent":["import { isNullOrUndefined, isString, isTruthy } from '@sindresorhus/is';\nimport _slugify from 'slugify';\nimport type {\n PackageRule,\n PackageRuleInputConfig,\n} from '../../config/types.ts';\nimport { mergeChildConfig } from '../../config/utils.ts';\nimport { logger } from '../../logger/index.ts';\nimport type { StageName } from '../../types/skip-reason.ts';\nimport { coerceArray } from '../array.ts';\nimport { compile } from '../template/index.ts';\nimport matchers from './matchers.ts';\n\nconst slugify = _slugify;\n\nasync function matchesRule(\n inputConfig: PackageRuleInputConfig,\n packageRule: PackageRule,\n): Promise<boolean> {\n for (const matcher of matchers) {\n const isMatch = await matcher.matches(inputConfig, packageRule);\n\n // no rules are defined\n if (isNullOrUndefined(isMatch)) {\n continue;\n }\n\n if (!isTruthy(isMatch)) {\n return false;\n }\n }\n\n return true;\n}\n\nexport async function applyPackageRules<T extends PackageRuleInputConfig>(\n inputConfig: T,\n stageName?: StageName,\n): Promise<T> {\n let config = { ...inputConfig };\n const packageRules = coerceArray(config.packageRules);\n // The `packageRules` array is invariant while rules are being applied, and\n // can be very large (e.g. vulnerability alerts append rules embedding full\n // advisory texts). Remove it from the working config so mergeChildConfig()\n // does not deep-clone the whole array once per matched rule, then restore\n // it afterwards.\n delete config.packageRules;\n logger.trace(\n { dependency: config.depName, packageRules },\n `Checking against ${packageRules.length} packageRules`,\n );\n for (const packageRule of packageRules) {\n // This rule is considered matched if there was at least one positive match and no negative matches\n if (await matchesRule(config, packageRule)) {\n // Package rule config overrides any existing config\n const toApply = removeMatchers({ ...packageRule });\n if (config.groupSlug && packageRule.groupName && !packageRule.groupSlug) {\n // Need to apply groupSlug otherwise the existing one will take precedence\n toApply.groupSlug = slugify(packageRule.groupName, {\n lower: true,\n });\n }\n\n if (\n // if it's got higher precedence, as it's a force'd config option\n // multiple force'd config options are \"last defined wins\"\n toApply.force?.enabled === false ||\n // otherwise, if it has regular precedence, compare\n (toApply.enabled === false && config.enabled !== false)\n ) {\n config.skipReason = 'package-rules';\n if (stageName) {\n config.skipStage = stageName;\n }\n }\n\n if (toApply.force?.enabled || toApply.enabled) {\n delete config.skipReason;\n delete config.skipStage;\n }\n if (\n isString(toApply.overrideDatasource) &&\n toApply.overrideDatasource !== config.datasource\n ) {\n logger.debug(\n `Overriding datasource from ${config.datasource} to ${toApply.overrideDatasource} for ${config.depName}`,\n );\n config.datasource = toApply.overrideDatasource;\n }\n if (\n isString(toApply.overrideDepName) &&\n toApply.overrideDepName !== config.depName\n ) {\n logger.debug(\n `Overriding depName from ${config.depName} to ${toApply.overrideDepName}`,\n );\n config.depName = compile(toApply.overrideDepName, config);\n }\n if (\n isString(toApply.overridePackageName) &&\n toApply.overridePackageName !== config.packageName\n ) {\n logger.debug(\n `Overriding packageName from ${config.packageName} to ${toApply.overridePackageName} for ${config.depName}`,\n );\n config.packageName = compile(toApply.overridePackageName, config);\n }\n if (isString(toApply.sourceUrl)) {\n toApply.sourceUrl = compile(toApply.sourceUrl, config);\n }\n delete toApply.overrideDatasource;\n delete toApply.overrideDepName;\n delete toApply.overridePackageName;\n config = mergeChildConfig(config, toApply);\n }\n }\n // Restore the rules. If any applied rule carried nested `packageRules`\n // (e.g. from a resolved preset), preserve the concat-merge semantics that\n // mergeChildConfig() would previously have applied.\n if (config.packageRules) {\n config.packageRules = packageRules.concat(config.packageRules);\n } else if ('packageRules' in inputConfig) {\n config.packageRules = inputConfig.packageRules;\n }\n return config;\n}\n\nfunction removeMatchers<T extends Record<string, unknown>>(\n packageRule: T,\n): Record<string, unknown> & {\n force?: Record<string, unknown>;\n} {\n for (const key of Object.keys(packageRule)) {\n if (key.startsWith('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,iBAC1D;GACA,OAAO,UAAU,QAAQ,QAAQ,iBAAiB,MAAM;EAC1D;EACA,IACE,SAAS,QAAQ,mBAAmB,KACpC,QAAQ,wBAAwB,OAAO,aACvC;GACA,OAAO,MACL,+BAA+B,OAAO,YAAY,MAAM,QAAQ,oBAAoB,OAAO,OAAO,SACpG;GACA,OAAO,cAAc,QAAQ,QAAQ,qBAAqB,MAAM;EAClE;EACA,IAAI,SAAS,QAAQ,SAAS,GAC5B,QAAQ,YAAY,QAAQ,QAAQ,WAAW,MAAM;EAEvD,OAAO,QAAQ;EACf,OAAO,QAAQ;EACf,OAAO,QAAQ;EACf,SAAS,iBAAiB,QAAQ,OAAO;CAC3C;CAKF,IAAI,OAAO,cACT,OAAO,eAAe,aAAa,OAAO,OAAO,YAAY;MACxD,IAAI,kBAAkB,aAC3B,OAAO,eAAe,YAAY;CAEpC,OAAO;AACT;AAEA,SAAS,eACP,aAGA;CACA,KAAK,MAAM,OAAO,OAAO,KAAK,WAAW,GACvC,IAAI,IAAI,WAAW,OAAO,KAAK,IAAI,WAAW,SAAS,GACrD,OAAO,YAAY;CAIvB,OAAO;AACT"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "renovate",
3
3
  "description": "Automated dependency updates. Flexible so you don't need to be.",
4
- "version": "44.60.1",
4
+ "version": "44.61.1",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$id": "https://docs.renovatebot.com/renovate-schema.json",
3
- "title": "JSON schema for Renovate 44.60.1 config files (https://renovatebot.com/)",
3
+ "title": "JSON schema for Renovate 44.61.1 config files (https://renovatebot.com/)",
4
4
  "$schema": "http://json-schema.org/draft-07/schema#",
5
- "x-renovate-version": "44.60.1",
5
+ "x-renovate-version": "44.61.1",
6
6
  "allowComments": true,
7
7
  "type": "object",
8
8
  "definitions": {