ScriptCollection 4.4.74__py3-none-any.whl → 5.0.0__py3-none-any.whl

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 (29) hide show
  1. ScriptCollection/Executables.py +14 -14
  2. ScriptCollection/GeneralUtilities.py +11 -11
  3. ScriptCollection/OCIImages/AbstractImageHandler.py +3 -3
  4. ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebian.py +3 -3
  5. ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebianSlim.py +3 -3
  6. ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGeneric.py +3 -3
  7. ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGenericV.py +3 -3
  8. ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabCE.py +3 -3
  9. ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabEE.py +3 -3
  10. ScriptCollection/OCIImages/OCIImageManager.py +24 -24
  11. ScriptCollection/Resources/CultureChooser/CultureChooser.js +0 -0
  12. ScriptCollection/Resources/CultureChooser/index.html +0 -0
  13. ScriptCollection/Resources/Dependencies/JRE/Version.txt +0 -0
  14. ScriptCollection/Resources/Dependencies/OpenAPIGenerator/Version.txt +0 -0
  15. ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html +0 -0
  16. ScriptCollection/ScriptCollectionCore.py +23 -23
  17. ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py +3 -3
  18. ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py +6 -6
  19. ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py +3 -3
  20. ScriptCollection/TFCPS/PlantUMLRenderer.py +1 -1
  21. ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py +13 -13
  22. ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +24 -15
  23. ScriptCollection/TFCPS/TFCPS_Tools_General.py +34 -16
  24. ScriptCollection/TFCPS/TFCPS_VisualRegressionTests.py +1 -1
  25. {scriptcollection-4.4.74.dist-info → scriptcollection-5.0.0.dist-info}/METADATA +3 -1
  26. {scriptcollection-4.4.74.dist-info → scriptcollection-5.0.0.dist-info}/RECORD +24 -24
  27. {scriptcollection-4.4.74.dist-info → scriptcollection-5.0.0.dist-info}/entry_points.txt +2 -2
  28. {scriptcollection-4.4.74.dist-info → scriptcollection-5.0.0.dist-info}/WHEEL +0 -0
  29. {scriptcollection-4.4.74.dist-info → scriptcollection-5.0.0.dist-info}/top_level.txt +0 -0
@@ -9,7 +9,7 @@ import traceback
9
9
  import shutil
10
10
  import keyboard
11
11
  from .ScriptCollectionCore import ScriptCollectionCore
12
- from .GeneralUtilities import GeneralUtilities, VersionEcholon
12
+ from .GeneralUtilities import GeneralUtilities, VersionEchelon
13
13
  from .SCLog import LogLevel, SCLog
14
14
  from .TFCPS.TFCPS_CodeUnit_BuildCodeUnits import TFCPS_CodeUnit_BuildCodeUnits
15
15
  from .TFCPS.TFCPS_OCIImageSecretScan import TFCPS_OCIImageSecretScan
@@ -822,7 +822,7 @@ def PrintOSName() -> int:
822
822
  return 0
823
823
 
824
824
 
825
- def PrintCurrecntWorkingDirectory() -> int:
825
+ def PrintCurrentWorkingDirectory() -> int:
826
826
  GeneralUtilities.write_message_to_stdout(os.getcwd())
827
827
  return 0
828
828
 
@@ -1064,7 +1064,7 @@ def OCRAnalysisOfRepository() -> int:
1064
1064
 
1065
1065
 
1066
1066
  def UpdateImagesInDockerComposeFile() -> int:
