LCOV - code coverage report
Current view: top level - src/platform/assets/utils - importSourceUtil.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 0.0 % 5 0
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import type { ImportSource } from '@/platform/assets/types/importSource'
       2              : 
       3              : /**
       4              :  * Check if a URL belongs to a specific import source
       5              :  */
       6            0 : export function validateSourceUrl(url: string, source: ImportSource): boolean {
       7            0 :   try {
       8            0 :     const hostname = new URL(url).hostname.toLowerCase()
       9            0 :     return source.hostnames.some(
      10              :       (h) => hostname === h || hostname.endsWith(`.${h}`)
      11              :     )
      12              :   } catch {
      13            0 :     return false
      14              :   }
      15              : }
        

Generated by: LCOV version 2.0-1