From d0b3b7a15b59266b4ae4262fdb0364245092c17c Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Fri, 24 Apr 2026 12:38:38 -0500 Subject: feat(v3.7.0): add timeline and advanced diffing system - introduce TimelineView for historical snapshots - allow comparison between any two snapshots - implement DiffService for structured domain diffs - improve diff visualization with clear change indicators - add navigation across changes - optimize history loading for performance - extend CLI and export to support timeline data --- DomainDig/SubdomainDiscoveryService.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'DomainDig/SubdomainDiscoveryService.swift') diff --git a/DomainDig/SubdomainDiscoveryService.swift b/DomainDig/SubdomainDiscoveryService.swift index 7339648..4511edd 100644 --- a/DomainDig/SubdomainDiscoveryService.swift +++ b/DomainDig/SubdomainDiscoveryService.swift @@ -17,6 +17,7 @@ enum SubdomainDiscoveryService { } private static func fetchSubdomains(for domain: String, limit: Int) async -> ServiceResult<[DiscoveredSubdomain]> { + let startedAt = DomainDebugLog.signpostStart("SubdomainDiscovery.fetch", domain: domain) var components = URLComponents(string: "https://crt.sh/")! components.queryItems = [ URLQueryItem(name: "q", value: "%.\(domain)"), @@ -29,15 +30,25 @@ enum SubdomainDiscoveryService { do { let request = URLRequest(url: url, timeoutInterval: 10) + DomainDebugLog.debug("SubdomainDiscovery.request url=\(url.absoluteString) timeout=10") let (data, response) = try await URLSession.shared.data(for: request) guard let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 else { + DomainDebugLog.error("SubdomainDiscovery.badResponse domain=\(domain)") return .error("Subdomain discovery unavailable") } let entries = try JSONDecoder().decode([CRTShEntry].self, from: data) let subdomains = parseSubdomains(from: entries, domain: domain, limit: limit) + DomainDebugLog.signpostEnd( + "SubdomainDiscovery.fetch", + start: startedAt, + domain: domain, + extra: "entries=\(entries.count) subdomains=\(subdomains.count)" + ) return subdomains.isEmpty ? .empty("No passive subdomains found") : .success(subdomains) } catch { + DomainDebugLog.error("SubdomainDiscovery.error domain=\(domain) error=\(error.localizedDescription)") + DomainDebugLog.signpostEnd("SubdomainDiscovery.fetch", start: startedAt, domain: domain, extra: "error") return .error(error.localizedDescription) } } -- cgit v1.2.3