haraka 0.2.34__py3-none-any.whl → 0.2.36__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.
- haraka/post_gen/service/fileOps/purge.py +29 -6
- {haraka-0.2.34.dist-info → haraka-0.2.36.dist-info}/METADATA +1 -1
- {haraka-0.2.34.dist-info → haraka-0.2.36.dist-info}/RECORD +5 -5
- {haraka-0.2.34.dist-info → haraka-0.2.36.dist-info}/WHEEL +0 -0
- {haraka-0.2.34.dist-info → haraka-0.2.36.dist-info}/top_level.txt +0 -0
@@ -81,7 +81,7 @@ class ResourcePurger:
|
|
81
81
|
|
82
82
|
matched, non_dirs, non_files, _ = self.classify_paths(all_paths, project_dir, spec)
|
83
83
|
|
84
|
-
self.
|
84
|
+
self._purge_unrelated(project_dir, matched, non_dirs, non_files)
|
85
85
|
|
86
86
|
self._log.debug(f"Finished purging unrelated paths in project directory: {project_dir}")
|
87
87
|
|
@@ -137,7 +137,7 @@ class ResourcePurger:
|
|
137
137
|
# --------------------------------------------------------------------------- #
|
138
138
|
# Summary printing helpers #
|
139
139
|
# --------------------------------------------------------------------------- #
|
140
|
-
def
|
140
|
+
def _print_matches(self, title: str, items: List[str]) -> None:
|
141
141
|
self._log.info(f"{title} — {len(items)}")
|
142
142
|
if items:
|
143
143
|
for p in sorted(items):
|
@@ -146,17 +146,40 @@ class ResourcePurger:
|
|
146
146
|
self._log.info(" (none)")
|
147
147
|
self._log.info("-" * 70)
|
148
148
|
|
149
|
-
def
|
149
|
+
def _dir_batch_delete(self, title: str, items: List[str], root: Path) -> None:
|
150
|
+
self._log.info(f"{title} — {len(items)}")
|
151
|
+
if items:
|
152
|
+
for p in sorted(items):
|
153
|
+
full_path = root / Path(p)
|
154
|
+
self._f.remove_dir(full_path)
|
155
|
+
self._log.debug(f" 🗑️ DELETED DIR {p}")
|
156
|
+
else:
|
157
|
+
self._log.info(" (none)")
|
158
|
+
self._log.info("-" * 70)
|
159
|
+
|
160
|
+
def _file_batch_delete(self, title: str, items: List[str], root: Path) -> None:
|
161
|
+
self._log.info(f"{title} — {len(items)}")
|
162
|
+
if items:
|
163
|
+
for p in sorted(items):
|
164
|
+
full_path = root / Path(p)
|
165
|
+
self._f.remove_file(full_path)
|
166
|
+
self._log.debug(f" 🗑️ DELETED DIR {p}")
|
167
|
+
else:
|
168
|
+
self._log.info(" (none)")
|
169
|
+
self._log.info("-" * 70)
|
170
|
+
|
171
|
+
def _purge_unrelated(
|
150
172
|
self,
|
173
|
+
root: Path,
|
151
174
|
matched: List[str],
|
152
175
|
non_matched_dirs: List[str],
|
153
176
|
non_matched_files: List[str],
|
154
177
|
) -> None:
|
155
178
|
"""Human-friendly digest of keep/delete results."""
|
156
179
|
self._log.info("\n" + "=" * 70)
|
157
|
-
self.
|
158
|
-
self.
|
159
|
-
self.
|
180
|
+
self._print_matches("✅ MATCHED (keep)", matched)
|
181
|
+
self._dir_batch_delete("🗂️ NON-MATCHED DIRECTORIES (delete)", non_matched_dirs, root)
|
182
|
+
self._file_batch_delete("📄 NON-MATCHED FILES (delete)", non_matched_files, root)
|
160
183
|
self._log.info("=" * 70)
|
161
184
|
|
162
185
|
@staticmethod
|
@@ -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=
|
20
|
+
haraka/post_gen/service/fileOps/purge.py,sha256=YhtIQYRVtoo65Wp1zPJGtolHub6BoukZlka1cDMaJVk,7253
|
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=DTZoVrIDNVpq2AuuXjL2jAvPggeKWVuKJEKwFb90cz4,989
|
31
31
|
haraka/utils/manifests/python-fastapi.yml,sha256=nhO6S9j_r-S10nM8nuw7PtR247-ePhBXHvaXg74CjWw,922
|
32
|
-
haraka-0.2.
|
33
|
-
haraka-0.2.
|
34
|
-
haraka-0.2.
|
35
|
-
haraka-0.2.
|
32
|
+
haraka-0.2.36.dist-info/METADATA,sha256=8HrIRSvD02n2Mj47vow3srS3Vie-FO5DD6VMU2mJhQc,579
|
33
|
+
haraka-0.2.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
34
|
+
haraka-0.2.36.dist-info/top_level.txt,sha256=1khpwypLKWoklVd_CgFiwAfcctVSXRoRPc3BI9lyIXo,7
|
35
|
+
haraka-0.2.36.dist-info/RECORD,,
|
File without changes
|
File without changes
|