1067
- echolon_values = ", ".join(f"{e.value}={e.name}" for e in VersionEcholon)
1067
+ echelon_values = ", ".join(f"{e.value}={e.name}" for e in VersionEchelon)
1068
1068
  parser = argparse.ArgumentParser(
1069
1069
  description=(
1070
1070
  "This function updates images in a Docker Compose file.\n"
@@ -1078,20 +1078,20 @@ def UpdateImagesInDockerComposeFile() -> int:
1078
1078
  formatter_class=argparse.RawDescriptionHelpFormatter,
1079
1079
  )
1080
1080
  parser.add_argument('-f', '--file', required=False, default="./docker-compose.yml")
1081
- parser.add_argument('-e', '--echolon', type=int, required=False, default=None, help=f"Default version-echolon applied to all images that have no specific override. Possible values: {echolon_values}. If not set, the image-handler default is used.")
1082
- parser.add_argument('-i', '--image-echolon', action='append', default=[], help="Per-image echolon override in the format 'imagename=echolon' (e.g. 'Debian=3'). Can be specified multiple times.")
1081
+ parser.add_argument('-e', '--echelon', type=int, required=False, default=None, help=f"Default version-echelon applied to all images that have no specific override. Possible values: {echelon_values}. If not set, the image-handler default is used.")
1082
+ parser.add_argument('-i', '--image-echelon', action='append', default=[], help="Per-image echelon override in the format 'imagename=echelon' (e.g. 'Debian=3'). Can be specified multiple times.")
1083
1083
  args = parser.parse_args()
1084
1084
  sc = ScriptCollectionCore()
1085
1085
  file = GeneralUtilities.resolve_relative_path(args.file, os.getcwd())
1086
- default_echolon: VersionEcholon = VersionEcholon(args.echolon) if args.echolon is not None else None
1087
- per_image_echolons: dict[str, VersionEcholon] = {}
1088
- for item in args.image_echolon:
1086
+ default_echelon: VersionEchelon = VersionEchelon(args.echelon) if args.echelon is not None else None
1087
+ per_image_echelons: dict[str, VersionEchelon] = {}
1088
+ for item in args.image_echelon:
1089
1089
  if "=" not in item:
1090
- raise ValueError(f"Invalid value for --image-echolon: '{item}'. Expected format: 'imagename=echolon'.")
1091
- name_part, echolon_part = item.split("=", 1)
1092
- per_image_echolons[name_part.strip()] = VersionEcholon(int(echolon_part.strip()))
1090
+ raise ValueError(f"Invalid value for --image-echelon: '{item}'. Expected format: 'imagename=echelon'.")
1091
+ name_part, echelon_part = item.split("=", 1)
1092
+ per_image_echelons[name_part.strip()] = VersionEchelon(int(echelon_part.strip()))
1093
1093
  oci = OCIImageManager(sc)
1094
- oci.update_image_in_docker_compose_file(file, default_echolon, per_image_echolons)
1094
+ oci.update_image_in_docker_compose_file(file, default_echelon, per_image_echelons)
1095
1095
  return 0
1096
1096
 
1097
1097
 
@@ -1205,14 +1205,14 @@ def CleanToolsCache()->int:
1205
1205
  return 0
1206
1206
 
1207
1207
 
1208
- def DownloadCachableTools()->int:
1208
+ def DownloadCacheableTools()->int:
1209
1209
  parser = argparse.ArgumentParser(description="Downloads all tools that are stored in the global ScriptCollection-cache (for example CycloneDX-CLI, MediaMTX, TruffleHog, OpenAPIGenerator and AndroidAppBundleTool). Running this - for example in a build-image - lets repeated pipeline-runs avoid rate-limits and run faster because the tools are already present.")
1210
1210
  parser.add_argument('-v', '--verbose', action='store_true', required=False, default=False, help="Enables verbose (debug) output.")
1211
1211
  parser.add_argument('-e', '--enforceupdate', action='store_true', required=False, default=False, help="Re-download the tools even if they are already present in the cache.")
1212
1212
  #TODO for each tool which will be installed allow to specify a specific version number
1213
1213
  args = parser.parse_args()
1214
1214
  sc: ScriptCollectionCore = ScriptCollectionCore()
1215
- TFCPS_Tools_General(sc).download_all_cachable_tools(args.enforceupdate, args.verbose)
1215
+ TFCPS_Tools_General(sc).download_all_cacheable_tools(args.enforceupdate, args.verbose)
1216
1216
  return 0
1217
1217
 
1218
1218
 
@@ -30,7 +30,7 @@ import psutil
30
30
  from defusedxml.minidom import parse
31
31
  from OpenSSL import crypto
32
32
 
33
- class VersionEcholon(Enum):
33
+ class VersionEchelon(Enum):
34
34
  LatestPatch = 0
35
35
  LatestPatchOrLatestMinor = 1
36
36
  LatestPatchOrLatestMinorOrNextMajor = 2
@@ -230,20 +230,20 @@ class GeneralUtilities:
230
230
 
231
231
  @staticmethod
232
232
  @check_arguments
233
- def choose_version(available_versions:list[str],current_version:str,echolon:VersionEcholon) -> str:
234
- match echolon:
235
- case VersionEcholon.LatestPatch:
233
+ def choose_version(available_versions:list[str],current_version:str,echelon:VersionEchelon) -> str:
234
+ match echelon:
235
+ case VersionEchelon.LatestPatch:
236
236
  return GeneralUtilities.get_latest_version(GeneralUtilities.filter_versions_by_prefix(available_versions,f"{GeneralUtilities.get_major_part_of_version(current_version)}.{GeneralUtilities.get_minor_part_of_version(current_version)}."))
237
- case VersionEcholon.LatestPatchOrLatestMinor:
237
+ case VersionEchelon.LatestPatchOrLatestMinor:
238
238
  return GeneralUtilities.get_latest_version(GeneralUtilities.filter_versions_by_prefix(available_versions,f"{GeneralUtilities.get_major_part_of_version(current_version)}."))
239
- case VersionEcholon.LatestPatchOrLatestMinorOrNextMajor:
239
+ case VersionEchelon.LatestPatchOrLatestMinorOrNextMajor:
240
240
  raise ValueError("not implemented")#TODO
241
- case VersionEcholon.LatestVersion:
241
+ case VersionEchelon.LatestVersion:
242
242
  return GeneralUtilities.get_latest_version(available_versions)
243
- case VersionEcholon.NoUpdate:
243
+ case VersionEchelon.NoUpdate:
244
244
  return current_version
245
245
  case _:
246
- raise ValueError("Unknown echolon-value: "+str(echolon))
246
+ raise ValueError("Unknown echelon-value: "+str(echelon))
247
247
 
248
248
  @staticmethod
249
249
  @check_arguments
@@ -1711,14 +1711,14 @@ class GeneralUtilities:
1711
1711
  def escape_yaml_string_value(str_value: str) -> str:
1712
1712
  """For input 'a"b\\c' this function returns 'a\\"b\\\\c'. This function does not add surrounding quotes. It only escapes the characters inside the string."""
1713
1713
  result= GeneralUtilities.escape_json_string_value(str_value)
1714
- #do other adaptions here if desired/required
1714
+ #do other adaptations here if desired/required
1715
1715
  return result
1716
1716
 
1717
1717
  @staticmethod
1718
1718
  @check_arguments
1719
1719
  def escape_yaml_property_value(str_value: str) -> str:
1720
1720
  result= GeneralUtilities.escape_json_property_value(str_value)
1721
- #do other adaptions here if desired/required
1721
+ #do other adaptations here if desired/required
1722
1722
  return result
1723
1723
 
1724
1724
 
@@ -1,6 +1,6 @@
1
1
  from abc import ABC, abstractmethod
2
2
  from packaging.version import Version
3
- from ..GeneralUtilities import VersionEcholon
3
+ from ..GeneralUtilities import VersionEchelon
4
4
 
5
5
  class AbstractImageHandler(ABC):
6
6
  """An image-handler knows the format of the tags of certain images: which tags of a registry are candidates for an update of a
@@ -22,12 +22,12 @@ class AbstractImageHandler(ABC):
22
22
  raise NotImplementedError()#because it is abstract
23
23
 
24
24
  @abstractmethod
25
- def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
25
+ def get_default_echelon_for_update(self,image_name:str)->VersionEchelon:
26
26
  raise NotImplementedError()#because it is abstract
27
27
 
28
28
  def get_latest_tag_custom(self,image_name:str,current_tag:str,candidate_tags:list[str])->str:
29
29
  """Determines the tag the image should be updated to using an image-specific custom algorithm.
30
30
  candidate_tags contains the current tag and all available tags which have the same format as the current tag.
31
- This is used when the echolon VersionEcholon.CustomAlgorithm is selected.
31
+ This is used when the echelon VersionEchelon.CustomAlgorithm is selected.
32
32
  Image-handlers which want to support a custom algorithm must override this method."""
33
33
  raise ValueError(f"Image-handler \"{type(self).__name__}\" does not define a custom algorithm for determining the latest version of image \"{image_name}\".")
@@ -1,4 +1,4 @@
1
- from ...GeneralUtilities import VersionEcholon
1
+ from ...GeneralUtilities import VersionEchelon
2
2
  from ..AbstractTagPatternImageHandler import AbstractTagPatternImageHandler
3
3
 
4
4
  class ImageHandlerDebian(AbstractTagPatternImageHandler):
@@ -7,5 +7,5 @@ class ImageHandlerDebian(AbstractTagPatternImageHandler):
7
7
  def _protected_accepts_tag_parts(self,image_name:str,prefix:str,suffix:str)->bool:
8
8
  return image_name.lower()=="debian" and prefix=="" and suffix==""
9
9
 
10
- def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
11
- return VersionEcholon.LatestPatch
10
+ def get_default_echelon_for_update(self,image_name:str)->VersionEchelon:
11
+ return VersionEchelon.LatestPatch
@@ -1,4 +1,4 @@
1
- from ...GeneralUtilities import VersionEcholon
1
+ from ...GeneralUtilities import VersionEchelon
2
2
  from ..AbstractTagPatternImageHandler import AbstractTagPatternImageHandler
3
3
 
4
4
  class ImageHandlerDebianSlim(AbstractTagPatternImageHandler):
@@ -7,5 +7,5 @@ class ImageHandlerDebianSlim(AbstractTagPatternImageHandler):
7
7
  def _protected_accepts_tag_parts(self,image_name:str,prefix:str,suffix:str)->bool:
8
8
  return image_name.lower()=="debian" and prefix=="" and suffix=="-slim"
9
9
 
10
- def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
11
- return VersionEcholon.LatestPatch
10
+ def get_default_echelon_for_update(self,image_name:str)->VersionEchelon:
11
+ return VersionEchelon.LatestPatch
@@ -1,4 +1,4 @@
1
- from ...GeneralUtilities import VersionEcholon
1
+ from ...GeneralUtilities import VersionEchelon
2
2
  from ..AbstractTagPatternImageHandler import AbstractTagPatternImageHandler
3
3
 
4
4
  class ImageHandlerGeneric(AbstractTagPatternImageHandler):
@@ -7,5 +7,5 @@ class ImageHandlerGeneric(AbstractTagPatternImageHandler):
7
7
  def _protected_accepts_tag_parts(self,image_name:str,prefix:str,suffix:str)->bool:
8
8
  return prefix==""
9
9
 
10
- def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
11
- return VersionEcholon.LatestVersion
10
+ def get_default_echelon_for_update(self,image_name:str)->VersionEchelon:
11
+ return VersionEchelon.LatestVersion
@@ -1,4 +1,4 @@
1
- from ...GeneralUtilities import VersionEcholon
1
+ from ...GeneralUtilities import VersionEchelon
2
2
  from ..AbstractTagPatternImageHandler import AbstractTagPatternImageHandler
3
3
 
4
4
  class ImageHandlerGenericV(AbstractTagPatternImageHandler):
@@ -7,5 +7,5 @@ class ImageHandlerGenericV(AbstractTagPatternImageHandler):
7
7
  def _protected_accepts_tag_parts(self,image_name:str,prefix:str,suffix:str)->bool:
8
8
  return prefix=="v"
9
9
 
10
- def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
11
- return VersionEcholon.LatestVersion
10
+ def get_default_echelon_for_update(self,image_name:str)->VersionEchelon:
11
+ return VersionEchelon.LatestVersion
@@ -1,5 +1,5 @@
1
1
  from packaging.version import Version
2
- from ...GeneralUtilities import VersionEcholon
2
+ from ...GeneralUtilities import VersionEchelon
3
3
  from ..AbstractImageHandler import AbstractImageHandler
4
4
 
5
5
  class ImageHandlerGitlabCE(AbstractImageHandler):
@@ -15,5 +15,5 @@ class ImageHandlerGitlabCE(AbstractImageHandler):
15
15
  def tag_to_version(self,image_name:str,tag:str)->Version:
16
16
  raise NotImplementedError(f"Updating the tag of image \"{image_name}\" (GitLab ce) is not implemented yet.")
17
17
 
18
- def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
19
- return VersionEcholon.CustomAlgorithm
18
+ def get_default_echelon_for_update(self,image_name:str)->VersionEchelon:
19
+ return VersionEchelon.CustomAlgorithm
@@ -1,5 +1,5 @@
1
1
  from packaging.version import Version
2
- from ...GeneralUtilities import VersionEcholon
2
+ from ...GeneralUtilities import VersionEchelon
3
3
  from ..AbstractImageHandler import AbstractImageHandler
4
4
 
5
5
  class ImageHandlerGitlabEE(AbstractImageHandler):
@@ -15,5 +15,5 @@ class ImageHandlerGitlabEE(AbstractImageHandler):
15
15
  def tag_to_version(self,image_name:str,tag:str)->Version:
16
16
  raise NotImplementedError(f"Updating the tag of image \"{image_name}\" (GitLab ee) is not implemented yet.")
17
17
 
18
- def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
19
- return VersionEcholon.CustomAlgorithm
18
+ def get_default_echelon_for_update(self,image_name:str)->VersionEchelon:
19
+ return VersionEchelon.CustomAlgorithm
@@ -3,7 +3,7 @@ import yaml
3
3
  from packaging.version import Version
4
4
  from ..GeneralUtilities import GeneralUtilities
5
5
  from ..ScriptCollectionCore import ScriptCollectionCore
6
- from ..GeneralUtilities import VersionEcholon
6
+ from ..GeneralUtilities import VersionEchelon
7
7
  from ..SCLog import LogLevel
8
8
  from .AbstractImageHandler import AbstractImageHandler
9
9
  from .OCIRegistryClient import OCIRegistryClient
@@ -217,7 +217,7 @@ class OCIImageManager:
217
217
  self.__sc.log.log(f"The tag of image \"{image_name}\" is not updated because no custom registry is defined for it in \"{self.get_global_docker_image_registries_file()}\".",LogLevel.Warning)
218
218
  else:
219
219
  try:
220
- tag=self.get_latest_tag_of_image(image_name,addresses_to_check,default_tag,VersionEcholon.LatestVersion)
220
+ tag=self.get_latest_tag_of_image(image_name,addresses_to_check,default_tag,VersionEchelon.LatestVersion)
221
221
  except Exception as e:
222
222
  self.__sc.log.log(f"Could not determine the latest tag of image \"{image_name}\" using the registries {', '.join(addresses_to_check)}. Reason: {type(e).__name__}: {str(e)}",LogLevel.Warning)
223
223
  if tag!=default_tag:
@@ -238,44 +238,44 @@ class OCIImageManager:
238
238
  return result
239
239
 
240
240
  @GeneralUtilities.check_arguments
241
- def get_latest_tag_of_image(self,image_name:str,registry_addresses:list[str],current_tag:str,echolon:VersionEcholon)->str:
242
- """Returns the tag the image should be updated to according to the echolon, considering the tags of all given registry-addresses
241
+ def get_latest_tag_of_image(self,image_name:str,registry_addresses:list[str],current_tag:str,echelon:VersionEchelon)->str:
242
+ """Returns the tag the image should be updated to according to the echelon, considering the tags of all given registry-addresses
243
243
  (always without tag, for example "docker.io/library/debian").
244
244
  Only tags with the same format as the current tag are candidates (see AbstractImageHandler.tag_has_same_format). The current tag is
245
245
  always a candidate, so the result is never a downgrade."""
246
246
  image_handler=self.get_image_handler(image_name,current_tag)
247
- if echolon==VersionEcholon.NoUpdate:
247
+ if echelon==VersionEchelon.NoUpdate:
248
248
  return current_tag
249
249
  candidate_tags:list[str]=[current_tag]
250
250
  for registry_address in registry_addresses:
251
251
  for tag in self.registry_client.get_tags(registry_address):
252
252
  if tag not in candidate_tags and image_handler.tag_has_same_format(image_name,tag,current_tag):
253
253
  candidate_tags.append(tag)
254
- if echolon==VersionEcholon.CustomAlgorithm:
254
+ if echelon==VersionEchelon.CustomAlgorithm:
255
255
  return image_handler.get_latest_tag_custom(image_name,current_tag,candidate_tags)
256
256
  tags_by_version:dict[Version,str]={}
257
257
  for tag in candidate_tags:
258
258
  #setdefault, because different tags can represent the same version (like "13.4" and "13.04"); then the first one (the current tag if affected) is used.
259
259
  tags_by_version.setdefault(image_handler.tag_to_version(image_name,tag),tag)
260
260
  current_version=image_handler.tag_to_version(image_name,current_tag)
261
- return tags_by_version[self.choose_version(set(tags_by_version.keys()),current_version,echolon)]
261
+ return tags_by_version[self.choose_version(set(tags_by_version.keys()),current_version,echelon)]
262
262
 
263
263
  @GeneralUtilities.check_arguments
264
- def choose_version(self,available_versions:set[Version],current_version:Version,echolon:VersionEcholon)->Version:
265
- """Returns the version out of the available versions which should be used according to the echolon.
266
- available_versions must contain current_version. The echolons NoUpdate and CustomAlgorithm are not handled here because they do
264
+ def choose_version(self,available_versions:set[Version],current_version:Version,echelon:VersionEchelon)->Version:
265
+ """Returns the version out of the available versions which should be used according to the echelon.
266
+ available_versions must contain current_version. The echelons NoUpdate and CustomAlgorithm are not handled here because they do
267
267
  not choose out of the available versions."""
268
268
  GeneralUtilities.assert_condition(current_version in available_versions,f"The available versions do not contain the current version {current_version}.")
269
269
  result:Version=None
270
- match echolon:
271
- case VersionEcholon.LatestPatch:#caution: this never updates the minor or major version
270
+ match echelon:
271
+ case VersionEchelon.LatestPatch:#caution: this never updates the minor or major version
272
272
  #take the latest available patch-version for the current minor-version of the image.
273
273
  result=self.__get_latest_patch(available_versions,current_version.major,current_version.minor)
274
- case VersionEcholon.LatestPatchOrLatestMinor:#caution: this never updates the major version
274
+ case VersionEchelon.LatestPatchOrLatestMinor:#caution: this never updates the major version
275
275
  #take the latest available patch-version for the current minor-version of the image if there is a newer patch version available.
276
276
  #otherwise take the latest available patch-version of the next available minor-version within the current major-version.
277
277
  result=self.__get_latest_patch_or_next_minor(available_versions,current_version)
278
- case VersionEcholon.LatestPatchOrLatestMinorOrNextMajor:#usual case for images which have complex migrations sometimes, like GitLab or NextCloud
278
+ case VersionEchelon.LatestPatchOrLatestMinorOrNextMajor:#usual case for images which have complex migrations sometimes, like GitLab or NextCloud
279
279
  #like LatestPatchOrLatestMinor, but if there is neither a newer patch nor a newer minor-version available within the current major-version
280
280
  #then take the latest available patch-version of the lowest minor-version of the next available major-version.
281
281
  result=self.__get_latest_patch_or_next_minor(available_versions,current_version)
@@ -284,11 +284,11 @@ class OCIImageManager:
284
284
  if next_major is not None:
285
285
  lowest_minor=min({v.minor for v in available_versions if v.major==next_major})
286
286
  result=self.__get_latest_patch(available_versions,next_major,lowest_minor)
287
- case VersionEcholon.LatestVersion:#usual case for most images
287
+ case VersionEchelon.LatestVersion:#usual case for most images
288
288
  #take the latest available version of the image.
289
289
  result=max(available_versions)
290
290
  case _:
291
- raise ValueError(f"Echolon \"{echolon.name}\" does not choose a version out of the available versions.")
291
+ raise ValueError(f"Echelon \"{echelon.name}\" does not choose a version out of the available versions.")
292
292
  return result
293
293
 
294
294
  @GeneralUtilities.check_arguments
@@ -343,9 +343,9 @@ class OCIImageManager:
343
343
  return result
344
344
 
345
345
  @GeneralUtilities.check_arguments
346
- def update_image_in_docker_compose_file(self,docker_compose_file:str,default_echolon:VersionEcholon=None,per_image_echolons:dict[str,VersionEcholon]=None,verbose:bool=False)->None:
347
- if per_image_echolons is None:
348
- per_image_echolons = {}
346
+ def update_image_in_docker_compose_file(self,docker_compose_file:str,default_echelon:VersionEchelon=None,per_image_echelons:dict[str,VersionEchelon]=None,verbose:bool=False)->None:
347
+ if per_image_echelons is None:
348
+ per_image_echelons = {}
349
349
  if verbose:
350
350
  self.__sc.log.log(f"Checking images in docker-compose-file \"{docker_compose_file}\" for updates.",LogLevel.Information)
351
351
  for service,service_information in self.get_images_used_in_docker_compose_file(docker_compose_file).items():
@@ -353,12 +353,12 @@ class OCIImageManager:
353
353
  image_address=service_information[1]
354
354
  current_tag=service_information[2]
355
355
  image_handler=self.get_image_handler(image_name,current_tag)
356
- effective_echolon=per_image_echolons.get(image_name,default_echolon)
357
- if effective_echolon is None:
358
- effective_echolon=image_handler.get_default_echolon_for_update(image_name)
356
+ effective_echelon=per_image_echelons.get(image_name,default_echelon)
357
+ if effective_echelon is None:
358
+ effective_echelon=image_handler.get_default_echelon_for_update(image_name)
359
359
  if verbose:
360
- self.__sc.log.log(f"Service \"{service}\": checking image \"{image_address}:{current_tag}\" using echolon \"{effective_echolon.name}\".",LogLevel.Information)
361
- new_tag=self.get_latest_tag_of_image(image_name,[image_address],current_tag,effective_echolon)
360
+ self.__sc.log.log(f"Service \"{service}\": checking image \"{image_address}:{current_tag}\" using echelon \"{effective_echelon.name}\".",LogLevel.Information)
361
+ new_tag=self.get_latest_tag_of_image(image_name,[image_address],current_tag,effective_echelon)
362
362
  if new_tag != current_tag:
363
363
  new_image_reference = f"{image_address}:{new_tag}"
364
364
  if verbose:
File without changes
File without changes
@@ -41,7 +41,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
41
41
  from .ProgramRunnerPopen import ProgramRunnerPopen
42
42
  from .SCLog import SCLog, LogLevel
43
43
 
44
- version = "4.4.74"
44
+ version = "5.0.0"
45
45
  __version__ = version
46
46
 
47
47
  class VSCodeWorkspaceShellTask:
@@ -959,7 +959,7 @@ class ScriptCollectionCore:
959
959
  return remote_is_ancestor_of_local and not local_is_ancestor_of_remote
960
960
 
961
961
  @GeneralUtilities.check_arguments
962
- def git_push(self, folder: str, remotename: str, localbranchname: str, remotebranchname: str, forcepush: bool = False, pushalltags: bool = True, verbosity: LogLevel = LogLevel.Quiet,resurse_submodules:bool=False) -> None:
962
+ def git_push(self, folder: str, remotename: str, localbranchname: str, remotebranchname: str, forcepush: bool = False, pushalltags: bool = True, verbosity: LogLevel = LogLevel.Quiet,recurse_submodules:bool=False) -> None:
963
963
  """Pushes localbranchname to remotebranchname on the given remote (with pushalltags also all tags).
964
964
  Without forcepush (and if folder is not a bare repository) the push is skipped (only logged on debug-level) when the
965
965
  remote-branch is not strictly behind the local-branch, i.e. when it is equal, ahead or diverged (see git_branch_is_pushable),
@@ -974,7 +974,7 @@ class ScriptCollectionCore:
974
974
  self.log.log(f"Skip pushing '{localbranchname}' to '{remotebranchname}' on '{remotename}' in '{folder}' because the remote-branch is not behind the local-branch.", LogLevel.Debug)
975
975
  return
976
976
  argument = ["push"]
977
- if resurse_submodules:
977
+ if recurse_submodules:
978
978
  argument = argument + ["--recurse-submodules=on-demand"]
979
979
  argument = argument + [remotename, f"{localbranchname}:{remotebranchname}"]
980
980
  if (forcepush):
@@ -1406,9 +1406,9 @@ class ScriptCollectionCore:
1406
1406
  for file_or_folder, item_type in items.items():
1407
1407
  truncated_file = file_or_folder[path_prefix:]
1408
1408
  if (filter_function is None or filter_function(folder, truncated_file)):
1409
- owner_and_permisssion = self.get_file_owner_and_file_permission(file_or_folder)
1410
- user = owner_and_permisssion[0]
1411
- permissions = owner_and_permisssion[1]
1409
+ owner_and_permission = self.get_file_owner_and_file_permission(file_or_folder)
1410
+ user = owner_and_permission[0]
1411
+ permissions = owner_and_permission[1]
1412
1412
  lines.append(f"{truncated_file};{item_type};{user};{permissions}")
1413
1413
  lines = sorted(lines, key=str.casefold)
1414
1414
  with open(target_file, "w", encoding=encoding) as file_object:
@@ -1793,7 +1793,7 @@ class ScriptCollectionCore:
1793
1793
  raise ValueError(f"{filetype_full} '{full_path_of_file_or_folder}' does not exist")
1794
1794
 
1795
1795
  @GeneralUtilities.check_arguments
1796
- def __calculate_lengh_in_seconds(self, filename: str, folder: str) -> float:
1796
+ def __calculate_length_in_seconds(self, filename: str, folder: str) -> float:
1797
1797
  argument = ['-v', 'error', '-show_entries', 'format=duration', '-of', 'default=noprint_wrappers=1:nokey=1', filename]
1798
1798
  result = self.run_program_argsasarray("ffprobe", argument, folder, throw_exception_if_exitcode_is_not_zero=True)
1799
1799
  return float(result[1].replace('\n', ''))
@@ -1850,15 +1850,15 @@ class ScriptCollectionCore:
1850
1850
  filename_without_extension = Path(file).stem
1851
1851
  preview_files: list[str] = []
1852
1852
  try:
1853
- length_in_seconds = self.__calculate_lengh_in_seconds(filename, folder)
1853
+ length_in_seconds = self.__calculate_length_in_seconds(filename, folder)
1854
1854
  # frames per second, example: frames_per_second="20fps" => 20 frames per second
1855
1855
  frames_per_second = self.__roundup(float(frames_per_second[:-3]), 2)
1856
1856
  frames_per_second_as_string = str(frames_per_second)
1857
1857
  preview_files = self.__create_thumbnails(filename, frames_per_second_as_string, folder, tempname_for_thumbnails)
1858
1858
  if hook is not None:
1859
1859
  hook(file, preview_files)
1860
- actual_amounf_of_previewframes = len(preview_files)
1861
- self.__create_thumbnail(filename_without_extension, folder, length_in_seconds, tempname_for_thumbnails, actual_amounf_of_previewframes)
1860
+ actual_amount_of_previewframes = len(preview_files)
1861
+ self.__create_thumbnail(filename_without_extension, folder, length_in_seconds, tempname_for_thumbnails, actual_amount_of_previewframes)
1862
1862
  finally:
1863
1863
  for thumbnail_to_delete in preview_files:
1864
1864
  os.remove(thumbnail_to_delete)
@@ -1874,14 +1874,14 @@ class ScriptCollectionCore:
1874
1874
  filename_without_extension = Path(file).stem
1875
1875
  preview_files: list[str] = []
1876
1876
  try:
1877
- length_in_seconds = self.__calculate_lengh_in_seconds(filename, folder)
1878
- amounf_of_previewframes = int(amount_of_columns*amount_of_rows)
1879
- frames_per_second_as_string = f"{amounf_of_previewframes-2}/{length_in_seconds}"
1877
+ length_in_seconds = self.__calculate_length_in_seconds(filename, folder)
1878
+ amount_of_previewframes = int(amount_of_columns*amount_of_rows)
1879
+ frames_per_second_as_string = f"{amount_of_previewframes-2}/{length_in_seconds}"
1880
1880
  preview_files = self.__create_thumbnails(filename, frames_per_second_as_string, folder, tempname_for_thumbnails)
1881
1881
  if hook is not None:
1882
1882
  hook(file, preview_files)
1883
- actual_amounf_of_previewframes = len(preview_files)
1884
- self.__create_thumbnail2(filename_without_extension, folder, length_in_seconds, amount_of_rows, amount_of_columns, tempname_for_thumbnails, actual_amounf_of_previewframes)
1883
+ actual_amount_of_previewframes = len(preview_files)
1884
+ self.__create_thumbnail2(filename_without_extension, folder, length_in_seconds, amount_of_rows, amount_of_columns, tempname_for_thumbnails, actual_amount_of_previewframes)
1885
1885
  finally:
1886
1886
  for thumbnail_to_delete in preview_files:
1887
1887
  os.remove(thumbnail_to_delete)
@@ -2300,7 +2300,7 @@ resolving a name requires fontconfig, which does not exist on every system ffmpe
2300
2300
  namemappingfile, "Original filename;new filename;SHA2-hash of file")
