haraka 0.2.38__tar.gz → 0.2.40__tar.gz

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 (39) hide show
  1. {haraka-0.2.38 → haraka-0.2.40}/PKG-INFO +1 -1
  2. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/config/config.py +11 -3
  3. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/service/fileOps/files.py +4 -4
  4. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/service/fileOps/purge.py +2 -2
  5. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/manifests/java-springboot.yml +1 -2
  6. {haraka-0.2.38 → haraka-0.2.40}/haraka.egg-info/PKG-INFO +1 -1
  7. {haraka-0.2.38 → haraka-0.2.40}/pyproject.toml +1 -1
  8. {haraka-0.2.38 → haraka-0.2.40}/MANIFEST.in +0 -0
  9. {haraka-0.2.38 → haraka-0.2.40}/haraka/__init__.py +0 -0
  10. {haraka-0.2.38 → haraka-0.2.40}/haraka/art/__init__.py +0 -0
  11. {haraka-0.2.38 → haraka-0.2.40}/haraka/art/ascii/__init__.py +0 -0
  12. {haraka-0.2.38 → haraka-0.2.40}/haraka/art/ascii/assets.py +0 -0
  13. {haraka-0.2.38 → haraka-0.2.40}/haraka/art/ascii/frame/__init__.py +0 -0
  14. {haraka-0.2.38 → haraka-0.2.40}/haraka/art/ascii/frame/border.py +0 -0
  15. {haraka-0.2.38 → haraka-0.2.40}/haraka/art/ascii/frame/framer.py +0 -0
  16. {haraka-0.2.38 → haraka-0.2.40}/haraka/art/ascii/frame/width_utils.py +0 -0
  17. {haraka-0.2.38 → haraka-0.2.40}/haraka/art/create.py +0 -0
  18. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/__init__.py +0 -0
  19. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/config/__init__.py +0 -0
  20. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/resources/__init__.py +0 -0
  21. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/resources/assets.py +0 -0
  22. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/runner.py +0 -0
  23. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/service/__init__.py +0 -0
  24. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/service/command.py +0 -0
  25. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/service/fileOps/__init__.py +0 -0
  26. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/service/gitOps/__init__.py +0 -0
  27. {haraka-0.2.38 → haraka-0.2.40}/haraka/post_gen/service/gitOps/gitops.py +0 -0
  28. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/__init__.py +0 -0
  29. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/common/__init__.py +0 -0
  30. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/common/utils.py +0 -0
  31. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/logging/__init__.py +0 -0
  32. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/logging/log_util.py +0 -0
  33. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/manifests/go-grpc-gateway-buf.yml +0 -0
  34. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/manifests/go-grpc-protoc.yml +0 -0
  35. {haraka-0.2.38 → haraka-0.2.40}/haraka/utils/manifests/python-fastapi.yml +0 -0
  36. {haraka-0.2.38 → haraka-0.2.40}/haraka.egg-info/SOURCES.txt +0 -0
  37. {haraka-0.2.38 → haraka-0.2.40}/haraka.egg-info/dependency_links.txt +0 -0
  38. {haraka-0.2.38 → haraka-0.2.40}/haraka.egg-info/top_level.txt +0 -0
  39. {haraka-0.2.38 → haraka-0.2.40}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haraka
3
- Version: 0.2.38
3
+ Version: 0.2.40
4
4
  Summary: Reusable post-generation helper for Cookiecutter micro-service templates
5
5
  Author-email: Will Burks <will@example.com>
6
6
  License: MIT
@@ -27,14 +27,22 @@ def load_manifest(variant: str) -> Tuple[List[str], List[str]]:
27
27
  f"(expected {manifest_path})"
28
28
  )
29
29
  doc = yaml.safe_load(manifest_path.read_text())
