renovate 44.106.0 → 44.107.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/modules/manager/fingerprint.generated.js +6 -6
  2. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  3. package/dist/modules/manager/fleet/extract.js +2 -2
  4. package/dist/modules/manager/fleet/extract.js.map +1 -1
  5. package/dist/modules/manager/flux/extract.js +2 -1
  6. package/dist/modules/manager/flux/extract.js.map +1 -1
  7. package/dist/modules/manager/helmfile/artifacts.js +7 -7
  8. package/dist/modules/manager/helmfile/artifacts.js.map +1 -1
  9. package/dist/modules/manager/helmfile/extract.js +2 -8
  10. package/dist/modules/manager/helmfile/extract.js.map +1 -1
  11. package/dist/modules/manager/helmfile/utils.js +2 -16
  12. package/dist/modules/manager/helmfile/utils.js.map +1 -1
  13. package/dist/modules/manager/helmv3/artifacts.js +8 -17
  14. package/dist/modules/manager/helmv3/artifacts.js.map +1 -1
  15. package/dist/modules/manager/helmv3/common.js +23 -8
  16. package/dist/modules/manager/helmv3/common.js.map +1 -1
  17. package/dist/modules/manager/helmv3/utils.js +16 -1
  18. package/dist/modules/manager/helmv3/utils.js.map +1 -1
  19. package/dist/modules/manager/kustomize/artifacts.js +1 -1
  20. package/dist/modules/manager/kustomize/artifacts.js.map +1 -1
  21. package/dist/modules/manager/mise/backends.js +20 -5
  22. package/dist/modules/manager/mise/backends.js.map +1 -1
  23. package/dist/modules/manager/mise/extract.js +2 -1
  24. package/dist/modules/manager/mise/extract.js.map +1 -1
  25. package/dist/modules/manager/mise/index.js +5 -0
  26. package/dist/modules/manager/mise/index.js.map +1 -1
  27. package/dist/modules/manager/terraform/extractors/resources/helm-release.js +2 -2
  28. package/dist/modules/manager/terraform/extractors/resources/helm-release.js.map +1 -1
  29. package/dist/modules/manager/terraform/util.js +1 -5
  30. package/dist/modules/manager/terraform/util.js.map +1 -1
  31. package/dist/modules/manager/types.d.ts +9 -0
  32. package/dist/modules/versioning/gradle/compare.js +1 -1
  33. package/dist/modules/versioning/gradle/compare.js.map +1 -1
  34. package/dist/modules/versioning/gradle/index.js +25 -3
  35. package/dist/modules/versioning/gradle/index.js.map +1 -1
  36. package/dist/modules/versioning/loose/index.js +21 -7
  37. package/dist/modules/versioning/loose/index.js.map +1 -1
  38. package/dist/modules/versioning/maven/compare.js +8 -7
  39. package/dist/modules/versioning/maven/compare.js.map +1 -1
  40. package/dist/modules/versioning/maven/index.js +24 -3
  41. package/dist/modules/versioning/maven/index.js.map +1 -1
  42. package/dist/types/skip-reason.d.ts +7 -1
  43. package/dist/workers/repository/extract/extract-fingerprint-config.js +5 -0
  44. package/dist/workers/repository/extract/extract-fingerprint-config.js.map +1 -1
  45. package/dist/workers/repository/extract/index.js +3 -0
  46. package/dist/workers/repository/extract/index.js.map +1 -1
  47. package/dist/workers/repository/extract/vulnerability-alerts.js +18 -0
  48. package/dist/workers/repository/extract/vulnerability-alerts.js.map +1 -0
  49. package/package.json +1 -1
  50. package/renovate-schema.json +2 -2
  51. package/dist/modules/manager/kustomize/common.js +0 -18
  52. package/dist/modules/manager/kustomize/common.js.map +0 -1