2301
2301
  for file in GeneralUtilities.absolute_file_paths(inputfolder):
2302
2302
  if os.path.isfile(os.path.join(inputfolder, file)):
2303
- if obfuscate_all_files or self.__extension_matchs(file, obfuscate_file_extensions):
2303
+ if obfuscate_all_files or self.__extension_matches(file, obfuscate_file_extensions):
2304
2304
  files.append(file)
2305
2305
  for file in files:
2306
2306
  hash_value = GeneralUtilities.get_sha256_of_file(file)
@@ -2314,7 +2314,7 @@ resolving a name requires fontconfig, which does not exist on every system ffmpe
2314
2314
  raise ValueError(f"Directory not found: '{inputfolder}'")
2315
2315
 
2316
2316
  @GeneralUtilities.check_arguments
2317
- def __extension_matchs(self, file: str, obfuscate_file_extensions) -> bool:
2317
+ def __extension_matches(self, file: str, obfuscate_file_extensions) -> bool:
2318
2318
  for extension in obfuscate_file_extensions:
2319
2319
  if file.lower().endswith("."+extension.lower()):
2320
2320
  return True
@@ -2336,7 +2336,7 @@ resolving a name requires fontconfig, which does not exist on every system ffmpe
2336
2336
  inputfolder = newd