30
- if not isinstance(doc, dict) or "keep" not in doc or "protected_dirs" not in doc:
31
- raise ValueError(f"Manifest {manifest_path} missing a `keep:` section")
30
+ if not isinstance(doc, dict):
31
+ if "keep" not in doc:
32
+ raise ValueError(f"Manifest {manifest_path} missing a `keep:` section")
33
+
34
+ if "protected" not in doc:
35
+ raise ValueError(f"Manifest {manifest_path} missing a `protected:` section")
36
+
32
37
  keep_patterns = doc["keep"]
33
- protected_dirs = doc.get("protected_dirs", [])
38
+ protected_dirs = doc.get("protected", [])
39
+
34
40
  if not isinstance(keep_patterns, Iterable):
35
41
  raise TypeError(f"`keep` section in {manifest_path} must be a list")
42
+
36
43
  if not isinstance(protected_dirs, Iterable):
37
44
  raise TypeError(f"`protected` section in {manifest_path} must be a list")
45
+
38
46
  return list(keep_patterns), list(protected_dirs)
39
47
 
40
48
 
@@ -21,8 +21,8 @@ class FileOps:
21
21
  self.logger.debug(f"Confirmed {self._relpath(path)} is a file")
22
22
 
23
23
  path.unlink()
24
- self.logger.debug(f"File {self._relpath(path)} successfully unlinked")
25
- self.logger.info(f"Removed file: {self._relpath(path)}")
24
+ self.logger.debug(f" 🗑️ File {self._relpath(path)} successfully unlinked")
25
+ self.logger.info(f" 🗑️ DELETED FILE: {self._relpath(path)}")
26
26
  elif path.is_dir():
27
27
  self.logger.debug(f"{self._relpath(path)} is a directory, not a file. Proceeding to remove it as a directory")
28
28
 
@@ -40,8 +40,8 @@ class FileOps:
40
40
  self.logger.debug(f"Confirmed {self._relpath(path)} exists")
41
41
  try:
42
42
  shutil.rmtree(path, ignore_errors=True)
43
- self.logger.debug(f"Directory {self._relpath(path)} successfully removed")
44
- self.logger.info(f"Removed directory: {self._relpath(path)}")
43
+ self.logger.debug(f" 🗑️ Directory {self._relpath(path)} successfully removed")
44
+ self.logger.info(f" 🗑️ DELETED DIR: {self._relpath(path)}")
45
45
  except Exception as e:
46
46
  self.logger.error(f"Error occurred while attempting to remove directory {self._relpath(path)}: {e}")
47
47
  self.logger.warn(f"Could not remove directory {self._relpath(path)}: {e}")
@@ -155,7 +155,8 @@ class ResourcePurger:
155
155
  if not protected_spec.match_file(p):
156
156
  full_path = root / Path(p)
157
157
  self._f.remove_dir(full_path)
158
- self._log.debug(f" 🗑️ DELETED DIR {p}")
158
+ else:
159
+ self._log.debug(f" 🛡️ PROTECTED DIRECTORY DIR {p}")
159
160
  else:
160
161
  self._log.info(" (none)")
161
162
  self._log.info("-" * 70)
@@ -166,7 +167,6 @@ class ResourcePurger:
166
167
  for p in sorted(items):
167
168
  full_path = root / Path(p)
168
169
  self._f.remove_file(full_path)
169
- self._log.debug(f" 🗑️ DELETED DIR {p}")
170
170
  else:
171
171
  self._log.info(" (none)")
172
172
  self._log.info("-" * 70)
@@ -29,5 +29,4 @@ keep:
29
29
  - infra/**
30
30
 
31
31
  protected:
32
- - src
33
- - src/main
32
+ - src
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haraka
3
- Version: 0.2.38
3
+ Version: 0.2.40
4
4
  Summary: Reusable post-generation helper for Cookiecutter micro-service templates
5
5
  Author-email: Will Burks <will@example.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "haraka"
7
- version = "0.2.38"
7
+ version = "0.2.40"
8
8
  description = "Reusable post-generation helper for Cookiecutter micro-service templates"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes
File without changes
File without changes