import { readJson } from 'fs-extra' ; import getPathToTargetWorkspaceRootDirFromCLIArgs from './getPathToTargetWorkspaceRootDirFromCLIArgs' ; import { TGetTargetWorkspaceLernaConfigContent } from '../../types' ; /**
 * Find and read JSON content of lerna.json file in the target workspace directory.
 */ const getTargetWorkspaceLernaConfigContent = async ( ) => { const pathToTargetWorkspaceDir = getPathToTargetWorkspaceRootDirFromCLIArgs ( ) ; const pathToTargetLernaConfig = `${ pathToTargetWorkspaceDir }/lerna.json` ; const targetWorkspaceLernaConfigContent = ( await readJson ( pathToTargetLernaConfig ) ) as Record < string , any > ; return targetWorkspaceLernaConfigContent ; } ; export default getTargetWorkspaceLernaConfigContent ;