haraka 0.2.27__py3-none-any.whl → 0.2.28__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/config/config.py +1 -0
- haraka/post_gen/service/fileOps/purge.py +15 -13
- haraka/utils/logging/log_util.py +2 -1
- {haraka-0.2.27.dist-info → haraka-0.2.28.dist-info}/METADATA +1 -1
- {haraka-0.2.27.dist-info → haraka-0.2.28.dist-info}/RECORD +7 -7
- {haraka-0.2.27.dist-info → haraka-0.2.28.dist-info}/WHEEL +0 -0
- {haraka-0.2.27.dist-info → haraka-0.2.28.dist-info}/top_level.txt +0 -0
haraka/post_gen/config/config.py
CHANGED
@@ -58,7 +58,9 @@ class ResourcePurger:
|
|
58
58
|
self._log.info(f"Starting purge for variant: {variant}")
|
59
59
|
self._log.debug(f"Loaded variant for purge: {variant}")
|
60
60
|
|
61
|
-
|
61
|
+
raw_patterns = config.load_manifest(variant)
|
62
|
+
keep_patterns = [p.rstrip("/") for p in raw_patterns]
|
63
|
+
|
62
64
|
self._log.debug(f"Loaded manifest for variant '{variant}': {keep_patterns}")
|
63
65
|
|
64
66
|
spec = config.build_spec(keep_patterns)
|
@@ -83,30 +85,30 @@ class ResourcePurger:
|
|
83
85
|
"""
|
84
86
|
|
85
87
|
# Dictionaries to separate matches and non-matches for logging
|
86
|
-
matches = []
|
87
|
-
non_matches = []
|
88
88
|
|
89
|
-
#
|
89
|
+
# 1) Dump every path under root or state what was found
|
90
90
|
all_paths = list(root.rglob("*"))
|
91
|
-
self._log.
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
91
|
+
if self._log.evm:
|
92
|
+
self._log.debug(f"📋 All paths under {root} (total {len(all_paths)}):")
|
93
|
+
for p in all_paths:
|
94
|
+
print(f"{p.relative_to(root)}")
|
95
|
+
else:
|
96
|
+
self._log.debug(f"Found {len(all_paths)} paths under {root})")
|
97
|
+
|
98
|
+
matches, non_matches = [], []
|
99
|
+
for path in all_paths:
|
98
100
|
self._log.debug(f"\nScanning path: {path}")
|
99
101
|
rel = path.relative_to(root).as_posix()
|
100
102
|
self._log.debug(f"Relative path for inspection: {rel}")
|
101
103
|
|
102
104
|
# Match file against the PathSpec
|
103
105
|
if spec.match_file(rel):
|
104
|
-
self._log.debug(f"Path matches keep patterns: {rel}")
|
106
|
+
self._log.debug(f"✅ KEEP: Path matches keep patterns: {rel}")
|
105
107
|
matches.append(path) # Collect paths to keep
|
106
108
|
continue
|
107
109
|
|
108
110
|
# Non-matching paths: collect and delete
|
109
|
-
self._log.debug(f"Path does not match keep patterns: {rel}")
|
111
|
+
self._log.debug(f"❌ DELETE: Path does not match keep patterns: {rel}")
|
110
112
|
non_matches.append(path)
|
111
113
|
if path.is_dir():
|
112
114
|
self._f.remove_dir(path)
|
haraka/utils/logging/log_util.py
CHANGED
@@ -4,9 +4,10 @@ from typing import TextIO
|
|
4
4
|
|
5
5
|
|
6
6
|
class Logger:
|
7
|
-
def __init__(self, label: str = "", verbose: bool = False) -> None:
|
7
|
+
def __init__(self, label: str = "", verbose: bool = False, evm: bool = True) -> None:
|
8
8
|
self.label = label
|
9
9
|
self.verbose = verbose
|
10
|
+
self.evm = evm # Extreme Verbosity Mode (In-depth debug logs)
|
10
11
|
|
11
12
|
def start_logger(self, verbose) -> Logger:
|
12
13
|
label = Logger.get_label(self.label)
|
@@ -10,26 +10,26 @@ haraka/art/ascii/frame/width_utils.py,sha256=in4AV3gTBBXUX6N01j67Icu9vsHFomybBN8
|
|
10
10
|
haraka/post_gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
haraka/post_gen/runner.py,sha256=CgC3-mOA6dOovJBCLykrec_Segitbu0XesMH6jsl6lM,3271
|
12
12
|
haraka/post_gen/config/__init__.py,sha256=-_XkJ_Dni28yJCMfIceQSiH1wa_hHsZMoBTyvR9Ikbc,62
|
13
|
-
haraka/post_gen/config/config.py,sha256=
|
13
|
+
haraka/post_gen/config/config.py,sha256=IsIoz8Ul132coGuTrCMN34ktRK6QA2o_GLuguZSFfQQ,1382
|
14
14
|
haraka/post_gen/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
15
|
haraka/post_gen/resources/assets.py,sha256=-oz3vlBaVOjeCOO2QHRvOmfyurR1KgihqXqbTtxDNG4,461
|
16
16
|
haraka/post_gen/service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
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=7CUNqocU5VqbM-ysVC6VGahFEuasLG2Fdr16R1SD270,4807
|
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
|
24
24
|
haraka/utils/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
25
|
haraka/utils/common/utils.py,sha256=kMnMXe_hcxGkD0MKGmR1lIwsRND7BaFPRbGN4PwonfM,360
|
26
26
|
haraka/utils/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
|
-
haraka/utils/logging/log_util.py,sha256=
|
27
|
+
haraka/utils/logging/log_util.py,sha256=UQq2E24q3brvXqcyGCjfSxxHH48JF_BMg54TKdl1SHk,1049
|
28
28
|
haraka/utils/manifests/go-grpc-gateway-buf.yml,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
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.
|
33
|
-
haraka-0.2.
|
34
|
-
haraka-0.2.
|
35
|
-
haraka-0.2.
|
32
|
+
haraka-0.2.28.dist-info/METADATA,sha256=U8ke_UOnmBYeIZ-I6e3D_p8esKHIwVD2O3eazGEn6yQ,579
|
33
|
+
haraka-0.2.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
34
|
+
haraka-0.2.28.dist-info/top_level.txt,sha256=1khpwypLKWoklVd_CgFiwAfcctVSXRoRPc3BI9lyIXo,7
|
35
|
+
haraka-0.2.28.dist-info/RECORD,,
|
File without changes
|
File without changes
|