import { schema } from '@kbn/config-schema' ; import { IRouter } from '../../http' ; import { createDynamicAssetHandler } from './dynamic_asset_response' ; import { FileHashCache } from './file_hash_cache' ; export function registerRouteForBundle ( router , { publicPath , routePath , bundlesPath , fileHashCache , isDist , } ) { router . get ( { path : `${ routePath }{path*}` , options : { authRequired : false , } , validate : { params : schema . object ( { path : schema . string ( ) , } ) , } , } , createDynamicAssetHandler ( { publicPath , bundlesPath , isDist , fileHashCache , } ) ) ; }