@@ -39,8 +39,8 @@ hashMap.set("devcontainer", "24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f25
39
39
  hashMap.set("docker-compose", "fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9");
40
40
  hashMap.set("dockerfile", "995048a257692db3b48dccda029ef5230ebd2a17085e837fc4eb848aae9ba64f");
41
41
  hashMap.set("droneci", "661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998");
42
- hashMap.set("fleet", "4942d52e82f35c41e2d46cf76f426e2d91b350338cfc0bbcb97e8aaae2a1ac0b");
43
- hashMap.set("flux", "aad8c786c4a2b5820663027452eeb8fe84c3af8c8399261e85f0eade2e484fe8");
42
+ hashMap.set("fleet", "ffa222820f72c4eb4cdc4c229ae8c50433bee96f3b974f0633d5a7d1f6427c97");
43
+ hashMap.set("flux", "842597c9083d82af99ef3d526101a3a53c4448414d2f53f7e969074757124811");
44
44
  hashMap.set("fvm", "9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90");
45
45
  hashMap.set("git-submodules", "df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f");
46
46
  hashMap.set("github-actions", "7adddc8e590786084855ffe53292bff3098ac672f91c21cc39d45bcf0af2271f");
@@ -56,7 +56,7 @@ hashMap.set("helm-requirements", "7ee9dace4c036dfe113c0c0e46369d8b83a739caa83166
56
56
  hashMap.set("helm-values", "0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa");
57
57
  hashMap.set("helmfile", "28572dd24b6746ca7065ee467aa13bbc8c3e8c0f88ae48e33bce88468c600100");
58
58
  hashMap.set("helmsman", "951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37");
59
- hashMap.set("helmv3", "e2d464055503d3702d3cf7323ce593747fe482def8ee59aea2dcaadb0bb0f72c");
59
+ hashMap.set("helmv3", "85cc70a02b5f6a965da680e0228e7b3d6151e9a36bebf79abfb65dc94226ee6a");
60
60
  hashMap.set("hermit", "0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071");
61
61
  hashMap.set("homeassistant-manifest", "05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f");
62
62
  hashMap.set("homebrew", "dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984");
@@ -65,13 +65,13 @@ hashMap.set("jenkins", "7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075
65
65
  hashMap.set("jsonnet-bundler", "4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d");
66
66
  hashMap.set("kotlin-script", "95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564");
67
67
  hashMap.set("kubernetes", "321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de");
68
- hashMap.set("kustomize", "aa830c27302555e12d7f04e342c96125d68c231028a2d3c459c4431516382584");
68
+ hashMap.set("kustomize", "706cc4776ad6ec4df5bed0ac84e8324ad7328457b6743b082e444d4770756604");
69
69
  hashMap.set("leiningen", "c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2");
70
70
  hashMap.set("maven", "c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d");
71
71
  hashMap.set("maven-wrapper", "6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0");
72
72
  hashMap.set("meteor", "4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776");
73
73
  hashMap.set("mint", "248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e");
74
- hashMap.set("mise", "eaedf27c1c87e4658c7eef17903cf222b42805f718e960c111632d2c8c649664");
74
+ hashMap.set("mise", "33c50a19b6bed53afff1045ac309ca92e2a1acff3fc474c2fb4210a125b538c2");
75
75
  hashMap.set("mix", "0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872");
76
76
  hashMap.set("nix", "0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e");
77
77
  hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
@@ -105,7 +105,7 @@ hashMap.set("smithy", "9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf5
105
105
  hashMap.set("sveltos", "60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90");
106
106
  hashMap.set("swift", "cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1");
107
107
  hashMap.set("tekton", "33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9");
108
- hashMap.set("terraform", "5b0037e4a88e06efe6f006eff15c24d9e1fefdda40d282aa99f54c2637d21c4d");
108
+ hashMap.set("terraform", "624c11f15d9eeaf27256bffe9c72e313064994c898e56dbcca292507d1ea93bd");
109
109
  hashMap.set("terraform-version", "ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa");
110
110
  hashMap.set("terragrunt", "300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7");
111
111
  hashMap.set("terragrunt-version", "eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d");
@@ -1 +1 @@
1
- {"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','bdb6931cc03f4ac02ebfdb56c4b3483bb6c5250fa952545f1a25584d502bbffd');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','a051fe5e7e4fef8208b5864131a2b52b4ae319936f1dd8ee5a4e1ef11359ec09');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c31bc0a0e23d32726bcc09aa67533ebc5058124bf89c88e09c837419f550801a');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','5820cfb6ebe018b8c336d481ea9ae319daaee6a2e368c45196fc8bc67cb3e755');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','fe8136135c895dd08819f91a60cf105f8b951251b057092700101ace991ae1d7');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','f1294fb3866ff65a75d98fdef80b1df3d3a8856535b8c690d1799e1205e4b639');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','10ae4d7f8ff35faf3a3f9f25bf4c969ea960e19aaf8c012aee11f93f4d10533e');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','05e7ab60494a20a5e7477f06a9e723e443d37643b6e1d9ba8d3d87126a051175');\nhashMap.set('deps-edn','06783dbc8b9c7bb84e162d1f75b7db56dfa021cc6f809dfd2314cee8b64af08d');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9');\nhashMap.set('dockerfile','995048a257692db3b48dccda029ef5230ebd2a17085e837fc4eb848aae9ba64f');\nhashMap.set('droneci','661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998');\nhashMap.set('fleet','4942d52e82f35c41e2d46cf76f426e2d91b350338cfc0bbcb97e8aaae2a1ac0b');\nhashMap.set('flux','aad8c786c4a2b5820663027452eeb8fe84c3af8c8399261e85f0eade2e484fe8');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f');\nhashMap.set('github-actions','7adddc8e590786084855ffe53292bff3098ac672f91c21cc39d45bcf0af2271f');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','6011c22e60814460fb4a40f834608a868776b91eff2cae2d3bfea1e73ccd8aeb');\nhashMap.set('gradle','9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a');\nhashMap.set('helm-values','0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa');\nhashMap.set('helmfile','28572dd24b6746ca7065ee467aa13bbc8c3e8c0f88ae48e33bce88468c600100');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','e2d464055503d3702d3cf7323ce593747fe482def8ee59aea2dcaadb0bb0f72c');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075b6a2cff5');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','aa830c27302555e12d7f04e342c96125d68c231028a2d3c459c4431516382584');\nhashMap.set('leiningen','c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','eaedf27c1c87e4658c7eef17903cf222b42805f718e960c111632d2c8c649664');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','30c78bc1c29eeecbdedb4eacc52bd93eedfb07279fd385f893193dcac6196466');\nhashMap.set('nuget','b81fb0ca6cfeb86b004592b38ce176673e056d6a2ed41a9807afb0eb7ad405d2');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','52450676f8b0e05134b3e8947b832195ef40bcaec1ce43d71351a2f797b80d75');\nhashMap.set('pep723','77022a0eae6a3cbb74a1e6d596db1276e379768e40448192b3fa81edd14ca73f');\nhashMap.set('pip-compile','a98dc76a002e1dc21662237f009ff8fea36236bb4e24cb82ee30c6a78f57271f');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398');\nhashMap.set('pixi','e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2');\nhashMap.set('poetry','e9dea5d591c87956b9f018414cb3dab8f2e13580a13be00550fdce198fdf08e6');\nhashMap.set('pre-commit','760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','40927b98dd2bac45dba60e66b5fd0e6b84b61d02db8be536fda7b14546a4feb7');\nhashMap.set('renovate-config','dfaf3f03ddaf70c332f7916106648f36dbfa6a36dd76d15dd27fa116ab3c174c');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e1eb5c7f0171a9bb1b6bd4a36a91039a31b6c84e0983d91d930be31a69506d9e');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','5b0037e4a88e06efe6f006eff15c24d9e1fefdda40d282aa99f54c2637d21c4d');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','f423bfa2b42a2bfc0e38a33ebd4f9d452473e7ed4e7ad6384a99eb9a35d97479');\nhashMap.set('travis','f3e2f38e699c390b00ff481be5e91dceaa81609e93caf9a4214933de759c84fc');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','7db907b3b77ef5f3465f3c4339fbab56bbcdfd1bf34b3d33e4c178d2e07e23e7');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ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AClG,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','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','bdb6931cc03f4ac02ebfdb56c4b3483bb6c5250fa952545f1a25584d502bbffd');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','a051fe5e7e4fef8208b5864131a2b52b4ae319936f1dd8ee5a4e1ef11359ec09');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c31bc0a0e23d32726bcc09aa67533ebc5058124bf89c88e09c837419f550801a');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','5820cfb6ebe018b8c336d481ea9ae319daaee6a2e368c45196fc8bc67cb3e755');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','fe8136135c895dd08819f91a60cf105f8b951251b057092700101ace991ae1d7');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','f1294fb3866ff65a75d98fdef80b1df3d3a8856535b8c690d1799e1205e4b639');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','10ae4d7f8ff35faf3a3f9f25bf4c969ea960e19aaf8c012aee11f93f4d10533e');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','05e7ab60494a20a5e7477f06a9e723e443d37643b6e1d9ba8d3d87126a051175');\nhashMap.set('deps-edn','06783dbc8b9c7bb84e162d1f75b7db56dfa021cc6f809dfd2314cee8b64af08d');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9');\nhashMap.set('dockerfile','995048a257692db3b48dccda029ef5230ebd2a17085e837fc4eb848aae9ba64f');\nhashMap.set('droneci','661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998');\nhashMap.set('fleet','ffa222820f72c4eb4cdc4c229ae8c50433bee96f3b974f0633d5a7d1f6427c97');\nhashMap.set('flux','842597c9083d82af99ef3d526101a3a53c4448414d2f53f7e969074757124811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f');\nhashMap.set('github-actions','7adddc8e590786084855ffe53292bff3098ac672f91c21cc39d45bcf0af2271f');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','6011c22e60814460fb4a40f834608a868776b91eff2cae2d3bfea1e73ccd8aeb');\nhashMap.set('gradle','9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a');\nhashMap.set('helm-values','0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa');\nhashMap.set('helmfile','28572dd24b6746ca7065ee467aa13bbc8c3e8c0f88ae48e33bce88468c600100');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','85cc70a02b5f6a965da680e0228e7b3d6151e9a36bebf79abfb65dc94226ee6a');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075b6a2cff5');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','706cc4776ad6ec4df5bed0ac84e8324ad7328457b6743b082e444d4770756604');\nhashMap.set('leiningen','c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','33c50a19b6bed53afff1045ac309ca92e2a1acff3fc474c2fb4210a125b538c2');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','30c78bc1c29eeecbdedb4eacc52bd93eedfb07279fd385f893193dcac6196466');\nhashMap.set('nuget','b81fb0ca6cfeb86b004592b38ce176673e056d6a2ed41a9807afb0eb7ad405d2');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','52450676f8b0e05134b3e8947b832195ef40bcaec1ce43d71351a2f797b80d75');\nhashMap.set('pep723','77022a0eae6a3cbb74a1e6d596db1276e379768e40448192b3fa81edd14ca73f');\nhashMap.set('pip-compile','a98dc76a002e1dc21662237f009ff8fea36236bb4e24cb82ee30c6a78f57271f');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398');\nhashMap.set('pixi','e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2');\nhashMap.set('poetry','e9dea5d591c87956b9f018414cb3dab8f2e13580a13be00550fdce198fdf08e6');\nhashMap.set('pre-commit','760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','40927b98dd2bac45dba60e66b5fd0e6b84b61d02db8be536fda7b14546a4feb7');\nhashMap.set('renovate-config','dfaf3f03ddaf70c332f7916106648f36dbfa6a36dd76d15dd27fa116ab3c174c');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e1eb5c7f0171a9bb1b6bd4a36a91039a31b6c84e0983d91d930be31a69506d9e');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','624c11f15d9eeaf27256bffe9c72e313064994c898e56dbcca292507d1ea93bd');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','f423bfa2b42a2bfc0e38a33ebd4f9d452473e7ed4e7ad6384a99eb9a35d97479');\nhashMap.set('travis','f3e2f38e699c390b00ff481be5e91dceaa81609e93caf9a4214933de759c84fc');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','7db907b3b77ef5f3465f3c4339fbab56bbcdfd1bf34b3d33e4c178d2e07e23e7');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],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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"}
@@ -3,7 +3,7 @@ import { parseYaml } from "../../../util/yaml.js";
3
3
  import { GitTagsDatasource } from "../../datasource/git-tags/index.js";
4
4
  import { HelmDatasource } from "../../datasource/helm/index.js";
5
5
  import { getOciChartDep, isOCIRegistry, removeOCIPrefix } from "../helmv3/oci.js";
6
- import { checkIfStringIsPath } from "../terraform/util.js";
6
+ import { isLocalChartPath } from "../helmv3/utils.js";
7
7
  import { FleetFile, GitRepo } from "./schema.js";
8
8
  import { isUndefined } from "@sindresorhus/is";
9
9
  //#region lib/modules/manager/fleet/extract.ts
@@ -56,7 +56,7 @@ function extractFleetHelmBlock(doc, config) {
56
56
  dep.depName = doc.chart;
57
57
  dep.packageName = doc.chart;
58
58
  if (!doc.repo) {
59
- if (checkIfStringIsPath(doc.chart)) return {
59
+ if (isLocalChartPath(doc.chart)) return {
60
60
  ...dep,
61
61
  skipReason: "local-chart"
62
62
  };
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","names":[],"sources":["../../../../lib/modules/manager/fleet/extract.ts"],"sourcesContent":["import { isUndefined } from '@sindresorhus/is';\nimport { regEx } from '../../../util/regex.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { HelmDatasource } from '../../datasource/helm/index.ts';\nimport {\n getOciChartDep,\n isOCIRegistry,\n removeOCIPrefix,\n} from '../helmv3/oci.ts';\nimport { checkIfStringIsPath } from '../terraform/util.ts';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFileContent,\n} from '../types.ts';\nimport { FleetFile, type FleetHelmBlock, GitRepo } from './schema.ts';\n\nfunction extractGitRepo(doc: GitRepo): PackageDependency {\n const dep: PackageDependency = {\n depType: 'git_repo',\n datasource: GitTagsDatasource.id,\n };\n\n const repo = doc.spec?.repo;\n if (!repo) {\n return {\n ...dep,\n skipReason: 'missing-depname',\n };\n }\n dep.sourceUrl = repo;\n dep.depName = repo;\n\n const currentValue = doc.spec.revision;\n if (!currentValue) {\n return {\n ...dep,\n skipReason: 'unspecified-version',\n };\n }\n\n return {\n ...dep,\n currentValue,\n };\n}\n\nfunction extractFleetHelmBlock(\n doc: FleetHelmBlock,\n config: ExtractConfig,\n): PackageDependency {\n const dep: PackageDependency = {\n depType: 'fleet',\n datasource: HelmDatasource.id,\n };\n\n if (!doc.chart) {\n return {\n ...dep,\n skipReason: 'missing-depname',\n };\n }\n\n if (isOCIRegistry(doc.chart)) {\n const ociDep: PackageDependency = {\n ...dep,\n ...getOciChartDep(doc.chart, undefined, config.registryAliases),\n depName: removeOCIPrefix(doc.chart),\n };\n if (!doc.version) {\n return {\n ...ociDep,\n skipReason: 'unspecified-version',\n };\n }\n return {\n ...ociDep,\n currentValue: doc.version,\n };\n }\n\n dep.depName = doc.chart;\n dep.packageName = doc.chart;\n\n if (!doc.repo) {\n if (checkIfStringIsPath(doc.chart)) {\n return {\n ...dep,\n skipReason: 'local-chart',\n };\n }\n return {\n ...dep,\n skipReason: 'no-repository',\n };\n }\n\n const alias = config.registryAliases?.[doc.repo];\n if (alias) {\n dep.registryUrls = [alias];\n } else {\n dep.registryUrls = [doc.repo];\n }\n\n const currentValue = doc.version;\n if (!doc.version) {\n return {\n ...dep,\n skipReason: 'unspecified-version',\n };\n }\n\n return {\n ...dep,\n currentValue,\n };\n}\n\nfunction extractFleetFile(\n doc: FleetFile,\n config: ExtractConfig,\n): PackageDependency[] {\n const result: PackageDependency[] = [];\n\n result.push(extractFleetHelmBlock(doc.helm, config));\n\n if (!isUndefined(doc.targetCustomizations)) {\n // remove version from helm block to allow usage of variables defined in the global block, but do not create PRs\n // if there is no version defined in the customization.\n const helmBlockContext: FleetHelmBlock = { ...doc.helm };\n delete helmBlockContext.version;\n\n for (const [index, custom] of doc.targetCustomizations.entries()) {\n const dep = extractFleetHelmBlock(\n {\n // merge base config with customization\n ...helmBlockContext,\n ...custom.helm,\n },\n config,\n );\n result.push({\n // overwrite name with customization name to allow splitting of PRs\n ...dep,\n depName: custom.name ?? `targetCustomization[${index}]`, // if no name is provided, use the index\n });\n }\n }\n return result;\n}\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): PackageFileContent | null {\n if (!content) {\n return null;\n }\n const deps: PackageDependency[] = [];\n\n if (regEx('fleet.ya?ml').test(packageFile)) {\n const docs = parseYaml(content, {\n customSchema: FleetFile,\n failureBehaviour: 'filter',\n });\n const fleetDeps = docs.flatMap((doc) => extractFleetFile(doc, config));\n\n deps.push(...fleetDeps);\n } else {\n const docs = parseYaml(content, {\n customSchema: GitRepo,\n failureBehaviour: 'filter',\n });\n const gitRepoDeps = docs.flatMap(extractGitRepo);\n deps.push(...gitRepoDeps);\n }\n\n return deps.length ? { deps } : null;\n}\n"],"mappings":";;;;;;;;;AAkBA,SAAS,eAAe,KAAiC;CACvD,MAAM,MAAyB;EAC7B,SAAS;EACT,YAAY,kBAAkB;CAChC;CAEA,MAAM,OAAO,IAAI,MAAM;CACvB,IAAI,CAAC,MACH,OAAO;EACL,GAAG;EACH,YAAY;CACd;CAEF,IAAI,YAAY;CAChB,IAAI,UAAU;CAEd,MAAM,eAAe,IAAI,KAAK;CAC9B,IAAI,CAAC,cACH,OAAO;EACL,GAAG;EACH,YAAY;CACd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,GACA,MACF;GACA,OAAO,KAAK;IAEV,GAAG;IACH,SAAS,OAAO,QAAQ,uBAAuB,MAAM;GACvD,CAAC;EACH;CACF;CACA,OAAO;AACT;AAEA,SAAgB,mBACd,SACA,aACA,QAC2B;CAC3B,IAAI,CAAC,SACH,OAAO;CAET,MAAM,OAA4B,CAAC;CAEnC,IAAI,MAAM,aAAa,CAAC,CAAC,KAAK,WAAW,GAAG;EAK1C,MAAM,YAJO,UAAU,SAAS;GAC9B,cAAc;GACd,kBAAkB;EACpB,CACqB,CAAC,CAAC,SAAS,QAAQ,iBAAiB,KAAK,MAAM,CAAC;EAErE,KAAK,KAAK,GAAG,SAAS;CACxB,OAAO;EAKL,MAAM,cAJO,UAAU,SAAS;GAC9B,cAAc;GACd,kBAAkB;EACpB,CACuB,CAAC,CAAC,QAAQ,cAAc;EAC/C,KAAK,KAAK,GAAG,WAAW;CAC1B;CAEA,OAAO,KAAK,SAAS,EAAE,KAAK,IAAI;AAClC"}
1
+ {"version":3,"file":"extract.js","names":[],"sources":["../../../../lib/modules/manager/fleet/extract.ts"],"sourcesContent":["import { isUndefined } from '@sindresorhus/is';\nimport { regEx } from '../../../util/regex.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { HelmDatasource } from '../../datasource/helm/index.ts';\nimport {\n getOciChartDep,\n isOCIRegistry,\n removeOCIPrefix,\n} from '../helmv3/oci.ts';\nimport { isLocalChartPath } from '../helmv3/utils.ts';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFileContent,\n} from '../types.ts';\nimport { FleetFile, type FleetHelmBlock, GitRepo } from './schema.ts';\n\nfunction extractGitRepo(doc: GitRepo): PackageDependency {\n const dep: PackageDependency = {\n depType: 'git_repo',\n datasource: GitTagsDatasource.id,\n };\n\n const repo = doc.spec?.repo;\n if (!repo) {\n return {\n ...dep,\n skipReason: 'missing-depname',\n };\n }\n dep.sourceUrl = repo;\n dep.depName = repo;\n\n const currentValue = doc.spec.revision;\n if (!currentValue) {\n return {\n ...dep,\n skipReason: 'unspecified-version',\n };\n }\n\n return {\n ...dep,\n currentValue,\n };\n}\n\nfunction extractFleetHelmBlock(\n doc: FleetHelmBlock,\n config: ExtractConfig,\n): PackageDependency {\n const dep: PackageDependency = {\n depType: 'fleet',\n datasource: HelmDatasource.id,\n };\n\n if (!doc.chart) {\n return {\n ...dep,\n skipReason: 'missing-depname',\n };\n }\n\n if (isOCIRegistry(doc.chart)) {\n const ociDep: PackageDependency = {\n ...dep,\n ...getOciChartDep(doc.chart, undefined, config.registryAliases),\n depName: removeOCIPrefix(doc.chart),\n };\n if (!doc.version) {\n return {\n ...ociDep,\n skipReason: 'unspecified-version',\n };\n }\n return {\n ...ociDep,\n currentValue: doc.version,\n };\n }\n\n dep.depName = doc.chart;\n dep.packageName = doc.chart;\n\n if (!doc.repo) {\n if (isLocalChartPath(doc.chart)) {\n return {\n ...dep,\n skipReason: 'local-chart',\n };\n }\n return {\n ...dep,\n skipReason: 'no-repository',\n };\n }\n\n const alias = config.registryAliases?.[doc.repo];\n if (alias) {\n dep.registryUrls = [alias];\n } else {\n dep.registryUrls = [doc.repo];\n }\n\n const currentValue = doc.version;\n if (!doc.version) {\n return {\n ...dep,\n skipReason: 'unspecified-version',\n };\n }\n\n return {\n ...dep,\n currentValue,\n };\n}\n\nfunction extractFleetFile(\n doc: FleetFile,\n config: ExtractConfig,\n): PackageDependency[] {\n const result: PackageDependency[] = [];\n\n result.push(extractFleetHelmBlock(doc.helm, config));\n\n if (!isUndefined(doc.targetCustomizations)) {\n // remove version from helm block to allow usage of variables defined in the global block, but do not create PRs\n // if there is no version defined in the customization.\n const helmBlockContext: FleetHelmBlock = { ...doc.helm };\n delete helmBlockContext.version;\n\n for (const [index, custom] of doc.targetCustomizations.entries()) {\n const dep = extractFleetHelmBlock(\n {\n // merge base config with customization\n ...helmBlockContext,\n ...custom.helm,\n },\n config,\n );\n result.push({\n // overwrite name with customization name to allow splitting of PRs\n ...dep,\n depName: custom.name ?? `targetCustomization[${index}]`, // if no name is provided, use the index\n });\n }\n }\n return result;\n}\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): PackageFileContent | null {\n if (!content) {\n return null;\n }\n const deps: PackageDependency[] = [];\n\n if (regEx('fleet.ya?ml').test(packageFile)) {\n const docs = parseYaml(content, {\n customSchema: FleetFile,\n failureBehaviour: 'filter',\n });\n const fleetDeps = docs.flatMap((doc) => extractFleetFile(doc, config));\n\n deps.push(...fleetDeps);\n } else {\n const docs = parseYaml(content, {\n customSchema: GitRepo,\n failureBehaviour: 'filter',\n });\n const gitRepoDeps = docs.flatMap(extractGitRepo);\n deps.push(...gitRepoDeps);\n }\n\n return deps.length ? { deps } : null;\n}\n"],"mappings":";;;;;;;;;AAkBA,SAAS,eAAe,KAAiC;CACvD,MAAM,MAAyB;EAC7B,SAAS;EACT,YAAY,kBAAkB;CAChC;CAEA,MAAM,OAAO,IAAI,MAAM;CACvB,IAAI,CAAC,MACH,OAAO;EACL,GAAG;EACH,YAAY;CACd;CAEF,IAAI,YAAY;CAChB,IAAI,UAAU;CAEd,MAAM,eAAe,IAAI,KAAK;CAC9B,IAAI,CAAC,cACH,OAAO;EACL,GAAG;EACH,YAAY;CACd;CAGF,OAAO;EACL,GAAG;EACH;CACF;AACF;AAEA,SAAS,sBACP,KACA,QACmB;CACnB,MAAM,MAAyB;EAC7B,SAAS;EACT,YAAY,eAAe;CAC7B;CAEA,IAAI,CAAC,IAAI,OACP,OAAO;EACL,GAAG;EACH,YAAY;CACd;CAGF,IAAI,cAAc,IAAI,KAAK,GAAG;EAC5B,MAAM,SAA4B;GAChC,GAAG;GACH,GAAG,eAAe,IAAI,OAAO,KAAA,GAAW,OAAO,eAAe;GAC9D,SAAS,gBAAgB,IAAI,KAAK;EACpC;EACA,IAAI,CAAC,IAAI,SACP,OAAO;GACL,GAAG;GACH,YAAY;EACd;EAEF,OAAO;GACL,GAAG;GACH,cA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cAJO,UAAU,SAAS;GAC9B,cAAc;GACd,kBAAkB;EACpB,CACuB,CAAC,CAAC,QAAQ,cAAc;EAC/C,KAAK,KAAK,GAAG,WAAW;CAC1B;CAEA,OAAO,KAAK,SAAS,EAAE,KAAK,IAAI;AAClC"}
@@ -13,6 +13,7 @@ import { GitlabTagsDatasource } from "../../datasource/gitlab-tags/index.js";
13
13
  import { HelmDatasource } from "../../datasource/helm/index.js";
14
14
  import { getDep } from "../dockerfile/extract.js";
15
15
  import { getOciChartDep, isOCIRegistry, removeOCIPrefix } from "../helmv3/oci.js";
16
+ import { isLocalChartPath } from "../helmv3/utils.js";
16
17
  import { collectHelmRepos, isSystemManifest, systemManifestHeaderRegex } from "./common.js";
17
18
  import { findDependencies } from "../helm-values/extract.js";
18
19
  import { extractImage } from "../kustomize/extract.js";
@@ -174,7 +175,7 @@ function resolveResourceManifest(manifest, helmRepositories, registryAliases, co
174
175
  currentValue: resource.spec.chart.spec.version,
175
176
  datasource: HelmDatasource.id
176
177
  };
177
- if (depName.startsWith("./")) {
178
+ if (isLocalChartPath(depName)) {
178
179
  dep.skipReason = "local-chart";
179
180
  delete dep.datasource;
180
181
  } else {
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","names":[],"sources":["../../../../lib/modules/manager/flux/extract.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport {\n type Document,\n type Scalar,\n type YAMLMap,\n isMap,\n isPair,\n isScalar,\n parseAllDocuments,\n} from 'yaml';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { isHttpUrl } from '../../../util/url.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { BitbucketTagsDatasource } from '../../datasource/bitbucket-tags/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 { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { HelmDatasource } from '../../datasource/helm/index.ts';\nimport { getDep } from '../dockerfile/extract.ts';\nimport { findDependencies } from '../helm-values/extract.ts';\nimport {\n getOciChartDep,\n isOCIRegistry,\n removeOCIPrefix,\n} from '../helmv3/oci.ts';\nimport { extractImage } from '../kustomize/extract.ts';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFile,\n PackageFileContent,\n} from '../types.ts';\nimport {\n collectHelmRepos,\n isSystemManifest,\n systemManifestHeaderRegex,\n} from './common.ts';\nimport { FluxResource, type HelmRepository } from './schema.ts';\nimport type {\n FluxManagerData,\n FluxManifest,\n ResourceFluxManifest,\n SystemFluxManifest,\n} from './types.ts';\n\nfunction readManifest(\n content: string,\n packageFile: string,\n): FluxManifest | null {\n if (isSystemManifest(packageFile)) {\n const versionMatch = regEx(systemManifestHeaderRegex).exec(content);\n if (!versionMatch) {\n return null;\n }\n return {\n kind: 'system',\n file: packageFile,\n content,\n version: versionMatch[1],\n components: versionMatch[2],\n };\n }\n\n return {\n kind: 'resource',\n file: packageFile,\n content,\n resources: parseYaml(content, {\n customSchema: FluxResource,\n failureBehaviour: 'filter',\n removeTemplates: true,\n }),\n };\n}\n\nconst githubUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)github\\.com[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\nconst gitlabUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)gitlab\\.com[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\nconst bitbucketUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)bitbucket\\.org[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\n\nfunction resolveGitRepositoryPerSourceTag(\n dep: PackageDependency,\n gitUrl: string,\n): void {\n const githubMatchGroups = githubUrlRegex.exec(gitUrl)?.groups;\n if (githubMatchGroups) {\n dep.datasource = GithubTagsDatasource.id;\n dep.packageName = githubMatchGroups.packageName;\n dep.sourceUrl = `https://github.com/${dep.packageName}`;\n return;\n }\n\n const gitlabMatchGroups = gitlabUrlRegex.exec(gitUrl)?.groups;\n if (gitlabMatchGroups) {\n dep.datasource = GitlabTagsDatasource.id;\n dep.packageName = gitlabMatchGroups.packageName;\n dep.sourceUrl = `https://gitlab.com/${dep.packageName}`;\n return;\n }\n\n const bitbucketMatchGroups = bitbucketUrlRegex.exec(gitUrl)?.groups;\n if (bitbucketMatchGroups) {\n dep.datasource = BitbucketTagsDatasource.id;\n dep.packageName = bitbucketMatchGroups.packageName;\n dep.sourceUrl = `https://bitbucket.org/${dep.packageName}`;\n return;\n }\n\n dep.datasource = GitTagsDatasource.id;\n dep.packageName = gitUrl;\n if (isHttpUrl(gitUrl)) {\n dep.sourceUrl = gitUrl.replace(regEx(/\\.git$/), '');\n }\n}\n\nfunction resolveHelmRepository(\n dep: PackageDependency,\n matchingRepositories: HelmRepository[],\n registryAliases: Record<string, string> | undefined,\n sourceRefName?: string,\n): void {\n if (matchingRepositories.length) {\n dep.registryUrls = matchingRepositories\n .map((repo) => {\n if (repo.spec.type === 'oci' || isOCIRegistry(repo.spec.url)) {\n Object.assign(\n dep,\n getOciChartDep(repo.spec.url, dep.depName, registryAliases),\n );\n return null;\n }\n return repo.spec.url;\n })\n .filter(isString);\n\n // if registryUrls is empty, delete it from dep\n if (!dep.registryUrls?.length) {\n delete dep.registryUrls;\n }\n return;\n }\n\n if (sourceRefName && registryAliases) {\n const aliasUrl = registryAliases[sourceRefName];\n if (aliasUrl) {\n if (isOCIRegistry(aliasUrl)) {\n // Treat alias value as an OCI registry URL\n Object.assign(\n dep,\n getOciChartDep(aliasUrl, dep.depName, registryAliases),\n );\n } else {\n dep.registryUrls = [aliasUrl];\n }\n return;\n }\n }\n\n dep.skipReason = 'unknown-registry';\n}\n\nfunction resolveSystemManifest(\n manifest: SystemFluxManifest,\n): PackageDependency<FluxManagerData>[] {\n return [\n {\n depName: 'fluxcd/flux2',\n datasource: GithubReleasesDatasource.id,\n currentValue: manifest.version,\n managerData: {\n components: manifest.components,\n },\n },\n ];\n}\n\n/**\n * Returns all `spec.ref` map nodes for OCIRepository resources matching `resourceName`.\n */\nfunction findOCIRefNodes(\n docs: Document.Parsed[],\n resourceName: string,\n): YAMLMap[] {\n const refNodes: YAMLMap[] = [];\n for (const doc of docs) {\n const docContents = doc.contents;\n if (!isMap(docContents)) {\n continue;\n }\n const kindNode = docContents.get('kind', true);\n if (\n !isScalar(kindNode) ||\n (kindNode.value as unknown) !== 'OCIRepository'\n ) {\n continue;\n }\n const nameNode = docContents.getIn(['metadata', 'name'], true);\n if (!isScalar(nameNode) || nameNode.value !== resourceName) {\n continue;\n }\n const specNode = docContents.get('spec');\n if (!isMap(specNode)) {\n continue;\n }\n const refNode = specNode.get('ref');\n if (isMap(refNode)) {\n refNodes.push(refNode);\n }\n }\n\n return refNodes;\n}\n\nfunction extractOCIRefTagAndDigestRange(\n docs: Document.Parsed[],\n content: string,\n resourceName: string,\n): { replaceString: string; tagFirst: boolean } | null {\n for (const refNode of findOCIRefNodes(docs, resourceName)) {\n let tagKey: Scalar | undefined;\n let tagValue: Scalar | undefined;\n let digestKey: Scalar | undefined;\n let digestValue: Scalar | undefined;\n\n for (const item of refNode.items) {\n if (!isPair(item) || !isScalar(item.key)) {\n continue;\n }\n if (item.key.value === 'tag' && isScalar(item.value)) {\n tagKey = item.key;\n tagValue = item.value;\n } else if (item.key.value === 'digest' && isScalar(item.value)) {\n digestKey = item.key;\n digestValue = item.value;\n }\n }\n\n if (\n !tagKey?.range ||\n !tagValue?.range ||\n !digestKey?.range ||\n !digestValue?.range\n ) {\n continue;\n }\n\n const tagFirst = tagKey.range[0] < digestKey.range[0];\n const start = tagFirst ? tagKey.range[0] : digestKey.range[0];\n const end = tagFirst ? digestValue.range[1] : tagValue.range[1];\n\n return { replaceString: content.slice(start, end), tagFirst };\n }\n\n return null;\n}\n\nfunction extractOCIRefTagRange(\n docs: Document.Parsed[],\n content: string,\n resourceName: string,\n): { replaceString: string; indentation: string } | null {\n for (const refNode of findOCIRefNodes(docs, resourceName)) {\n for (const item of refNode.items) {\n if (\n isPair(item) &&\n isScalar(item.key) &&\n item.key.value === 'tag' &&\n isScalar(item.value) &&\n item.key.range &&\n item.value.range\n ) {\n const keyStart = item.key.range[0];\n const valueEnd = item.value.range[1];\n const lineStart = content.lastIndexOf('\\n', keyStart - 1) + 1;\n return {\n replaceString: content.slice(keyStart, valueEnd),\n indentation: content.slice(lineStart, keyStart),\n };\n }\n }\n }\n\n return null;\n}\n\nfunction resolveResourceManifest(\n manifest: ResourceFluxManifest,\n helmRepositories: HelmRepository[],\n registryAliases: Record<string, string> | undefined,\n content: string,\n): PackageDependency[] {\n let docs: Document.Parsed[] | undefined;\n const deps: PackageDependency[] = [];\n for (const resource of manifest.resources) {\n switch (resource.kind) {\n case 'HelmRelease': {\n if (resource.spec.chartRef) {\n logger.trace(\n 'HelmRelease using chartRef was found, skipping as version will be handled via referenced resource directly',\n );\n } else if (resource.spec.chart) {\n const chartSpec = resource.spec.chart.spec;\n const depName = chartSpec.chart;\n const dep: PackageDependency = {\n depName,\n currentValue: resource.spec.chart.spec.version,\n datasource: HelmDatasource.id,\n };\n\n if (depName.startsWith('./')) {\n dep.skipReason = 'local-chart';\n delete dep.datasource;\n } else {\n const sourceRef = chartSpec.sourceRef;\n const matchingRepositories = helmRepositories.filter(\n (rep) =>\n rep.kind === sourceRef?.kind &&\n rep.metadata.name === sourceRef.name &&\n rep.metadata.namespace ===\n (sourceRef?.namespace ?? resource.metadata?.namespace),\n );\n resolveHelmRepository(\n dep,\n matchingRepositories,\n registryAliases,\n sourceRef?.name,\n );\n }\n deps.push(dep);\n } else {\n logger.debug(\n `invalid or incomplete ${resource.metadata.name} HelmRelease spec, skipping`,\n );\n }\n\n if (resource.spec.values) {\n logger.trace('detecting dependencies in HelmRelease values');\n deps.push(...findDependencies(resource.spec.values, registryAliases));\n }\n break;\n }\n\n case 'HelmChart': {\n if (resource.spec.sourceRef.kind === 'GitRepository') {\n logger.trace(\n 'HelmChart using GitRepository was found, skipping as version will be handled via referenced resource directly',\n );\n continue;\n }\n\n const dep: PackageDependency = {\n depName: resource.spec.chart,\n };\n\n if (resource.spec.sourceRef.kind === 'HelmRepository') {\n dep.currentValue = resource.spec.version;\n dep.datasource = HelmDatasource.id;\n\n const sourceRef = resource.spec.sourceRef;\n const matchingRepositories = helmRepositories.filter(\n (rep) =>\n rep.kind === sourceRef?.kind &&\n rep.metadata.name === sourceRef.name &&\n rep.metadata.namespace === resource.metadata?.namespace,\n );\n resolveHelmRepository(\n dep,\n matchingRepositories,\n registryAliases,\n sourceRef?.name,\n );\n } else {\n dep.skipReason = 'unsupported-datasource';\n }\n deps.push(dep);\n break;\n }\n\n case 'GitRepository': {\n const dep: PackageDependency = {\n depName: resource.metadata.name,\n };\n\n if (resource.spec.ref?.commit) {\n const gitUrl = resource.spec.url;\n dep.currentDigest = resource.spec.ref.commit;\n dep.datasource = GitRefsDatasource.id;\n dep.packageName = gitUrl;\n dep.replaceString = resource.spec.ref.commit;\n if (isHttpUrl(gitUrl)) {\n dep.sourceUrl = gitUrl.replace(regEx(/\\.git$/), '');\n }\n if (resource.spec.ref?.branch) {\n dep.currentValue = resource.spec.ref.branch;\n }\n } else if (resource.spec.ref?.tag) {\n dep.currentValue = resource.spec.ref.tag;\n resolveGitRepositoryPerSourceTag(dep, resource.spec.url);\n } else {\n dep.skipReason = 'unversioned-reference';\n }\n deps.push(dep);\n break;\n }\n case 'OCIRepository': {\n const container = removeOCIPrefix(resource.spec.url);\n if (resource.spec.ref?.digest && resource.spec.ref?.tag) {\n const combinedDep = getDep(\n `${container}@${resource.spec.ref.digest}`,\n false,\n registryAliases,\n );\n // Set currentValue to the tag so the docker datasource can look up the image's new digest\n combinedDep.currentValue = resource.spec.ref.tag;\n\n const refRange = extractOCIRefTagAndDigestRange(\n (docs ??= parseAllDocuments(content, { strict: false })),\n content,\n resource.metadata.name,\n );\n if (refRange) {\n combinedDep.replaceString = refRange.replaceString;\n if (refRange.tagFirst) {\n combinedDep.autoReplaceStringTemplate = refRange.replaceString\n .replace(resource.spec.ref.tag, '{{newValue}}')\n .replace(resource.spec.ref.digest, '{{newDigest}}');\n } else {\n combinedDep.autoReplaceStringTemplate = refRange.replaceString\n .replace(resource.spec.ref.digest, '{{newDigest}}')\n .replace(resource.spec.ref.tag, '{{newValue}}');\n }\n } else {\n logger.debug(\n { file: manifest.file, name: resource.metadata.name },\n 'Could not find tag/digest nodes in content, skipping replacement',\n );\n combinedDep.skipReason = 'invalid-value';\n }\n\n deps.push(combinedDep);\n } else if (resource.spec.ref?.digest) {\n const dep = getDep(\n `${container}@${resource.spec.ref.digest}`,\n false,\n registryAliases,\n );\n deps.push(dep);\n } else if (resource.spec.ref?.tag) {\n const dep = getDep(\n `${container}:${resource.spec.ref.tag}`,\n false,\n registryAliases,\n );\n const refTagRange = extractOCIRefTagRange(\n (docs ??= parseAllDocuments(content, { strict: false })),\n content,\n resource.metadata.name,\n );\n if (refTagRange) {\n dep.replaceString = refTagRange.replaceString;\n const newline = content.includes('\\r\\n') ? '\\r\\n' : '\\n';\n dep.autoReplaceStringTemplate = `${refTagRange.replaceString.replace(\n resource.spec.ref.tag,\n '{{newValue}}',\n )}{{#if newDigest}}${newline}${refTagRange.indentation}digest: {{newDigest}}{{/if}}`;\n } else {\n logger.debug(\n { file: manifest.file, name: resource.metadata.name },\n 'Unable to locate tag node for replacement (may be YAML alias or alias reference), digest pinning will not be possible',\n );\n dep.replaceString = resource.spec.ref.tag;\n dep.autoReplaceStringTemplate = '{{newValue}}';\n }\n deps.push(dep);\n } else {\n const dep = getDep(container, false, registryAliases);\n dep.skipReason = 'unversioned-reference';\n deps.push(dep);\n }\n break;\n }\n\n case 'Kustomization': {\n for (const image of coerceArray(resource.spec.images)) {\n const dep = extractImage(image, registryAliases);\n // v8 ignore else -- the schema rejects an image without a name\n if (dep) {\n deps.push(dep);\n }\n }\n }\n }\n }\n return deps;\n}\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n config?: ExtractConfig,\n): PackageFileContent<FluxManagerData> | null {\n const manifest = readManifest(content, packageFile);\n if (!manifest) {\n return null;\n }\n const helmRepositories = collectHelmRepos([manifest]);\n let deps: PackageDependency[] | null = null;\n switch (manifest.kind) {\n case 'system':\n deps = resolveSystemManifest(manifest);\n break;\n case 'resource': {\n deps = resolveResourceManifest(\n manifest,\n helmRepositories,\n config?.registryAliases,\n content,\n );\n break;\n }\n }\n return deps?.length ? { deps } : null;\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n packageFiles: string[],\n): Promise<PackageFile<FluxManagerData>[] | null> {\n const manifests: FluxManifest[] = [];\n const results: PackageFile<FluxManagerData>[] = [];\n\n for (const file of packageFiles) {\n const content = await readLocalFile(file, 'utf8');\n if (content) {\n const manifest = readManifest(content, file);\n if (manifest) {\n manifests.push(manifest);\n }\n }\n }\n\n const helmRepositories = collectHelmRepos(manifests);\n\n for (const manifest of manifests) {\n let deps: PackageDependency[] | null = null;\n switch (manifest.kind) {\n case 'system':\n deps = resolveSystemManifest(manifest);\n break;\n case 'resource': {\n deps = resolveResourceManifest(\n manifest,\n helmRepositories,\n config.registryAliases,\n manifest.content,\n );\n break;\n }\n }\n if (deps?.length) {\n results.push({\n packageFile: manifest.file,\n deps,\n });\n }\n }\n\n return results.length ? results : null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAS,aACP,SACA,aACqB;CACrB,IAAI,iBAAiB,WAAW,GAAG;EACjC,MAAM,eAAe,MAAM,yBAAyB,CAAC,CAAC,KAAK,OAAO;EAClE,IAAI,CAAC,cACH,OAAO;EAET,OAAO;GACL,MAAM;GACN,MAAM;GACN;GACA,SAAS,aAAa;GACtB,YAAY,aAAa;EAC3B;CACF;CAEA,OAAO;EACL,MAAM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ACH,OAAO,wBACL,UACA,kBACA,QAAQ,iBACR,OACF;CAGJ;CACA,OAAO,MAAM,SAAS,EAAE,KAAK,IAAI;AACnC;AAEA,eAAsB,uBACpB,QACA,cACgD;CAChD,MAAM,YAA4B,CAAC;CACnC,MAAM,UAA0C,CAAC;CAEjD,KAAK,MAAM,QAAQ,cAAc;EAC/B,MAAM,UAAU,MAAM,cAAc,MAAM,MAAM;EAChD,IAAI,SAAS;GACX,MAAM,WAAW,aAAa,SAAS,IAAI;GAC3C,IAAI,UACF,UAAU,KAAK,QAAQ;EAE3B;CACF;CAEA,MAAM,mBAAmB,iBAAiB,SAAS;CAEnD,KAAK,MAAM,YAAY,WAAW;EAChC,IAAI,OAAmC;EACvC,QAAQ,SAAS,MAAjB;GACE,KAAK;IACH,OAAO,sBAAsB,QAAQ;IACrC;GACF,KAAK,YACH,OAAO,wBACL,UACA,kBACA,OAAO,iBACP,SAAS,OACX;EAGJ;EACA,IAAI,MAAM,QACR,QAAQ,KAAK;GACX,aAAa,SAAS;GACtB;EACF,CAAC;CAEL;CAEA,OAAO,QAAQ,SAAS,UAAU;AACpC"}
1
+ {"version":3,"file":"extract.js","names":[],"sources":["../../../../lib/modules/manager/flux/extract.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport {\n type Document,\n type Scalar,\n type YAMLMap,\n isMap,\n isPair,\n isScalar,\n parseAllDocuments,\n} from 'yaml';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { isHttpUrl } from '../../../util/url.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { BitbucketTagsDatasource } from '../../datasource/bitbucket-tags/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 { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { HelmDatasource } from '../../datasource/helm/index.ts';\nimport { getDep } from '../dockerfile/extract.ts';\nimport { findDependencies } from '../helm-values/extract.ts';\nimport {\n getOciChartDep,\n isOCIRegistry,\n removeOCIPrefix,\n} from '../helmv3/oci.ts';\nimport { isLocalChartPath } from '../helmv3/utils.ts';\nimport { extractImage } from '../kustomize/extract.ts';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFile,\n PackageFileContent,\n} from '../types.ts';\nimport {\n collectHelmRepos,\n isSystemManifest,\n systemManifestHeaderRegex,\n} from './common.ts';\nimport { FluxResource, type HelmRepository } from './schema.ts';\nimport type {\n FluxManagerData,\n FluxManifest,\n ResourceFluxManifest,\n SystemFluxManifest,\n} from './types.ts';\n\nfunction readManifest(\n content: string,\n packageFile: string,\n): FluxManifest | null {\n if (isSystemManifest(packageFile)) {\n const versionMatch = regEx(systemManifestHeaderRegex).exec(content);\n if (!versionMatch) {\n return null;\n }\n return {\n kind: 'system',\n file: packageFile,\n content,\n version: versionMatch[1],\n components: versionMatch[2],\n };\n }\n\n return {\n kind: 'resource',\n file: packageFile,\n content,\n resources: parseYaml(content, {\n customSchema: FluxResource,\n failureBehaviour: 'filter',\n removeTemplates: true,\n }),\n };\n}\n\nconst githubUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)github\\.com[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\nconst gitlabUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)gitlab\\.com[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\nconst bitbucketUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)bitbucket\\.org[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\n\nfunction resolveGitRepositoryPerSourceTag(\n dep: PackageDependency,\n gitUrl: string,\n): void {\n const githubMatchGroups = githubUrlRegex.exec(gitUrl)?.groups;\n if (githubMatchGroups) {\n dep.datasource = GithubTagsDatasource.id;\n dep.packageName = githubMatchGroups.packageName;\n dep.sourceUrl = `https://github.com/${dep.packageName}`;\n return;\n }\n\n const gitlabMatchGroups = gitlabUrlRegex.exec(gitUrl)?.groups;\n if (gitlabMatchGroups) {\n dep.datasource = GitlabTagsDatasource.id;\n dep.packageName = gitlabMatchGroups.packageName;\n dep.sourceUrl = `https://gitlab.com/${dep.packageName}`;\n return;\n }\n\n const bitbucketMatchGroups = bitbucketUrlRegex.exec(gitUrl)?.groups;\n if (bitbucketMatchGroups) {\n dep.datasource = BitbucketTagsDatasource.id;\n dep.packageName = bitbucketMatchGroups.packageName;\n dep.sourceUrl = `https://bitbucket.org/${dep.packageName}`;\n return;\n }\n\n dep.datasource = GitTagsDatasource.id;\n dep.packageName = gitUrl;\n if (isHttpUrl(gitUrl)) {\n dep.sourceUrl = gitUrl.replace(regEx(/\\.git$/), '');\n }\n}\n\nfunction resolveHelmRepository(\n dep: PackageDependency,\n matchingRepositories: HelmRepository[],\n registryAliases: Record<string, string> | undefined,\n sourceRefName?: string,\n): void {\n if (matchingRepositories.length) {\n dep.registryUrls = matchingRepositories\n .map((repo) => {\n if (repo.spec.type === 'oci' || isOCIRegistry(repo.spec.url)) {\n Object.assign(\n dep,\n getOciChartDep(repo.spec.url, dep.depName, registryAliases),\n );\n return null;\n }\n return repo.spec.url;\n })\n .filter(isString);\n\n // if registryUrls is empty, delete it from dep\n if (!dep.registryUrls?.length) {\n delete dep.registryUrls;\n }\n return;\n }\n\n if (sourceRefName && registryAliases) {\n const aliasUrl = registryAliases[sourceRefName];\n if (aliasUrl) {\n if (isOCIRegistry(aliasUrl)) {\n // Treat alias value as an OCI registry URL\n Object.assign(\n dep,\n getOciChartDep(aliasUrl, dep.depName, registryAliases),\n );\n } else {\n dep.registryUrls = [aliasUrl];\n }\n return;\n }\n }\n\n dep.skipReason = 'unknown-registry';\n}\n\nfunction resolveSystemManifest(\n manifest: SystemFluxManifest,\n): PackageDependency<FluxManagerData>[] {\n return [\n {\n depName: 'fluxcd/flux2',\n datasource: GithubReleasesDatasource.id,\n currentValue: manifest.version,\n managerData: {\n components: manifest.components,\n },\n },\n ];\n}\n\n/**\n * Returns all `spec.ref` map nodes for OCIRepository resources matching `resourceName`.\n */\nfunction findOCIRefNodes(\n docs: Document.Parsed[],\n resourceName: string,\n): YAMLMap[] {\n const refNodes: YAMLMap[] = [];\n for (const doc of docs) {\n const docContents = doc.contents;\n if (!isMap(docContents)) {\n continue;\n }\n const kindNode = docContents.get('kind', true);\n if (\n !isScalar(kindNode) ||\n (kindNode.value as unknown) !== 'OCIRepository'\n ) {\n continue;\n }\n const nameNode = docContents.getIn(['metadata', 'name'], true);\n if (!isScalar(nameNode) || nameNode.value !== resourceName) {\n continue;\n }\n const specNode = docContents.get('spec');\n if (!isMap(specNode)) {\n continue;\n }\n const refNode = specNode.get('ref');\n if (isMap(refNode)) {\n refNodes.push(refNode);\n }\n }\n\n return refNodes;\n}\n\nfunction extractOCIRefTagAndDigestRange(\n docs: Document.Parsed[],\n content: string,\n resourceName: string,\n): { replaceString: string; tagFirst: boolean } | null {\n for (const refNode of findOCIRefNodes(docs, resourceName)) {\n let tagKey: Scalar | undefined;\n let tagValue: Scalar | undefined;\n let digestKey: Scalar | undefined;\n let digestValue: Scalar | undefined;\n\n for (const item of refNode.items) {\n if (!isPair(item) || !isScalar(item.key)) {\n continue;\n }\n if (item.key.value === 'tag' && isScalar(item.value)) {\n tagKey = item.key;\n tagValue = item.value;\n } else if (item.key.value === 'digest' && isScalar(item.value)) {\n digestKey = item.key;\n digestValue = item.value;\n }\n }\n\n if (\n !tagKey?.range ||\n !tagValue?.range ||\n !digestKey?.range ||\n !digestValue?.range\n ) {\n continue;\n }\n\n const tagFirst = tagKey.range[0] < digestKey.range[0];\n const start = tagFirst ? tagKey.range[0] : digestKey.range[0];\n const end = tagFirst ? digestValue.range[1] : tagValue.range[1];\n\n return { replaceString: content.slice(start, end), tagFirst };\n }\n\n return null;\n}\n\nfunction extractOCIRefTagRange(\n docs: Document.Parsed[],\n content: string,\n resourceName: string,\n): { replaceString: string; indentation: string } | null {\n for (const refNode of findOCIRefNodes(docs, resourceName)) {\n for (const item of refNode.items) {\n if (\n isPair(item) &&\n isScalar(item.key) &&\n item.key.value === 'tag' &&\n isScalar(item.value) &&\n item.key.range &&\n item.value.range\n ) {\n const keyStart = item.key.range[0];\n const valueEnd = item.value.range[1];\n const lineStart = content.lastIndexOf('\\n', keyStart - 1) + 1;\n return {\n replaceString: content.slice(keyStart, valueEnd),\n indentation: content.slice(lineStart, keyStart),\n };\n }\n }\n }\n\n return null;\n}\n\nfunction resolveResourceManifest(\n manifest: ResourceFluxManifest,\n helmRepositories: HelmRepository[],\n registryAliases: Record<string, string> | undefined,\n content: string,\n): PackageDependency[] {\n let docs: Document.Parsed[] | undefined;\n const deps: PackageDependency[] = [];\n for (const resource of manifest.resources) {\n switch (resource.kind) {\n case 'HelmRelease': {\n if (resource.spec.chartRef) {\n logger.trace(\n 'HelmRelease using chartRef was found, skipping as version will be handled via referenced resource directly',\n );\n } else if (resource.spec.chart) {\n const chartSpec = resource.spec.chart.spec;\n const depName = chartSpec.chart;\n const dep: PackageDependency = {\n depName,\n currentValue: resource.spec.chart.spec.version,\n datasource: HelmDatasource.id,\n };\n\n if (isLocalChartPath(depName)) {\n dep.skipReason = 'local-chart';\n delete dep.datasource;\n } else {\n const sourceRef = chartSpec.sourceRef;\n const matchingRepositories = helmRepositories.filter(\n (rep) =>\n rep.kind === sourceRef?.kind &&\n rep.metadata.name === sourceRef.name &&\n rep.metadata.namespace ===\n (sourceRef?.namespace ?? resource.metadata?.namespace),\n );\n resolveHelmRepository(\n dep,\n matchingRepositories,\n registryAliases,\n sourceRef?.name,\n );\n }\n deps.push(dep);\n } else {\n logger.debug(\n `invalid or incomplete ${resource.metadata.name} HelmRelease spec, skipping`,\n );\n }\n\n if (resource.spec.values) {\n logger.trace('detecting dependencies in HelmRelease values');\n deps.push(...findDependencies(resource.spec.values, registryAliases));\n }\n break;\n }\n\n case 'HelmChart': {\n if (resource.spec.sourceRef.kind === 'GitRepository') {\n logger.trace(\n 'HelmChart using GitRepository was found, skipping as version will be handled via referenced resource directly',\n );\n continue;\n }\n\n const dep: PackageDependency = {\n depName: resource.spec.chart,\n };\n\n if (resource.spec.sourceRef.kind === 'HelmRepository') {\n dep.currentValue = resource.spec.version;\n dep.datasource = HelmDatasource.id;\n\n const sourceRef = resource.spec.sourceRef;\n const matchingRepositories = helmRepositories.filter(\n (rep) =>\n rep.kind === sourceRef?.kind &&\n rep.metadata.name === sourceRef.name &&\n rep.metadata.namespace === resource.metadata?.namespace,\n );\n resolveHelmRepository(\n dep,\n matchingRepositories,\n registryAliases,\n sourceRef?.name,\n );\n } else {\n dep.skipReason = 'unsupported-datasource';\n }\n deps.push(dep);\n break;\n }\n\n case 'GitRepository': {\n const dep: PackageDependency = {\n depName: resource.metadata.name,\n };\n\n if (resource.spec.ref?.commit) {\n const gitUrl = resource.spec.url;\n dep.currentDigest = resource.spec.ref.commit;\n dep.datasource = GitRefsDatasource.id;\n dep.packageName = gitUrl;\n dep.replaceString = resource.spec.ref.commit;\n if (isHttpUrl(gitUrl)) {\n dep.sourceUrl = gitUrl.replace(regEx(/\\.git$/), '');\n }\n if (resource.spec.ref?.branch) {\n dep.currentValue = resource.spec.ref.branch;\n }\n } else if (resource.spec.ref?.tag) {\n dep.currentValue = resource.spec.ref.tag;\n resolveGitRepositoryPerSourceTag(dep, resource.spec.url);\n } else {\n dep.skipReason = 'unversioned-reference';\n }\n deps.push(dep);\n break;\n }\n case 'OCIRepository': {\n const container = removeOCIPrefix(resource.spec.url);\n if (resource.spec.ref?.digest && resource.spec.ref?.tag) {\n const combinedDep = getDep(\n `${container}@${resource.spec.ref.digest}`,\n false,\n registryAliases,\n );\n // Set currentValue to the tag so the docker datasource can look up the image's new digest\n combinedDep.currentValue = resource.spec.ref.tag;\n\n const refRange = extractOCIRefTagAndDigestRange(\n (docs ??= parseAllDocuments(content, { strict: false })),\n content,\n resource.metadata.name,\n );\n if (refRange) {\n combinedDep.replaceString = refRange.replaceString;\n if (refRange.tagFirst) {\n combinedDep.autoReplaceStringTemplate = refRange.replaceString\n .replace(resource.spec.ref.tag, '{{newValue}}')\n .replace(resource.spec.ref.digest, '{{newDigest}}');\n } else {\n combinedDep.autoReplaceStringTemplate = refRange.replaceString\n .replace(resource.spec.ref.digest, '{{newDigest}}')\n .replace(resource.spec.ref.tag, '{{newValue}}');\n }\n } else {\n logger.debug(\n { file: manifest.file, name: resource.metadata.name },\n 'Could not find tag/digest nodes in content, skipping replacement',\n );\n combinedDep.skipReason = 'invalid-value';\n }\n\n deps.push(combinedDep);\n } else if (resource.spec.ref?.digest) {\n const dep = getDep(\n `${container}@${resource.spec.ref.digest}`,\n false,\n registryAliases,\n );\n deps.push(dep);\n } else if (resource.spec.ref?.tag) {\n const dep = getDep(\n `${container}:${resource.spec.ref.tag}`,\n false,\n registryAliases,\n );\n const refTagRange = extractOCIRefTagRange(\n (docs ??= parseAllDocuments(content, { strict: false })),\n content,\n resource.metadata.name,\n );\n if (refTagRange) {\n dep.replaceString = refTagRange.replaceString;\n const newline = content.includes('\\r\\n') ? '\\r\\n' : '\\n';\n dep.autoReplaceStringTemplate = `${refTagRange.replaceString.replace(\n resource.spec.ref.tag,\n '{{newValue}}',\n )}{{#if newDigest}}${newline}${refTagRange.indentation}digest: {{newDigest}}{{/if}}`;\n } else {\n logger.debug(\n { file: manifest.file, name: resource.metadata.name },\n 'Unable to locate tag node for replacement (may be YAML alias or alias reference), digest pinning will not be possible',\n );\n dep.replaceString = resource.spec.ref.tag;\n dep.autoReplaceStringTemplate = '{{newValue}}';\n }\n deps.push(dep);\n } else {\n const dep = getDep(container, false, registryAliases);\n dep.skipReason = 'unversioned-reference';\n deps.push(dep);\n }\n break;\n }\n\n case 'Kustomization': {\n for (const image of coerceArray(resource.spec.images)) {\n const dep = extractImage(image, registryAliases);\n // v8 ignore else -- the schema rejects an image without a name\n if (dep) {\n deps.push(dep);\n }\n }\n }\n }\n }\n return deps;\n}\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n config?: ExtractConfig,\n): PackageFileContent<FluxManagerData> | null {\n const manifest = readManifest(content, packageFile);\n if (!manifest) {\n return null;\n }\n const helmRepositories = collectHelmRepos([manifest]);\n let deps: PackageDependency[] | null = null;\n switch (manifest.kind) {\n case 'system':\n deps = resolveSystemManifest(manifest);\n break;\n case 'resource': {\n deps = resolveResourceManifest(\n manifest,\n helmRepositories,\n config?.registryAliases,\n content,\n );\n break;\n }\n }\n return deps?.length ? { deps } : null;\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n packageFiles: string[],\n): Promise<PackageFile<FluxManagerData>[] | null> {\n const manifests: FluxManifest[] = [];\n const results: PackageFile<FluxManagerData>[] = [];\n\n for (const file of packageFiles) {\n const content = await readLocalFile(file, 'utf8');\n if (content) {\n const manifest = readManifest(content, file);\n if (manifest) {\n manifests.push(manifest);\n }\n }\n }\n\n const helmRepositories = collectHelmRepos(manifests);\n\n for (const manifest of manifests) {\n let deps: PackageDependency[] | null = null;\n switch (manifest.kind) {\n case 'system':\n deps = resolveSystemManifest(manifest);\n break;\n case 'resource': {\n deps = resolveResourceManifest(\n manifest,\n helmRepositories,\n config.registryAliases,\n manifest.content,\n );\n break;\n }\n }\n if (deps?.length) {\n results.push({\n packageFile: manifest.file,\n deps,\n });\n }\n }\n\n return results.length ? results : null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmDA,SAAS,aACP,SACA,aACqB;CACrB,IAAI,iBAAiB,WAAW,GAAG;EACjC,MAAM,eAAe,MAAM,yBAAyB,CAAC,CAAC,KAAK,OAAO;EAClE,IAAI,CAAC,cACH,OAAO;EAET,OAAO;GACL,MAAM;GACN,MAAM;GACN;GACA,SAAS,aAAa;GACtB,YAAY,aAAa;EAC3B;CACF;CAEA,OAAO;EACL,MAAM;EACN,M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ACL,UACA,kBACA,QAAQ,iBACR,OACF;CAGJ;CACA,OAAO,MAAM,SAAS,EAAE,KAAK,IAAI;AACnC;AAEA,eAAsB,uBACpB,QACA,cACgD;CAChD,MAAM,YAA4B,CAAC;CACnC,MAAM,UAA0C,CAAC;CAEjD,KAAK,MAAM,QAAQ,cAAc;EAC/B,MAAM,UAAU,MAAM,cAAc,MAAM,MAAM;EAChD,IAAI,SAAS;GACX,MAAM,WAAW,aAAa,SAAS,IAAI;GAC3C,IAAI,UACF,UAAU,KAAK,QAAQ;EAE3B;CACF;CAEA,MAAM,mBAAmB,iBAAiB,SAAS;CAEnD,KAAK,MAAM,YAAY,WAAW;EAChC,IAAI,OAAmC;EACvC,QAAQ,SAAS,MAAjB;GACE,KAAK;IACH,OAAO,sBAAsB,QAAQ;IACrC;GACF,KAAK,YACH,OAAO,wBACL,UACA,kBACA,OAAO,iBACP,SAAS,OACX;EAGJ;EACA,IAAI,MAAM,QACR,QAAQ,KAAK;GACX,aAAa,SAAS;GACtB;EACF,CAAC;CAEL;CAEA,OAAO,QAAQ,SAAS,UAAU;AACpC"}
@@ -1,5 +1,4 @@
1
1
  import "../../../constants/error-messages.js";
2
- import { regEx } from "../../../util/regex.js";
3
2
  import { coerceArray } from "../../../util/array.js";
4
3
  import { logger } from "../../../logger/index.js";
5
4
  import { parseYaml } from "../../../util/yaml.js";
@@ -8,9 +7,9 @@ import { Result } from "../../../util/result.js";
8
7
  import { exec } from "../../../util/exec/index.js";
9
8
  import { getFile } from "../../../util/git/index.js";
10
9
  import { artifactErrorResult, resolveToolConstraint, updateLockFile } from "../util.js";
11
- import { generateHelmEnvs } from "../helmv3/common.js";
10
+ import { generateHelmEnvs, generateRegistryLoginCmd } from "../helmv3/common.js";
12
11
  import { Doc, LockVersion } from "./schema.js";
13
- import { generateRegistryLoginCmd, isOCIRegistry } from "./utils.js";
12
+ import { isOciRepositoryFlagSet } from "./utils.js";
14
13
  import { isFalsy } from "@sindresorhus/is";
15
14
  import { quote } from "shlex";
16
15
  //#region lib/modules/manager/helmfile/artifacts.ts
@@ -28,9 +27,10 @@ async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileCon
28
27
  return null;
29
28
  }
30
29
  try {
30
+ const helmConstraint = await resolveToolConstraint(config, "helm");
31
31
  const toolConstraints = [{
32
32
  toolName: "helm",
33
- constraint: await resolveToolConstraint(config, "helm")
33
+ constraint: helmConstraint
34
34
  }, {
35
35
  toolName: "helmfile",
36
36
  constraint: await resolveToolConstraint(config, "helmfile", () => Result.parse(existingLockFileContent, LockVersion).unwrapOrNull())
@@ -45,8 +45,8 @@ async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileCon
45
45
  customSchema: Doc,
46
46
  failureBehaviour: "filter"
47
47
  });
48
- for (const doc of docs) for (const value of coerceArray(doc.repositories).filter(isOCIRegistry)) {
49
- const loginCmd = await generateRegistryLoginCmd(value.name, `https://${value.url}`, value.url.replace(regEx(/\/.*/), ""));
48
+ for (const doc of docs) for (const value of coerceArray(doc.repositories).filter(isOciRepositoryFlagSet)) {
49
+ const loginCmd = await generateRegistryLoginCmd(value.name, value.url);
50
50
  // v8 ignore else -- needs a repository the login helper cannot handle
51
51
  if (loginCmd) cmd.push(loginCmd);
52
52
  }
@@ -60,7 +60,7 @@ async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileCon
60
60
  },
61
61
  run: () => exec(cmd, {
62
62
  docker: {},
63
- extraEnv: generateHelmEnvs(),
63
+ extraEnv: generateHelmEnvs(helmConstraint),
64
64
  toolConstraints
65
65
  })
66
66
  });
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","names":[],"sources":["../../../../lib/modules/manager/helmfile/artifacts.ts"],"sourcesContent":["import { isFalsy } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { exec } from '../../../util/exec/index.ts';\nimport type { ToolConstraint } from '../../../util/exec/types.ts';\nimport { getSiblingFileName } from '../../../util/fs/index.ts';\nimport { getFile } from '../../../util/git/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { Result } from '../../../util/result.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { generateHelmEnvs } from '../helmv3/common.ts';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\nimport {\n artifactErrorResult,\n resolveToolConstraint,\n updateLockFile,\n} from '../util.ts';\nimport { Doc, LockVersion } from './schema.ts';\nimport { generateRegistryLoginCmd, isOCIRegistry } from './utils.ts';\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.trace(`helmfile.updateArtifacts(${packageFileName})`);\n\n const { isLockFileMaintenance } = config;\n if (\n !isLockFileMaintenance &&\n (updatedDeps === undefined || updatedDeps.length < 1)\n ) {\n logger.debug('No updated helmfile deps - returning null');\n return null;\n }\n\n const lockFileName = getSiblingFileName(packageFileName, 'helmfile.lock');\n const existingLockFileContent = await getFile(lockFileName);\n\n if (isFalsy(existingLockFileContent)) {\n logger.debug('No helmfile.lock found');\n return null;\n }\n\n try {\n const toolConstraints: ToolConstraint[] = [\n {\n toolName: 'helm',\n constraint: await resolveToolConstraint(config, 'helm'),\n },\n {\n toolName: 'helmfile',\n constraint: await resolveToolConstraint(config, 'helmfile', () =>\n Result.parse(existingLockFileContent, LockVersion).unwrapOrNull(),\n ),\n },\n ];\n const needKustomize = updatedDeps.some(\n (dep) => dep.managerData?.needKustomize,\n );\n if (needKustomize) {\n toolConstraints.push({\n toolName: 'kustomize',\n constraint: await resolveToolConstraint(config, 'kustomize'),\n });\n }\n\n const cmd: string[] = [];\n const docs = parseYaml(newPackageFileContent, {\n removeTemplates: true,\n customSchema: Doc,\n failureBehaviour: 'filter',\n });\n\n for (const doc of docs) {\n for (const value of coerceArray(doc.repositories).filter(isOCIRegistry)) {\n const loginCmd = await generateRegistryLoginCmd(\n value.name,\n `https://${value.url}`,\n // this extracts the hostname from url like format ghcr.ip/helm-charts\n value.url.replace(regEx(/\\/.*/), ''),\n );\n\n // v8 ignore else -- needs a repository the login helper cannot handle\n if (loginCmd) {\n cmd.push(loginCmd);\n }\n }\n }\n\n cmd.push(`helmfile deps -f ${quote(packageFileName)}`);\n\n return await updateLockFile({\n lockFileName,\n existingLockFileContent,\n packageFile: { path: packageFileName, contents: newPackageFileContent },\n run: () =>\n exec(cmd, {\n docker: {},\n extraEnv: generateHelmEnvs(),\n toolConstraints,\n }),\n });\n } catch (err) {\n /* v8 ignore if -- defensive rethrow, not reproduced in the helmfile specs */\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update Helmfile lock file');\n return artifactErrorResult(lockFileName, err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,eAAsB,gBAAgB,EACpC,iBACA,aACA,uBACA,UAC0D;CAC1D,OAAO,MAAM,4BAA4B,gBAAgB,EAAE;CAE3D,MAAM,EAAE,0BAA0B;CAClC,IACE,CAAC,0BACA,gBAAgB,KAAA,KAAa,YAAY,SAAS,IACnD;EACA,OAAO,MAAM,2CAA2C;EACxD,OAAO;CACT;CAEA,MAAM,eAAe,mBAAmB,iBAAiB,eAAe;CACxE,MAAM,0BAA0B,MAAM,QAAQ,YAAY;CAE1D,IAAI,QAAQ,uBAAuB,GAAG;EACpC,OAAO,MAAM,wBAAwB;EACrC,OAAO;CACT;CAEA,IAAI;EACF,MAAM,kBAAoC,CACxC;GACE,UAAU;GACV,YAAY,MAAM,sBAAsB,QAAQ,MAAM;EACxD,GACA;GACE,UAAU;GACV,YAAY,MAAM,sBAAsB,QAAQ,kBAC9C,OAAO,MAAM,yBAAyB,WAAW,CAAC,CAAC,aAAa,CAClE;EACF,CACF;EAIA,IAHsB,YAAY,MAC/B,QAAQ,IAAI,aAAa,aAEZ,GACd,gBAAgB,KAAK;GACnB,UAAU;GACV,YAAY,MAAM,sBAAsB,QAAQ,WAAW;EAC7D,CAAC;EAGH,MAAM,MAAgB,CAAC;EACvB,MAAM,OAAO,UAAU,uBAAuB;GAC5C,iBAAiB;GACjB,cAAc;GACd,kBAAkB;EACpB,CAAC;EAED,KAAK,MAAM,OAAO,MAChB,KAAK,MAAM,SAAS,YAAY,IAAI,YAAY,CAAC,CAAC,OAAO,aAAa,GAAG;GACvE,MAAM,WAAW,MAAM,yBACrB,MAAM,MACN,WAAW,MAAM,OAEjB,MAAM,IAAI,QAAQ,MAAM,MAAM,GAAG,EAAE,CACrC;;GAGA,IAAI,UACF,IAAI,KAAK,QAAQ;EAErB;EAGF,IAAI,KAAK,oBAAoB,MAAM,eAAe,GAAG;EAErD,OAAO,MAAM,eAAe;GAC1B;GACA;GACA,aAAa;IAAE,MAAM;IAAiB,UAAU;GAAsB;GACtE,WACE,KAAK,KAAK;IACR,QAAQ,CAAC;IACT,UAAU,iBAAiB;IAC3B;GACF,CAAC;EACL,CAAC;CACH,SAAS,KAAK;;EAEZ,IAAI,IAAI,YAAA,mBACN,MAAM;EAER,OAAO,MAAM,EAAE,IAAI,GAAG,qCAAqC;EAC3D,OAAO,oBAAoB,cAAc,GAAG;CAC9C;AACF"}
1
+ {"version":3,"file":"artifacts.js","names":[],"sources":["../../../../lib/modules/manager/helmfile/artifacts.ts"],"sourcesContent":["import { isFalsy } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { exec } from '../../../util/exec/index.ts';\nimport type { ToolConstraint } from '../../../util/exec/types.ts';\nimport { getSiblingFileName } from '../../../util/fs/index.ts';\nimport { getFile } from '../../../util/git/index.ts';\nimport { Result } from '../../../util/result.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport {\n generateHelmEnvs,\n generateRegistryLoginCmd,\n} from '../helmv3/common.ts';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\nimport {\n artifactErrorResult,\n resolveToolConstraint,\n updateLockFile,\n} from '../util.ts';\nimport { Doc, LockVersion } from './schema.ts';\nimport { isOciRepositoryFlagSet } from './utils.ts';\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.trace(`helmfile.updateArtifacts(${packageFileName})`);\n\n const { isLockFileMaintenance } = config;\n if (\n !isLockFileMaintenance &&\n (updatedDeps === undefined || updatedDeps.length < 1)\n ) {\n logger.debug('No updated helmfile deps - returning null');\n return null;\n }\n\n const lockFileName = getSiblingFileName(packageFileName, 'helmfile.lock');\n const existingLockFileContent = await getFile(lockFileName);\n\n if (isFalsy(existingLockFileContent)) {\n logger.debug('No helmfile.lock found');\n return null;\n }\n\n try {\n const helmConstraint = await resolveToolConstraint(config, 'helm');\n const toolConstraints: ToolConstraint[] = [\n {\n toolName: 'helm',\n constraint: helmConstraint,\n },\n {\n toolName: 'helmfile',\n constraint: await resolveToolConstraint(config, 'helmfile', () =>\n Result.parse(existingLockFileContent, LockVersion).unwrapOrNull(),\n ),\n },\n ];\n const needKustomize = updatedDeps.some(\n (dep) => dep.managerData?.needKustomize,\n );\n if (needKustomize) {\n toolConstraints.push({\n toolName: 'kustomize',\n constraint: await resolveToolConstraint(config, 'kustomize'),\n });\n }\n\n const cmd: string[] = [];\n const docs = parseYaml(newPackageFileContent, {\n removeTemplates: true,\n customSchema: Doc,\n failureBehaviour: 'filter',\n });\n\n for (const doc of docs) {\n for (const value of coerceArray(doc.repositories).filter(\n isOciRepositoryFlagSet,\n )) {\n const loginCmd = await generateRegistryLoginCmd(value.name, value.url);\n\n // v8 ignore else -- needs a repository the login helper cannot handle\n if (loginCmd) {\n cmd.push(loginCmd);\n }\n }\n }\n\n cmd.push(`helmfile deps -f ${quote(packageFileName)}`);\n\n return await updateLockFile({\n lockFileName,\n existingLockFileContent,\n packageFile: { path: packageFileName, contents: newPackageFileContent },\n run: () =>\n exec(cmd, {\n docker: {},\n extraEnv: generateHelmEnvs(helmConstraint),\n toolConstraints,\n }),\n });\n } catch (err) {\n /* v8 ignore if -- defensive rethrow, not reproduced in the helmfile specs */\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update Helmfile lock file');\n return artifactErrorResult(lockFileName, err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,eAAsB,gBAAgB,EACpC,iBACA,aACA,uBACA,UAC0D;CAC1D,OAAO,MAAM,4BAA4B,gBAAgB,EAAE;CAE3D,MAAM,EAAE,0BAA0B;CAClC,IACE,CAAC,0BACA,gBAAgB,KAAA,KAAa,YAAY,SAAS,IACnD;EACA,OAAO,MAAM,2CAA2C;EACxD,OAAO;CACT;CAEA,MAAM,eAAe,mBAAmB,iBAAiB,eAAe;CACxE,MAAM,0BAA0B,MAAM,QAAQ,YAAY;CAE1D,IAAI,QAAQ,uBAAuB,GAAG;EACpC,OAAO,MAAM,wBAAwB;EACrC,OAAO;CACT;CAEA,IAAI;EACF,MAAM,iBAAiB,MAAM,sBAAsB,QAAQ,MAAM;EACjE,MAAM,kBAAoC,CACxC;GACE,UAAU;GACV,YAAY;EACd,GACA;GACE,UAAU;GACV,YAAY,MAAM,sBAAsB,QAAQ,kBAC9C,OAAO,MAAM,yBAAyB,WAAW,CAAC,CAAC,aAAa,CAClE;EACF,CACF;EAIA,IAHsB,YAAY,MAC/B,QAAQ,IAAI,aAAa,aAEZ,GACd,gBAAgB,KAAK;GACnB,UAAU;GACV,YAAY,MAAM,sBAAsB,QAAQ,WAAW;EAC7D,CAAC;EAGH,MAAM,MAAgB,CAAC;EACvB,MAAM,OAAO,UAAU,uBAAuB;GAC5C,iBAAiB;GACjB,cAAc;GACd,kBAAkB;EACpB,CAAC;EAED,KAAK,MAAM,OAAO,MAChB,KAAK,MAAM,SAAS,YAAY,IAAI,YAAY,CAAC,CAAC,OAChD,sBACF,GAAG;GACD,MAAM,WAAW,MAAM,yBAAyB,MAAM,MAAM,MAAM,GAAG;;GAGrE,IAAI,UACF,IAAI,KAAK,QAAQ;EAErB;EAGF,IAAI,KAAK,oBAAoB,MAAM,eAAe,GAAG;EAErD,OAAO,MAAM,eAAe;GAC1B;GACA;GACA,aAAa;IAAE,MAAM;IAAiB,UAAU;GAAsB;GACtE,WACE,KAAK,KAAK;IACR,QAAQ,CAAC;IACT,UAAU,iBAAiB,cAAc;IACzC;GACF,CAAC;EACL,CAAC;CACH,SAAS,KAAK;;EAEZ,IAAI,IAAI,YAAA,mBACN,MAAM;EAER,OAAO,MAAM,EAAE,IAAI,GAAG,qCAAqC;EAC3D,OAAO,oBAAoB,cAAc,GAAG;CAC9C;AACF"}
@@ -6,6 +6,7 @@ import { parseYaml } from "../../../util/yaml.js";
6
6
  import { DockerDatasource } from "../../datasource/docker/index.js";
7
7
  import { HelmDatasource } from "../../datasource/helm/index.js";
8
8
  import { getOciChartDep, isOCIRegistry, removeOCIPrefix } from "../helmv3/oci.js";
9
+ import { isLocalChartPath } from "../helmv3/utils.js";
9
10
  import { Doc } from "./schema.js";
10
11
  import { kustomizationsKeysUsed, localChartHasKustomizationsYaml } from "./utils.js";
11
12
  import { isEmptyArray, isString } from "@sindresorhus/is";
@@ -14,13 +15,6 @@ function isValidChartName(name, oci) {
14
15
  if (oci) return !!name && !regEx(/[!@#$%^&*(),.?":{}|<>A-Z]/).test(name);
15
16
  return !!name && !regEx(/[!@#$%^&*(),.?":{}/|<>A-Z]/).test(name);
16
17
  }
17
- function isLocalPath(possiblePath) {
18
- return [
19
- "./",
20
- "../",
21
- "/"
22
- ].some((localPrefix) => possiblePath.startsWith(localPrefix));
23
- }
24
18
  async function extractPackageFile(content, packageFile, config) {
25
19
  const deps = [];
26
20
  let registryData = {};
@@ -52,7 +46,7 @@ async function extractPackageFile(content, packageFile, config) {
52
46
  let depName = dep.chart;
53
47
  let ociDep = null;
54
48
  let repoName = null;
55
- if (isLocalPath(dep.chart)) {
49
+ if (isLocalChartPath(dep.chart)) {
56
50
  if (kustomizationsKeysUsed(dep) || await localChartHasKustomizationsYaml(dep, packageFile)) needKustomize = true;
57
51
  deps.push({
58
52
  depName: dep.name,
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","names":["Document"],"sources":["../../../../lib/modules/manager/helmfile/extract.ts"],"sourcesContent":["import { isEmptyArray, isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { coerceObject } from '../../../util/object.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { HelmDatasource } from '../../datasource/helm/index.ts';\nimport {\n getOciChartDep,\n isOCIRegistry,\n removeOCIPrefix,\n} from '../helmv3/oci.ts';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFileContent,\n} from '../types.ts';\nimport type { Doc, HelmRepository } from './schema.ts';\nimport { Doc as Document } from './schema.ts';\nimport {\n kustomizationsKeysUsed,\n localChartHasKustomizationsYaml,\n} from './utils.ts';\n\nfunction isValidChartName(name: string | undefined, oci: boolean): boolean {\n if (oci) {\n return !!name && !regEx(/[!@#$%^&*(),.?\":{}|<>A-Z]/).test(name);\n }\n return !!name && !regEx(/[!@#$%^&*(),.?\":{}/|<>A-Z]/).test(name);\n}\n\nfunction isLocalPath(possiblePath: string): boolean {\n return ['./', '../', '/'].some((localPrefix) =>\n possiblePath.startsWith(localPrefix),\n );\n}\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): Promise<PackageFileContent | null> {\n const deps: PackageDependency[] = [];\n let registryData: Record<string, HelmRepository> = {};\n // Record kustomization usage for all deps, since updating artifacts is run on the helmfile.yaml as a whole.\n let needKustomize = false;\n const docs: Doc[] = parseYaml(content, {\n customSchema: Document,\n failureBehaviour: 'filter',\n removeTemplates: true,\n });\n\n for (const doc of docs) {\n // Always check for repositories in the current document and override the existing ones if any (as YAML does)\n if (doc.repositories) {\n registryData = {};\n for (const repo of doc.repositories) {\n if (repo.url?.startsWith('git+')) {\n logger.debug(\n { repo, packageFile },\n `Skipping unsupported helm-git repository.`,\n );\n continue;\n }\n registryData[repo.name] = repo;\n }\n logger.debug(\n { registryAliases: registryData, packageFile },\n `repositories discovered.`,\n );\n }\n\n for (const dep of [\n ...coerceArray(doc.releases),\n ...Object.values(coerceObject(doc.templates)),\n ]) {\n let depName = dep.chart;\n let ociDep: PackageDependency | null = null;\n let repoName: string | null = null;\n\n // If it starts with ./ ../ or / then it's a local path\n if (isLocalPath(dep.chart)) {\n if (\n kustomizationsKeysUsed(dep) ||\n (await localChartHasKustomizationsYaml(dep, packageFile))\n ) {\n needKustomize = true;\n }\n deps.push({\n depName: dep.name,\n skipReason: 'local-chart',\n });\n continue;\n }\n\n if (isOCIRegistry(dep.chart)) {\n depName = removeOCIPrefix(dep.chart);\n ociDep = getOciChartDep(dep.chart, undefined, config.registryAliases);\n } else {\n if (dep.chart.includes('/')) {\n const v = dep.chart.split('/');\n repoName = v.shift()!;\n depName = v.join('/');\n } else {\n repoName = dep.chart;\n }\n const registry = registryData[repoName];\n if (registry?.oci) {\n ociDep = getOciChartDep(\n registry.url,\n depName,\n config.registryAliases,\n );\n repoName = null;\n }\n }\n\n if (!isString(dep.version)) {\n deps.push({\n depName,\n skipReason: 'invalid-version',\n });\n continue;\n }\n\n const res: PackageDependency = {\n depName,\n currentValue: dep.version,\n };\n if (kustomizationsKeysUsed(dep)) {\n needKustomize = true;\n }\n if (ociDep) {\n Object.assign(res, ociDep);\n } else if (repoName) {\n res.registryUrls = [registryData[repoName]?.url]\n .concat([config.registryAliases?.[repoName]] as string[])\n .filter(isString);\n }\n\n // By definition on helm the chart name should be lowercase letter + number + -\n // However helmfile support templating of that field\n if (\n !isValidChartName(\n isOCIRegistry(dep.chart)\n ? depName.slice(depName.lastIndexOf('/') + 1)\n : depName,\n !!ociDep,\n )\n ) {\n res.skipReason = 'unsupported-chart-type';\n }\n\n // Skip in case we cannot locate the registry\n if (\n res.datasource !== DockerDatasource.id &&\n isEmptyArray(res.registryUrls)\n ) {\n res.skipReason = 'unknown-registry';\n }\n\n deps.push(res);\n }\n }\n\n return deps.length\n ? {\n deps,\n datasource: HelmDatasource.id,\n ...(needKustomize && { managerData: { needKustomize } }),\n }\n : null;\n}\n"],"mappings":";;;;;;;;;;;;AAyBA,SAAS,iBAAiB,MAA0B,KAAuB;CACzE,IAAI,KACF,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,2BAA2B,CAAC,CAAC,KAAK,IAAI;CAEhE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,4BAA4B,CAAC,CAAC,KAAK,IAAI;AACjE;AAEA,SAAS,YAAY,cAA+B;CAClD,OAAO;EAAC;EAAM;EAAO;CAAG,CAAC,CAAC,MAAM,gBAC9B,aAAa,WAAW,WAAW,CACrC;AACF;AAEA,eAAsB,mBACpB,SACA,aACA,QACoC;CACpC,MAAM,OAA4B,CAAC;CACnC,IAAI,eAA+C,CAAC;CAEpD,IAAI,gBAAgB;CACpB,MAAM,OAAc,UAAU,SAAS;EACrC,cAAcA;EACd,kBAAkB;EAClB,iBAAiB;CACnB,CAAC;CAED,KAAK,MAAM,OAAO,MAAM;EAEtB,IAAI,IAAI,cAAc;GACpB,eAAe,CAAC;GAChB,KAAK,MAAM,QAAQ,IAAI,cAAc;IACnC,IAAI,KAAK,KAAK,WAAW,MAAM,GAAG;KAChC,OAAO,MACL;MAAE;MAAM;KAAY,GACpB,2CACF;KACA;IACF;IACA,aAAa,KAAK,QAAQ;GAC5B;GACA,OAAO,MACL;IAAE,iBAAiB;IAAc;GAAY,GAC7C,0BACF;EACF;EAEA,KAAK,MAAM,OAAO,CAChB,GAAG,YAAY,IAAI,QAAQ,GAC3B,GAAG,OAAO,OAAO,aAAa,IAAI,SAAS,CAAC,CAC9C,GAAG;GACD,IAAI,UAAU,I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K,GAAG;EACf;CACF;CAEA,OAAO,KAAK,SACR;EACE;EACA,YAAY,eAAe;EAC3B,GAAI,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE;CACxD,IACA;AACN"}
1
+ {"version":3,"file":"extract.js","names":["Document"],"sources":["../../../../lib/modules/manager/helmfile/extract.ts"],"sourcesContent":["import { isEmptyArray, isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { coerceObject } from '../../../util/object.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { HelmDatasource } from '../../datasource/helm/index.ts';\nimport {\n getOciChartDep,\n isOCIRegistry,\n removeOCIPrefix,\n} from '../helmv3/oci.ts';\nimport { isLocalChartPath } from '../helmv3/utils.ts';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFileContent,\n} from '../types.ts';\nimport type { Doc, HelmRepository } from './schema.ts';\nimport { Doc as Document } from './schema.ts';\nimport {\n kustomizationsKeysUsed,\n localChartHasKustomizationsYaml,\n} from './utils.ts';\n\nfunction isValidChartName(name: string | undefined, oci: boolean): boolean {\n if (oci) {\n return !!name && !regEx(/[!@#$%^&*(),.?\":{}|<>A-Z]/).test(name);\n }\n return !!name && !regEx(/[!@#$%^&*(),.?\":{}/|<>A-Z]/).test(name);\n}\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): Promise<PackageFileContent | null> {\n const deps: PackageDependency[] = [];\n let registryData: Record<string, HelmRepository> = {};\n // Record kustomization usage for all deps, since updating artifacts is run on the helmfile.yaml as a whole.\n let needKustomize = false;\n const docs: Doc[] = parseYaml(content, {\n customSchema: Document,\n failureBehaviour: 'filter',\n removeTemplates: true,\n });\n\n for (const doc of docs) {\n // Always check for repositories in the current document and override the existing ones if any (as YAML does)\n if (doc.repositories) {\n registryData = {};\n for (const repo of doc.repositories) {\n if (repo.url?.startsWith('git+')) {\n logger.debug(\n { repo, packageFile },\n `Skipping unsupported helm-git repository.`,\n );\n continue;\n }\n registryData[repo.name] = repo;\n }\n logger.debug(\n { registryAliases: registryData, packageFile },\n `repositories discovered.`,\n );\n }\n\n for (const dep of [\n ...coerceArray(doc.releases),\n ...Object.values(coerceObject(doc.templates)),\n ]) {\n let depName = dep.chart;\n let ociDep: PackageDependency | null = null;\n let repoName: string | null = null;\n\n // If it starts with ./ ../ or / then it's a local path\n if (isLocalChartPath(dep.chart)) {\n if (\n kustomizationsKeysUsed(dep) ||\n (await localChartHasKustomizationsYaml(dep, packageFile))\n ) {\n needKustomize = true;\n }\n deps.push({\n depName: dep.name,\n skipReason: 'local-chart',\n });\n continue;\n }\n\n if (isOCIRegistry(dep.chart)) {\n depName = removeOCIPrefix(dep.chart);\n ociDep = getOciChartDep(dep.chart, undefined, config.registryAliases);\n } else {\n if (dep.chart.includes('/')) {\n const v = dep.chart.split('/');\n repoName = v.shift()!;\n depName = v.join('/');\n } else {\n repoName = dep.chart;\n }\n const registry = registryData[repoName];\n if (registry?.oci) {\n ociDep = getOciChartDep(\n registry.url,\n depName,\n config.registryAliases,\n );\n repoName = null;\n }\n }\n\n if (!isString(dep.version)) {\n deps.push({\n depName,\n skipReason: 'invalid-version',\n });\n continue;\n }\n\n const res: PackageDependency = {\n depName,\n currentValue: dep.version,\n };\n if (kustomizationsKeysUsed(dep)) {\n needKustomize = true;\n }\n if (ociDep) {\n Object.assign(res, ociDep);\n } else if (repoName) {\n res.registryUrls = [registryData[repoName]?.url]\n .concat([config.registryAliases?.[repoName]] as string[])\n .filter(isString);\n }\n\n // By definition on helm the chart name should be lowercase letter + number + -\n // However helmfile support templating of that field\n if (\n !isValidChartName(\n isOCIRegistry(dep.chart)\n ? depName.slice(depName.lastIndexOf('/') + 1)\n : depName,\n !!ociDep,\n )\n ) {\n res.skipReason = 'unsupported-chart-type';\n }\n\n // Skip in case we cannot locate the registry\n if (\n res.datasource !== DockerDatasource.id &&\n isEmptyArray(res.registryUrls)\n ) {\n res.skipReason = 'unknown-registry';\n }\n\n deps.push(res);\n }\n }\n\n return deps.length\n ? {\n deps,\n datasource: HelmDatasource.id,\n ...(needKustomize && { managerData: { needKustomize } }),\n }\n : null;\n}\n"],"mappings":";;;;;;;;;;;;;AA0BA,SAAS,iBAAiB,MAA0B,KAAuB;CACzE,IAAI,KACF,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,2BAA2B,CAAC,CAAC,KAAK,IAAI;CAEhE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,4BAA4B,CAAC,CAAC,KAAK,IAAI;AACjE;AAEA,eAAsB,mBACpB,SACA,aACA,QACoC;CACpC,MAAM,OAA4B,CAAC;CACnC,IAAI,eAA+C,CAAC;CAEpD,IAAI,gBAAgB;CACpB,MAAM,OAAc,UAAU,SAAS;EACrC,cAAcA;EACd,kBAAkB;EAClB,iBAAiB;CACnB,CAAC;CAED,KAAK,MAAM,OAAO,MAAM;EAEtB,IAAI,IAAI,cAAc;GACpB,eAAe,CAAC;GAChB,KAAK,MAAM,QAAQ,IAAI,cAAc;IACnC,IAAI,KAAK,KAAK,WAAW,MAAM,GAAG;KAChC,OAAO,MACL;MAAE;MAAM;KAAY,GACpB,2CACF;KACA;IACF;IACA,aAAa,KAAK,QAAQ;GAC5B;GACA,OAAO,MACL;IAAE,iBAAiB;IAAc;GAAY,GAC7C,0BACF;EACF;EAEA,KAAK,MAAM,OAAO,CAChB,GAAG,YAAY,IAAI,QAAQ,GAC3B,GAAG,OAAO,OAAO,aAAa,IAAI,SAAS,CAAC,CAC9C,GAAG;GACD,IAAI,UAAU,IAAI;GAClB,IAAI,SAAmC;GACvC,IAAI,WAA0B;GAG9B,IAAI,iBAAiB,IAAI,KAAK,GAAG;IAC/B,IACE,uBAAuB,GAAG,KACzB,MAAM,gCAAgC,KAAK,WAAW,GAEvD,gBAAgB;IAElB,KAAK,KAAK;KACR,SAAS,IAAI;KACb,YAAY;IACd,CAAC;IACD;GACF;GAEA,IAAI,cAAc,IAAI,KAAK,GAAG;IAC5B,UAAU,gBAAgB,IAAI,KAAK;IACnC,SAAS,eAAe,IAAI,OAAO,KAAA,GAAW,OAAO,eAAe;GACtE,OAAO;IACL,IAAI,IAAI,MAAM,SAAS,GAAG,GAAG;KAC3B,MAAM,IAAI,IAAI,MAAM,MAAM,GAAG;KAC7B,WAAW,EAAE,MAAM;KACnB,UAAU,EAAE,KAAK,GAAG;IACtB,OACE,WAAW,IAAI;IAEjB,MAAM,WAAW,aAAa;IAC9B,IAAI,UAAU,KAAK;KACjB,SAAS,eACP,SAAS,KACT,SACA,OAAO,eACT;KACA,WAAW;IACb;GACF;GAEA,IAAI,CAAC,SAAS,IAAI,OAAO,GAAG;IAC1B,KAAK,KAAK;KACR;KACA,YAAY;IACd,CAAC;IACD;GACF;GAEA,MAAM,MAAyB;IAC7B;IACA,cAAc,IAAI;GACpB;GACA,IAAI,uBAAuB,GAAG,GAC5B,gBAAgB;GAElB,IAAI,QACF,OAAO,OAAO,KAAK,MAAM;QACpB,IAAI,UACT,IAAI,eAAe,CAAC,aAAa,SAAS,EAAE,GAAG,CAAC,CAC7C,OAAO,CAAC,OAAO,kBAAkB,SAAS,CAAa,CAAC,CACxD,OAAO,QAAQ;GAKpB,IACE,CAAC,iBACC,cAAc,IAAI,KAAK,IACnB,QAAQ,MAAM,QAAQ,YAAY,GAAG,IAAI,CAAC,IAC1C,SACJ,CAAC,CAAC,MACJ,GAEA,IAAI,aAAa;GAInB,IACE,IAAI,eAAe,iBAAiB,MACpC,aAAa,IAAI,YAAY,GAE7B,IAAI,aAAa;GAGnB,KAAK,KAAK,GAAG;EACf;CACF;CAEA,OAAO,KAAK,SACR;EACE;EACA,YAAY,eAAe;EAC3B,GAAI,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE;CACxD,IACA;AACN"}
@@ -1,7 +1,4 @@
1
- import { find } from "../../../util/host-rules.js";
2
1
  import { getParentDir, localPathExists } from "../../../util/fs/index.js";
3
- import { DockerDatasource } from "../../datasource/docker/index.js";
4
- import { generateLoginCmd } from "../helmv3/common.js";
5
2
  import upath from "upath";
6
3
  //#region lib/modules/manager/helmfile/utils.ts
7
4
  /** Returns true if a helmfile release contains kustomize specific keys **/
@@ -13,21 +10,10 @@ function localChartHasKustomizationsYaml(release, helmFileYamlFileName) {
13
10
  const helmfileYamlParentDir = getParentDir(helmFileYamlFileName) || "";
14
11
  return localPathExists(upath.join(helmfileYamlParentDir, release.chart, "kustomization.yaml"));
15
12
  }
16
- function isOCIRegistry(repository) {
13
+ function isOciRepositoryFlagSet(repository) {
17
14
  return repository.oci === true;
18
15
  }
19
- async function generateRegistryLoginCmd(repositoryName, repositoryBaseURL, repositoryHost) {
20
- const repositoryRule = {
21
- name: repositoryName,
22
- repository: repositoryHost,
23
- hostRule: find({
24
- url: repositoryBaseURL,
25
- hostType: DockerDatasource.id
26
- })
27
- };
28
- return await generateLoginCmd(repositoryRule);
29
- }
30
16
  //#endregion
31
- export { generateRegistryLoginCmd, isOCIRegistry, kustomizationsKeysUsed, localChartHasKustomizationsYaml };
17
+ export { isOciRepositoryFlagSet, kustomizationsKeysUsed, localChartHasKustomizationsYaml };
32
18
 
33
19
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["hostRules.find"],"sources":["../../../../lib/modules/manager/helmfile/utils.ts"],"sourcesContent":["import upath from 'upath';\n\nimport { getParentDir, localPathExists } from '../../../util/fs/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { generateLoginCmd } from '../helmv3/common.ts';\nimport type { RepositoryRule } from '../helmv3/types.ts';\n\nimport type { HelmRelease, HelmRepository } from './schema.ts';\n\n/** Returns true if a helmfile release contains kustomize specific keys **/\nexport function kustomizationsKeysUsed(release: HelmRelease): boolean {\n return (\n release.strategicMergePatches !== undefined ||\n release.jsonPatches !== undefined ||\n release.transformers !== undefined\n );\n}\n\n/** Returns true if a helmfile release uses a local chart with a kustomization.yaml file **/\nexport function localChartHasKustomizationsYaml(\n release: HelmRelease,\n helmFileYamlFileName: string,\n): Promise<boolean> {\n const helmfileYamlParentDir = getParentDir(helmFileYamlFileName) || '';\n return localPathExists(\n upath.join(helmfileYamlParentDir, release.chart, 'kustomization.yaml'),\n );\n}\n\nexport function isOCIRegistry(repository: HelmRepository): boolean {\n return repository.oci === true;\n}\n\nexport async function generateRegistryLoginCmd(\n repositoryName: string,\n repositoryBaseURL: string,\n repositoryHost: string,\n): Promise<string | null> {\n const repositoryRule: RepositoryRule = {\n name: repositoryName,\n repository: repositoryHost,\n hostRule: hostRules.find({\n url: repositoryBaseURL,\n hostType: DockerDatasource.id,\n }),\n };\n\n return await generateLoginCmd(repositoryRule);\n}\n"],"mappings":";;;;;;;AAWA,SAAgB,uBAAuB,SAA+B;CACpE,OACE,QAAQ,0BAA0B,KAAA,KAClC,QAAQ,gBAAgB,KAAA,KACxB,QAAQ,iBAAiB,KAAA;AAE7B;;AAGA,SAAgB,gCACd,SACA,sBACkB;CAClB,MAAM,wBAAwB,aAAa,oBAAoB,KAAK;CACpE,OAAO,gBACL,MAAM,KAAK,uBAAuB,QAAQ,OAAO,oBAAoB,CACvE;AACF;AAEA,SAAgB,cAAc,YAAqC;CACjE,OAAO,WAAW,QAAQ;AAC5B;AAEA,eAAsB,yBACpB,gBACA,mBACA,gBACwB;CACxB,MAAM,iBAAiC;EACrC,MAAM;EACN,YAAY;EACZ,UAAUA,KAAe;GACvB,KAAK;GACL,UAAU,iBAAiB;EAC7B,CAAC;CACH;CAEA,OAAO,MAAM,iBAAiB,cAAc;AAC9C"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../../lib/modules/manager/helmfile/utils.ts"],"sourcesContent":["import upath from 'upath';\n\nimport { getParentDir, localPathExists } from '../../../util/fs/index.ts';\n\nimport type { HelmRelease, HelmRepository } from './schema.ts';\n\n/** Returns true if a helmfile release contains kustomize specific keys **/\nexport function kustomizationsKeysUsed(release: HelmRelease): boolean {\n return (\n release.strategicMergePatches !== undefined ||\n release.jsonPatches !== undefined ||\n release.transformers !== undefined\n );\n}\n\n/** Returns true if a helmfile release uses a local chart with a kustomization.yaml file **/\nexport function localChartHasKustomizationsYaml(\n release: HelmRelease,\n helmFileYamlFileName: string,\n): Promise<boolean> {\n const helmfileYamlParentDir = getParentDir(helmFileYamlFileName) || '';\n return localPathExists(\n upath.join(helmfileYamlParentDir, release.chart, 'kustomization.yaml'),\n );\n}\n\nexport function isOciRepositoryFlagSet(repository: HelmRepository): boolean {\n return repository.oci === true;\n}\n"],"mappings":";;;;AAOA,SAAgB,uBAAuB,SAA+B;CACpE,OACE,QAAQ,0BAA0B,KAAA,KAClC,QAAQ,gBAAgB,KAAA,KACxB,QAAQ,iBAAiB,KAAA;AAE7B;;AAGA,SAAgB,gCACd,SACA,sBACkB;CAClB,MAAM,wBAAwB,aAAa,oBAAoB,KAAK;CACpE,OAAO,gBACL,MAAM,KAAK,uBAAuB,QAAQ,OAAO,oBAAoB,CACvE;AACF;AAEA,SAAgB,uBAAuB,YAAqC;CAC1E,OAAO,WAAW,QAAQ;AAC5B"}
@@ -6,31 +6,21 @@ import { parseSingleYaml } from "../../../util/yaml.js";
6
6
  import { getParentDir, getSiblingFileName, readLocalFile, writeLocalFile } from "../../../util/fs/index.js";
7
7
  import { exec } from "../../../util/exec/index.js";
8
8
  import { getRepoStatus } from "../../../util/git/index.js";
9
- import { DockerDatasource } from "../../datasource/docker/index.js";
10
9
  import { HelmDatasource } from "../../datasource/helm/index.js";
11
10
  import { collectFileChanges } from "../../../util/git/file-changes.js";
12
11
  import { artifactErrorResult, fileAddition, fileChangesToArtifactResults, resolveToolConstraint } from "../util.js";
13
- import { isOCIRegistry, removeOCIPrefix } from "./oci.js";
14
- import { generateHelmEnvs, generateLoginCmd } from "./common.js";
12
+ import { isOCIRegistry } from "./oci.js";
15
13
  import { aliasRecordToRepositories, getRepositories, isFileInDir } from "./utils.js";
14
+ import { generateHelmEnvs, generateRegistryLoginCmd } from "./common.js";
16
15
  import { isString, isTruthy } from "@sindresorhus/is";
17
16
  import { quote } from "shlex";
18
17
  import pMap from "p-map";
19
18
  //#region lib/modules/manager/helmv3/artifacts.ts
20
19
  async function helmCommands(execOptions, manifestPath, repositories) {
21
20
  const cmd = [];
22
- const registries = repositories.filter(isOCIRegistry).map((value) => {
23
- return {
24
- ...value,
25
- repository: removeOCIPrefix(value.repository),
26
- hostRule: find({
27
- url: value.repository.replace("oci://", "https://"),
28
- hostType: DockerDatasource.id
29
- })
30
- };
31
- });
32
- await pMap(registries, async (value) => {
33
- const loginCmd = await generateLoginCmd(value);
21
+ const ociRepositories = repositories.filter(isOCIRegistry);
22
+ await pMap(ociRepositories, async (value) => {
23
+ const loginCmd = await generateRegistryLoginCmd(value.name, value.repository);
34
24
  if (loginCmd) cmd.push(loginCmd);
35
25
  });
36
26
  repositories.filter((repository) => !isOCIRegistry(repository)).map((value) => {
@@ -76,13 +66,14 @@ async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileCon
76
66
  const repositories = getRepositories(chartDefinitions);
77
67
  await writeLocalFile(packageFileName, newPackageFileContent);
78
68
  logger.debug("Updating Helm artifacts");
69
+ const helmConstraint = await resolveToolConstraint(config, "helm");
79
70
  const helmToolConstraint = {
80
71
  toolName: "helm",
81
- constraint: await resolveToolConstraint(config, "helm")
72
+ constraint: helmConstraint
82
73
  };
83
74
  await helmCommands({
84
75
  docker: {},
85
- extraEnv: generateHelmEnvs(),
76
+ extraEnv: generateHelmEnvs(helmConstraint),
86
77
  toolConstraints: [helmToolConstraint]
87
78
  }, packageFileName, repositories);
88
79
  logger.debug("Returning updated Helm artifacts");