2337
2337
  if (os.path.isdir(inputfolder)):
2338
2338
  for file in GeneralUtilities.absolute_file_paths(inputfolder):
2339
- if obfuscate_all_files or self.__extension_matchs(file, obfuscate_file_extensions):
2339
+ if obfuscate_all_files or self.__extension_matches(file, obfuscate_file_extensions):
2340
2340
  self.changeHashOfProgram(file)
2341
2341
  os.remove(file)
2342
2342
  os.rename(file + ".modified", file)
@@ -2371,7 +2371,7 @@ resolving a name requires fontconfig, which does not exist on every system ffmpe
2371
2371
  # -1 → a < b
2372
2372
  # 0 → a = b
2373
2373
  # 1 → a > b
2374
- # dpkg --compare-versions <a> lt <b> → exit 0 wenn a < b
2374
+ # dpkg --compare-versions <a> lt <b> → exit 0 if a < b
2375
2375
  def dpkg_compare(op: str) -> bool:
2376
2376
  result = self.run_program_argsasarray("docker", [ "run", "--rm",image, "dpkg", "--compare-versions", a, op, b],throw_exception_if_exitcode_is_not_zero=False)
2377
2377
  GeneralUtilities.assert_condition(result[1]==GeneralUtilities.empty_string)
@@ -3918,10 +3918,10 @@ OCR-content:
3918
3918
  service_url = service_url + f"&languages={language}"
3919
3919
  headers = {'Cache-Control': 'no-cache'}
3920
3920
  with open(file, "rb") as f:
3921
- files_to_analyse = {
3921
+ files_to_analyze = {
3922
3922
  "fileContent": (os.path.basename(file), f, mime_type)
3923
3923
  }
3924
- r = requests.put(service_url, timeout=3600, headers=headers, files=files_to_analyse,verify=True)
3924
+ r = requests.put(service_url, timeout=3600, headers=headers, files=files_to_analyze,verify=True)
3925
3925
  if r.status_code != 200:
3926
3926
  if r.status_code == 400:
3927
3927
  return f"Could not calculate ocr-content for file \"{file}\". File may be broken."
@@ -4378,7 +4378,7 @@ OCR-content:
4378
4378
  health = state.get("Health")
4379
4379
 
4380
4380
  if health is None:
4381
- return False # kein HEALTHCHECK definiert
4381
+ return False # no HEALTHCHECK defined
4382
4382
 
4383
4383
  return health["Status"] == "healthy"
4384
4384
 
@@ -4994,7 +4994,7 @@ OCR-content:
4994
4994
  GeneralUtilities.write_lines_to_file(target_file, commits)
4995
4995
 
4996
4996
  @GeneralUtilities.check_arguments
4997
- def is_runnning_in_container(self) ->bool:
4997
+ def is_running_in_container(self) ->bool:
4998
4998
  """this function is based on a convention and does not do a real check."""
4999
4999
  return os.environ.get("ISRUNNINGINCONTAINER") == "true"
5000
5000
 
@@ -10,7 +10,7 @@ from lxml import etree
10
10
  import yaml
11
11
  from packaging.version import Version
12
12
  from .CertificateGeneratorInformationBase import CertificateGeneratorInformationBase
13
- from ...GeneralUtilities import GeneralUtilities, VersionEcholon
13
+ from ...GeneralUtilities import GeneralUtilities, VersionEchelon
14
14
  from ...SCLog import LogLevel
15
15
  from .NuGetPackageSourceRegistration import NuGetPackageSourceRegistration
16
16
  from ..TFCPS_CodeUnitSpecific_Base import TFCPS_CodeUnitSpecific_Base,TFCPS_CodeUnitSpecific_Base_CLI
@@ -841,13 +841,13 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
841
841
  return sorted(three_part_versions, key=Version, reverse=True)
842
842
 
843
843
  @GeneralUtilities.check_arguments
844
- def update_dependencies_with_specific_echolon(self, echolon: VersionEcholon) -> None:
844
+ def update_dependencies_with_specific_echelon(self, echelon: VersionEchelon) -> None:
845
845
  """Updates the dependencies of this codeunit and confirms the result in its lock-files.
846
846
 
847
847
  The update changes the versions the project-files ask for, and the lock-files still state the versions which were
848
848
  resolved before. Writing them again is part of the update: without it the next build fails with NU1004, and the
849
849
  state of the dependencies of the codeunit would be spread over two places which do not agree."""
850
- super().update_dependencies_with_specific_echolon(echolon)
850
+ super().update_dependencies_with_specific_echelon(echelon)
851
851
  self.synchronize_dependency_versions_across_project_files()
852
852
  self.tfcps_Tools_General.update_lock_files_of_dotnet_codeunit(self.get_codeunit_folder())
853
853
 
@@ -11,7 +11,7 @@ import zipfile
11
11
  import yaml
12
12
 
13
13
  from ...ArbTranslationsOrganizer import ArbTranslationsOrganizer
14
- from ...GeneralUtilities import GeneralUtilities, VersionEcholon
14
+ from ...GeneralUtilities import GeneralUtilities, VersionEchelon
15
15
  from ...SCLog import LogLevel
16
16
  from ...ScriptCollectionCore import ScriptCollectionCore
17
17
  from ..PubDependencies import PubDependencies
@@ -90,11 +90,11 @@ class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
90
90
  self._protected_sc.log.log(f"Build flutter-codeunit {codeunit_name} for target {target_names[target]}...")
91
91
  if target == "web":
92
92
  self._protected_sc.run_with_epew("flutter", "build web", src_folder)
93
- web_relase_folder = os.path.join(src_folder, "build/web")
93
+ web_release_folder = os.path.join(src_folder, "build/web")
94
94
  web_folder = os.path.join(artifacts_folder, "BuildResult_WebApplication")
95
95
  GeneralUtilities.ensure_directory_does_not_exist(web_folder)
96
96
  GeneralUtilities.ensure_directory_exists(web_folder)
97
- GeneralUtilities.copy_content_of_folder(web_relase_folder, web_folder)
97
+ GeneralUtilities.copy_content_of_folder(web_release_folder, web_folder)
98
98
  elif target == "windows":
99
99
  # Windows-builds prefer a Windows-task-runner - even when building on a Windows-client - so that all builds
100
100
  # are produced uniformly in the same defined environment. See the remote-build-article in the reference. If
@@ -725,7 +725,7 @@ class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
725
725
  def __is_running_in_container(self) -> bool:
726
726
  # The filesystem-marker is checked in addition to the convention-based environment-variable because a wrong
727
727
  # result here does not only change a message but makes the sibling-container access the wrong folder.
728
- return os.path.exists("/.dockerenv") or self._protected_sc.is_runnning_in_container()
728
+ return os.path.exists("/.dockerenv") or self._protected_sc.is_running_in_container()
729
729
 
730
730
  @GeneralUtilities.check_arguments
731
731
  def __get_own_container_id(self) -> str:
@@ -786,7 +786,7 @@ class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
786
786
  GeneralUtilities.assert_condition(dependency_was_set, f"No package of the codeunit \"{self.get_codeunit_name()}\" contains a dependency which is named \"{name}\".")
787
787
 
788
788
  @GeneralUtilities.check_arguments
789
- def update_dependencies_with_specific_echolon(self, echolon: VersionEcholon) -> None:
789
+ def update_dependencies_with_specific_echelon(self, echelon: VersionEchelon) -> None:
790
790
  """Updates the dependencies of this codeunit and confirms the result in the lock-files of its packages.
791
791
 
792
792
  The update changes the versions the package-files ask for, and the lock-files still state the versions which
@@ -797,7 +797,7 @@ class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
797
797
  The lock-files are only written when the update really changed a version, because writing them means
798
798
  resolving the dependencies again, which is the most expensive part of an update-run."""
799
799
  dependencies_before_the_update: dict[str, set[str]] = self.get_dependencies()
800
- super().update_dependencies_with_specific_echolon(echolon)
800
+ super().update_dependencies_with_specific_echelon(echelon)
801
801
  if dependencies_before_the_update == self.get_dependencies():
802
802
  return
803
803
  for package_folder in self.__get_package_folders():
@@ -4,7 +4,7 @@ import json
4
4
  from pathlib import Path
5
5
  import xml.etree.ElementTree as ET
6
6
  from lxml import etree
7
- from ...GeneralUtilities import GeneralUtilities, VersionEcholon
7
+ from ...GeneralUtilities import GeneralUtilities, VersionEchelon
8
8
  from ...SCLog import LogLevel
9
9
  from ..TFCPS_CodeUnitSpecific_Base import TFCPS_CodeUnitSpecific_Base,TFCPS_CodeUnitSpecific_Base_CLI
10
10
  from ..NpmDependencies import NpmDependencies
@@ -147,7 +147,7 @@ class TFCPS_CodeUnitSpecific_NodeJS_Functions(TFCPS_CodeUnitSpecific_Base):
147
147
  self._protected_sc.format_json_file(package_json_file)
148
148
 
149
149
  @GeneralUtilities.check_arguments
150
- def update_dependencies_with_specific_echolon(self,echolon:VersionEcholon)->None:
150
+ def update_dependencies_with_specific_echelon(self,echelon:VersionEchelon)->None:
151
151
  """Updates the dependencies of this codeunit and confirms the result in its lock-file.
152
152
 
153
153
  The update changes the versions the package-file asks for, and the lock-file still states the versions which
@@ -158,7 +158,7 @@ class TFCPS_CodeUnitSpecific_NodeJS_Functions(TFCPS_CodeUnitSpecific_Base):
158
158
  The lock-file is only written when the update really changed a version, because writing it means installing
159
159
  the dependencies again, which is the most expensive part of an update-run."""
160
160
  dependencies_before_the_update:dict[str,set[str]]=self.get_dependencies()
161
- super().update_dependencies_with_specific_echolon(echolon)
161
+ super().update_dependencies_with_specific_echelon(echelon)
162
162
  if dependencies_before_the_update!=self.get_dependencies():
163
163
  #The cache must not be used here: the whole point of this install is to resolve the dependencies again.
164
164
  self.tfcps_Tools_General.do_npm_install(self.get_codeunit_folder(),True,False)
@@ -94,7 +94,7 @@ class PlantUMLRenderer:
94
94
  self.__sc.docker_pull(image_address, image_tag)
95
95
  # Inside a build-container the forwarded docker-socket belongs to the daemon of the host, so the container
96
96
  # started here is a sibling-container and not a child. See get_container_call_configuration.
97
- own_container_id: str = self.__sc.get_own_container_id() if self.__sc.is_runnning_in_container() else None
97
+ own_container_id: str = self.__sc.get_own_container_id() if self.__sc.is_running_in_container() else None
98
98
  for plantuml_file in plantuml_files:
99
99
  folder: str = os.path.dirname(plantuml_file)
100
100
  container_call: PlantUMLContainerCall = PlantUMLRenderer.get_container_call_configuration(folder, own_container_id)
@@ -9,7 +9,7 @@ import yaml
9
9
  import xmlschema
10
10
  from packaging.version import Version
11
11
  from lxml import etree
12
- from ..GeneralUtilities import GeneralUtilities, VersionEcholon
12
+ from ..GeneralUtilities import GeneralUtilities, VersionEchelon
13
13
  from ..ScriptCollectionCore import ScriptCollectionCore
14
14
  from ..SCLog import LogLevel
15
15
  from .TFCPS_Tools_General import TFCPS_Tools_General, CommonProjectStructureVersion
@@ -32,10 +32,10 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
32
32
  __validate_developers_of_repository:bool=True#TODO must be settable to false
33
33
  codeunit_namespace:str= TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)
