namespace Utils { const { join , resolve , dirname } = require ( "path" ) as typeof import ( "path" ) ; const { existsSync } = require ( "fs" ) as typeof import ( "fs" ) ; export function findUpFile ( name ) { let dir = __dirname ; while ( true ) { const fullPath = join ( dir , name ) ; if ( existsSync ( fullPath ) ) return fullPath ; const up = resolve ( dir , ".." ) ; if ( up === dir ) return name ; dir = up ; } } export const findUpRoot = ( ) => findUpRoot . cached ||= dirname ( findUpFile ( "Gulpfile.js" ) ) ; }