import { Setup } from '../../lib/helpers/setup_request' ; import { APMPluginStartDependencies } from '../../types' ; import { listConfigurations } from '../settings/agent_configuration/list_configurations' ; import { getPackagePolicyWithAgentConfigurations , PackagePolicy , } from './register_fleet_policy_callbacks' ; import { getPackagePolicyWithSourceMap , listArtifacts } from './source_maps' ; export async function mergePackagePolicyWithApm ( { packagePolicy , setup , fleetPluginStart , } ) { const agentConfigurations = await listConfigurations ( { setup } ) ; const artifacts = await listArtifacts ( { fleetPluginStart } ) ; return getPackagePolicyWithAgentConfigurations ( getPackagePolicyWithSourceMap ( { packagePolicy , artifacts } ) , agentConfigurations ) ; }