34
34
 
35
- def __init__(self,current_file:str,verbosity:LogLevel,target_envionment_type:str,use_cache:bool,is_pre_merge:bool):
35
+ def __init__(self,current_file:str,verbosity:LogLevel,target_environment_type:str,use_cache:bool,is_pre_merge:bool):
36
36
  self.__verbosity=verbosity
37
37
  self.__use_cache=use_cache
38
- self.__target_environment_type=target_envionment_type
38
+ self.__target_environment_type=target_environment_type
39
39
  self.__current_file = str(Path(current_file).absolute())
40
40
  self.__current_folder = os.path.dirname(self.__current_file)
41
41
  self.__codeunit_folder=self.__search_codeunit_folder()
@@ -77,9 +77,9 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
77
77
  raise ValueError(f"Operation is abstract.")
78
78
 
79
79
  def update_dependencies(self):
80
- self.update_dependencies_with_specific_echolon(VersionEcholon.LatestPatchOrLatestMinor)
80
+ self.update_dependencies_with_specific_echelon(VersionEchelon.LatestPatchOrLatestMinor)
81
81
 
82
- def update_dependencies_with_specific_echolon(self, echolon: VersionEcholon):
82
+ def update_dependencies_with_specific_echelon(self, echelon: VersionEchelon):
83
83
  ignored_dependencies=self.tfcps_Tools_General.get_dependencies_which_are_ignored_from_updates(self.get_codeunit_folder())
84
84
  for ignored_dependency in ignored_dependencies:
85
85
  self._protected_sc.log.log(f"Codeunit {self.get_codeunit_name()} ignores the dependency {ignored_dependency} in update-checks.", LogLevel.Warning)
@@ -95,7 +95,7 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
95
95
  available_versions:list[str]=self.get_available_versions(dependencyname)
96
96
  for available_version in available_versions:
97
97
  GeneralUtilities.assert_condition(re.match(r"^(\d+).(\d+).(\d+)$", available_version) is not None,f"Invalid-version-string: {available_version}")
98
- desired_version=GeneralUtilities.choose_version(available_versions,latest_currently_used_version,echolon)
98
+ desired_version=GeneralUtilities.choose_version(available_versions,latest_currently_used_version,echelon)
99
99
  GeneralUtilities.assert_condition(Version(dependency_version)<=Version(desired_version),f"Desired version {desired_version} for dependency {dependencyname} is less than the actual used version {latest_currently_used_version}.")
100
100
  update_dependency:bool=desired_version!=latest_currently_used_version
101
101
  if update_dependency:
