function cov_2bgq51rggt(){var path="/Users/ruyadorno/Documents/workspace/cli/main/packages/libnpmdiff/index.js";var hash="ff4097f67c916956ac5714378c24a83d41aef5a3";var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"/Users/ruyadorno/Documents/workspace/cli/main/packages/libnpmdiff/index.js",statementMap:{"0":{start:{line:1,column:15},end:{line:1,column:32}},"1":{start:{line:3,column:19},end:{line:3,column:50}},"2":{start:{line:4,column:19},end:{line:4,column:46}},"3":{start:{line:5,column:14},end:{line:5,column:39}},"4":{start:{line:7,column:18},end:{line:11,column:3}},"5":{start:{line:8,column:2},end:{line:11,column:3}},"6":{start:{line:12,column:13},end:{line:55,column:1}},"7":{start:{line:13,column:2},end:{line:14,column:21}},"8":{start:{line:14,column:4},end:{line:14,column:21}},"9":{start:{line:20,column:4},end:{line:20,column:69}},"10":{start:{line:20,column:40},end:{line:20,column:67}},"11":{start:{line:22,column:19},end:{line:25,column:3}},"12":{start:{line:28,column:17},end:{line:31,column:4}},"13":{start:{line:38,column:6},end:{line:47,column:10}},"14":{start:{line:49,column:2},end:{line:54,column:4}},"15":{start:{line:57,column:0},end:{line:57,column:21}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:7,column:18},end:{line:7,column:19}},loc:{start:{line:8,column:2},end:{line:11,column:3}},line:8},"1":{name:"(anonymous_1)",decl:{start:{line:12,column:13},end:{line:12,column:14}},loc:{start:{line:12,column:41},end:{line:55,column:1}},line:12},"2":{name:"(anonymous_2)",decl:{start:{line:20,column:32},end:{line:20,column:33}},loc:{start:{line:20,column:40},end:{line:20,column:67}},line:20}},branchMap:{"0":{loc:{start:{line:12,column:27},end:{line:12,column:36}},type:"default-arg",locations:[{start:{line:12,column:34},end:{line:12,column:36}}],line:12},"1":{loc:{start:{line:13,column:2},end:{line:14,column:21}},type:"if",locations:[{start:{line:13,column:2},end:{line:14,column:21}},{start:{line:13,column:2},end:{line:14,column:21}}],line:13}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0},f:{"0":0,"1":0,"2":0},b:{"0":[0],"1":[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ff4097f67c916956ac5714378c24a83d41aef5a3"};var coverage=global[gcv]||(global[gcv]={});if(!coverage[path]||coverage[path].hash!==hash){coverage[path]=coverageData;}var actualCoverage=coverage[path];{// @ts-ignore
cov_2bgq51rggt=function(){return actualCoverage;};}return actualCoverage;}cov_2bgq51rggt();const pacote=(cov_2bgq51rggt().s[0]++,require('pacote'));const formatDiff=(cov_2bgq51rggt().s[1]++,require('./lib/format-diff.js'));const getTarball=(cov_2bgq51rggt().s[2]++,require('./lib/tarball.js'));const untar=(cov_2bgq51rggt().s[3]++,require('./lib/untar.js'));cov_2bgq51rggt().s[4]++;const argsError=()=>{cov_2bgq51rggt().f[0]++;cov_2bgq51rggt().s[5]++;return Object.assign(new TypeError('libnpmdiff needs two arguments to compare'),{code:'EDIFFARGS'});};cov_2bgq51rggt().s[6]++;const diff=async(specs,opts=(cov_2bgq51rggt().b[0][0]++,{}))=>{cov_2bgq51rggt().f[1]++;cov_2bgq51rggt().s[7]++;if(specs.length!==2){cov_2bgq51rggt().b[1][0]++;cov_2bgq51rggt().s[8]++;throw argsError();}else{cov_2bgq51rggt().b[1][1]++;}const[aManifest,bManifest]=(cov_2bgq51rggt().s[9]++,await Promise.all(specs.map(spec=>{cov_2bgq51rggt().f[2]++;cov_2bgq51rggt().s[10]++;return pacote.manifest(spec,opts);})));const versions=(cov_2bgq51rggt().s[11]++,{a:aManifest.version,b:bManifest.version});// fetches tarball using pacote
const[a,b]=(cov_2bgq51rggt().s[12]++,await Promise.all([getTarball(aManifest,opts),getTarball(bManifest,opts)]));// read all files
// populates `files` and `refs`
const{files,refs}=(cov_2bgq51rggt().s[13]++,await untar([{prefix:'a/',item:a},{prefix:'b/',item:b}],opts));cov_2bgq51rggt().s[14]++;return formatDiff({files,opts,refs,versions});};cov_2bgq51rggt().s[15]++;module.exports=diff;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbInBhY290ZSIsInJlcXVpcmUiLCJmb3JtYXREaWZmIiwiZ2V0VGFyYmFsbCIsInVudGFyIiwiYXJnc0Vycm9yIiwiT2JqZWN0IiwiYXNzaWduIiwiVHlwZUVycm9yIiwiY29kZSIsImRpZmYiLCJzcGVjcyIsIm9wdHMiLCJsZW5ndGgiLCJhTWFuaWZlc3QiLCJiTWFuaWZlc3QiLCJQcm9taXNlIiwiYWxsIiwibWFwIiwic3BlYyIsIm1hbmlmZXN0IiwidmVyc2lvbnMiLCJhIiwidmVyc2lvbiIsImIiLCJmaWxlcyIsInJlZnMiLCJwcmVmaXgiLCJpdGVtIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJtYXBwaW5ncyI6InM0RUFlWTsyRkFmWixLQUFNQSxDQUFBQSxNQUFNLDBCQUFHQyxPQUFPLENBQUMsUUFBRCxDQUFWLENBQVosQ0FFQSxLQUFNQyxDQUFBQSxVQUFVLDBCQUFHRCxPQUFPLENBQUMsc0JBQUQsQ0FBVixDQUFoQixDQUNBLEtBQU1FLENBQUFBLFVBQVUsMEJBQUdGLE9BQU8sQ0FBQyxrQkFBRCxDQUFWLENBQWhCLENBQ0EsS0FBTUcsQ0FBQUEsS0FBSywwQkFBR0gsT0FBTyxDQUFDLGdCQUFELENBQVYsQ0FBWCxDLHdCQUVBLEtBQU1JLENBQUFBLFNBQVMsQ0FBRyxJQUNoQix1REFBQUMsQ0FBQUEsTUFBTSxDQUFDQyxNQUFQLENBQ0UsR0FBSUMsQ0FBQUEsU0FBSixDQUFjLDJDQUFkLENBREYsQ0FFRSxDQUFFQyxJQUFJLENBQUUsV0FBUixDQUZGLEVBR0MsQ0FKSCxDLHdCQUtBLEtBQU1DLENBQUFBLElBQUksQ0FBRyx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