renovate 43.284.1 → 43.285.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.
@@ -70,7 +70,7 @@ hashMap.set("maven", "f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a57222
70
70
  hashMap.set("maven-wrapper", "976ed8a59cf43b0c765b1a49ebc5669478e78278cf48f4ce3d0deb49647d10e3");
71
71
  hashMap.set("meteor", "4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4");
72
72
  hashMap.set("mint", "248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e");
73
- hashMap.set("mise", "ac76eb412f7560907389c50cced10aafcaa2428702144b325ad608a6907abf3a");
73
+ hashMap.set("mise", "1d4470230400ee4c1cb546cbe4fec3426f25a81425d8c555a3f60a42add403e0");
74
74
  hashMap.set("mix", "bedc1c384159dc19663827a9a3da0f195a5d4122b60ec5749cd3144cef339371");
75
75
  hashMap.set("nix", "5c2a27c9525894185d93b81e54eeb663bc2f6192853b220f56211c56e87d8379");
76
76
  hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
@@ -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('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','0407066010ebb3d7ad4c1afe6b9a3615a3c11d64dc3cf0674cb9dfc3ea272273');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','40f6a862b4e72fcc7262ee41f8b570ea3fd5600d6d552b94ed3301bb201f5db5');\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','f2d5b0a7c0c724d30e79e12688b1fc8ff8e344db0cc6389553e2f6001ddf8345');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','629eda7bc52772bcc5b9c7254ce43a4d0a109c8473ba7633235020193102fd1e');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','197fa953327d70c12fad864eacc4c2f25b8d92dcb7e7e6d19bdda473f650f786');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','38b7fdc82d1d5583870707a04c334aa6dd725b13648febddebed35ce888ca017');\nhashMap.set('composer','829e1483e9519e9ff8d33e40f18a3e3be87ad4a328e32dc1cfb42655709796f8');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','02b3cf090d7b8b8b1c06dd025a7faf6db4e0b5eb58aba7c1da16d15ac934cf61');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','db87814a407e43b8edaf7ccdf1659407fd934597e4253a3f330b8219dc34c40e');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','c6204becff9e14b60b40f76ecb181f5292d4a2b39bca439afe6f9305cf6ce418');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','79fa6ec15676108739e468f43746b1174528ed97cf7e3a2ac3758993141d326d');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','2d12dc3bd8bb6d866843b48af2fd6594a99f4b2d6bc52613ff2b14642b78b466');\nhashMap.set('github-actions','3f593cee5173db2d797cc0b52af859b7b98f4290c7b4c6175d38d9786db0df74');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','0e0ecc704a4c0370ac36f5592c1d0def1581ffb0df6d14114cef009b0365f84c');\nhashMap.set('gradle','62e769489ed98a4635c0f7e4dd839845d3cf487d76a68442eb2b7fe832fcd150');\nhashMap.set('gradle-wrapper','81760ab88a1bed36b0381684396934cf7875e3466c01df8c98f410173f3168f4');\nhashMap.set('haskell-cabal','f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','90725ebe5de2d8bb249177123b0de357cf2d55e153501e3ad0ad7b0bef9178e5');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','31f48511403438ceac8f9b813a35d2c10c8f28e7125e8b6a7e12035ba5d5201e');\nhashMap.set('hermit','cdc0007b3612f91a1fa61a9fa137096555014638c75ea8d5465bf71fd6ff6125');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','56ef90301143874355fd2ed25dff7c646875f701f97422d02e01d45608a88f31');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','4023ef4cac55fe58f8d9744ae86b13532298926e35e22d250334cde55c3386ff');\nhashMap.set('kotlin-script','99ef296792a0ca575ed31d3defb514b05a58083dc01c52ea0890c69d867ba1dd');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','95f662ce196b95ee87845488d944cc046f6eb53ac6e10d90581735cd2f7c2d8c');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','976ed8a59cf43b0c765b1a49ebc5669478e78278cf48f4ce3d0deb49647d10e3');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','ac76eb412f7560907389c50cced10aafcaa2428702144b325ad608a6907abf3a');\nhashMap.set('mix','bedc1c384159dc19663827a9a3da0f195a5d4122b60ec5749cd3144cef339371');\nhashMap.set('nix','5c2a27c9525894185d93b81e54eeb663bc2f6192853b220f56211c56e87d8379');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','8ead682ae73c7bc4ab425ee1536f26e09e663e0dac409cb0c6d5d82f55ad8375');\nhashMap.set('nuget','815b89106ec2a7e9455f45cbb8ec50ade82172e05a6d4439a0f30730a686f82f');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','d11d77288684578a4d444aecf4e3fba837ada31c676548bba9097e6179b27848');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','52f0aa7c0b2ae5af6c649f7d7dd7202e257887c4f4497a0b70eb3384e349e7de');\nhashMap.set('pip_requirements','133115d094c35139584fd08e20b8a60bfc99de4e82e30020e4acb3c2f33a1a5b');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','b759dbb54b09a9338d61cfb539afe2281b485abe646eb2c6ff309527469cd0dd');\nhashMap.set('pixi','fd925887530c356daaa416057e1941a291d494238b9f519d43f970a3457cc1e6');\nhashMap.set('poetry','60965cf6f1addb4ebb43531b12138fc90560c5145530a69529719325b443cc62');\nhashMap.set('pre-commit','d191792fe6a89025de644421e9e6391c4048f10bf8e46421c676290a35c9e587');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','a0b659f470dab05555cea82da60d414641678555c0bec213b3206b3ae3ead011');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e355e13e104351a8b3516a8e272fc5f7e625c9f39b0c492ba27283a36227c2d4');\nhashMap.set('renovate-config','2a4e4fb671aed5d0c900b8d54c31bfef46ca36d0f4e16b00ff73377b9c09fb69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','e957f1f1563af4e5fbd1c552ca15632b7808d9d2e51ec0da6022a1f84372caec');\nhashMap.set('sbt','e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','05b3158e88771ed4629e171592cf4f1bf0ff342f8aeae89be0b340c630cc6d8e');\nhashMap.set('swift','56cdc6fe4cd00519f953459f94323c71677f6bde007537eef891154fb8696db1');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','3dc2e8342e5e4ddf0f1cf1910567f13c4cfb20b9eaf375ee522f67946fe3e368');\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','ef3374fc0a3d3457172b0ce77bfca120e8044b6fd4fa942348fb837f6023360c');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','46efac5bda6737cccacf2d89ce1d384ee410876c5557b4c02be2275b7c1d862d');\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,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,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF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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('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','0407066010ebb3d7ad4c1afe6b9a3615a3c11d64dc3cf0674cb9dfc3ea272273');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','40f6a862b4e72fcc7262ee41f8b570ea3fd5600d6d552b94ed3301bb201f5db5');\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','f2d5b0a7c0c724d30e79e12688b1fc8ff8e344db0cc6389553e2f6001ddf8345');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','629eda7bc52772bcc5b9c7254ce43a4d0a109c8473ba7633235020193102fd1e');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','197fa953327d70c12fad864eacc4c2f25b8d92dcb7e7e6d19bdda473f650f786');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','38b7fdc82d1d5583870707a04c334aa6dd725b13648febddebed35ce888ca017');\nhashMap.set('composer','829e1483e9519e9ff8d33e40f18a3e3be87ad4a328e32dc1cfb42655709796f8');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','02b3cf090d7b8b8b1c06dd025a7faf6db4e0b5eb58aba7c1da16d15ac934cf61');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','db87814a407e43b8edaf7ccdf1659407fd934597e4253a3f330b8219dc34c40e');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','c6204becff9e14b60b40f76ecb181f5292d4a2b39bca439afe6f9305cf6ce418');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','79fa6ec15676108739e468f43746b1174528ed97cf7e3a2ac3758993141d326d');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','2d12dc3bd8bb6d866843b48af2fd6594a99f4b2d6bc52613ff2b14642b78b466');\nhashMap.set('github-actions','3f593cee5173db2d797cc0b52af859b7b98f4290c7b4c6175d38d9786db0df74');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','0e0ecc704a4c0370ac36f5592c1d0def1581ffb0df6d14114cef009b0365f84c');\nhashMap.set('gradle','62e769489ed98a4635c0f7e4dd839845d3cf487d76a68442eb2b7fe832fcd150');\nhashMap.set('gradle-wrapper','81760ab88a1bed36b0381684396934cf7875e3466c01df8c98f410173f3168f4');\nhashMap.set('haskell-cabal','f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','90725ebe5de2d8bb249177123b0de357cf2d55e153501e3ad0ad7b0bef9178e5');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','31f48511403438ceac8f9b813a35d2c10c8f28e7125e8b6a7e12035ba5d5201e');\nhashMap.set('hermit','cdc0007b3612f91a1fa61a9fa137096555014638c75ea8d5465bf71fd6ff6125');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','56ef90301143874355fd2ed25dff7c646875f701f97422d02e01d45608a88f31');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','4023ef4cac55fe58f8d9744ae86b13532298926e35e22d250334cde55c3386ff');\nhashMap.set('kotlin-script','99ef296792a0ca575ed31d3defb514b05a58083dc01c52ea0890c69d867ba1dd');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','95f662ce196b95ee87845488d944cc046f6eb53ac6e10d90581735cd2f7c2d8c');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','976ed8a59cf43b0c765b1a49ebc5669478e78278cf48f4ce3d0deb49647d10e3');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','1d4470230400ee4c1cb546cbe4fec3426f25a81425d8c555a3f60a42add403e0');\nhashMap.set('mix','bedc1c384159dc19663827a9a3da0f195a5d4122b60ec5749cd3144cef339371');\nhashMap.set('nix','5c2a27c9525894185d93b81e54eeb663bc2f6192853b220f56211c56e87d8379');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','8ead682ae73c7bc4ab425ee1536f26e09e663e0dac409cb0c6d5d82f55ad8375');\nhashMap.set('nuget','815b89106ec2a7e9455f45cbb8ec50ade82172e05a6d4439a0f30730a686f82f');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','d11d77288684578a4d444aecf4e3fba837ada31c676548bba9097e6179b27848');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','52f0aa7c0b2ae5af6c649f7d7dd7202e257887c4f4497a0b70eb3384e349e7de');\nhashMap.set('pip_requirements','133115d094c35139584fd08e20b8a60bfc99de4e82e30020e4acb3c2f33a1a5b');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','b759dbb54b09a9338d61cfb539afe2281b485abe646eb2c6ff309527469cd0dd');\nhashMap.set('pixi','fd925887530c356daaa416057e1941a291d494238b9f519d43f970a3457cc1e6');\nhashMap.set('poetry','60965cf6f1addb4ebb43531b12138fc90560c5145530a69529719325b443cc62');\nhashMap.set('pre-commit','d191792fe6a89025de644421e9e6391c4048f10bf8e46421c676290a35c9e587');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','a0b659f470dab05555cea82da60d414641678555c0bec213b3206b3ae3ead011');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e355e13e104351a8b3516a8e272fc5f7e625c9f39b0c492ba27283a36227c2d4');\nhashMap.set('renovate-config','2a4e4fb671aed5d0c900b8d54c31bfef46ca36d0f4e16b00ff73377b9c09fb69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','e957f1f1563af4e5fbd1c552ca15632b7808d9d2e51ec0da6022a1f84372caec');\nhashMap.set('sbt','e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','05b3158e88771ed4629e171592cf4f1bf0ff342f8aeae89be0b340c630cc6d8e');\nhashMap.set('swift','56cdc6fe4cd00519f953459f94323c71677f6bde007537eef891154fb8696db1');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','3dc2e8342e5e4ddf0f1cf1910567f13c4cfb20b9eaf375ee522f67946fe3e368');\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','ef3374fc0a3d3457172b0ce77bfca120e8044b6fd4fa942348fb837f6023360c');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a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,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"}
@@ -0,0 +1,10 @@
1
+ //#region lib/modules/manager/mise/dep-types.ts
2
+ const knownDepTypes = [{
3
+ depType: "tools",
4
+ description: "A tool defined under the top-level `[tools]` table"
5
+ }];
6
+ const supportsDynamicDepTypesNote = "Tools defined under `tasks.<name>.tools` produce dynamic `depType` values in the form `task-<name>-tools`, where `<name>` is the task name (e.g. `task-lint-tools`).";
7
+ //#endregion
8
+ export { knownDepTypes, supportsDynamicDepTypesNote };
9
+
10
+ //# sourceMappingURL=dep-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dep-types.js","names":[],"sources":["../../../../lib/modules/manager/mise/dep-types.ts"],"sourcesContent":["import type { DepTypeMetadata } from '../types.ts';\n\nexport const knownDepTypes = [\n {\n depType: 'tools',\n description: 'A tool defined under the top-level `[tools]` table',\n },\n] as const satisfies readonly DepTypeMetadata[];\n\nexport const supportsDynamicDepTypesNote =\n 'Tools defined under `tasks.<name>.tools` produce dynamic `depType` values in the form `task-<name>-tools`, where `<name>` is the task name (e.g. `task-lint-tools`).';\n"],"mappings":";AAEA,MAAa,gBAAgB,CAC3B;CACE,SAAS;CACT,aAAa;AACf,CACF;AAEA,MAAa,8BACX"}
@@ -19,8 +19,8 @@ async function extractPackageFile(content, packageFile) {
19
19
  const misefile = parseTomlFile(content, packageFile);
20
20
  if (!misefile) return null;
21
21
  const deps = [];
22
- for (const [name, toolData] of Object.entries(misefile.tools)) deps.push(extractToolEntry(name, toolData));
23
- for (const taskData of Object.values(misefile.tasks)) for (const [name, toolData] of Object.entries(taskData.tools ?? {})) deps.push(extractToolEntry(name, toolData));
22
+ for (const [name, toolData] of Object.entries(misefile.tools)) deps.push(extractToolEntry(name, toolData, "tools"));
23
+ for (const [taskName, taskData] of Object.entries(misefile.tasks)) for (const [name, toolData] of Object.entries(taskData.tools ?? {})) deps.push(extractToolEntry(name, toolData, `task-${taskName}-tools`));
24
24
  if (!deps.length) return null;
25
25
  const result = { deps };
26
26
  const lockFileName = getLockFileName(packageFile);
@@ -98,26 +98,29 @@ function getConfigFromTooling(toolingSource, name, version) {
98
98
  if (!toolDefinition) return null;
99
99
  return (isFunction(toolDefinition.config) ? toolDefinition.config(version) : toolDefinition.config) ?? null;
100
100
  }
101
- function extractToolEntry(name, toolData) {
101
+ function extractToolEntry(name, toolData, depType) {
102
102
  const version = parseVersion(toolData);
103
103
  const { name: depName, options: optionsInName } = optionInToolNameRegex.exec(name.trim()).groups;
104
104
  const delimiterIndex = depName.indexOf(":");
105
105
  const backend = depName.substring(0, delimiterIndex);
106
106
  const toolName = depName.substring(delimiterIndex + 1);
107
107
  const options = parseOptions(optionsInName, isNonEmptyObject(toolData) ? toolData : {});
108
- return createDependency(depName, version, version === null ? null : getToolConfig(backend, toolName, version, options));
108
+ return createDependency(depName, version, version === null ? null : getToolConfig(backend, toolName, version, options), depType);
109
109
  }
110
- function createDependency(name, version, config) {
110
+ function createDependency(name, version, config, depType) {
111
111
  if (version === null) return {
112
112
  depName: name,
113
+ depType,
113
114
  skipReason: "unspecified-version"
114
115
  };
115
116
  if (config === null) return {
116
117
  depName: name,
118
+ depType,
117
119
  skipReason: "unsupported-datasource"
118
120
  };
119
121
  return {
120
122
  depName: name,
123
+ depType,
121
124
  currentValue: version,
122
125
  ...config
123
126
  };
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","names":[],"sources":["../../../../lib/modules/manager/mise/extract.ts"],"sourcesContent":["import {\n isArray,\n isFunction,\n isNonEmptyObject,\n isNonEmptyString,\n isObject,\n isString,\n} from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport type { StaticTooling } from '../asdf/upgradeable-tooling.ts';\nimport type { PackageDependency, PackageFileContent } from '../types.ts';\nimport type { BackendToolingConfig } from './backends.ts';\nimport {\n createAquaToolConfig,\n createCargoToolConfig,\n createDotnetToolConfig,\n createGemToolConfig,\n createGithubToolConfig,\n createGoToolConfig,\n createNpmToolConfig,\n createPipxToolConfig,\n createSpmToolConfig,\n createUbiToolConfig,\n} from './backends.ts';\nimport { getLockFileName, getLockedVersion } from './lockfile.ts';\nimport type { MiseTool, MiseToolOptions } from './schema.ts';\nimport { MiseLockFile } from './schema.ts';\nimport type { ToolingDefinition } from './upgradeable-tooling.ts';\nimport {\n asdfTooling,\n getOrderedMiseRegistryBackends,\n miseTooling,\n} from './upgradeable-tooling.ts';\nimport { parseTomlFile } from './utils.ts';\n\n// Tool names can have options in the tool name\n// e.g. ubi:tamasfe/taplo[matching=full,exe=taplo]\nconst optionInToolNameRegex = regEx(/^(?<name>.+?)(?:\\[(?<options>.+)\\])?$/);\n\n/**\n * Extracts mise tool dependencies from a mise configuration file.\n * Supports various backends (core, asdf, aqua, cargo, etc.) and\n * extracts locked versions when a corresponding lock file exists.\n */\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n): Promise<PackageFileContent | null> {\n logger.trace(`mise.extractPackageFile(${packageFile})`);\n\n const misefile = parseTomlFile(content, packageFile);\n if (!misefile) {\n return null;\n }\n\n const deps: PackageDependency[] = [];\n\n for (const [name, toolData] of Object.entries(misefile.tools)) {\n deps.push(extractToolEntry(name, toolData));\n }\n\n for (const taskData of Object.values(misefile.tasks)) {\n for (const [name, toolData] of Object.entries(taskData.tools ?? {})) {\n deps.push(extractToolEntry(name, toolData));\n }\n }\n\n if (!deps.length) {\n return null;\n }\n\n const result: PackageFileContent = { deps };\n\n const lockFileName = getLockFileName(packageFile);\n const lockFileContent = await readLocalFile(lockFileName, 'utf8');\n\n if (lockFileContent) {\n const lockFileParsed = MiseLockFile.safeParse(lockFileContent);\n if (lockFileParsed.success) {\n result.lockFiles = [lockFileName];\n for (const dep of deps) {\n const lockedVersion = getLockedVersion(\n lockFileParsed.data,\n dep.depName!,\n );\n if (lockedVersion) {\n dep.lockedVersion = lockedVersion;\n }\n }\n } else {\n logger.debug(\n { lockFileName, error: lockFileParsed.error },\n 'Failed to parse mise lock file',\n );\n }\n }\n\n return result;\n}\n\nfunction parseVersion(toolData: MiseTool): string | null {\n if (isNonEmptyString(toolData)) {\n // Handle the string case\n // e.g. 'erlang = \"23.3\"'\n return toolData;\n }\n if (isArray(toolData, isString)) {\n // Handle the array case\n // e.g. 'erlang = [\"23.3\", \"24.0\"]'\n return toolData.length ? toolData[0] : null; // Get the first version in the array\n }\n if (isObject(toolData) && isNonEmptyString(toolData.version)) {\n // Handle the object case with a string version\n // e.g. 'python = { version = \"3.11.2\" }'\n return toolData.version;\n }\n return null; // Return null if no version is found\n}\n\nfunction parseOptions(\n optionsInName: string,\n toolOptions: MiseToolOptions,\n): MiseToolOptions {\n const options = isNonEmptyString(optionsInName)\n ? Object.fromEntries(\n optionsInName.split(',').map((option) => option.split('=', 2)),\n )\n : {};\n // Options in toolOptions will override options in the tool name\n return {\n ...options,\n ...toolOptions,\n };\n}\n\nfunction getToolConfig(\n backend: string,\n toolName: string,\n version: string,\n toolOptions: MiseToolOptions,\n): StaticTooling | BackendToolingConfig | null {\n switch (backend) {\n case '': {\n // If the tool name does not specify a backend, it should be a short name or an alias defined by users\n const staticResult = getRegistryToolConfig(toolName, version);\n if (staticResult) {\n return staticResult;\n }\n\n // Otherwise, see if we have any known short tool names that are in the `mise-registry.json` data file\n const backends = getOrderedMiseRegistryBackends(toolName);\n\n // prioritise the github backend as the best source for data\n if (backends.github) {\n const result = getToolConfig(\n 'github',\n backends.github,\n version,\n toolOptions,\n );\n // v8 ignore else -- TODO: add test #40625\n if (result !== null) {\n return result;\n }\n }\n\n for (const [backendType, backendName] of Object.entries(backends)) {\n const result = getToolConfig(\n backendType,\n backendName,\n version,\n toolOptions,\n );\n // v8 ignore else -- TODO: add test #40625\n if (result !== null) {\n return result;\n }\n }\n return null;\n }\n // We can specify core, asdf, vfox, aqua backends for tools in the default registry\n // e.g. 'core:rust', 'asdf:rust', 'vfox:clang', 'aqua:act'\n case 'core':\n return getConfigFromTooling(miseTooling, toolName, version);\n case 'asdf':\n return getConfigFromTooling(asdfTooling, toolName, version);\n case 'vfox':\n return getRegistryToolConfig(toolName, version);\n case 'aqua':\n return (\n getRegistryToolConfig(toolName, version) ??\n createAquaToolConfig(toolName, version)\n );\n case 'cargo':\n return createCargoToolConfig(toolName, version);\n case 'dotnet':\n return createDotnetToolConfig(toolName);\n case 'gem':\n return createGemToolConfig(toolName);\n case 'github':\n return createGithubToolConfig(toolName, version, toolOptions);\n case 'go':\n return createGoToolConfig(toolName);\n case 'npm':\n return createNpmToolConfig(toolName);\n case 'pipx':\n return createPipxToolConfig(toolName);\n case 'spm':\n return createSpmToolConfig(toolName);\n case 'ubi':\n return createUbiToolConfig(toolName, version, toolOptions);\n default:\n // Unsupported backend\n return null;\n }\n}\n\n/**\n * Get the tooling config for a short name defined in the default registry\n * @link https://mise.jdx.dev/registry.html\n */\nfunction getRegistryToolConfig(\n short: string,\n version: string,\n): StaticTooling | null {\n // Try to get the config from miseTooling first, then asdfTooling\n return (\n getConfigFromTooling(miseTooling, short, version) ??\n getConfigFromTooling(asdfTooling, short, version)\n );\n}\n\nfunction getConfigFromTooling(\n toolingSource: Record<string, ToolingDefinition>,\n name: string,\n version: string,\n): StaticTooling | null {\n const toolDefinition = toolingSource[name];\n if (!toolDefinition) {\n return null;\n } // Return null if no toolDefinition is found\n\n return (\n (isFunction(toolDefinition.config)\n ? toolDefinition.config(version)\n : toolDefinition.config) ?? null\n ); // Ensure null is returned instead of undefined\n}\n\nfunction extractToolEntry(name: string, toolData: MiseTool): PackageDependency {\n const version = parseVersion(toolData);\n const { name: depName, options: optionsInName } = optionInToolNameRegex.exec(\n name.trim(),\n )!.groups!;\n const delimiterIndex = depName.indexOf(':');\n const backend = depName.substring(0, delimiterIndex);\n const toolName = depName.substring(delimiterIndex + 1);\n const options = parseOptions(\n optionsInName,\n isNonEmptyObject(toolData) ? toolData : {},\n );\n const toolConfig =\n version === null\n ? null\n : getToolConfig(backend, toolName, version, options);\n return createDependency(depName, version, toolConfig);\n}\n\nfunction createDependency(\n name: string,\n version: string | null,\n config: StaticTooling | BackendToolingConfig | null,\n): PackageDependency {\n if (version === null) {\n return {\n depName: name,\n skipReason: 'unspecified-version',\n };\n }\n if (config === null) {\n return {\n depName: name,\n skipReason: 'unsupported-datasource',\n };\n }\n\n return {\n depName: name,\n currentValue: version,\n // Spread the config last to override other properties\n ...config,\n };\n}\n"],"mappings":";;;;;;;;;;AAuCA,MAAM,wBAAwB,MAAM,uCAAuC;;;;;;AAO3E,eAAsB,mBACpB,SACA,aACoC;CACpC,OAAO,MAAM,2BAA2B,YAAY,EAAE;CAEtD,MAAM,WAAW,cAAc,SAAS,WAAW;CACnD,IAAI,CAAC,UACH,OAAO;CAGT,MAAM,OAA4B,CAAC;CAEnC,KAAK,MAAM,CAAC,MAAM,aAAa,OAAO,QAAQ,SAAS,KAAK,GAC1D,KAAK,KAAK,iBAAiB,MAAM,QAAQ,CAAC;CAG5C,KAAK,MAAM,YAAY,OAAO,OAAO,SAAS,KAAK,GACjD,KAAK,MAAM,CAAC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,CAAC,CAAE;CACH,MAAM,iBAAiB,QAAQ,QAAQ,GAAG;CAC1C,MAAM,UAAU,QAAQ,UAAU,GAAG,cAAc;CACnD,MAAM,WAAW,QAAQ,UAAU,iBAAiB,CAAC;CACrD,MAAM,UAAU,aACd,eACA,iBAAiB,QAAQ,IAAI,WAAW,CAAC,CAC3C;CAKA,OAAO,iBAAiB,SAAS,SAH/B,YAAY,OACR,OACA,cAAc,SAAS,UAAU,SAAS,OAAO,CACH;AACtD;AAEA,SAAS,iBACP,MACA,SACA,QACmB;CACnB,IAAI,YAAY,MACd,OAAO;EACL,SAAS;EACT,YAAY;CACd;CAEF,IAAI,WAAW,MACb,OAAO;EACL,SAAS;EACT,YAAY;CACd;CAGF,OAAO;EACL,SAAS;EACT,cAAc;EAEd,GAAG;CACL;AACF"}
1
+ {"version":3,"file":"extract.js","names":[],"sources":["../../../../lib/modules/manager/mise/extract.ts"],"sourcesContent":["import {\n isArray,\n isFunction,\n isNonEmptyObject,\n isNonEmptyString,\n isObject,\n isString,\n} from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport type { StaticTooling } from '../asdf/upgradeable-tooling.ts';\nimport type { PackageDependency, PackageFileContent } from '../types.ts';\nimport type { BackendToolingConfig } from './backends.ts';\nimport {\n createAquaToolConfig,\n createCargoToolConfig,\n createDotnetToolConfig,\n createGemToolConfig,\n createGithubToolConfig,\n createGoToolConfig,\n createNpmToolConfig,\n createPipxToolConfig,\n createSpmToolConfig,\n createUbiToolConfig,\n} from './backends.ts';\nimport { getLockFileName, getLockedVersion } from './lockfile.ts';\nimport type { MiseTool, MiseToolOptions } from './schema.ts';\nimport { MiseLockFile } from './schema.ts';\nimport type { ToolingDefinition } from './upgradeable-tooling.ts';\nimport {\n asdfTooling,\n getOrderedMiseRegistryBackends,\n miseTooling,\n} from './upgradeable-tooling.ts';\nimport { parseTomlFile } from './utils.ts';\n\n// Tool names can have options in the tool name\n// e.g. ubi:tamasfe/taplo[matching=full,exe=taplo]\nconst optionInToolNameRegex = regEx(/^(?<name>.+?)(?:\\[(?<options>.+)\\])?$/);\n\n/**\n * Extracts mise tool dependencies from a mise configuration file.\n * Supports various backends (core, asdf, aqua, cargo, etc.) and\n * extracts locked versions when a corresponding lock file exists.\n */\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n): Promise<PackageFileContent | null> {\n logger.trace(`mise.extractPackageFile(${packageFile})`);\n\n const misefile = parseTomlFile(content, packageFile);\n if (!misefile) {\n return null;\n }\n\n const deps: PackageDependency[] = [];\n\n for (const [name, toolData] of Object.entries(misefile.tools)) {\n deps.push(extractToolEntry(name, toolData, 'tools'));\n }\n\n for (const [taskName, taskData] of Object.entries(misefile.tasks)) {\n for (const [name, toolData] of Object.entries(taskData.tools ?? {})) {\n deps.push(extractToolEntry(name, toolData, `task-${taskName}-tools`));\n }\n }\n\n if (!deps.length) {\n return null;\n }\n\n const result: PackageFileContent = { deps };\n\n const lockFileName = getLockFileName(packageFile);\n const lockFileContent = await readLocalFile(lockFileName, 'utf8');\n\n if (lockFileContent) {\n const lockFileParsed = MiseLockFile.safeParse(lockFileContent);\n if (lockFileParsed.success) {\n result.lockFiles = [lockFileName];\n for (const dep of deps) {\n const lockedVersion = getLockedVersion(\n lockFileParsed.data,\n dep.depName!,\n );\n if (lockedVersion) {\n dep.lockedVersion = lockedVersion;\n }\n }\n } else {\n logger.debug(\n { lockFileName, error: lockFileParsed.error },\n 'Failed to parse mise lock file',\n );\n }\n }\n\n return result;\n}\n\nfunction parseVersion(toolData: MiseTool): string | null {\n if (isNonEmptyString(toolData)) {\n // Handle the string case\n // e.g. 'erlang = \"23.3\"'\n return toolData;\n }\n if (isArray(toolData, isString)) {\n // Handle the array case\n // e.g. 'erlang = [\"23.3\", \"24.0\"]'\n return toolData.length ? toolData[0] : null; // Get the first version in the array\n }\n if (isObject(toolData) && isNonEmptyString(toolData.version)) {\n // Handle the object case with a string version\n // e.g. 'python = { version = \"3.11.2\" }'\n return toolData.version;\n }\n return null; // Return null if no version is found\n}\n\nfunction parseOptions(\n optionsInName: string,\n toolOptions: MiseToolOptions,\n): MiseToolOptions {\n const options = isNonEmptyString(optionsInName)\n ? Object.fromEntries(\n optionsInName.split(',').map((option) => option.split('=', 2)),\n )\n : {};\n // Options in toolOptions will override options in the tool name\n return {\n ...options,\n ...toolOptions,\n };\n}\n\nfunction getToolConfig(\n backend: string,\n toolName: string,\n version: string,\n toolOptions: MiseToolOptions,\n): StaticTooling | BackendToolingConfig | null {\n switch (backend) {\n case '': {\n // If the tool name does not specify a backend, it should be a short name or an alias defined by users\n const staticResult = getRegistryToolConfig(toolName, version);\n if (staticResult) {\n return staticResult;\n }\n\n // Otherwise, see if we have any known short tool names that are in the `mise-registry.json` data file\n const backends = getOrderedMiseRegistryBackends(toolName);\n\n // prioritise the github backend as the best source for data\n if (backends.github) {\n const result = getToolConfig(\n 'github',\n backends.github,\n version,\n toolOptions,\n );\n // v8 ignore else -- TODO: add test #40625\n if (result !== null) {\n return result;\n }\n }\n\n for (const [backendType, backendName] of Object.entries(backends)) {\n const result = getToolConfig(\n backendType,\n backendName,\n version,\n toolOptions,\n );\n // v8 ignore else -- TODO: add test #40625\n if (result !== null) {\n return result;\n }\n }\n return null;\n }\n // We can specify core, asdf, vfox, aqua backends for tools in the default registry\n // e.g. 'core:rust', 'asdf:rust', 'vfox:clang', 'aqua:act'\n case 'core':\n return getConfigFromTooling(miseTooling, toolName, version);\n case 'asdf':\n return getConfigFromTooling(asdfTooling, toolName, version);\n case 'vfox':\n return getRegistryToolConfig(toolName, version);\n case 'aqua':\n return (\n getRegistryToolConfig(toolName, version) ??\n createAquaToolConfig(toolName, version)\n );\n case 'cargo':\n return createCargoToolConfig(toolName, version);\n case 'dotnet':\n return createDotnetToolConfig(toolName);\n case 'gem':\n return createGemToolConfig(toolName);\n case 'github':\n return createGithubToolConfig(toolName, version, toolOptions);\n case 'go':\n return createGoToolConfig(toolName);\n case 'npm':\n return createNpmToolConfig(toolName);\n case 'pipx':\n return createPipxToolConfig(toolName);\n case 'spm':\n return createSpmToolConfig(toolName);\n case 'ubi':\n return createUbiToolConfig(toolName, version, toolOptions);\n default:\n // Unsupported backend\n return null;\n }\n}\n\n/**\n * Get the tooling config for a short name defined in the default registry\n * @link https://mise.jdx.dev/registry.html\n */\nfunction getRegistryToolConfig(\n short: string,\n version: string,\n): StaticTooling | null {\n // Try to get the config from miseTooling first, then asdfTooling\n return (\n getConfigFromTooling(miseTooling, short, version) ??\n getConfigFromTooling(asdfTooling, short, version)\n );\n}\n\nfunction getConfigFromTooling(\n toolingSource: Record<string, ToolingDefinition>,\n name: string,\n version: string,\n): StaticTooling | null {\n const toolDefinition = toolingSource[name];\n if (!toolDefinition) {\n return null;\n } // Return null if no toolDefinition is found\n\n return (\n (isFunction(toolDefinition.config)\n ? toolDefinition.config(version)\n : toolDefinition.config) ?? null\n ); // Ensure null is returned instead of undefined\n}\n\nfunction extractToolEntry(\n name: string,\n toolData: MiseTool,\n depType: string,\n): PackageDependency {\n const version = parseVersion(toolData);\n const { name: depName, options: optionsInName } = optionInToolNameRegex.exec(\n name.trim(),\n )!.groups!;\n const delimiterIndex = depName.indexOf(':');\n const backend = depName.substring(0, delimiterIndex);\n const toolName = depName.substring(delimiterIndex + 1);\n const options = parseOptions(\n optionsInName,\n isNonEmptyObject(toolData) ? toolData : {},\n );\n const toolConfig =\n version === null\n ? null\n : getToolConfig(backend, toolName, version, options);\n return createDependency(depName, version, toolConfig, depType);\n}\n\nfunction createDependency(\n name: string,\n version: string | null,\n config: StaticTooling | BackendToolingConfig | null,\n depType: string,\n): PackageDependency {\n if (version === null) {\n return {\n depName: name,\n depType,\n skipReason: 'unspecified-version',\n };\n }\n if (config === null) {\n return {\n depName: name,\n depType,\n skipReason: 'unsupported-datasource',\n };\n }\n\n return {\n depName: name,\n depType,\n currentValue: version,\n // Spread the config last to override other properties\n ...config,\n };\n}\n"],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E,OAAO;CACX;AACF;;;;;AAMA,SAAS,sBACP,OACA,SACsB;CAEtB,OACE,qBAAqB,aAAa,OAAO,OAAO,KAChD,qBAAqB,aAAa,OAAO,OAAO;AAEpD;AAEA,SAAS,qBACP,eACA,MACA,SACsB;CACtB,MAAM,iBAAiB,cAAc;CACrC,IAAI,CAAC,gBACH,OAAO;CAGT,QACG,WAAW,eAAe,MAAM,IAC7B,eAAe,OAAO,OAAO,IAC7B,eAAe,WAAW;AAElC;AAEA,SAAS,iBACP,MACA,UACA,SACmB;CACnB,MAAM,UAAU,aAAa,QAAQ;CACrC,MAAM,EAAE,MAAM,SAAS,SAAS,kBAAkB,sBAAsB,KACtE,KAAK,KAAK,CACZ,CAAC,CAAE;CACH,MAAM,iBAAiB,QAAQ,QAAQ,GAAG;CAC1C,MAAM,UAAU,QAAQ,UAAU,GAAG,cAAc;CACnD,MAAM,WAAW,QAAQ,UAAU,iBAAiB,CAAC;CACrD,MAAM,UAAU,aACd,eACA,iBAAiB,QAAQ,IAAI,WAAW,CAAC,CAC3C;CAKA,OAAO,iBAAiB,SAAS,SAH/B,YAAY,OACR,OACA,cAAc,SAAS,UAAU,SAAS,OAAO,GACD,OAAO;AAC/D;AAEA,SAAS,iBACP,MACA,SACA,QACA,SACmB;CACnB,IAAI,YAAY,MACd,OAAO;EACL,SAAS;EACT;EACA,YAAY;CACd;CAEF,IAAI,WAAW,MACb,OAAO;EACL,SAAS;EACT;EACA,YAAY;CACd;CAGF,OAAO;EACL,SAAS;EACT;EACA,cAAc;EAEd,GAAG;CACL;AACF"}
@@ -15,6 +15,7 @@ import { RubyVersionDatasource } from "../../datasource/ruby-version/index.js";
15
15
  import { RubygemsDatasource } from "../../datasource/rubygems/index.js";
16
16
  import { supportedDatasources as supportedDatasources$1 } from "../asdf/index.js";
17
17
  import { updateArtifacts } from "./artifacts.js";
18
+ import { knownDepTypes, supportsDynamicDepTypesNote } from "./dep-types.js";
18
19
  import { extractPackageFile } from "./extract.js";
19
20
  import { updateLockedDependency } from "./update-locked.js";
20
21
  //#region lib/modules/manager/mise/index.ts
@@ -22,10 +23,12 @@ var mise_exports = /* @__PURE__ */ __exportAll({
22
23
  defaultConfig: () => defaultConfig,
23
24
  displayName: () => displayName,
24
25
  extractPackageFile: () => extractPackageFile,
26
+ knownDepTypes: () => knownDepTypes,
25
27
  lockFileNames: () => lockFileNames,
26
28
  maybeSupportedBackendDatasources: () => maybeSupportedBackendDatasources,
27
29
  supportedBackendDatasources: () => supportedBackendDatasources,
28
30
  supportedDatasources: () => supportedDatasources,
31
+ supportsDynamicDepTypesNote: () => supportsDynamicDepTypesNote,
29
32
  supportsLockFileMaintenance: () => true,
30
33
  updateArtifacts: () => updateArtifacts,
31
34
  updateLockedDependency: () => updateLockedDependency,
@@ -84,6 +87,6 @@ const supportedBackendDatasources = new Set(Object.keys(backendDatasources).filt
84
87
  const maybeSupportedBackendDatasources = new Set(Object.keys(backendDatasources).filter((key) => key === "vfox" || key === "aqua"));
85
88
  const supportedDatasources = deduplicateArray(Object.values(backendDatasources).flat()).sort();
86
89
  //#endregion
87
- export { defaultConfig, displayName, extractPackageFile, lockFileNames, maybeSupportedBackendDatasources, mise_exports, supportedBackendDatasources, supportedDatasources, updateArtifacts, updateLockedDependency, url };
90
+ export { defaultConfig, displayName, extractPackageFile, knownDepTypes, lockFileNames, maybeSupportedBackendDatasources, mise_exports, supportedBackendDatasources, supportedDatasources, supportsDynamicDepTypesNote, updateArtifacts, updateLockedDependency, url };
88
91
 
89
92
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["asdfSupportedDatasources"],"sources":["../../../../lib/modules/manager/mise/index.ts"],"sourcesContent":["import { deduplicateArray } from '../../../util/array.ts';\nimport { CrateDatasource } from '../../datasource/crate/index.ts';\nimport { GitRefsDatasource } from '../../datasource/git-refs/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GoDatasource } from '../../datasource/go/index.ts';\nimport { JavaVersionDatasource } from '../../datasource/java-version/index.ts';\nimport { NodeVersionDatasource } from '../../datasource/node-version/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\nimport { NugetDatasource } from '../../datasource/nuget/index.ts';\nimport { PypiDatasource } from '../../datasource/pypi/index.ts';\nimport { RubyVersionDatasource } from '../../datasource/ruby-version/index.ts';\nimport { RubygemsDatasource } from '../../datasource/rubygems/index.ts';\nimport { supportedDatasources as asdfSupportedDatasources } from '../asdf/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractPackageFile } from './extract.ts';\nexport { updateLockedDependency } from './update-locked.ts';\n\nexport const displayName = 'mise-en-place';\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['mise.lock'];\nexport const url = 'https://mise.jdx.dev';\n\nexport const defaultConfig = {\n managerFilePatterns: [\n '**/{,.}mise{,.*}.toml',\n '**/{,.}mise/config{,.*}.toml',\n '**/.config/mise{,.*}.toml',\n '**/.config/mise/{mise,config}{,.*}.toml',\n '**/.config/mise/conf.d/*.toml',\n '**/.rtx{,.*}.toml',\n ],\n pinDigests: false,\n};\n\nconst backendDatasources = {\n core: [\n GithubReleasesDatasource.id,\n GithubTagsDatasource.id,\n JavaVersionDatasource.id,\n NodeVersionDatasource.id,\n RubyVersionDatasource.id,\n ],\n // Re-use the asdf datasources, as mise and asdf support the same plugins.\n asdf: asdfSupportedDatasources,\n aqua: [GithubTagsDatasource.id],\n cargo: [CrateDatasource.id, GitTagsDatasource.id, GitRefsDatasource.id],\n dotnet: [NugetDatasource.id],\n gem: [RubygemsDatasource.id],\n github: [GithubReleasesDatasource.id],\n go: [GoDatasource.id],\n npm: [NpmDatasource.id],\n pipx: [PypiDatasource.id, GithubTagsDatasource.id, GitRefsDatasource.id],\n spm: [GithubReleasesDatasource.id],\n ubi: [GithubReleasesDatasource.id],\n // not supported\n vfox: [],\n};\n\n/**\n * Backends that are definitely supported out-of-the-box with Renovate.\n */\nexport const supportedBackendDatasources = new Set(\n Object.keys(backendDatasources).filter((key) => key !== 'vfox'),\n);\n\n/**\n * Backends that may require some additional work for users to configure Renovate to update them.\n */\nexport const maybeSupportedBackendDatasources = new Set<string>(\n Object.keys(backendDatasources).filter(\n (key) => key === 'vfox' || key === 'aqua',\n ),\n);\n\nexport const supportedDatasources = deduplicateArray(\n Object.values(backendDatasources).flat(),\n).sort();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,cAAc;AAE3B,MAAa,gBAAgB,CAAC,WAAW;AACzC,MAAa,MAAM;AAEnB,MAAa,gBAAgB;CAC3B,qBAAqB;EACnB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,YAAY;AACd;AAEA,MAAM,qBAAqB;CACzB,MAAM;EACJ,yBAAyB;EACzB,qBAAqB;EACrB,sBAAsB;EACtB,sBAAsB;EACtB,sBAAsB;CACxB;CAEA,MAAMA;CACN,MAAM,CAAC,qBAAqB,EAAE;CAC9B,OAAO;EAAC,gBAAgB;EAAI,kBAAkB;EAAI,kBAAkB;CAAE;CACtE,QAAQ,CAAC,gBAAgB,EAAE;CAC3B,KAAK,CAAC,mBAAmB,EAAE;CAC3B,QAAQ,CAAC,yBAAyB,EAAE;CACpC,IAAI,CAAC,aAAa,EAAE;CACpB,KAAK,CAAC,cAAc,EAAE;CACtB,MAAM;EAAC,eAAe;EAAI,qBAAqB;EAAI,kBAAkB;CAAE;CACvE,KAAK,CAAC,yBAAyB,EAAE;CACjC,KAAK,CAAC,yBAAyB,EAAE;CAEjC,MAAM,CAAC;AACT;;;;AAKA,MAAa,8BAA8B,IAAI,IAC7C,OAAO,KAAK,kBAAkB,CAAC,CAAC,QAAQ,QAAQ,QAAQ,MAAM,CAChE;;;;AAKA,MAAa,mCAAmC,IAAI,IAClD,OAAO,KAAK,kBAAkB,CAAC,CAAC,QAC7B,QAAQ,QAAQ,UAAU,QAAQ,MACrC,CACF;AAEA,MAAa,uBAAuB,iBAClC,OAAO,OAAO,kBAAkB,CAAC,CAAC,KAAK,CACzC,CAAC,CAAC,KAAK"}
1
+ {"version":3,"file":"index.js","names":["asdfSupportedDatasources"],"sources":["../../../../lib/modules/manager/mise/index.ts"],"sourcesContent":["import { deduplicateArray } from '../../../util/array.ts';\nimport { CrateDatasource } from '../../datasource/crate/index.ts';\nimport { GitRefsDatasource } from '../../datasource/git-refs/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GoDatasource } from '../../datasource/go/index.ts';\nimport { JavaVersionDatasource } from '../../datasource/java-version/index.ts';\nimport { NodeVersionDatasource } from '../../datasource/node-version/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\nimport { NugetDatasource } from '../../datasource/nuget/index.ts';\nimport { PypiDatasource } from '../../datasource/pypi/index.ts';\nimport { RubyVersionDatasource } from '../../datasource/ruby-version/index.ts';\nimport { RubygemsDatasource } from '../../datasource/rubygems/index.ts';\nimport { supportedDatasources as asdfSupportedDatasources } from '../asdf/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { knownDepTypes, supportsDynamicDepTypesNote } from './dep-types.ts';\nexport { extractPackageFile } from './extract.ts';\nexport { updateLockedDependency } from './update-locked.ts';\n\nexport const displayName = 'mise-en-place';\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['mise.lock'];\nexport const url = 'https://mise.jdx.dev';\n\nexport const defaultConfig = {\n managerFilePatterns: [\n '**/{,.}mise{,.*}.toml',\n '**/{,.}mise/config{,.*}.toml',\n '**/.config/mise{,.*}.toml',\n '**/.config/mise/{mise,config}{,.*}.toml',\n '**/.config/mise/conf.d/*.toml',\n '**/.rtx{,.*}.toml',\n ],\n pinDigests: false,\n};\n\nconst backendDatasources = {\n core: [\n GithubReleasesDatasource.id,\n GithubTagsDatasource.id,\n JavaVersionDatasource.id,\n NodeVersionDatasource.id,\n RubyVersionDatasource.id,\n ],\n // Re-use the asdf datasources, as mise and asdf support the same plugins.\n asdf: asdfSupportedDatasources,\n aqua: [GithubTagsDatasource.id],\n cargo: [CrateDatasource.id, GitTagsDatasource.id, GitRefsDatasource.id],\n dotnet: [NugetDatasource.id],\n gem: [RubygemsDatasource.id],\n github: [GithubReleasesDatasource.id],\n go: [GoDatasource.id],\n npm: [NpmDatasource.id],\n pipx: [PypiDatasource.id, GithubTagsDatasource.id, GitRefsDatasource.id],\n spm: [GithubReleasesDatasource.id],\n ubi: [GithubReleasesDatasource.id],\n // not supported\n vfox: [],\n};\n\n/**\n * Backends that are definitely supported out-of-the-box with Renovate.\n */\nexport const supportedBackendDatasources = new Set(\n Object.keys(backendDatasources).filter((key) => key !== 'vfox'),\n);\n\n/**\n * Backends that may require some additional work for users to configure Renovate to update them.\n */\nexport const maybeSupportedBackendDatasources = new Set<string>(\n Object.keys(backendDatasources).filter(\n (key) => key === 'vfox' || key === 'aqua',\n ),\n);\n\nexport const supportedDatasources = deduplicateArray(\n Object.values(backendDatasources).flat(),\n).sort();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,cAAc;AAE3B,MAAa,gBAAgB,CAAC,WAAW;AACzC,MAAa,MAAM;AAEnB,MAAa,gBAAgB;CAC3B,qBAAqB;EACnB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,YAAY;AACd;AAEA,MAAM,qBAAqB;CACzB,MAAM;EACJ,yBAAyB;EACzB,qBAAqB;EACrB,sBAAsB;EACtB,sBAAsB;EACtB,sBAAsB;CACxB;CAEA,MAAMA;CACN,MAAM,CAAC,qBAAqB,EAAE;CAC9B,OAAO;EAAC,gBAAgB;EAAI,kBAAkB;EAAI,kBAAkB;CAAE;CACtE,QAAQ,CAAC,gBAAgB,EAAE;CAC3B,KAAK,CAAC,mBAAmB,EAAE;CAC3B,QAAQ,CAAC,yBAAyB,EAAE;CACpC,IAAI,CAAC,aAAa,EAAE;CACpB,KAAK,CAAC,cAAc,EAAE;CACtB,MAAM;EAAC,eAAe;EAAI,qBAAqB;EAAI,kBAAkB;CAAE;CACvE,KAAK,CAAC,yBAAyB,EAAE;CACjC,KAAK,CAAC,yBAAyB,EAAE;CAEjC,MAAM,CAAC;AACT;;;;AAKA,MAAa,8BAA8B,IAAI,IAC7C,OAAO,KAAK,kBAAkB,CAAC,CAAC,QAAQ,QAAQ,QAAQ,MAAM,CAChE;;;;AAKA,MAAa,mCAAmC,IAAI,IAClD,OAAO,KAAK,kBAAkB,CAAC,CAAC,QAC7B,QAAQ,QAAQ,UAAU,QAAQ,MACrC,CACF;AAEA,MAAa,uBAAuB,iBAClC,OAAO,OAAO,kBAAkB,CAAC,CAAC,KAAK,CACzC,CAAC,CAAC,KAAK"}
@@ -133,7 +133,7 @@ async function initRepo({ repository, cloneSubmodules, cloneSubmodulesFilter, gi
133
133
  if (virtualBranchCount > 0) logger.debug(`Will fetch ${virtualBranchCount} Gerrit changes as virtual branches`);
134
134
  const baseUrl = defaults.endpoint;
135
135
  const url = getGerritRepoUrl(repository, baseUrl, gitUrl, config.gerritUsername);
136
- configureScm(repository);
136
+ configureScm(repository, config.labels);
137
137
  await initRepo$1({
138
138
  url,
139
139
  cloneSubmodules,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["git.initRepo","git.setVirtualBranch"],"sources":["../../../../lib/modules/platform/gerrit/index.ts"],"sourcesContent":["import { isTruthy, isUndefined } from '@sindresorhus/is';\nimport semver from 'semver';\nimport { logger } from '../../../logger/index.ts';\nimport type { BranchStatus } from '../../../types/index.ts';\nimport { parseJson } from '../../../util/common.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport * as git from '../../../util/git/index.ts';\nimport type { VirtualBranch } from '../../../util/git/types.ts';\nimport { setBaseUrl } from '../../../util/http/gerrit.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { toLongCommitSha } from '../../../util/schema-utils/git.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport type {\n BranchStatusConfig,\n CreatePRConfig,\n EnsureCommentConfig,\n EnsureCommentRemovalConfigByContent,\n EnsureCommentRemovalConfigByTopic,\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 { repoFingerprint } from '../util.ts';\n\nimport { smartTruncate } from '../utils/pr-body.ts';\nimport { readOnlyIssueBody } from '../utils/read-only-issue-body.ts';\nimport { client } from './client.ts';\nimport type { GerritLabelTypeInfo, GerritProjectInfo } from './schema.ts';\nimport { configureScm, pushForReview } from './scm.ts';\nimport {\n MAX_GERRIT_COMMENT_SIZE,\n REQUEST_DETAILS_FOR_PRS,\n TAG_PULL_REQUEST_BODY,\n extractSourceBranch,\n getGerritRepoUrl,\n mapBranchStatusToLabel,\n mapGerritChangeToPr,\n} from './utils.ts';\n\nexport const id = 'gerrit';\nexport const experimental = true;\n\nconst defaults: {\n endpoint?: string;\n} = {};\n\nlet config: {\n repository?: string;\n head?: string;\n config?: GerritProjectInfo;\n labels: Record<string, GerritLabelTypeInfo>;\n gerritUsername?: string;\n} = {\n labels: {},\n};\n\nexport function writeToConfig(newConfig: typeof config): void {\n config = { ...config, ...newConfig };\n}\n\nexport async function initPlatform({\n endpoint,\n username,\n password,\n}: PlatformParams): Promise<PlatformResult> {\n logger.debug(`initPlatform(${endpoint!}, ${username!})`);\n if (!endpoint) {\n throw new Error('Init: You must configure a Gerrit Server endpoint');\n }\n if (!(username && password)) {\n throw new Error(\n 'Init: You must configure a Gerrit Server username/password',\n );\n }\n config.gerritUsername = username;\n defaults.endpoint = ensureTrailingSlash(endpoint);\n setBaseUrl(defaults.endpoint);\n\n let gerritVersion: string;\n try {\n const env = getEnv();\n /* v8 ignore if: experimental feature */\n if (env.RENOVATE_X_PLATFORM_VERSION) {\n gerritVersion = env.RENOVATE_X_PLATFORM_VERSION;\n } else {\n gerritVersion = await client.getGerritVersion({\n username,\n password,\n });\n }\n } catch (err) {\n logger.debug(\n { err },\n 'Error authenticating with Gerrit. Check your credentials',\n );\n throw new Error('Init: Authentication failure');\n }\n\n logger.debug(`Gerrit version is: ${gerritVersion}`);\n // Example: 3.13.0-rc3-148-gb478dbbb57\n const parsed = semver.parse(gerritVersion);\n if (!parsed) {\n throw new Error(`Unable to parse Gerrit version: ${gerritVersion}`);\n }\n gerritVersion = `${parsed.major}.${parsed.minor}.${parsed.patch}`;\n client.setGerritVersion(gerritVersion);\n\n const platformConfig: PlatformResult = {\n endpoint: defaults.endpoint,\n };\n return platformConfig;\n}\n\n/**\n * Get all state=\"ACTIVE\" and type=\"CODE\" repositories from gerrit\n */\nexport async function getRepos(): Promise<string[]> {\n logger.debug(`getRepos()`);\n return await client.getRepos();\n}\n\n/**\n * Clone repository to local directory\n * @param config\n */\nexport async function initRepo({\n repository,\n cloneSubmodules,\n cloneSubmodulesFilter,\n gitUrl,\n}: RepoParams): Promise<RepoResult> {\n logger.debug(`initRepo(${repository}, ${gitUrl})`);\n const projectInfo = await client.getProjectInfo(repository);\n const branchInfo = await client.getBranchInfo(repository);\n\n config = {\n ...config,\n repository,\n head: branchInfo.revision,\n config: projectInfo,\n labels: projectInfo.labels ?? {},\n };\n\n //abandon \"open\" and \"rejected\" changes at startup\n const rejectedChanges = await client.findChanges(repository, {\n branchName: '',\n state: 'open',\n label: '-2',\n });\n for (const change of rejectedChanges) {\n await client.abandonChange(\n change._number,\n 'This change has been abandoned as it was voted with Code-Review -2.',\n );\n logger.info(\n `Abandoned change ${change._number} with Code-Review -2 in repository ${repository}`,\n );\n }\n\n // Collect open Gerrit changes to initialize as virtual branches.\n // This allows DefaultGitScm to treat them as regular Git branches.\n const openChanges = await client.findChanges(repository, {\n branchName: '',\n state: 'open',\n requestDetails: ['CURRENT_REVISION', 'COMMIT_FOOTERS'],\n });\n const virtualBranches: Record<string, VirtualBranch> = {};\n for (const change of openChanges) {\n const branchName = extractSourceBranch(change);\n if (!branchName) {\n continue;\n }\n const sha = toLongCommitSha(change.current_revision);\n const ref = change.revisions![sha].ref;\n virtualBranches[branchName] = { ref, sha };\n }\n\n const virtualBranchCount = Object.keys(virtualBranches).length;\n if (virtualBranchCount > 0) {\n logger.debug(\n `Will fetch ${virtualBranchCount} Gerrit changes as virtual branches`,\n );\n }\n\n const baseUrl = defaults.endpoint!;\n const url = getGerritRepoUrl(\n repository,\n baseUrl,\n gitUrl,\n config.gerritUsername!,\n );\n configureScm(repository);\n await git.initRepo({\n url,\n cloneSubmodules,\n cloneSubmodulesFilter,\n virtualBranches,\n });\n\n const repoConfig: RepoResult = {\n defaultBranch: config.head!,\n isFork: false,\n repoFingerprint: repoFingerprint(repository, baseUrl),\n };\n return repoConfig;\n}\n\nexport async function findPr(findPRConfig: FindPRConfig): Promise<Pr | null> {\n const change = (\n await client.findChanges(config.repository!, {\n ...findPRConfig,\n singleChange: true,\n requestDetails: REQUEST_DETAILS_FOR_PRS,\n })\n ).pop();\n return change\n ? mapGerritChangeToPr(change, {\n sourceBranch: findPRConfig.branchName,\n })\n : null;\n}\n\nexport async function getPr(number: number): Promise<Pr | null> {\n try {\n const change = await client.getChange(number, REQUEST_DETAILS_FOR_PRS);\n return mapGerritChangeToPr(change);\n } catch (err) {\n if (err.statusCode === 404) {\n return null;\n }\n throw err;\n }\n}\n\nexport async function updatePr(prConfig: UpdatePrConfig): Promise<void> {\n logger.debug(`updatePr(${prConfig.number}, ${prConfig.prTitle})`);\n if (prConfig.prBody) {\n await client.addMessageIfNotAlreadyExists(\n prConfig.number,\n prConfig.prBody,\n TAG_PULL_REQUEST_BODY,\n );\n }\n await client.setHashtags(prConfig.number, {\n add: prConfig.addLabels,\n remove: prConfig.removeLabels,\n });\n if (prConfig.targetBranch) {\n await client.moveChange(prConfig.number, prConfig.targetBranch);\n }\n if (prConfig.state && prConfig.state === 'closed') {\n await client.abandonChange(prConfig.number);\n }\n}\n\nexport async function createPr(prConfig: CreatePRConfig): Promise<Pr | null> {\n logger.debug(\n `createPr(${prConfig.sourceBranch}, ${prConfig.prTitle}, ${\n prConfig.labels?.toString() ?? ''\n })`,\n );\n\n logger.debug(\n `Pushing commit to refs/for/${prConfig.targetBranch} to create Gerrit change`,\n );\n const pushResult = await pushForReview({\n sourceRef: prConfig.sourceBranch,\n targetBranch: prConfig.targetBranch,\n files: [],\n autoApprove: prConfig.platformPrOptions?.autoApprove,\n labels: prConfig.labels ?? undefined,\n });\n\n if (!pushResult) {\n throw new Error(\n `Failed to push commit to refs/for/${prConfig.targetBranch} to create Gerrit change`,\n );\n }\n\n const change = (\n await client.findChanges(config.repository!, {\n branchName: prConfig.sourceBranch,\n targetBranch: prConfig.targetBranch,\n state: 'open',\n singleChange: true,\n requestDetails: REQUEST_DETAILS_FOR_PRS,\n })\n ).pop();\n if (isUndefined(change)) {\n throw new Error(\n `Could not find the Gerrit change after pushing to refs/for/${prConfig.targetBranch}`,\n );\n }\n\n // Register the virtual branch now that the change exists and we have the ref.\n const sha = toLongCommitSha(change.current_revision);\n const ref = change.revisions![sha].ref;\n await git.setVirtualBranch(prConfig.sourceBranch, ref, sha);\n\n await client.addMessage(\n change._number,\n prConfig.prBody,\n TAG_PULL_REQUEST_BODY,\n );\n return mapGerritChangeToPr(change, {\n sourceBranch: prConfig.sourceBranch,\n prBody: prConfig.prBody,\n });\n}\n\nexport async function getBranchPr(\n branchName: string,\n targetBranch?: string,\n): Promise<Pr | null> {\n const change = await client.getBranchChange(config.repository!, {\n branchName,\n state: 'open',\n targetBranch,\n requestDetails: REQUEST_DETAILS_FOR_PRS,\n });\n\n return change\n ? mapGerritChangeToPr(change, {\n sourceBranch: branchName,\n })\n : null;\n}\n\nexport async function getPrList(): Promise<Pr[]> {\n const changes = await client.findChanges(config.repository!, {\n branchName: '',\n requestDetails: REQUEST_DETAILS_FOR_PRS,\n });\n return changes.map((change) => mapGerritChangeToPr(change)).filter(isTruthy);\n}\n\nexport async function mergePr(config: MergePRConfig): Promise<boolean> {\n logger.debug(\n `mergePr(${config.id}, ${config.branchName!}, ${config.strategy!})`,\n );\n try {\n const change = await client.submitChange(config.id);\n return change.status === 'MERGED';\n } catch (err) {\n if (err.statusCode === 409) {\n logger.warn(\n { err },\n \"Can't submit the change, because the submit rule doesn't allow it.\",\n );\n return false;\n }\n throw err;\n }\n}\n\n/**\n * BranchStatus for Gerrit assumes that the branchName refers to a change.\n * @param branchName\n */\nexport async function getBranchStatus(\n branchName: string,\n): Promise<BranchStatus> {\n logger.debug(`getBranchStatus(${branchName})`);\n const change = (\n await client.findChanges(config.repository!, {\n state: 'open',\n branchName,\n singleChange: true,\n requestDetails: ['LABELS', 'SUBMITTABLE', 'CHECK'],\n })\n ).pop();\n if (change) {\n const hasProblems = change.problems && change.problems.length > 0;\n if (hasProblems) {\n return 'red';\n }\n const hasBlockingLabels = Object.values(change.labels ?? {}).some(\n (label) => label.blocking,\n );\n if (hasBlockingLabels) {\n return 'red';\n }\n // v8 ignore else -- TODO: add test #40625\n if (change.submittable) {\n return 'green';\n }\n }\n return 'yellow';\n}\n\n/**\n * check the gerrit-change for the presence of the corresponding \"$context\" Gerrit label if configured,\n * return 'yellow' if not configured or not set\n * @param branchName\n * @param context renovate/stability-days || ...\n */\nexport async function getBranchStatusCheck(\n branchName: string,\n context: string,\n): Promise<BranchStatus | null> {\n const labelConfig = config.labels[context];\n if (labelConfig) {\n const change = (\n await client.findChanges(config.repository!, {\n branchName,\n state: 'open',\n singleChange: true,\n requestDetails: ['LABELS'],\n })\n ).pop();\n // v8 ignore else -- TODO: add test #40625\n if (change) {\n const label = change.labels![context];\n // v8 ignore else -- TODO: add test #40625\n if (label) {\n // Check for rejected or blocking first, as a label could have both rejected and approved\n if (label.rejected || label.blocking) {\n return 'red';\n }\n // v8 ignore else -- TODO: add test #40625\n if (label.approved) {\n return 'green';\n }\n }\n }\n }\n return 'yellow';\n}\n\n/**\n * Apply the branch state $context to the corresponding gerrit label (if available)\n * context === \"renovate/stability-days\" / \"renovate/merge-confidence\" and state === \"green\"/...\n * @param branchStatusConfig\n */\nexport async function setBranchStatus(\n branchStatusConfig: BranchStatusConfig,\n): Promise<void> {\n const label = config.labels[branchStatusConfig.context];\n const labelValue =\n label && mapBranchStatusToLabel(branchStatusConfig.state, label);\n if (branchStatusConfig.context && labelValue) {\n const change = (\n await client.findChanges(config.repository!, {\n branchName: branchStatusConfig.branchName,\n state: 'open',\n singleChange: true,\n requestDetails: ['LABELS'],\n })\n ).pop();\n\n const labelKey = branchStatusConfig.context;\n if (!change?.labels || !Object.hasOwn(change.labels, labelKey)) {\n return;\n }\n\n await client.setLabel(change._number, labelKey, labelValue);\n }\n}\n\nexport async function getRawFile(\n fileName: string,\n repoName?: string,\n branchOrTag?: string,\n): Promise<string | null> {\n const repo = repoName ?? config.repository;\n if (!repo) {\n logger.debug('No repo so cannot getRawFile');\n return null;\n }\n // v8 ignore next -- TODO: add test #40625\n const branch =\n branchOrTag ??\n (repo === config.repository ? (config.head ?? 'HEAD') : 'HEAD');\n const result = await client.getFile(repo, branch, fileName);\n return result;\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 addReviewers(\n number: number,\n reviewers: string[],\n): Promise<void> {\n await client.addReviewers(number, reviewers);\n}\n\n/**\n * add \"CC\" (only one possible)\n */\nexport async function addAssignees(\n number: number,\n assignees: string[],\n): Promise<void> {\n // v8 ignore else -- TODO: add test #40625\n if (assignees.length) {\n // v8 ignore else -- TODO: add test #40625\n if (assignees.length > 1) {\n logger.debug(\n `addAssignees(${number}, ${assignees.toString()}) called with more then one assignee! Gerrit only supports one assignee! Using the first from list.`,\n );\n }\n await client.addAssignee(number, assignees[0]);\n }\n}\n\nexport async function ensureComment(\n ensureComment: EnsureCommentConfig,\n): Promise<boolean> {\n logger.debug(\n `ensureComment(${ensureComment.number}, ${ensureComment.topic!}, ${\n ensureComment.content\n })`,\n );\n await client.addMessageIfNotAlreadyExists(\n ensureComment.number,\n ensureComment.content,\n ensureComment.topic ?? undefined,\n );\n return true;\n}\n\nexport function massageMarkdown(prBody: string, rebaseLabel: string): string {\n return (\n smartTruncate(readOnlyIssueBody(prBody), maxBodyLength())\n .replace('Branch creation', 'Change creation')\n .replace(\n 'close this Pull Request unmerged',\n 'abandon or vote this change with Code-Review -2',\n )\n .replace(\n 'Close this PR',\n 'Abandon or vote this change with Code-Review -2',\n )\n .replace(\n 'you tick the rebase/retry checkbox',\n `you add the _${rebaseLabel}_ hashtag to this change`,\n )\n .replace(\n 'checking the rebase/retry box above',\n `adding the _${rebaseLabel}_ hashtag to this change`,\n )\n .replace(regEx(/\\b(?:Pull Request|PR)/g), 'change')\n // Remove HTML tags not supported in Gerrit markdown\n .replace(regEx(/<\\/?summary>/g), '**')\n .replace(regEx(/<\\/?(details|blockquote)>/g), '')\n .replace(regEx(`\\n---\\n\\n.*?<!-- rebase-check -->.*?\\n`), '')\n .replace(regEx(/<!--renovate-(?:debug|config-hash):.*?-->/g), '')\n // Remove zero-width-space not supported in Gerrit markdown\n .replace(regEx(/&#8203;/g), '')\n );\n}\n\nexport function maxBodyLength(): number {\n return MAX_GERRIT_COMMENT_SIZE;\n}\n\nexport async function deleteLabel(\n number: number,\n label: string,\n): Promise<void> {\n await client.setHashtags(number, { remove: [label] });\n}\n\nexport function ensureCommentRemoval(\n _ensureCommentRemoval:\n | EnsureCommentRemovalConfigByTopic\n | EnsureCommentRemovalConfigByContent,\n): Promise<void> {\n return Promise.resolve();\n}\n\nexport function ensureIssueClosing(_title: string): Promise<void> {\n return Promise.resolve();\n}\n\nexport function ensureIssue(\n _issueConfig: EnsureIssueConfig,\n): Promise<EnsureIssueResult | null> {\n return Promise.resolve(null);\n}\n\nexport function findIssue(_title: string): Promise<Issue | null> {\n return Promise.resolve(null);\n}\n\nexport function getIssueList(): Promise<Issue[]> {\n return Promise.resolve([]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAa,KAAK;AAGlB,MAAM,WAEF,CAAC;AAEL,IAAI,SAMA,EACF,QAAQ,CAAC,EACX;AAEA,SAAgB,cAAc,WAAgC;CAC5D,SAAS;EAAE,GAAG;EAAQ,GAAG;CAAU;AACrC;AAEA,eAAsB,aAAa,EACjC,UACA,UACA,YAC0C;CAC1C,OAAO,MAAM,gBAAgB,SAAU,IAAI,SAAU,EAAE;CACvD,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,IAAI,EAAE,YAAY,WAChB,MAAM,IAAI,MACR,4DACF;CAEF,OAAO,iBAAiB;CACxB,SAAS,WAAW,oBAAoB,QAAQ;CAChD,WAAW,SAAS,QAAQ;CAE5B,IAAI;CACJ,IAAI;EACF,MAAM,MAAM,OAAO;;EAEnB,IAAI,IAAI,6BACN,gBAAgB,IAAI;OAEpB,gBAAgB,MAAM,OAAO,iBAAiB;GAC5C;GACA;EACF,CAAC;CAEL,SAAS,KAAK;EACZ,OAAO,MACL,EAAE,IAAI,GACN,0DACF;EACA,MAAM,IAAI,MAAM,8BAA8B;CAChD;CAEA,OAAO,MAAM,sBAAsB,eAAe;CAElD,MAAM,SAAS,OAAO,MAAM,aAAa;CACzC,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,mCAAmC,eAAe;CAEpE,gBAAgB,GAAG,OAAO,MAAM,GAAG,OAAO,MAAM,GAAG,OAAO;CAC1D,OAAO,iBAAiB,aAAa;CAKrC,OAAO,EAFL,UAAU,SAAS,SAED;AACtB;;;;AAKA,eAAsB,WAA8B;CAClD,OAAO,MAAM,YAAY;CACzB,OAAO,MAAM,OAAO,SAAS;AAC/B;;;;;AAMA,eAAsB,SAAS,EAC7B,YACA,iBACA,uBACA,UACkC;CAClC,OAAO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AAY,QAAQ,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;AACtD;AAEA,SAAgB,qBACd,uBAGe;CACf,OAAO,QAAQ,QAAQ;AACzB;AAEA,SAAgB,mBAAmB,QAA+B;CAChE,OAAO,QAAQ,QAAQ;AACzB;AAEA,SAAgB,YACd,cACmC;CACnC,OAAO,QAAQ,QAAQ,IAAI;AAC7B;AAEA,SAAgB,UAAU,QAAuC;CAC/D,OAAO,QAAQ,QAAQ,IAAI;AAC7B;AAEA,SAAgB,eAAiC;CAC/C,OAAO,QAAQ,QAAQ,CAAC,CAAC;AAC3B"}
1
+ {"version":3,"file":"index.js","names":["git.initRepo","git.setVirtualBranch"],"sources":["../../../../lib/modules/platform/gerrit/index.ts"],"sourcesContent":["import { isTruthy, isUndefined } from '@sindresorhus/is';\nimport semver from 'semver';\nimport { logger } from '../../../logger/index.ts';\nimport type { BranchStatus } from '../../../types/index.ts';\nimport { parseJson } from '../../../util/common.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport * as git from '../../../util/git/index.ts';\nimport type { VirtualBranch } from '../../../util/git/types.ts';\nimport { setBaseUrl } from '../../../util/http/gerrit.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { toLongCommitSha } from '../../../util/schema-utils/git.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport type {\n BranchStatusConfig,\n CreatePRConfig,\n EnsureCommentConfig,\n EnsureCommentRemovalConfigByContent,\n EnsureCommentRemovalConfigByTopic,\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 { repoFingerprint } from '../util.ts';\n\nimport { smartTruncate } from '../utils/pr-body.ts';\nimport { readOnlyIssueBody } from '../utils/read-only-issue-body.ts';\nimport { client } from './client.ts';\nimport type { GerritLabels, GerritProjectInfo } from './schema.ts';\nimport { configureScm, pushForReview } from './scm.ts';\nimport {\n MAX_GERRIT_COMMENT_SIZE,\n REQUEST_DETAILS_FOR_PRS,\n TAG_PULL_REQUEST_BODY,\n extractSourceBranch,\n getGerritRepoUrl,\n mapBranchStatusToLabel,\n mapGerritChangeToPr,\n} from './utils.ts';\n\nexport const id = 'gerrit';\nexport const experimental = true;\n\nconst defaults: {\n endpoint?: string;\n} = {};\n\nlet config: {\n repository?: string;\n head?: string;\n config?: GerritProjectInfo;\n labels: GerritLabels;\n gerritUsername?: string;\n} = {\n labels: {},\n};\n\nexport function writeToConfig(newConfig: typeof config): void {\n config = { ...config, ...newConfig };\n}\n\nexport async function initPlatform({\n endpoint,\n username,\n password,\n}: PlatformParams): Promise<PlatformResult> {\n logger.debug(`initPlatform(${endpoint!}, ${username!})`);\n if (!endpoint) {\n throw new Error('Init: You must configure a Gerrit Server endpoint');\n }\n if (!(username && password)) {\n throw new Error(\n 'Init: You must configure a Gerrit Server username/password',\n );\n }\n config.gerritUsername = username;\n defaults.endpoint = ensureTrailingSlash(endpoint);\n setBaseUrl(defaults.endpoint);\n\n let gerritVersion: string;\n try {\n const env = getEnv();\n /* v8 ignore if: experimental feature */\n if (env.RENOVATE_X_PLATFORM_VERSION) {\n gerritVersion = env.RENOVATE_X_PLATFORM_VERSION;\n } else {\n gerritVersion = await client.getGerritVersion({\n username,\n password,\n });\n }\n } catch (err) {\n logger.debug(\n { err },\n 'Error authenticating with Gerrit. Check your credentials',\n );\n throw new Error('Init: Authentication failure');\n }\n\n logger.debug(`Gerrit version is: ${gerritVersion}`);\n // Example: 3.13.0-rc3-148-gb478dbbb57\n const parsed = semver.parse(gerritVersion);\n if (!parsed) {\n throw new Error(`Unable to parse Gerrit version: ${gerritVersion}`);\n }\n gerritVersion = `${parsed.major}.${parsed.minor}.${parsed.patch}`;\n client.setGerritVersion(gerritVersion);\n\n const platformConfig: PlatformResult = {\n endpoint: defaults.endpoint,\n };\n return platformConfig;\n}\n\n/**\n * Get all state=\"ACTIVE\" and type=\"CODE\" repositories from gerrit\n */\nexport async function getRepos(): Promise<string[]> {\n logger.debug(`getRepos()`);\n return await client.getRepos();\n}\n\n/**\n * Clone repository to local directory\n * @param config\n */\nexport async function initRepo({\n repository,\n cloneSubmodules,\n cloneSubmodulesFilter,\n gitUrl,\n}: RepoParams): Promise<RepoResult> {\n logger.debug(`initRepo(${repository}, ${gitUrl})`);\n const projectInfo = await client.getProjectInfo(repository);\n const branchInfo = await client.getBranchInfo(repository);\n\n config = {\n ...config,\n repository,\n head: branchInfo.revision,\n config: projectInfo,\n labels: projectInfo.labels ?? {},\n };\n\n //abandon \"open\" and \"rejected\" changes at startup\n const rejectedChanges = await client.findChanges(repository, {\n branchName: '',\n state: 'open',\n label: '-2',\n });\n for (const change of rejectedChanges) {\n await client.abandonChange(\n change._number,\n 'This change has been abandoned as it was voted with Code-Review -2.',\n );\n logger.info(\n `Abandoned change ${change._number} with Code-Review -2 in repository ${repository}`,\n );\n }\n\n // Collect open Gerrit changes to initialize as virtual branches.\n // This allows DefaultGitScm to treat them as regular Git branches.\n const openChanges = await client.findChanges(repository, {\n branchName: '',\n state: 'open',\n requestDetails: ['CURRENT_REVISION', 'COMMIT_FOOTERS'],\n });\n const virtualBranches: Record<string, VirtualBranch> = {};\n for (const change of openChanges) {\n const branchName = extractSourceBranch(change);\n if (!branchName) {\n continue;\n }\n const sha = toLongCommitSha(change.current_revision);\n const ref = change.revisions![sha].ref;\n virtualBranches[branchName] = { ref, sha };\n }\n\n const virtualBranchCount = Object.keys(virtualBranches).length;\n if (virtualBranchCount > 0) {\n logger.debug(\n `Will fetch ${virtualBranchCount} Gerrit changes as virtual branches`,\n );\n }\n\n const baseUrl = defaults.endpoint!;\n const url = getGerritRepoUrl(\n repository,\n baseUrl,\n gitUrl,\n config.gerritUsername!,\n );\n configureScm(repository, config.labels);\n await git.initRepo({\n url,\n cloneSubmodules,\n cloneSubmodulesFilter,\n virtualBranches,\n });\n\n const repoConfig: RepoResult = {\n defaultBranch: config.head!,\n isFork: false,\n repoFingerprint: repoFingerprint(repository, baseUrl),\n };\n return repoConfig;\n}\n\nexport async function findPr(findPRConfig: FindPRConfig): Promise<Pr | null> {\n const change = (\n await client.findChanges(config.repository!, {\n ...findPRConfig,\n singleChange: true,\n requestDetails: REQUEST_DETAILS_FOR_PRS,\n })\n ).pop();\n return change\n ? mapGerritChangeToPr(change, {\n sourceBranch: findPRConfig.branchName,\n })\n : null;\n}\n\nexport async function getPr(number: number): Promise<Pr | null> {\n try {\n const change = await client.getChange(number, REQUEST_DETAILS_FOR_PRS);\n return mapGerritChangeToPr(change);\n } catch (err) {\n if (err.statusCode === 404) {\n return null;\n }\n throw err;\n }\n}\n\nexport async function updatePr(prConfig: UpdatePrConfig): Promise<void> {\n logger.debug(`updatePr(${prConfig.number}, ${prConfig.prTitle})`);\n if (prConfig.prBody) {\n await client.addMessageIfNotAlreadyExists(\n prConfig.number,\n prConfig.prBody,\n TAG_PULL_REQUEST_BODY,\n );\n }\n await client.setHashtags(prConfig.number, {\n add: prConfig.addLabels,\n remove: prConfig.removeLabels,\n });\n if (prConfig.targetBranch) {\n await client.moveChange(prConfig.number, prConfig.targetBranch);\n }\n if (prConfig.state && prConfig.state === 'closed') {\n await client.abandonChange(prConfig.number);\n }\n}\n\nexport async function createPr(prConfig: CreatePRConfig): Promise<Pr | null> {\n logger.debug(\n `createPr(${prConfig.sourceBranch}, ${prConfig.prTitle}, ${\n prConfig.labels?.toString() ?? ''\n })`,\n );\n\n logger.debug(\n `Pushing commit to refs/for/${prConfig.targetBranch} to create Gerrit change`,\n );\n const pushResult = await pushForReview({\n sourceRef: prConfig.sourceBranch,\n targetBranch: prConfig.targetBranch,\n files: [],\n autoApprove: prConfig.platformPrOptions?.autoApprove,\n labels: prConfig.labels ?? undefined,\n });\n\n if (!pushResult) {\n throw new Error(\n `Failed to push commit to refs/for/${prConfig.targetBranch} to create Gerrit change`,\n );\n }\n\n const change = (\n await client.findChanges(config.repository!, {\n branchName: prConfig.sourceBranch,\n targetBranch: prConfig.targetBranch,\n state: 'open',\n singleChange: true,\n requestDetails: REQUEST_DETAILS_FOR_PRS,\n })\n ).pop();\n if (isUndefined(change)) {\n throw new Error(\n `Could not find the Gerrit change after pushing to refs/for/${prConfig.targetBranch}`,\n );\n }\n\n // Register the virtual branch now that the change exists and we have the ref.\n const sha = toLongCommitSha(change.current_revision);\n const ref = change.revisions![sha].ref;\n await git.setVirtualBranch(prConfig.sourceBranch, ref, sha);\n\n await client.addMessage(\n change._number,\n prConfig.prBody,\n TAG_PULL_REQUEST_BODY,\n );\n return mapGerritChangeToPr(change, {\n sourceBranch: prConfig.sourceBranch,\n prBody: prConfig.prBody,\n });\n}\n\nexport async function getBranchPr(\n branchName: string,\n targetBranch?: string,\n): Promise<Pr | null> {\n const change = await client.getBranchChange(config.repository!, {\n branchName,\n state: 'open',\n targetBranch,\n requestDetails: REQUEST_DETAILS_FOR_PRS,\n });\n\n return change\n ? mapGerritChangeToPr(change, {\n sourceBranch: branchName,\n })\n : null;\n}\n\nexport async function getPrList(): Promise<Pr[]> {\n const changes = await client.findChanges(config.repository!, {\n branchName: '',\n requestDetails: REQUEST_DETAILS_FOR_PRS,\n });\n return changes.map((change) => mapGerritChangeToPr(change)).filter(isTruthy);\n}\n\nexport async function mergePr(config: MergePRConfig): Promise<boolean> {\n logger.debug(\n `mergePr(${config.id}, ${config.branchName!}, ${config.strategy!})`,\n );\n try {\n const change = await client.submitChange(config.id);\n return change.status === 'MERGED';\n } catch (err) {\n if (err.statusCode === 409) {\n logger.warn(\n { err },\n \"Can't submit the change, because the submit rule doesn't allow it.\",\n );\n return false;\n }\n throw err;\n }\n}\n\n/**\n * BranchStatus for Gerrit assumes that the branchName refers to a change.\n * @param branchName\n */\nexport async function getBranchStatus(\n branchName: string,\n): Promise<BranchStatus> {\n logger.debug(`getBranchStatus(${branchName})`);\n const change = (\n await client.findChanges(config.repository!, {\n state: 'open',\n branchName,\n singleChange: true,\n requestDetails: ['LABELS', 'SUBMITTABLE', 'CHECK'],\n })\n ).pop();\n if (change) {\n const hasProblems = change.problems && change.problems.length > 0;\n if (hasProblems) {\n return 'red';\n }\n const hasBlockingLabels = Object.values(change.labels ?? {}).some(\n (label) => label.blocking,\n );\n if (hasBlockingLabels) {\n return 'red';\n }\n // v8 ignore else -- TODO: add test #40625\n if (change.submittable) {\n return 'green';\n }\n }\n return 'yellow';\n}\n\n/**\n * check the gerrit-change for the presence of the corresponding \"$context\" Gerrit label if configured,\n * return 'yellow' if not configured or not set\n * @param branchName\n * @param context renovate/stability-days || ...\n */\nexport async function getBranchStatusCheck(\n branchName: string,\n context: string,\n): Promise<BranchStatus | null> {\n const labelConfig = config.labels[context];\n if (labelConfig) {\n const change = (\n await client.findChanges(config.repository!, {\n branchName,\n state: 'open',\n singleChange: true,\n requestDetails: ['LABELS'],\n })\n ).pop();\n // v8 ignore else -- TODO: add test #40625\n if (change) {\n const label = change.labels![context];\n // v8 ignore else -- TODO: add test #40625\n if (label) {\n // Check for rejected or blocking first, as a label could have both rejected and approved\n if (label.rejected || label.blocking) {\n return 'red';\n }\n // v8 ignore else -- TODO: add test #40625\n if (label.approved) {\n return 'green';\n }\n }\n }\n }\n return 'yellow';\n}\n\n/**\n * Apply the branch state $context to the corresponding gerrit label (if available)\n * context === \"renovate/stability-days\" / \"renovate/merge-confidence\" and state === \"green\"/...\n * @param branchStatusConfig\n */\nexport async function setBranchStatus(\n branchStatusConfig: BranchStatusConfig,\n): Promise<void> {\n const label = config.labels[branchStatusConfig.context];\n const labelValue =\n label && mapBranchStatusToLabel(branchStatusConfig.state, label);\n if (branchStatusConfig.context && labelValue) {\n const change = (\n await client.findChanges(config.repository!, {\n branchName: branchStatusConfig.branchName,\n state: 'open',\n singleChange: true,\n requestDetails: ['LABELS'],\n })\n ).pop();\n\n const labelKey = branchStatusConfig.context;\n if (!change?.labels || !Object.hasOwn(change.labels, labelKey)) {\n return;\n }\n\n await client.setLabel(change._number, labelKey, labelValue);\n }\n}\n\nexport async function getRawFile(\n fileName: string,\n repoName?: string,\n branchOrTag?: string,\n): Promise<string | null> {\n const repo = repoName ?? config.repository;\n if (!repo) {\n logger.debug('No repo so cannot getRawFile');\n return null;\n }\n // v8 ignore next -- TODO: add test #40625\n const branch =\n branchOrTag ??\n (repo === config.repository ? (config.head ?? 'HEAD') : 'HEAD');\n const result = await client.getFile(repo, branch, fileName);\n return result;\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 addReviewers(\n number: number,\n reviewers: string[],\n): Promise<void> {\n await client.addReviewers(number, reviewers);\n}\n\n/**\n * add \"CC\" (only one possible)\n */\nexport async function addAssignees(\n number: number,\n assignees: string[],\n): Promise<void> {\n // v8 ignore else -- TODO: add test #40625\n if (assignees.length) {\n // v8 ignore else -- TODO: add test #40625\n if (assignees.length > 1) {\n logger.debug(\n `addAssignees(${number}, ${assignees.toString()}) called with more then one assignee! Gerrit only supports one assignee! Using the first from list.`,\n );\n }\n await client.addAssignee(number, assignees[0]);\n }\n}\n\nexport async function ensureComment(\n ensureComment: EnsureCommentConfig,\n): Promise<boolean> {\n logger.debug(\n `ensureComment(${ensureComment.number}, ${ensureComment.topic!}, ${\n ensureComment.content\n })`,\n );\n await client.addMessageIfNotAlreadyExists(\n ensureComment.number,\n ensureComment.content,\n ensureComment.topic ?? undefined,\n );\n return true;\n}\n\nexport function massageMarkdown(prBody: string, rebaseLabel: string): string {\n return (\n smartTruncate(readOnlyIssueBody(prBody), maxBodyLength())\n .replace('Branch creation', 'Change creation')\n .replace(\n 'close this Pull Request unmerged',\n 'abandon or vote this change with Code-Review -2',\n )\n .replace(\n 'Close this PR',\n 'Abandon or vote this change with Code-Review -2',\n )\n .replace(\n 'you tick the rebase/retry checkbox',\n `you add the _${rebaseLabel}_ hashtag to this change`,\n )\n .replace(\n 'checking the rebase/retry box above',\n `adding the _${rebaseLabel}_ hashtag to this change`,\n )\n .replace(regEx(/\\b(?:Pull Request|PR)/g), 'change')\n // Remove HTML tags not supported in Gerrit markdown\n .replace(regEx(/<\\/?summary>/g), '**')\n .replace(regEx(/<\\/?(details|blockquote)>/g), '')\n .replace(regEx(`\\n---\\n\\n.*?<!-- rebase-check -->.*?\\n`), '')\n .replace(regEx(/<!--renovate-(?:debug|config-hash):.*?-->/g), '')\n // Remove zero-width-space not supported in Gerrit markdown\n .replace(regEx(/&#8203;/g), '')\n );\n}\n\nexport function maxBodyLength(): number {\n return MAX_GERRIT_COMMENT_SIZE;\n}\n\nexport async function deleteLabel(\n number: number,\n label: string,\n): Promise<void> {\n await client.setHashtags(number, { remove: [label] });\n}\n\nexport function ensureCommentRemoval(\n _ensureCommentRemoval:\n | EnsureCommentRemovalConfigByTopic\n | EnsureCommentRemovalConfigByContent,\n): Promise<void> {\n return Promise.resolve();\n}\n\nexport function ensureIssueClosing(_title: string): Promise<void> {\n return Promise.resolve();\n}\n\nexport function ensureIssue(\n _issueConfig: EnsureIssueConfig,\n): Promise<EnsureIssueResult | null> {\n return Promise.resolve(null);\n}\n\nexport function findIssue(_title: string): Promise<Issue | null> {\n return Promise.resolve(null);\n}\n\nexport function getIssueList(): Promise<Issue[]> {\n return Promise.resolve([]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAa,KAAK;AAGlB,MAAM,WAEF,CAAC;AAEL,IAAI,SAMA,EACF,QAAQ,CAAC,EACX;AAEA,SAAgB,cAAc,WAAgC;CAC5D,SAAS;EAAE,GAAG;EAAQ,GAAG;CAAU;AACrC;AAEA,eAAsB,aAAa,EACjC,UACA,UACA,YAC0C;CAC1C,OAAO,MAAM,gBAAgB,SAAU,IAAI,SAAU,EAAE;CACvD,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,IAAI,EAAE,YAAY,WAChB,MAAM,IAAI,MACR,4DACF;CAEF,OAAO,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AAc,QACf,EACH;CACA,MAAM,OAAO,6BACX,cAAc,QACd,cAAc,SACd,cAAc,SAAS,KAAA,CACzB;CACA,OAAO;AACT;AAEA,SAAgB,gBAAgB,QAAgB,aAA6B;CAC3E,OACE,cAAc,kBAAkB,MAAM,GAAG,cAAc,CAAC,CAAC,CACtD,QAAQ,mBAAmB,iBAAiB,CAAC,CAC7C,QACC,oCACA,iDACF,CAAC,CACA,QACC,iBACA,iDACF,CAAC,CACA,QACC,sCACA,gBAAgB,YAAY,yBAC9B,CAAC,CACA,QACC,uCACA,eAAe,YAAY,yBAC7B,CAAC,CACA,QAAQ,MAAM,wBAAwB,GAAG,QAAQ,CAAC,CAElD,QAAQ,MAAM,eAAe,GAAG,IAAI,CAAC,CACrC,QAAQ,MAAM,4BAA4B,GAAG,EAAE,CAAC,CAChD,QAAQ,MAAM,wCAAwC,GAAG,EAAE,CAAC,CAC5D,QAAQ,MAAM,4CAA4C,GAAG,EAAE,CAAC,CAEhE,QAAQ,MAAM,UAAU,GAAG,EAAE;AAEpC;AAEA,SAAgB,gBAAwB;CACtC,OAAO;AACT;AAEA,eAAsB,YACpB,QACA,OACe;CACf,MAAM,OAAO,YAAY,QAAQ,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;AACtD;AAEA,SAAgB,qBACd,uBAGe;CACf,OAAO,QAAQ,QAAQ;AACzB;AAEA,SAAgB,mBAAmB,QAA+B;CAChE,OAAO,QAAQ,QAAQ;AACzB;AAEA,SAAgB,YACd,cACmC;CACnC,OAAO,QAAQ,QAAQ,IAAI;AAC7B;AAEA,SAAgB,UAAU,QAAuC;CAC/D,OAAO,QAAQ,QAAQ,IAAI;AAC7B;AAEA,SAAgB,eAAiC;CAC/C,OAAO,QAAQ,QAAQ,CAAC,CAAC;AAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/platform/gerrit/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { LooseArray } from '../../../util/schema-utils/index.ts';\n\n/**\n * The Schemas for the Gerrit API Responses ({@link https://gerrit-review.googlesource.com/Documentation/rest-api.html | REST-API})\n * minimized to only needed properties.\n *\n * @packageDocumentation\n */\n\nexport const GerritAccountInfo = z.object({\n _account_id: z.number(),\n username: z.string().optional(),\n});\nexport type GerritAccountInfo = z.infer<typeof GerritAccountInfo>;\n\nexport const GerritLabelInfo = z.object({\n approved: GerritAccountInfo.optional(),\n rejected: GerritAccountInfo.optional(),\n blocking: z.boolean().optional(),\n});\nexport type GerritLabelInfo = z.infer<typeof GerritLabelInfo>;\n\nexport const GerritActionInfo = z.object({\n method: z.string().optional(),\n enabled: z.boolean().optional(),\n});\nexport type GerritActionInfo = z.infer<typeof GerritActionInfo>;\n\nexport const GerritRevisionInfo = z.object({\n uploader: GerritAccountInfo,\n ref: z.string(),\n created: z.string(),\n actions: z.record(z.string(), GerritActionInfo).optional(),\n commit_with_footers: z.string().optional(),\n});\nexport type GerritRevisionInfo = z.infer<typeof GerritRevisionInfo>;\n\nexport const GerritChangeMessageInfo = z.object({\n id: z.string(),\n message: z.string(),\n tag: z.string().optional(),\n});\nexport type GerritChangeMessageInfo = z.infer<typeof GerritChangeMessageInfo>;\n\nexport const GerritChange = z.object({\n branch: z.string(),\n change_id: z.string(),\n subject: z.string(),\n status: z.enum(['NEW', 'MERGED', 'ABANDONED']),\n created: z.string(),\n hashtags: z.array(z.string()),\n submittable: z.boolean().optional(),\n _number: z.number(),\n labels: z.record(z.string(), GerritLabelInfo).optional(),\n reviewers: z\n .object({\n REVIEWER: LooseArray(GerritAccountInfo).optional(),\n })\n .optional(),\n messages: LooseArray(GerritChangeMessageInfo).optional(),\n current_revision: z.string().optional(),\n revisions: z.record(z.string(), GerritRevisionInfo).optional(),\n problems: z.array(z.unknown()).optional(),\n _more_changes: z.boolean().optional(),\n});\nexport type GerritChange = z.infer<typeof GerritChange>;\n\nexport const GerritChanges = LooseArray(GerritChange);\n\nexport const GerritLabelTypeInfo = z.object({\n values: z.record(z.coerce.number(), z.string()),\n default_value: z.number(),\n});\nexport type GerritLabelTypeInfo = z.infer<typeof GerritLabelTypeInfo>;\n\nexport const GerritProjectInfo = z.object({\n id: z.string(),\n name: z.string(),\n state: z.enum(['ACTIVE', 'READ_ONLY', 'HIDDEN']).optional(),\n labels: z.record(z.string(), GerritLabelTypeInfo).optional(),\n});\nexport type GerritProjectInfo = z.infer<typeof GerritProjectInfo>;\n\nexport const GerritBranchInfo = z.object({\n ref: z.string(),\n revision: z.string(),\n});\nexport type GerritBranchInfo = z.infer<typeof GerritBranchInfo>;\n\nexport const GerritMergeableInfo = z.object({\n submit_type: z.enum([\n 'MERGE_IF_NECESSARY',\n 'FAST_FORWARD_ONLY',\n 'REBASE_IF_NECESSARY',\n 'REBASE_ALWAYS',\n 'MERGE_ALWAYS',\n 'CHERRY_PICK',\n ]),\n mergeable: z.boolean(),\n});\nexport type GerritMergeableInfo = z.infer<typeof GerritMergeableInfo>;\n\nexport const GerritRepos = z.record(z.string(), z.object({}).loose());\n\nexport const GerritChangeMessages = LooseArray(GerritChangeMessageInfo);\n"],"mappings":";;;;;;;;;AAUA,MAAa,oBAAoB,EAAE,OAAO;CACxC,aAAa,EAAE,OAAO;CACtB,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;AAChC,CAAC;AAGD,MAAa,kBAAkB,EAAE,OAAO;CACtC,UAAU,kBAAkB,SAAS;CACrC,UAAU,kBAAkB,SAAS;CACrC,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS;AACjC,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO;CACvC,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS;AAChC,CAAC;AAGD,MAAa,qBAAqB,EAAE,OAAO;CACzC,UAAU;CACV,KAAK,EAAE,OAAO;CACd,SAAS,EAAE,OAAO;CAClB,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAAC,CAAC,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,CAAC,CAAC,CAAC,SAAS;CAC1D,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,mBAAmB,CAAC,CAAC,SAAS;AAC7D,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO;CACvC,KAAK,EAAE,OAAO;CACd,UAAU,EAAE,OAAO;AACrB,CAAC;AAGD,MAAa,sBAAsB,EAAE,OAAO;CAC1C,aAAa,EAAE,KAAK;EAClB;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,WAAW,EAAE,QAAQ;AACvB,CAAC;AAGD,MAAa,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAEpE,MAAa,uBAAuB,WAAW,uBAAuB"}
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/platform/gerrit/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { LooseArray } from '../../../util/schema-utils/index.ts';\n\n/**\n * The Schemas for the Gerrit API Responses ({@link https://gerrit-review.googlesource.com/Documentation/rest-api.html | REST-API})\n * minimized to only needed properties.\n *\n * @packageDocumentation\n */\n\nexport const GerritAccountInfo = z.object({\n _account_id: z.number(),\n username: z.string().optional(),\n});\nexport type GerritAccountInfo = z.infer<typeof GerritAccountInfo>;\n\nexport const GerritLabelInfo = z.object({\n approved: GerritAccountInfo.optional(),\n rejected: GerritAccountInfo.optional(),\n blocking: z.boolean().optional(),\n});\nexport type GerritLabelInfo = z.infer<typeof GerritLabelInfo>;\n\nexport const GerritActionInfo = z.object({\n method: z.string().optional(),\n enabled: z.boolean().optional(),\n});\nexport type GerritActionInfo = z.infer<typeof GerritActionInfo>;\n\nexport const GerritRevisionInfo = z.object({\n uploader: GerritAccountInfo,\n ref: z.string(),\n created: z.string(),\n actions: z.record(z.string(), GerritActionInfo).optional(),\n commit_with_footers: z.string().optional(),\n});\nexport type GerritRevisionInfo = z.infer<typeof GerritRevisionInfo>;\n\nexport const GerritChangeMessageInfo = z.object({\n id: z.string(),\n message: z.string(),\n tag: z.string().optional(),\n});\nexport type GerritChangeMessageInfo = z.infer<typeof GerritChangeMessageInfo>;\n\nexport const GerritChange = z.object({\n branch: z.string(),\n change_id: z.string(),\n subject: z.string(),\n status: z.enum(['NEW', 'MERGED', 'ABANDONED']),\n created: z.string(),\n hashtags: z.array(z.string()),\n submittable: z.boolean().optional(),\n _number: z.number(),\n labels: z.record(z.string(), GerritLabelInfo).optional(),\n reviewers: z\n .object({\n REVIEWER: LooseArray(GerritAccountInfo).optional(),\n })\n .optional(),\n messages: LooseArray(GerritChangeMessageInfo).optional(),\n current_revision: z.string().optional(),\n revisions: z.record(z.string(), GerritRevisionInfo).optional(),\n problems: z.array(z.unknown()).optional(),\n _more_changes: z.boolean().optional(),\n});\nexport type GerritChange = z.infer<typeof GerritChange>;\n\nexport const GerritChanges = LooseArray(GerritChange);\n\nexport const GerritLabelTypeInfo = z.object({\n values: z.record(z.coerce.number(), z.string()),\n default_value: z.number(),\n});\nexport type GerritLabelTypeInfo = z.infer<typeof GerritLabelTypeInfo>;\n\n/** Map of label name (e.g. \"Code-Review\") to its definition on a project. */\nexport type GerritLabels = Record<string, GerritLabelTypeInfo>;\n\nexport const GerritProjectInfo = z.object({\n id: z.string(),\n name: z.string(),\n state: z.enum(['ACTIVE', 'READ_ONLY', 'HIDDEN']).optional(),\n labels: z.record(z.string(), GerritLabelTypeInfo).optional(),\n});\nexport type GerritProjectInfo = z.infer<typeof GerritProjectInfo>;\n\nexport const GerritBranchInfo = z.object({\n ref: z.string(),\n revision: z.string(),\n});\nexport type GerritBranchInfo = z.infer<typeof GerritBranchInfo>;\n\nexport const GerritMergeableInfo = z.object({\n submit_type: z.enum([\n 'MERGE_IF_NECESSARY',\n 'FAST_FORWARD_ONLY',\n 'REBASE_IF_NECESSARY',\n 'REBASE_ALWAYS',\n 'MERGE_ALWAYS',\n 'CHERRY_PICK',\n ]),\n mergeable: z.boolean(),\n});\nexport type GerritMergeableInfo = z.infer<typeof GerritMergeableInfo>;\n\nexport const GerritRepos = z.record(z.string(), z.object({}).loose());\n\nexport const GerritChangeMessages = LooseArray(GerritChangeMessageInfo);\n"],"mappings":";;;;;;;;;AAUA,MAAa,oBAAoB,EAAE,OAAO;CACxC,aAAa,EAAE,OAAO;CACtB,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;AAChC,CAAC;AAGD,MAAa,kBAAkB,EAAE,OAAO;CACtC,UAAU,kBAAkB,SAAS;CACrC,UAAU,kBAAkB,SAAS;CACrC,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS;AACjC,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO;CACvC,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS;AAChC,CAAC;AAGD,MAAa,qBAAqB,EAAE,OAAO;CACzC,UAAU;CACV,KAAK,EAAE,OAAO;CACd,SAAS,EAAE,OAAO;CAClB,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAAC,CAAC,SAAS;CACzD,qBAAqB,EAAE,OAAO,CAAC,CAAC,SAAS;AAC3C,CAAC;AAGD,MAAa,0BAA0B,EAAE,OAAO;CAC9C,IAAI,EAAE,OAAO;CACb,SAAS,EAAE,OAAO;CAClB,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS;AAC3B,CAAC;AAGD,MAAa,eAAe,EAAE,OAAO;CACnC,QAAQ,EAAE,OAAO;CACjB,WAAW,EAAE,OAAO;CACpB,SAAS,EAAE,OAAO;CAClB,QAAQ,EAAE,KAAK;EAAC;EAAO;EAAU;CAAW,CAAC;CAC7C,SAAS,EAAE,OAAO;CAClB,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC;CAC5B,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS;CAClC,SAAS,EAAE,OAAO;CAClB,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC,CAAC,SAAS;CACvD,WAAW,EACR,OAAO,EACN,UAAU,WAAW,iBAAiB,CAAC,CAAC,SAAS,EACnD,CAAC,CAAC,CACD,SAAS;CACZ,UAAU,WAAW,uBAAuB,CAAC,CAAC,SAAS;CACvD,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS;CACtC,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,kBAAkB,CAAC,CAAC,SAAS;CAC7D,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS;CACxC,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS;AACtC,CAAC;AAGD,MAAa,gBAAgB,WAAW,YAAY;AAEpD,MAAa,sBAAsB,EAAE,OAAO;CAC1C,QAAQ,EAAE,OAAO,EAAE,OAAO,OAAO,GAAG,EAAE,OAAO,CAAC;CAC9C,eAAe,EAAE,OAAO;AAC1B,CAAC;AAMD,MAAa,oBAAoB,EAAE,OAAO;CACxC,IAAI,EAAE,OAAO;CACb,MAAM,EAAE,OAAO;CACf,OAAO,EAAE,KAAK;EAAC;EAAU;EAAa;CAAQ,CAAC,CAAC,CAAC,SAAS;CAC1D,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,mBAAmB,CAAC,CAAC,SAAS;AAC7D,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO;CACvC,KAAK,EAAE,OAAO;CACd,UAAU,EAAE,OAAO;AACrB,CAAC;AAGD,MAAa,sBAAsB,EAAE,OAAO;CAC1C,aAAa,EAAE,KAAK;EAClB;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,WAAW,EAAE,QAAQ;AACvB,CAAC;AAGD,MAAa,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAEpE,MAAa,uBAAuB,WAAW,uBAAuB"}
@@ -2,10 +2,12 @@ import { logger } from "../../../logger/index.js";
2
2
  import { hash } from "../../../util/hash.js";
3
3
  import { prepareCommit, pushCommit, setVirtualBranch } from "../../../util/git/index.js";
4
4
  import { DefaultGitScm } from "../default-scm.js";
5
+ import { mapBranchStatusToLabel } from "./utils.js";
5
6
  import { client } from "./client.js";
6
7
  import { isNonEmptyArray, isString } from "@sindresorhus/is";
7
8
  import { randomUUID } from "node:crypto";
8
9
  //#region lib/modules/platform/gerrit/scm.ts
10
+ const CODE_REVIEW_LABEL = "Code-Review";
9
11
  /**
10
12
  * Gerrit SCM strategy:
11
13
  * Instead of implementing custom branch operations, we fetch all open Gerrit changes
@@ -14,12 +16,33 @@ import { randomUUID } from "node:crypto";
14
16
  * as regular Git branches, while minimizing Gerrit API requests.
15
17
  */
16
18
  let repository;
17
- function configureScm(repo) {
19
+ let projectLabels = {};
20
+ function configureScm(repo, labels = {}) {
18
21
  repository = repo;
22
+ projectLabels = labels;
23
+ }
24
+ /**
25
+ * Returns the max vote value for the "Code-Review" label (some Gerrit
26
+ * projects only allow up to +1), or `null` if the label isn't defined on
27
+ * the project, so the caller can skip voting instead of failing the push.
28
+ */
29
+ function getAutoApproveLabelValue() {
30
+ const codeReviewLabel = projectLabels[CODE_REVIEW_LABEL];
31
+ if (!codeReviewLabel) {
32
+ logger.warn({
33
+ repository,
34
+ label: CODE_REVIEW_LABEL
35
+ }, "Cannot auto-approve: label is not defined on the project");
36
+ return null;
37
+ }
38
+ return mapBranchStatusToLabel("green", codeReviewLabel);
19
39
  }
20
40
  async function pushForReview(options) {
21
41
  const pushOptions = ["notify=NONE", "ready"];
22
- if (options.autoApprove) pushOptions.push("label=Code-Review+2");
42
+ if (options.autoApprove) {
43
+ const value = getAutoApproveLabelValue();
44
+ if (value !== null) pushOptions.push(`label=${CODE_REVIEW_LABEL}+${value}`);
45
+ }
23
46
  if (isNonEmptyArray(options.labels)) for (const label of options.labels) pushOptions.push(`hashtag=${label}`);
24
47
  return pushCommit({
25
48
  sourceRef: options.sourceRef,
@@ -1 +1 @@
1
- {"version":3,"file":"scm.js","names":["git.pushCommit","git.prepareCommit","git.setVirtualBranch"],"sources":["../../../../lib/modules/platform/gerrit/scm.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport { isNonEmptyArray, isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport * as git from '../../../util/git/index.ts';\nimport type { CommitFilesConfig, FileChange } from '../../../util/git/types.ts';\nimport { hash } from '../../../util/hash.ts';\nimport type { LongCommitSha } from '../../../util/schema-utils/git.ts';\nimport { DefaultGitScm } from '../default-scm.ts';\nimport { client } from './client.ts';\n\n/**\n * Gerrit SCM strategy:\n * Instead of implementing custom branch operations, we fetch all open Gerrit changes\n * as virtual branches (refs/remotes/origin/<branchName>) after repository initialization.\n * This allows us to leverage DefaultGitScm for most operations, treating virtual branches\n * as regular Git branches, while minimizing Gerrit API requests.\n */\n\nlet repository: string;\nexport function configureScm(repo: string): void {\n repository = repo;\n}\n\nexport async function pushForReview(options: {\n sourceRef: string;\n targetBranch: string;\n files: FileChange[];\n autoApprove?: boolean;\n labels?: string[];\n}): Promise<boolean> {\n const pushOptions = ['notify=NONE', 'ready'];\n if (options.autoApprove) {\n pushOptions.push('label=Code-Review+2');\n }\n if (isNonEmptyArray(options.labels)) {\n for (const label of options.labels) {\n pushOptions.push(`hashtag=${label}`);\n }\n }\n\n return git.pushCommit({\n sourceRef: options.sourceRef,\n targetRef: `refs/for/${options.targetBranch}`,\n files: options.files,\n pushOptions,\n });\n}\n\nexport class GerritScm extends DefaultGitScm {\n override async commitAndPush(\n commit: CommitFilesConfig,\n ): Promise<LongCommitSha | null> {\n logger.debug(`commitAndPush(${commit.branchName})`);\n\n const existingChange = await client.getBranchChange(repository, {\n branchName: commit.branchName,\n state: 'open',\n targetBranch: commit.baseBranch,\n requestDetails: ['CURRENT_REVISION'],\n });\n\n const message = isString(commit.message)\n ? [commit.message]\n : commit.message;\n\n // In Gerrit, the change subject/title is the first line of the commit message\n // v8 ignore else -- TODO: add test #40625\n if (commit.prTitle) {\n const firstMessageLines = message[0].split('\\n');\n firstMessageLines[0] = commit.prTitle;\n message[0] = firstMessageLines.join('\\n');\n }\n\n const changeId = existingChange?.change_id ?? generateChangeId();\n commit.message = message;\n commit.trailers = [\n ...(commit.trailers ?? []).filter(\n (trailer) =>\n !trailer.startsWith('Renovate-Branch:') &&\n !trailer.startsWith('Change-Id:'),\n ),\n `Renovate-Branch: ${commit.branchName}`,\n `Change-Id: ${changeId}`,\n ];\n // prepareCommit already checks hasDiff('HEAD', 'origin/<branchName>') when\n // force is not set, which works because virtual branches are fetched as\n // refs/remotes/origin/<branchName> during init. This avoids pushing empty\n // patch sets without a separate diff check.\n const commitResult = await git.prepareCommit(commit);\n if (commitResult) {\n const { commitSha } = commitResult;\n if (existingChange) {\n // Since the change already exists, we push to the same target branch to\n // avoid creating a new change if the base branch has changed.\n // updatePr() will later take care of moving the existing change to a\n // different base branch if needed.\n const pushResult = await pushForReview({\n sourceRef: commit.branchName,\n targetBranch: existingChange.branch,\n files: commit.files,\n autoApprove: commit.autoApprove,\n });\n /* v8 ignore else -- should never happen */\n if (pushResult) {\n const currentRef =\n existingChange.revisions![existingChange.current_revision!].ref;\n await git.setVirtualBranch(\n commit.branchName,\n nextPatchSetRef(currentRef),\n commitSha,\n );\n return commitSha;\n }\n } else {\n logger.debug(`Commit prepared, push deferred to createPr()`);\n return commitSha;\n }\n }\n return null; // empty commit, no changes in this Gerrit Change\n }\n}\n\n/**\n * Derive the next patch-set ref from a Gerrit change ref.\n * Gerrit refs follow the pattern `refs/changes/<NN>/<change>/<patchset>`.\n * After a push, Gerrit creates the next patch-set, so we increment the\n * trailing number to keep the virtual branch in sync.\n */\nexport function nextPatchSetRef(currentRef: string): string {\n const lastSlash = currentRef.lastIndexOf('/');\n const patchSet = Number(currentRef.slice(lastSlash + 1));\n return `${currentRef.slice(0, lastSlash + 1)}${patchSet + 1}`;\n}\n\n/**\n * This function should generate a Gerrit Change-ID analogous to the commit hook. We avoid the commit hook cause of security concerns.\n * random=$( (whoami ; hostname ; date; cat $1 ; echo $RANDOM) | git hash-object --stdin) prefixed with an 'I'.\n * TODO: Gerrit don't accept longer Change-IDs (sha256), but what happens with this https://git-scm.com/docs/hash-function-transition/ ?\n */\nfunction generateChangeId(): string {\n return `I${hash(randomUUID(), 'sha1')}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,IAAI;AACJ,SAAgB,aAAa,MAAoB;CAC/C,aAAa;AACf;AAEA,eAAsB,cAAc,SAMf;CACnB,MAAM,cAAc,CAAC,eAAe,OAAO;CAC3C,IAAI,QAAQ,aACV,YAAY,KAAK,qBAAqB;CAExC,IAAI,gBAAgB,QAAQ,MAAM,GAChC,KAAK,MAAM,SAAS,QAAQ,QAC1B,YAAY,KAAK,WAAW,OAAO;CAIvC,OAAOA,WAAe;EACpB,WAAW,QAAQ;EACnB,WAAW,YAAY,QAAQ;EAC/B,OAAO,QAAQ;EACf;CACF,CAAC;AACH;AAEA,IAAa,YAAb,cAA+B,cAAc;CAC3C,MAAe,cACb,QAC+B;EAC/B,OAAO,MAAM,iBAAiB,OAAO,WAAW,EAAE;EAElD,MAAM,iBAAiB,MAAM,OAAO,gBAAgB,YAAY;GAC9D,YAAY,OAAO;GACnB,OAAO;GACP,cAAc,OAAO;GACrB,gBAAgB,CAAC,kBAAkB;EACrC,CAAC;EAED,MAAM,UAAU,SAAS,OAAO,OAAO,IACnC,CAAC,OAAO,OAAO,IACf,OAAO;;EAIX,IAAI,OAAO,SAAS;GAClB,MAAM,oBAAoB,QAAQ,EAAE,CAAC,MAAM,IAAI;GAC/C,kBAAkB,KAAK,OAAO;GAC9B,QAAQ,KAAK,kBAAkB,KAAK,IAAI;EAC1C;EAEA,MAAM,WAAW,gBAAgB,aAAa,iBAAiB;EAC/D,OAAO,UAAU;EACjB,OAAO,WAAW;GAChB,IAAI,OAAO,YAAY,CAAC,EAAA,CAAG,QACxB,YACC,CAAC,QAAQ,WAAW,kBAAkB,KACtC,CAAC,QAAQ,WAAW,YAAY,CACpC;GACA,oBAAoB,OAAO;GAC3B,cAAc;EAChB;EAKA,MAAM,eAAe,MAAMC,cAAkB,MAAM;EACnD,IAAI,cAAc;GAChB,MAAM,EAAE,cAAc;GACtB,IAAI,gBAYE;;QAAA,MAPqB,cAAc;KACrC,WAAW,OAAO;KAClB,cAAc,eAAe;KAC7B,OAAO,OAAO;KACd,aAAa,OAAO;IACtB,CAAC,GAEe;KACd,MAAM,aACJ,eAAe,UAAW,eAAe,iBAAkB,CAAC;KAC9D,MAAMC,iBACJ,OAAO,YACP,gBAAgB,UAAU,GAC1B,SACF;KACA,OAAO;IACT;UACK;IACL,OAAO,MAAM,8CAA8C;IAC3D,OAAO;GACT;EACF;EACA,OAAO;CACT;AACF;;;;;;;AAQA,SAAgB,gBAAgB,YAA4B;CAC1D,MAAM,YAAY,WAAW,YAAY,GAAG;CAC5C,MAAM,WAAW,OAAO,WAAW,MAAM,YAAY,CAAC,CAAC;CACvD,OAAO,GAAG,WAAW,MAAM,GAAG,YAAY,CAAC,IAAI,WAAW;AAC5D;;;;;;AAOA,SAAS,mBAA2B;CAClC,OAAO,IAAI,KAAK,WAAW,GAAG,MAAM;AACtC"}
1
+ {"version":3,"file":"scm.js","names":["git.pushCommit","git.prepareCommit","git.setVirtualBranch"],"sources":["../../../../lib/modules/platform/gerrit/scm.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport { isNonEmptyArray, isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport * as git from '../../../util/git/index.ts';\nimport type { CommitFilesConfig, FileChange } from '../../../util/git/types.ts';\nimport { hash } from '../../../util/hash.ts';\nimport type { LongCommitSha } from '../../../util/schema-utils/git.ts';\nimport { DefaultGitScm } from '../default-scm.ts';\nimport { client } from './client.ts';\nimport type { GerritLabels } from './schema.ts';\nimport { mapBranchStatusToLabel } from './utils.ts';\n\nconst CODE_REVIEW_LABEL = 'Code-Review';\n\n/**\n * Gerrit SCM strategy:\n * Instead of implementing custom branch operations, we fetch all open Gerrit changes\n * as virtual branches (refs/remotes/origin/<branchName>) after repository initialization.\n * This allows us to leverage DefaultGitScm for most operations, treating virtual branches\n * as regular Git branches, while minimizing Gerrit API requests.\n */\n\nlet repository: string;\nlet projectLabels: GerritLabels = {};\nexport function configureScm(repo: string, labels: GerritLabels = {}): void {\n repository = repo;\n projectLabels = labels;\n}\n\n/**\n * Returns the max vote value for the \"Code-Review\" label (some Gerrit\n * projects only allow up to +1), or `null` if the label isn't defined on\n * the project, so the caller can skip voting instead of failing the push.\n */\nfunction getAutoApproveLabelValue(): number | null {\n const codeReviewLabel = projectLabels[CODE_REVIEW_LABEL];\n if (!codeReviewLabel) {\n logger.warn(\n { repository, label: CODE_REVIEW_LABEL },\n 'Cannot auto-approve: label is not defined on the project',\n );\n return null;\n }\n return mapBranchStatusToLabel('green', codeReviewLabel);\n}\n\nexport async function pushForReview(options: {\n sourceRef: string;\n targetBranch: string;\n files: FileChange[];\n autoApprove?: boolean;\n labels?: string[];\n}): Promise<boolean> {\n const pushOptions = ['notify=NONE', 'ready'];\n if (options.autoApprove) {\n const value = getAutoApproveLabelValue();\n if (value !== null) {\n pushOptions.push(`label=${CODE_REVIEW_LABEL}+${value}`);\n }\n }\n if (isNonEmptyArray(options.labels)) {\n for (const label of options.labels) {\n pushOptions.push(`hashtag=${label}`);\n }\n }\n\n return git.pushCommit({\n sourceRef: options.sourceRef,\n targetRef: `refs/for/${options.targetBranch}`,\n files: options.files,\n pushOptions,\n });\n}\n\nexport class GerritScm extends DefaultGitScm {\n override async commitAndPush(\n commit: CommitFilesConfig,\n ): Promise<LongCommitSha | null> {\n logger.debug(`commitAndPush(${commit.branchName})`);\n\n const existingChange = await client.getBranchChange(repository, {\n branchName: commit.branchName,\n state: 'open',\n targetBranch: commit.baseBranch,\n requestDetails: ['CURRENT_REVISION'],\n });\n\n const message = isString(commit.message)\n ? [commit.message]\n : commit.message;\n\n // In Gerrit, the change subject/title is the first line of the commit message\n // v8 ignore else -- TODO: add test #40625\n if (commit.prTitle) {\n const firstMessageLines = message[0].split('\\n');\n firstMessageLines[0] = commit.prTitle;\n message[0] = firstMessageLines.join('\\n');\n }\n\n const changeId = existingChange?.change_id ?? generateChangeId();\n commit.message = message;\n commit.trailers = [\n ...(commit.trailers ?? []).filter(\n (trailer) =>\n !trailer.startsWith('Renovate-Branch:') &&\n !trailer.startsWith('Change-Id:'),\n ),\n `Renovate-Branch: ${commit.branchName}`,\n `Change-Id: ${changeId}`,\n ];\n // prepareCommit already checks hasDiff('HEAD', 'origin/<branchName>') when\n // force is not set, which works because virtual branches are fetched as\n // refs/remotes/origin/<branchName> during init. This avoids pushing empty\n // patch sets without a separate diff check.\n const commitResult = await git.prepareCommit(commit);\n if (commitResult) {\n const { commitSha } = commitResult;\n if (existingChange) {\n // Since the change already exists, we push to the same target branch to\n // avoid creating a new change if the base branch has changed.\n // updatePr() will later take care of moving the existing change to a\n // different base branch if needed.\n const pushResult = await pushForReview({\n sourceRef: commit.branchName,\n targetBranch: existingChange.branch,\n files: commit.files,\n autoApprove: commit.autoApprove,\n });\n /* v8 ignore else -- should never happen */\n if (pushResult) {\n const currentRef =\n existingChange.revisions![existingChange.current_revision!].ref;\n await git.setVirtualBranch(\n commit.branchName,\n nextPatchSetRef(currentRef),\n commitSha,\n );\n return commitSha;\n }\n } else {\n logger.debug(`Commit prepared, push deferred to createPr()`);\n return commitSha;\n }\n }\n return null; // empty commit, no changes in this Gerrit Change\n }\n}\n\n/**\n * Derive the next patch-set ref from a Gerrit change ref.\n * Gerrit refs follow the pattern `refs/changes/<NN>/<change>/<patchset>`.\n * After a push, Gerrit creates the next patch-set, so we increment the\n * trailing number to keep the virtual branch in sync.\n */\nexport function nextPatchSetRef(currentRef: string): string {\n const lastSlash = currentRef.lastIndexOf('/');\n const patchSet = Number(currentRef.slice(lastSlash + 1));\n return `${currentRef.slice(0, lastSlash + 1)}${patchSet + 1}`;\n}\n\n/**\n * This function should generate a Gerrit Change-ID analogous to the commit hook. We avoid the commit hook cause of security concerns.\n * random=$( (whoami ; hostname ; date; cat $1 ; echo $RANDOM) | git hash-object --stdin) prefixed with an 'I'.\n * TODO: Gerrit don't accept longer Change-IDs (sha256), but what happens with this https://git-scm.com/docs/hash-function-transition/ ?\n */\nfunction generateChangeId(): string {\n return `I${hash(randomUUID(), 'sha1')}`;\n}\n"],"mappings":";;;;;;;;;AAYA,MAAM,oBAAoB;;;;;;;;AAU1B,IAAI;AACJ,IAAI,gBAA8B,CAAC;AACnC,SAAgB,aAAa,MAAc,SAAuB,CAAC,GAAS;CAC1E,aAAa;CACb,gBAAgB;AAClB;;;;;;AAOA,SAAS,2BAA0C;CACjD,MAAM,kBAAkB,cAAc;CACtC,IAAI,CAAC,iBAAiB;EACpB,OAAO,KACL;GAAE;GAAY,OAAO;EAAkB,GACvC,0DACF;EACA,OAAO;CACT;CACA,OAAO,uBAAuB,SAAS,eAAe;AACxD;AAEA,eAAsB,cAAc,SAMf;CACnB,MAAM,cAAc,CAAC,eAAe,OAAO;CAC3C,IAAI,QAAQ,aAAa;EACvB,MAAM,QAAQ,yBAAyB;EACvC,IAAI,UAAU,MACZ,YAAY,KAAK,SAAS,kBAAkB,GAAG,OAAO;CAE1D;CACA,IAAI,gBAAgB,QAAQ,MAAM,GAChC,KAAK,MAAM,SAAS,QAAQ,QAC1B,YAAY,KAAK,WAAW,OAAO;CAIvC,OAAOA,WAAe;EACpB,WAAW,QAAQ;EACnB,WAAW,YAAY,QAAQ;EAC/B,OAAO,QAAQ;EACf;CACF,CAAC;AACH;AAEA,IAAa,YAAb,cAA+B,cAAc;CAC3C,MAAe,cACb,QAC+B;EAC/B,OAAO,MAAM,iBAAiB,OAAO,WAAW,EAAE;EAElD,MAAM,iBAAiB,MAAM,OAAO,gBAAgB,YAAY;GAC9D,YAAY,OAAO;GACnB,OAAO;GACP,cAAc,OAAO;GACrB,gBAAgB,CAAC,kBAAkB;EACrC,CAAC;EAED,MAAM,UAAU,SAAS,OAAO,OAAO,IACnC,CAAC,OAAO,OAAO,IACf,OAAO;;EAIX,IAAI,OAAO,SAAS;GAClB,MAAM,oBAAoB,QAAQ,EAAE,CAAC,MAAM,IAAI;GAC/C,kBAAkB,KAAK,OAAO;GAC9B,QAAQ,KAAK,kBAAkB,KAAK,IAAI;EAC1C;EAEA,MAAM,WAAW,gBAAgB,aAAa,iBAAiB;EAC/D,OAAO,UAAU;EACjB,OAAO,WAAW;GAChB,IAAI,OAAO,YAAY,CAAC,EAAA,CAAG,QACxB,YACC,CAAC,QAAQ,WAAW,kBAAkB,KACtC,CAAC,QAAQ,WAAW,YAAY,CACpC;GACA,oBAAoB,OAAO;GAC3B,cAAc;EAChB;EAKA,MAAM,eAAe,MAAMC,cAAkB,MAAM;EACnD,IAAI,cAAc;GAChB,MAAM,EAAE,cAAc;GACtB,IAAI,gBAYE;;QAAA,MAPqB,cAAc;KACrC,WAAW,OAAO;KAClB,cAAc,eAAe;KAC7B,OAAO,OAAO;KACd,aAAa,OAAO;IACtB,CAAC,GAEe;KACd,MAAM,aACJ,eAAe,UAAW,eAAe,iBAAkB,CAAC;KAC9D,MAAMC,iBACJ,OAAO,YACP,gBAAgB,UAAU,GAC1B,SACF;KACA,OAAO;IACT;UACK;IACL,OAAO,MAAM,8CAA8C;IAC3D,OAAO;GACT;EACF;EACA,OAAO;CACT;AACF;;;;;;;AAQA,SAAgB,gBAAgB,YAA4B;CAC1D,MAAM,YAAY,WAAW,YAAY,GAAG;CAC5C,MAAM,WAAW,OAAO,WAAW,MAAM,YAAY,CAAC,CAAC;CACvD,OAAO,GAAG,WAAW,MAAM,GAAG,YAAY,CAAC,IAAI,WAAW;AAC5D;;;;;;AAOA,SAAS,mBAA2B;CAClC,OAAO,IAAI,KAAK,WAAW,GAAG,MAAM;AACtC"}
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": "43.284.1",
4
+ "version": "43.285.1",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",
@@ -219,7 +219,7 @@
219
219
  "@ls-lint/ls-lint": "2.3.1",
220
220
  "@openpgp/web-stream-tools": "0.3.1",
221
221
  "@semantic-release/exec": "7.1.0",
222
- "@smithy/util-stream": "4.7.10",
222
+ "@smithy/util-stream": "4.7.11",
223
223
  "@types/adm-zip": "0.5.8",
224
224
  "@types/aws4": "1.11.6",
225
225
  "@types/breejs__later": "4.1.5",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$id": "https://docs.renovatebot.com/renovate-schema.json",
3
- "title": "JSON schema for Renovate 43.284.1 config files (https://renovatebot.com/)",
3
+ "title": "JSON schema for Renovate 43.285.1 config files (https://renovatebot.com/)",
4
4
  "$schema": "http://json-schema.org/draft-07/schema#",
5
- "x-renovate-version": "43.284.1",
5
+ "x-renovate-version": "43.285.1",
6
6
  "allowComments": true,
7
7
  "type": "object",
8
8
  "definitions": {