@@ -150,7 +150,7 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
150
150
  namespaces = {'cps': TFCPS_CodeUnitSpecific_Base.codeunit_namespace, 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
151
151
  root: etree._ElementTree = etree.parse(codeunit_file)
152
152
 
153
- # check codeunit-spcecification-version
153
+ # check codeunit-specification-version
154
154
  try:
155
155
  codeunit_file_version = root.xpath('//cps:codeunit/@codeunitspecificationversion', namespaces=namespaces)[0]
156
156
  if codeunit_file_version != supported_codeunitspecificationversion:
@@ -256,7 +256,7 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
256
256
  raise ValueError(f"Hints-file '{hints_file}' does not exist.")
257
257
 
258
258
  # Copy license-file
259
- self.tfcps_Tools_General.copy_licence_file(self.get_codeunit_folder())
259
+ self.tfcps_Tools_General.copy_license_file(self.get_codeunit_folder())
260
260
 
261
261
  # Propagate the repository-level dependency-version-pins (e.g. PlantUML, OpenAPIGenerator, JRE) into the codeunit
262
262
  # so each codeunit carries its own copy of the versions that are defined once at repository-level.
@@ -510,11 +510,11 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
510
510
 
511
511
  # Generating badges
512
512
  if generate_badges:
513
- testcoverageubfolger = "Other/Resources/TestCoverageBadges"
514
- fulltestcoverageubfolger = os.path.join(repository_folder, codeunitname, testcoverageubfolger)
515
- GeneralUtilities.ensure_directory_does_not_exist(fulltestcoverageubfolger)
516
- GeneralUtilities.ensure_directory_exists(fulltestcoverageubfolger)
517
- self._protected_sc.run_program("reportgenerator", f"-reports:Other/Artifacts/TestCoverage/TestCoverage.xml -targetdir:{testcoverageubfolger} -reporttypes:Badges --verbosity:{verbose_argument_for_reportgenerator}", os.path.join(repository_folder, codeunitname))
513
+ testcoverage_subfolder = "Other/Resources/TestCoverageBadges"
514
+ full_testcoverage_subfolder = os.path.join(repository_folder, codeunitname, testcoverage_subfolder)
515
+ GeneralUtilities.ensure_directory_does_not_exist(full_testcoverage_subfolder)
516
+ GeneralUtilities.ensure_directory_exists(full_testcoverage_subfolder)
517
+ self._protected_sc.run_program("reportgenerator", f"-reports:Other/Artifacts/TestCoverage/TestCoverage.xml -targetdir:{testcoverage_subfolder} -reporttypes:Badges --verbosity:{verbose_argument_for_reportgenerator}", os.path.join(repository_folder, codeunitname))
518
518
 
519
519
  @GeneralUtilities.check_arguments
520
520
  def __update_path_of_source_in_testcoverage_file(self, repository_folder: str, codeunitname: str) -> None:
@@ -117,7 +117,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
117
117
  GeneralUtilities.assert_file_exists(product_information_file, f"The file '{product_information_file}' does not exist.")
118
118
 
119
119
  #when the build runs inside a container, ensure the used SCBuilder-image is at least the version required by this repository (defined in .ScriptCollection/OCIImages/ImageDefinition.csv)
120
- if self.sc.is_runnning_in_container():
120
+ if self.sc.is_running_in_container():
121
121
  scbuilder_version_environment_value = os.environ.get("SCBuilderVersion")
122
122
  GeneralUtilities.assert_condition(GeneralUtilities.string_has_content(scbuilder_version_environment_value), "The environment-variable 'SCBuilderVersion' is not set although the build runs inside a container (environment-variable 'ISRUNNINGINCONTAINER' is 'true').")
123
123
  scbuilder_tag=self.tfcps_tools_general.oci_image_manager.get_tag_for_image(self.repository, "SCBuilder")
@@ -182,7 +182,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
182
182
  #mark current version as supported
183
183
  now = GeneralUtilities.get_now()
184
184
  project_version:str=self.tfcps_tools_general.get_version_of_project(self.repository)
185
- if not self.tfcps_tools_general.suport_information_exists(self.repository, project_version):
185
+ if not self.tfcps_tools_general.support_information_exists(self.repository, project_version):
186
186
  amount_of_years_for_support:int=1
187
187
  support_time = timedelta(days=365*amount_of_years_for_support+30*3+1)
188
188
  until = now + support_time
@@ -345,17 +345,8 @@ class TFCPS_CodeUnit_BuildCodeUnits:
345
345
  self.sc.log.log(f"The signature of '{security_txt_file}' can not be verified because the file does not contain an 'Encryption'-field with an http(s)-URL of the public key.", LogLevel.Warning)
346
346
  return
347
347
  key_url: str = key_urls[0]
348
- try:
349
- response = requests.get(key_url, timeout=30, allow_redirects=True)
350
- except requests.RequestException as exception:
351
- self.sc.log.log(f"The signature of '{security_txt_file}' can not be verified because the public key can not be downloaded from '{key_url}': {exception}", LogLevel.Warning)
352
- return
353
- if not response.ok:
354
- self.sc.log.log(f"The signature of '{security_txt_file}' can not be verified because the public key can not be downloaded from '{key_url}' (HTTP-status {response.status_code}).", LogLevel.Warning)
355
- return
356
- public_key: bytes = TFCPS_CodeUnit_BuildCodeUnits.__dearmor_pgp_public_key(response.text)
348
+ public_key: bytes = self.__download_pgp_public_key(security_txt_file, key_url)
357
349
  if public_key is None:
358
- self.sc.log.log(f"The signature of '{security_txt_file}' can not be verified because '{key_url}' does not contain a PGP-public-key-block.", LogLevel.Warning)
359
350
  return
360
351
  with tempfile.TemporaryDirectory() as keyring_folder:
361
352
  keyring_file: str = os.path.join(keyring_folder, "PublicKey.gpg")
@@ -367,6 +358,24 @@ class TFCPS_CodeUnit_BuildCodeUnits:
367
358
  if exit_code != 0:
368
359
  self.sc.log.log(f"The signature of '{security_txt_file}' is not valid for the public key from '{key_url}' (exitcode of gpgv: {exit_code}). StdErr: '{stderr}'", LogLevel.Warning)
369
360
 
361
+ @GeneralUtilities.check_arguments
362
+ def __download_pgp_public_key(self, security_txt_file: str, key_url: str) -> bytes:
363
+ """Returns the binary content of the PGP-public-key which is downloaded from the given URL to verify the signature of the given
364
+ security.txt-file, or None (after logging a warning which explains why) if it can not be downloaded or if the downloaded
365
+ content does not contain a PGP-public-key-block."""
366
+ try:
367
+ response = requests.get(key_url, timeout=30, allow_redirects=True)
368
+ except requests.RequestException as exception:
369
+ self.sc.log.log(f"The signature of '{security_txt_file}' can not be verified because the public key can not be downloaded from '{key_url}': {exception}", LogLevel.Warning)
370
+ return None
371
+ if not response.ok:
372
+ self.sc.log.log(f"The signature of '{security_txt_file}' can not be verified because the public key can not be downloaded from '{key_url}' (HTTP-status {response.status_code}).", LogLevel.Warning)
373
+ return None
374
+ public_key: bytes = TFCPS_CodeUnit_BuildCodeUnits.__dearmor_pgp_public_key(response.text)
375
+ if public_key is None:
376
+ self.sc.log.log(f"The signature of '{security_txt_file}' can not be verified because '{key_url}' does not contain a PGP-public-key-block.", LogLevel.Warning)
377
+ return public_key
378
+
370
379
  @staticmethod
371
380
  @GeneralUtilities.check_arguments
372
381
  def __dearmor_pgp_public_key(armored_content: str) -> bytes:
@@ -557,7 +566,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
557
566
  build-runner gets the TFCPS-folder of its configuration-folder mounted there instead (see the article 'Build-runner-configuration'). The
558
567
  script which the host itself runs before it starts the container is 'CustomPreCodeUnitBuildScriptForContainer.py' and is
559
568
  therefore run there and not here."""
560
- if self.sc.is_runnning_in_container():
569
+ if self.sc.is_running_in_container():
561
570
  script_file: str = os.path.join(self.tfcps_tools_general.get_folder_of_custom_scripts_in_container(), "CustomPreCodeUnitBuildScriptInContainer.py")
562
571
  if not os.path.isfile(script_file):
563
572
  script_file = os.path.join(self.tfcps_tools_general.get_custom_scripts_folder_for_container(), "CustomPreCodeUnitBuildScriptInContainer.py")
@@ -705,7 +714,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
705
714
  @GeneralUtilities.check_arguments
706
715
  def __is_running_in_container(self) -> bool:
707
716
  #the filesystem-marker is checked in addition to the convention-based environment-variable, like in __search_for_secrets_in_repository.
708
- return os.path.exists("/.dockerenv") or self.sc.is_runnning_in_container()
717
+ return os.path.exists("/.dockerenv") or self.sc.is_running_in_container()
709
718
 
710
719
  @GeneralUtilities.check_arguments
711
720
  def __get_base_mount_arguments(self, base_mount_folder: str, container_base_mount_folder: str) -> list[str]:
@@ -962,7 +971,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
962
971
  config_file = os.path.join(self.repository, ".betterleaks.toml")
963
972
  #the filesystem-marker is checked in addition to the convention-based environment-variable (which the rest of this class uses as well),
964
973
  #because a wrong result here does not only change a message but makes the scan analyze the wrong folder.
965
- running_in_container = os.path.exists("/.dockerenv") or self.sc.is_runnning_in_container()
974
+ running_in_container = os.path.exists("/.dockerenv") or self.sc.is_running_in_container()
966
975
  if running_in_container:
967
976
  # We run inside the build-container with the docker-socket forwarded to the host-daemon.
968
977
  # A bind-mount of our in-container repository-path (e.g. "/__w/<repo>/<repo>" on a
@@ -18,12 +18,13 @@ from packaging import version
18
18
  import requests
19
19
  import yaml
20
20
  from lxml import etree
21
- from ..GeneralUtilities import GeneralUtilities,Platform
21
+ from ..GeneralUtilities import GeneralUtilities,Platform,VersionEchelon
22
22
  from ..ScriptCollectionCore import ScriptCollectionCore,VSCodeWorkspaceShellTask
23
23
  from ..SCLog import LogLevel
24
24
  from ..OCIImages.AbstractImageHandler import AbstractImageHandler
25
25
  from ..OCIImages.OCIImageManager import OCIImageManager
26
26
  from .PackageSource import PackageSource
27
+ from .NpmDependencies import NpmDependencies
27
28
  from .PlantUMLRenderer import PlantUMLRenderer
28
29
 
29
30
  # Central definition of the common-project-structure-version. This is the single place which has to be updated to bump the
@@ -104,7 +105,7 @@ class TFCPS_Tools_General:
104
105
  raise ValueError("Unsupported operating system for cyclonedx-cli.")
105
106
 
106
107
  @GeneralUtilities.check_arguments
107
- def download_all_cachable_tools(self, enforce_update: bool = False, verbose: bool = False) -> None:
108
+ def download_all_cacheable_tools(self, enforce_update: bool = False, verbose: bool = False) -> None:
108
109
  """Downloads all tools that are stored in the global ScriptCollection-cache.
109
110
  Running this (for example in a build-image) lets repeated pipeline-runs avoid
110
111
  rate-limits and run faster, because the tools are already present when a later
@@ -129,7 +130,7 @@ class TFCPS_Tools_General:
129
130
  @GeneralUtilities.check_arguments
130
131
  def download_jre(self, enforce_update: bool = False) -> None:
131
132
  self.__sc.log.log("Download cacheable tool \"JRE\" into global cache...", LogLevel.Debug)
132
- # No repository-context is available when warming the global cache (e.g. scdownloadcachabletools in a
133
+ # No repository-context is available when warming the global cache (e.g. scdownloadcacheabletools in a
133
134
  # build-image), so download the default version pinned by the ScriptCollection-package. Actual builds
134
135
  # pass the version pinned in their own '<repo>/Other/Resources/Dependencies/JRE/Version.txt'. This is
135
136
  # independent of the PlantUML-diagram-rendering (see PlantUMLRenderer), which brings its own java in the
@@ -709,11 +710,11 @@ class TFCPS_Tools_General:
709
710
  if constants_valuefile is None:
710
711
  constants_valuefile_folder = constants_folder
711
712
  constants_valuefile_name = f"{constantname}.value.txt"
712
- constants_valuefiler_reference = f"./{constants_valuefile_name}"
713
+ constants_valuefile_reference = f"./{constants_valuefile_name}"
713
714
  else:
714
715
  constants_valuefile_folder = os.path.dirname(constants_valuefile)
715
716
  constants_valuefile_name = os.path.basename(constants_valuefile)
716
- constants_valuefiler_reference = os.path.join(constants_valuefile_folder, constants_valuefile_name)
717
+ constants_valuefile_reference = os.path.join(constants_valuefile_folder, constants_valuefile_name)
717
718
 
718
719
  # TODO implement usage of self.reference_latest_version_of_xsd_when_generating_xml
719
720
  GeneralUtilities.write_text_to_file(constants_metafile, f"""<?xml version="1.0" encoding="UTF-8" ?>
@@ -721,7 +722,7 @@ class TFCPS_Tools_General:
721
722
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="{TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)} {TFCPS_Tools_General.get_common_project_structure_xsd_base_url(CommonProjectStructureVersion)}/constant.xsd">
722
723
  <cps:name>{constantname}</cps:name>
723
724
  <cps:documentationsummary>{documentationsummary}</cps:documentationsummary>
724
- <cps:path>{constants_valuefiler_reference}</cps:path>
725
+ <cps:path>{constants_valuefile_reference}</cps:path>
725
726
  </cps:constant>""")
726
727
  # TODO validate generated xml against xsd
727
728
  GeneralUtilities.write_text_to_file(os.path.join(constants_valuefile_folder, constants_valuefile_name), constant_value)
@@ -754,7 +755,7 @@ class TFCPS_Tools_General:
754
755
  raise ValueError("Too many results found.")
755
756
 
756
757
  @GeneralUtilities.check_arguments
757
- def copy_licence_file(self, codeunit_folder: str) -> None:
758
+ def copy_license_file(self, codeunit_folder: str) -> None:
758
759
  folder_of_current_file = os.path.join(codeunit_folder,"Other")
759
760
  license_file = GeneralUtilities.resolve_relative_path("../../License.txt", folder_of_current_file)
760
761
  target_folder = GeneralUtilities.resolve_relative_path("Artifacts/License", folder_of_current_file)
@@ -940,7 +941,7 @@ class TFCPS_Tools_General:
940
941
  @GeneralUtilities.check_arguments
941
942
  def get_default_jre_version(self) -> str:
942
943
  """Returns the JRE-version used when no repository-specific version is pinned (for example when warming
943
- the global cache via scdownloadcachabletools). The value is read from the version-file bundled with the
944
+ the global cache via scdownloadcacheabletools). The value is read from the version-file bundled with the
944
945
  ScriptCollection-package."""
945
946
  content = GeneralUtilities._internal_load_resource(TFCPS_Tools_General.__jre_version_resource_relative_path)
946
947
  return content.decode("utf-8").strip()
@@ -1636,14 +1637,14 @@ class TFCPS_Tools_General:
1636
1637
  line_elements = package.findall(".//line")
1637
1638
 
1638
1639
  amount_of_lines = 0
1639
- amount_of_hited_lines = 0
1640
+ amount_of_hit_lines = 0
1640
1641
 
1641
1642
  for line in line_elements:
1642
1643
  amount_of_lines += 1
1643
1644
  hits = int(line.get("hits", "0"))
1644
1645
  if hits > 0:
1645
- amount_of_hited_lines += 1
1646
- line_rate = amount_of_hited_lines / amount_of_lines if amount_of_lines > 0 else 0.0
1646
+ amount_of_hit_lines += 1
1647
+ line_rate = amount_of_hit_lines / amount_of_lines if amount_of_lines > 0 else 0.0
1647
1648
  package.set("line-rate", str(line_rate))
1648
1649
  tree.write(coverage_file, pretty_print=True, xml_declaration=True, encoding="UTF-8")
1649
1650
 
@@ -1709,7 +1710,7 @@ class TFCPS_Tools_General:
1709
1710
  self.__sc.log.log("Download OpenAPIGeneratorCLI...", LogLevel.Debug)
1710
1711
  if pinned_version is None:
1711
1712
  # No repository-specific version is pinned. This happens when the global cache is warmed
1712
- # without a repository-context (e.g. scdownloadcachabletools in a build-image). Fall back
1713
+ # without a repository-context (e.g. scdownloadcacheabletools in a build-image). Fall back
1713
1714
  # to the default version that ships with the ScriptCollection-package instead of failing.
1714
1715
  # Actual codeunit-builds always pass a repository_folder and therefore use the version
1715
1716
  # pinned in their own '<repo>/Other/Resources/Dependencies/OpenAPIGenerator/Version.txt'.
@@ -1753,7 +1754,7 @@ class TFCPS_Tools_General:
1753
1754
  @GeneralUtilities.check_arguments
1754
1755
  def get_default_openapigenerator_version(self) -> str:
1755
1756
  """Returns the OpenAPIGenerator-version used when no repository-specific version is pinned
1756
- (for example when warming the global cache via scdownloadcachabletools). The value is read from
1757
+ (for example when warming the global cache via scdownloadcacheabletools). The value is read from
1757
1758
  '<repo>/Other/Resources/Dependencies/OpenAPIGenerator/Version.txt', which the build copies into the
1758
1759
  ScriptCollection.Resources-package so it is available at runtime from the installed wheel."""
1759
1760
  content = GeneralUtilities._internal_load_resource(TFCPS_Tools_General.__openapigenerator_version_resource_relative_path)
@@ -1811,7 +1812,7 @@ class TFCPS_Tools_General:
1811
1812
  self.__sc.push_nuget_build_artifact(self.__sc.find_file_by_extension(build_artifact_folder, "nupkg"), registry_address, api_key)
1812
1813
 
1813
1814
  @GeneralUtilities.check_arguments
1814
- def suport_information_exists(self, repository_folder: str, version_of_product: str) -> bool:
1815
+ def support_information_exists(self, repository_folder: str, version_of_product: str) -> bool:
1815
1816
  self.__sc.assert_is_git_repository(repository_folder)
1816
1817
  folder = os.path.join(repository_folder, "Other", "Resources", "Support")
1817
1818
  file = os.path.join(folder, "InformationAboutSupportedVersions.csv")
@@ -1826,7 +1827,7 @@ class TFCPS_Tools_General:
1826
1827
  @GeneralUtilities.check_arguments
1827
1828
  def mark_current_version_as_supported(self, repository_folder: str, version_of_product: str, supported_from: datetime, supported_until: datetime):
1828
1829
  self.__sc.assert_is_git_repository(repository_folder)
1829
- if self.suport_information_exists(repository_folder, version_of_product):
1830
+ if self.support_information_exists(repository_folder, version_of_product):
1830
1831
  raise ValueError(f"Version-support for v{version_of_product} already defined.")
1831
1832
  folder = os.path.join(repository_folder, "Other", "Resources", "Support")
1832
1833
  GeneralUtilities.ensure_directory_exists(folder)
@@ -2133,7 +2134,7 @@ class TFCPS_Tools_General:
2133
2134
  @GeneralUtilities.check_arguments
2134
2135
  def log_newer_major_versions_of_dependency(self, dependency_name: str, available_versions: list[str], used_version: str) -> None:
2135
2136
  """Logs if a newer major-version of the given dependency is available than the used one.
2136
- An update with an echolon like LatestPatchOrLatestMinor does not take over a new major-version, so without this message it would not be visible that the dependency falls behind.
2137
+ An update with an echelon like LatestPatchOrLatestMinor does not take over a new major-version, so without this message it would not be visible that the dependency falls behind.
2137
2138
  Being 1 major-version behind is logged as information, being 2 or more major-versions behind is logged as warning.
2138
2139
  used_version is the version which is used after the update (if an update was done)."""
2139
2140
  amount_of_major_versions_behind: int = GeneralUtilities.get_amount_of_major_versions_behind(available_versions, used_version)
@@ -2143,6 +2144,23 @@ class TFCPS_Tools_General:
2143
2144
  latest_version: str = GeneralUtilities.get_latest_version(available_versions)
2144
2145
  self.__sc.log.log(f"Dependency {dependency_name} is used in version {used_version}, which is {amount_of_major_versions_behind} major-version(s) behind the latest available version {latest_version}. A new major-version has to be taken over deliberately.", loglevel)
2145
2146
 
2147
+ @GeneralUtilities.check_arguments
2148
+ def update_dependencies_of_package_json_file(self, package_json_file: str, echelon: VersionEchelon) -> None:
2149
+ """Updates the versions of the dependencies and dev-dependencies which the given package.json-file declares, according to the given echelon.
2150
+ This is intended for a package-file which does not belong to a codeunit (for example "<repository>/package.json", which declares the git-hooks-tool of the repository),
2151
+ so it is called by "<repository>/Other/Scripts/UpdateDependencies.py". The package-file of a nodejs- or typescript-codeunit is updated by the update of that codeunit instead.
2152
+ Only dependencies which are declared with a plain version-number are updated (see NpmDependencies.get_dependency_entries).
2153
+ No lock-file is written and nothing is installed, because such a package-file is not part of a build."""
2154
+ GeneralUtilities.assert_file_exists(package_json_file)
2155
+ for dependency in NpmDependencies.get_dependencies(package_json_file):
2156
+ available_versions: list[str] = NpmDependencies.get_available_versions(dependency.dependencyname)
2157
+ desired_version: str = GeneralUtilities.choose_version(available_versions, dependency.current_version, echelon)
2158
+ GeneralUtilities.assert_condition(version.parse(dependency.current_version) <= version.parse(desired_version), f"Desired version {desired_version} for dependency {dependency.dependencyname} is less than the actual used version {dependency.current_version}.")
2159
+ if desired_version != dependency.current_version:
2160
+ self.__sc.log.log(f"Update dependency {dependency.dependencyname} (which is currently used in version {dependency.current_version}) to version {desired_version}.")
2161
+ NpmDependencies.set_dependency_version(package_json_file, dependency.dependencyname, desired_version)
2162
+ self.log_newer_major_versions_of_dependency(dependency.dependencyname, available_versions, desired_version)
2163
+
2146
2164
  @GeneralUtilities.check_arguments
2147
2165
  def get_dependencies_which_are_ignored_from_updates(self, codeunit_folder: str) -> list[str]:
2148
2166
  self.assert_is_codeunit_folder(codeunit_folder)
@@ -455,7 +455,7 @@ class TFCPS_VisualRegressionTests:
455
455
  def __is_running_in_container(self) -> bool:
456
456
  # The filesystem-marker is checked in addition to the convention-based environment-variable because a wrong
457
457
  # result here does not only change a message but makes the container access the wrong folder.
458
- return os.path.exists("/.dockerenv") or self.__sc.is_runnning_in_container()
458
+ return os.path.exists("/.dockerenv") or self.__sc.is_running_in_container()
459
459
 
460
460
  @GeneralUtilities.check_arguments
461
461
  def __get_own_container_id(self) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scriptcollection
3
- Version: 4.4.74
3
+ Version: 5.0.0
4
4
  Summary: The ScriptCollection is the place for reusable scripts.
5
5
  Author-email: Marius Göcke <marius.goecke@gmail.com>
6
6
  License-Expression: GPL-3.0-only
@@ -31,6 +31,7 @@ Requires-Dist: keyboard>=0.13.5
31
31
  Requires-Dist: lcov-cobertura>=2.1.1
32
32
  Requires-Dist: lxml>=6.0.1
33
33
  Requires-Dist: ntplib>=0.4.0
34
+ Requires-Dist: packaging>=26.3
34
35
  Requires-Dist: Pillow>=11.3.0
35
36
  Requires-Dist: psutil>=7.2.2
36
37
  Requires-Dist: pycdlib>=1.22.0
@@ -41,6 +42,7 @@ Requires-Dist: PyPDF>=6.21.1
41
42
  Requires-Dist: pytest>=8.4.2
42
43
  Requires-Dist: PyYAML>=6.0.3
43
44
  Requires-Dist: qrcode>=8.2.0
45
+ Requires-Dist: requests>=2.34.2
44
46
  Requires-Dist: send2trash>=1.8.3
45
47
  Requires-Dist: twine>=6.2.0
46
48
  Requires-Dist: xmlschema>=4.3.2
@@ -1,8 +1,8 @@
1
1
  ScriptCollection/AgentRunner.py,sha256=v3wRllPSjeIuIK6uhCfQLRdAm0Kpq-DOs7VVWUEIU2s,29866
2
2
  ScriptCollection/ArbTranslationsOrganizer.py,sha256=3TO4fjkYADcHGyUXdiQk-RtfCxtf9ojuBS3CbZtgXBE,12218
3
3
  ScriptCollection/CertificateUpdater.py,sha256=yZc7KESc1F_Mc6HP2UfLmNHRc2MvtVqp0t60J_CqY3s,9755
4
- ScriptCollection/Executables.py,sha256=eLLqSEAsrpI1t7F63cqFrTOfwZuq7S6HGBr8buVWj_E,88478
5
- ScriptCollection/GeneralUtilities.py,sha256=F4o39U7YxWlePPfHqiO0ijw1qUX3D6E8jJk3OFlxsKw,83093
4
+ ScriptCollection/Executables.py,sha256=Ow5t0s3vqNJ03dA4kjqj37d5AnUfZkwcCn_5kaX9xWQ,88479
5
+ ScriptCollection/GeneralUtilities.py,sha256=pBFEN5yeF4_2bLS1VQy7IFfqcBG-0Lgnta8bS80WRVI,83097
6
6
  ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
7
7
  ScriptCollection/ProcessesRunner.py,sha256=wtNFdmj9klETTIDUSE90vaR5ClEX4V7dgJNVbp9_wi0,1381
8
8
  ScriptCollection/ProgramRunnerBase.py,sha256=eZenpiIFW1dhvSVCG7cfBs5hO4_KLlOxR7oXoSxUDmk,2286
@@ -12,7 +12,7 @@ ScriptCollection/ProgramRunnerSudo.py,sha256=gTcLNt4TAUck-i9TvLHaOHYfB0TLKLVKlYN
12
12
  ScriptCollection/RepositoryDiagramGenerator.py,sha256=K_u2NW_p4ozdWD50irJEkkcDVa70TcUJpZN63TeXSLw,7092
13
13
  ScriptCollection/RepositoryHistoryAnalyzer.py,sha256=u9141B9D-Kef-9uo3yR7BXKUMzIKLVsesnYk7H-cWm4,6157
14
14
  ScriptCollection/SCLog.py,sha256=Fjf8Pdi63cXHGMxL_aI6A0dwGm7QIfrv3czjvpSUlaM,4705
15
- ScriptCollection/ScriptCollectionCore.py,sha256=YU-rApqYlm8uY5jB6cHqmNuEDtXxlttSjnU9s0M3CZU,313309
15
+ ScriptCollection/ScriptCollectionCore.py,sha256=jC4eyD2T404KS0FvZhRXbkziP7L0S9b4HcbpIGhGZN8,313304
16
16
  ScriptCollection/TestKind.py,sha256=jqLJwNvQeyea7SZf-UFzMC9pM0znv4do7FIC1xq8u9M,1672
17
17
  ScriptCollection/UnassignedVariablesCheck.py,sha256=8xNcp1D5HeOLO1a1NEerq2TsnpFhw7yzYPkaay-oisY,3804
18
18
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -46,17 +46,17 @@ ScriptCollection/LinuxServerSecurityCheck/Checks/PersistenceChecks.py,sha256=rRg
46
46
  ScriptCollection/LinuxServerSecurityCheck/Checks/ProcessChecks.py,sha256=gkK8sDMBF92NtFOBW_uvJGrB8xmJJQTW-MpeEjU6ip4,5254
47
47
  ScriptCollection/LinuxServerSecurityCheck/Checks/SSHChecks.py,sha256=I603qknNvoirjTpqoGrISfg9qSB1Ndl2fTDXZo-NFME,3436
48
48
  ScriptCollection/LinuxServerSecurityCheck/Checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
- ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=a_IkSjHiA2gV1PfCIzw13fnuUOT19I_6NW_zYLZujEo,2042
49
+ ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=pzmv6FLbZjRUjE2kBr1cemttBIAqbHLT6QNvpI6d9jc,2042
50
50
  ScriptCollection/OCIImages/AbstractTagPatternImageHandler.py,sha256=tB2cs_89LGzeiTQl3REn5IAPvccrJyQfzfLg74SpdzI,2607
51
- ScriptCollection/OCIImages/OCIImageManager.py,sha256=LzZv2cuhpWrGxjbRTEOGu04rWv4seSnw6u-ntyYOjN4,25970
51
+ ScriptCollection/OCIImages/OCIImageManager.py,sha256=KrmnPiIQEPmnRtuOVqpcX_VEFKvPC66rZ9SyVz-UT8M,25970
52
52
  ScriptCollection/OCIImages/OCIRegistryClient.py,sha256=QNEEHgKmcqBd0VvHIvnti50EmOhROW1lpdfErXu7rJM,7226
53
53
  ScriptCollection/OCIImages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebian.py,sha256=c31ZovK5Gc5kd09lj0rx1uWaUjxp517R2kFxMCPauUo,538
55
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebianSlim.py,sha256=fMJzFI3yyRkrsjFa32s3ckOdN7qDWvPcyIsNhDvfl1g,556
56
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGeneric.py,sha256=pn7180kGuGw0Nt23Vy-LFHD2VDMaNvqq4cFxpmmZurQ,555
57
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGenericV.py,sha256=SyJFz92XAfPsb82zJouT92LECYyW_JKv9T7PmfahyF4,561
58
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabCE.py,sha256=UU3vkn1V9y6s3H1NVCpITMS_mnpMzuCHuGrp2tA5BK4,1042
59
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabEE.py,sha256=7_afKFvXFmm8wHuk-wMhPaeVejeXXZeYjyafRZJh0rE,1042
54
+ ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebian.py,sha256=6UOtEWrkX7815htm2TR4nyWSleCUTf7PhOafxRoPCjg,538
55
+ ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebianSlim.py,sha256=UKgBvwd_qv-2Z6vPw599hRCeJPXfZCFTPX-TfXPr1TA,556
56
+ ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGeneric.py,sha256=V0q0HMbZ-u4cPHuvQYJI0XpOkCoZREfw_aEkkpCzobs,555
57
+ ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGenericV.py,sha256=YgZmh00Mxo9OfwkgjX7y7NuFqmqNCgMyptufiMiMaXY,561
58
+ ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabCE.py,sha256=E0x2FYKYtltkm4bA2QdMiHJ0Oa9ICf15WijLg1rFCyg,1042
59
+ ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabEE.py,sha256=IU5FJhA_Uidm3qmbgscp8viMuWPnuu04d5eB2ePPkto,1042
60
60
  ScriptCollection/OCIImages/ConcreteImageHandlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
61
  ScriptCollection/Resources/CultureChooser/CultureChooser.js,sha256=5-4pwGDq5j1UnpTZy850ZMoxlM9tYPeu781QpZBtCWM,951
62
62
  ScriptCollection/Resources/CultureChooser/index.html,sha256=gxQzbrSp4WU52TqN-gcBEtz2gJXmmM14OwTSFtFVRvw,276
@@ -66,14 +66,14 @@ ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html,sha256=CX9S1bdOz
66
66
  ScriptCollection/TFCPS/ContainerBuildEnvironment.py,sha256=LIlWZnxqKGqTyAOxrdUOh2yTLmaTlA8skqIII9-SElk,12620
67
67
  ScriptCollection/TFCPS/NpmDependencies.py,sha256=IfUh9EyrkHxovGRWYagNMZjBUXyKjZ4AG-Z8leehw24,6304
68
68
  ScriptCollection/TFCPS/PackageSource.py,sha256=tQoMbxrIbV3mYHKH2wgOoGzIHY1TvBH8EAFpWGhryrQ,1311
69
- ScriptCollection/TFCPS/PlantUMLRenderer.py,sha256=He5woqx9IR96vMXtHo12BmeXmcjLoifGD8Sup0bpxuo,11060
69
+ ScriptCollection/TFCPS/PlantUMLRenderer.py,sha256=QwfLFdnaCI1aP3_ndlMs7HC4JgqR_z6WPvCU_SRYTwE,11059
70
70
  ScriptCollection/TFCPS/PubDependencies.py,sha256=hl6BfYjzb0-esO-pqyV_sxBLbHBi55GEgUiub3lma_8,9922
71
71
  ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=ou8MUz8yR_9ruugsUarT4cb9Rmm_HR98ERhKoveCxkA,34795
72
72
  ScriptCollection/TFCPS/TFCPS_BuildCodeUnitsHook.py,sha256=67_DQwoH5bhxxSmwtuAeoW1NOCMiLMzOy48OqlJX-KY,1744
73
73
  ScriptCollection/TFCPS/TFCPS_CodeSpellCheck.py,sha256=zV62O7UiGjewx1yQUIWmUJ9D-5ipkV_f28uNhp-JWUs,5306
74
- ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=QvDcicWpcF9u5dKQ2uhE8yi7pfa2sn_2241hRXsZPoo,40878
74
+ ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=oRz5MqUUXv60AxnLjT8PaMN_W0cdm-7eLW8o23SkYYM,40894
75
75
  ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=_wTwaf-lmz8MijRhaM6NvNV7bI52Tlnxb8wLZnD5vcY,10678
76
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=K00w4MO_gdw0GL-397LJjJB1rSQBkFuIkWglvUOjJqk,74283
76
+ ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=eUOFfK7ZNhLMJip8GXhDWDTyUv4pcEh1ehj8ARTvLJI,74886
77
77
  ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=BVK3fpEyjcXYVHIb6YYLH7bWe6iKRaCtPrJ3tXAemYw,6582
78
78
  ScriptCollection/TFCPS/TFCPS_FindingsSorter.py,sha256=3ChuKf-Myr3sBtQhYGw6dHlk93HO6PAH-Jq1oPYdW1s,4804
79
79
  ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=mRBcf7XuNWOSXbZYc3NuJow18AMZ30D6Z-BtyNYfNcM,2072
@@ -82,8 +82,8 @@ ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=GdpFcgIFRvdc1Q9b7uXlPlN99s7
82
82
  ScriptCollection/TFCPS/TFCPS_OCIImageSecretScan.py,sha256=Jb7AaMcJDW-gYEYBUVZAG3QLTTNWmXlvVEW-lZsykws,14821
83
83
  ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=XLVsFTA1jvfDbZ7wYJgIdEByZhF_bYVbA5jkisuvK4k,2322
84
84
  ScriptCollection/TFCPS/TFCPS_RemoteBuild.py,sha256=g9hncmdvV1DtYC7_3F3UCvEjoOMUdxKHqt-wQVPIvEU,26652
85
- ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=YY9xCY_Cd6wzSFv6NOxgxmOAYHouCw8hGojNpnZ8YoI,163220
86
- ScriptCollection/TFCPS/TFCPS_VisualRegressionTests.py,sha256=F90CF5kLCgV_M3yN696xWzF1cglWLXecau9My2ZyGxw,42230
85
+ ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=7wXgyHfMjzeoMioxsla5M4a7tZt-s5mNsINk2l4tlac,165309
86
+ ScriptCollection/TFCPS/TFCPS_VisualRegressionTests.py,sha256=Fju80SI5bOLrNzCbDzjrMlO8teJoKfnSQsQtu1tmLn0,42229
87
87
  ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
88
  ScriptCollection/TFCPS/Android/TFCPS_CodeUnitSpecific_Android.py,sha256=g6K4eJp1zsVx4enkTKvca2H8kWUVAtkz3pSDVS_0iU8,35461
89
89
  ScriptCollection/TFCPS/Android/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -95,15 +95,15 @@ ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6G
95
95
  ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
96
96
  ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
97
97
  ScriptCollection/TFCPS/DotNet/NuGetPackageSourceRegistration.py,sha256=E2TiFbwyPZvhozoWqLksc4uH50LbFAaVWOGfUo6for4,7050
98
- ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=WlWfgfWKwU1PS58BgxQoFFr4_3R3YyYdhsCJYiV-kiM,67192
98
+ ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=iJjsXo8MBi6Moh7X4o0zaFhpT22q-7XJb5c4wMBxRsU,67192
99
99
  ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
- ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=Fb1iBuIQkwXloKdlTFw7ynYts3XxS__-Fk97MwDKuKY,64587
100
+ ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=NGKP-9SVBAND9jnmvaGEHDWmfuJRevJCSTeRTz8NcKs,64588
101
101
  ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
102
102
  ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=m4Pax-U6o5XuspLnLfnWjyQMtoC7zBDDNJW9EhLWjeE,9012
103
103
  ScriptCollection/TFCPS/Go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
104
  ScriptCollection/TFCPS/Maven/TFCPS_CodeUnitSpecific_Maven.py,sha256=6to-jfT49GBbUYCjUm-2-7A888OVV2HJDSPqKL14aog,10708
105
105
  ScriptCollection/TFCPS/Maven/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
- ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=FW3HHeaEmYC8A-725A3o9_tKXldn7eggsfjJg_7ZMys,17234
106
+ ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=GMiWCtAUm_dppJBDHg6gd9kvW_LZCltiiPniPmDv_A4,17234
107
107
  ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
108
  ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Wi9anRljuvW1-UplYhI_QNR2szxaitHiXVJ6p4nUEI8,21089
109
109
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -112,8 +112,8 @@ ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=ZfOiefD5RGOcaZ
112
112
  ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
113
113
  ScriptCollection/TFCPS/TypeScript/TFCPS_CodeUnitSpecific_TypeScript.py,sha256=ILVhJHvwG5TvPBBqSvyACYb7W9QnWrJpxKgHu8IQu4g,9249
114
114
  ScriptCollection/TFCPS/TypeScript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
- scriptcollection-4.4.74.dist-info/METADATA,sha256=2unXONHqKGlOKx6veeEo9utQH8GBCxRV2AsgNstq_68,8037
116
- scriptcollection-4.4.74.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
117
- scriptcollection-4.4.74.dist-info/entry_points.txt,sha256=OK3miTYUhXpsvY3SC9pkczbh_MULzFdYUGm_qlAHRtM,6468
118
- scriptcollection-4.4.74.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
119
- scriptcollection-4.4.74.dist-info/RECORD,,
115
+ scriptcollection-5.0.0.dist-info/METADATA,sha256=MkbkDD3CHLL_PM5_gpX_ljqv0dJ5x22xS7ZKEYsyP0w,8099
116
+ scriptcollection-5.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
117
+ scriptcollection-5.0.0.dist-info/entry_points.txt,sha256=xNcXwGkN86YhN59W4c89bXaxUa4jUKHazNzVmllm_y0,6469
118
+ scriptcollection-5.0.0.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
119
+ scriptcollection-5.0.0.dist-info/RECORD,,
@@ -21,7 +21,7 @@ sccreaterelease = ScriptCollection.Executables:CreateRelease
21
21
  sccreatesimplemergewithoutrelease = ScriptCollection.Executables:CreateSimpleMergeWithoutRelease
22
22
  sccreateskill = ScriptCollection.Executables:CreateSkill
23
23
  sccurrentuserhaselevatedprivileges = ScriptCollection.Executables:CurrentUserHasElevatedPrivileges
24
- scdownloadcachabletools = ScriptCollection.Executables:DownloadCachableTools
24
+ scdownloadcacheabletools = ScriptCollection.Executables:DownloadCacheableTools
25
25
  scensuredockernetworkisavailable = ScriptCollection.Executables:EnsureDockerNetworkIsAvailable
26
26
  scensuredockernetworkisnotavailable = ScriptCollection.Executables:EnsureDockerNetworkIsNotAvailable
27
27
  scensureexternaldockernetworksexist = ScriptCollection.Executables:EnsureExternalDockerNetworksExist
@@ -54,7 +54,7 @@ scocranalysisofrepository = ScriptCollection.Executables:OCRAnalysisOfRepository
54
54
  scorganizelinesinfile = ScriptCollection.Executables:OrganizeLinesInFile
55
55
  scpreparebuildpipelineforgithub = ScriptCollection.Executables:PrepareBuildPipelineForGithub
56
56
  scpreparebuildpipelineforgitlab = ScriptCollection.Executables:PrepareBuildPipelineForGitlab
57
- scprintcurrentworkingdirectory = ScriptCollection.Executables:PrintCurrecntWorkingDirectory
57
+ scprintcurrentworkingdirectory = ScriptCollection.Executables:PrintCurrentWorkingDirectory
58
58
  scprintfilecontent = ScriptCollection.Executables:PrintFileContent
59
59
  scprintfilesize = ScriptCollection.Executables:PrintFileSize
60
60
  scprintosname = ScriptCollection.Executables:PrintOSName