haraka 0.2.23__py3-none-any.whl → 0.2.25__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.
@@ -78,23 +78,51 @@ class ResourcePurger:
78
78
  def _purge_unrelated(self, root: Path, spec: PathSpec) -> None:
79
79
  """
80
80
  Walk the project tree; delete every path NOT matched by *spec*.
81
+
82
+ Updated to align with the `test_java_manifest` logic for cleaner organization.
81
83
  """
82
84
 
85
+ # Dictionaries to separate matches and non-matches for logging
86
+ matches = []
87
+ non_matches = []
88
+
89
+ # Walk the project tree to inspect all paths
90
+ all_paths = list(root.rglob("*"))
91
+ self._log.debug("📋 All paths under %s (total %d):", root, len(all_paths))
92
+ for p in all_paths:
93
+ # log relative paths so they match what spec.match_file() sees
94
+ rel = p.relative_to(root)
95
+ self._log.debug(" %s", rel)
96
+
83
97
  for path in root.rglob("*"):
84
- self._log.debug(f"Scanning path: {path}")
98
+ self._log.debug(f"\nScanning path: {path}")
85
99
  rel = path.relative_to(root).as_posix()
86
100
  self._log.debug(f"Relative path for inspection: {rel}")
87
101
 
88
- # Regular file matching
89
- if spec.match_file(path):
102
+ # Match file against the PathSpec
103
+ if spec.match_file(rel):
90
104
  self._log.debug(f"Path matches keep patterns: {rel}")
91
- self._log.debug(f"Keeping file: {rel}")
105
+ matches.append(path) # Collect paths to keep
92
106
  continue
93
107
 
94
- # If path didn't match, delete
108
+ # Non-matching paths: collect and delete
109
+ self._log.debug(f"Path does not match keep patterns: {rel}")
110
+ non_matches.append(path)
95
111
  if path.is_dir():
96
112
  self._f.remove_dir(path)
97
113
  self._log.debug(f"Deleted directory: {path}")
98
114
  else:
99
115
  self._f.remove_file(path)
100
116
  self._log.debug(f"Deleted file: {path}")
117
+
118
+ # Print results cleanly for debugging/logging purposes
119
+ self._log.info("\nMATCHED PATHS:")
120
+ self._log.info("=" * 80)
121
+ for match in matches:
122
+ self._log.info(f"✅ {match}")
123
+
124
+ self._log.info("\nNOT MATCHED PATHS:")
125
+ self._log.info("=" * 80)
126
+ for non_match in non_matches:
127
+ self._log.info(f"❌ {non_match}")
128
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haraka
3
- Version: 0.2.23
3
+ Version: 0.2.25
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
@@ -17,7 +17,7 @@ haraka/post_gen/service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
17
17
  haraka/post_gen/service/command.py,sha256=yvEzW9rMSXWeQ_2DXuQNtGH6sRuZnK6viMud-amFQXw,2348
18
18
  haraka/post_gen/service/fileOps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  haraka/post_gen/service/fileOps/files.py,sha256=Jm_0bhvVnNqSPGKQ2RnMpx8JLV74M-IXMmwly9fpmVw,3020
20
- haraka/post_gen/service/fileOps/purge.py,sha256=ydq5CqiikCiabozb_WTR-fh8SOpNBS-dGWUWTfVxnqk,3626
20
+ haraka/post_gen/service/fileOps/purge.py,sha256=mQr5TACPKxBx6b1lbAv9YcND4xZnvdzBeBSESeV6-pE,4714
21
21
  haraka/post_gen/service/gitOps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  haraka/post_gen/service/gitOps/gitops.py,sha256=clWny1m9qB4yr8asba8JwqBjewlMVsJUmIOCLtAL8RI,4052
23
23
  haraka/utils/__init__.py,sha256=3Cp4u0dyAGcmqes-tIr95KFsNsJx5Ji5Yzkto9546Hs,168
@@ -29,7 +29,7 @@ haraka/utils/manifests/go-grpc-gateway-buf.yml,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
29
29
  haraka/utils/manifests/go-grpc-protoc.yml,sha256=OaQlfW_S_OguhW_UcpBVdqdEtUMlg-SrT4bqLhQrY7Y,936
30
30
  haraka/utils/manifests/java-springboot.yml,sha256=WzcaStDgzyWmBhV2TUiYEkxHhYwydN9ww2yjZYyhSmw,929
31
31
  haraka/utils/manifests/python-fastapi.yml,sha256=nhO6S9j_r-S10nM8nuw7PtR247-ePhBXHvaXg74CjWw,922
32
- haraka-0.2.23.dist-info/METADATA,sha256=FwO7H28Lu43V-tod7JcsPmdFT3xLMwVEtCYwt0AKsXQ,579
33
- haraka-0.2.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- haraka-0.2.23.dist-info/top_level.txt,sha256=1khpwypLKWoklVd_CgFiwAfcctVSXRoRPc3BI9lyIXo,7
35
- haraka-0.2.23.dist-info/RECORD,,
32
+ haraka-0.2.25.dist-info/METADATA,sha256=LDVBTqVFXFIP7terOKpXFEAJs7eHlEoqrn06_3BntDQ,579
33
+ haraka-0.2.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ haraka-0.2.25.dist-info/top_level.txt,sha256=1khpwypLKWoklVd_CgFiwAfcctVSXRoRPc3BI9lyIXo,7
35
+ haraka-0.2.25.dist-info/RECORD,,