From c89b9124e454c0db43333c36886ec88f5da996f1 Mon Sep 17 00:00:00 2001 From: Ollie Copping Date: Fri, 29 May 2026 14:42:50 +0000 Subject: [PATCH 1/2] Fix typo in _generate_json_map --- src/techui_builder/builder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/techui_builder/builder.py b/src/techui_builder/builder.py index 7b849c6..ce15a42 100644 --- a/src/techui_builder/builder.py +++ b/src/techui_builder/builder.py @@ -306,7 +306,9 @@ def _next_file_crawl( child_node = JsonMap( str(file_path), display_name, - exists=("IOC" in macro_dictionary or ("https:/" in str(file_path))), + exists=( + "IOC" in macro_dictionary or ("https://" in str(file_path)) + ), ) return child_node From 804e56a4d677a247fb0400497d9d390bc31b00c3 Mon Sep 17 00:00:00 2001 From: Ollie Copping Date: Fri, 29 May 2026 14:55:33 +0000 Subject: [PATCH 2/2] Fix how path is handled in _next_file_crawl() --- src/techui_builder/builder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/techui_builder/builder.py b/src/techui_builder/builder.py index ce15a42..093cb27 100644 --- a/src/techui_builder/builder.py +++ b/src/techui_builder/builder.py @@ -283,7 +283,7 @@ def _get_display_name( return display_name def _next_file_crawl( - file_path: Path, + file_path_text: str, destination_path: Path, name_element: str | None, component_name: str | None, @@ -291,7 +291,7 @@ def _next_file_crawl( macro_dictionary: dict[str, Any], ): # TODO: misleading var name? - next_file_path = destination_path.joinpath(file_path) + next_file_path = destination_path.joinpath(file_path_text) # Crawl the next file if next_file_path.is_file(): @@ -304,10 +304,10 @@ def _next_file_crawl( ) else: child_node = JsonMap( - str(file_path), + file_path_text, display_name, exists=( - "IOC" in macro_dictionary or ("https://" in str(file_path)) + "IOC" in macro_dictionary or ("https://" in file_path_text) ), ) @@ -395,7 +395,7 @@ def _next_file_crawl( ) child_node = _next_file_crawl( - file_path, + file_text, dest_path, name_elem, current_component_name, @@ -429,7 +429,7 @@ def _next_file_crawl( ) child_node = _next_file_crawl( - file_path, + file_text, dest_path, name_elem, current_component_name,