use shared readManifest implementation in tools
move copy_sourcemap to tools