(addon)
| 3 | const gitCache = require('./git-tools'); |
| 4 | |
| 5 | async function solveGitPath(addon) { |
| 6 | const [gitPath, type] = addon.split('#type='); |
| 7 | const [url, branch] = gitPath.split('@'); |
| 8 | const id = new Buffer(gitPath).toString('base64'); |
| 9 | const target = path.join(os.homedir(), '.crwp', 'crwp', id); |
| 10 | try { |
| 11 | await gitCache({ git: url, branch, target }); |
| 12 | } catch (err) { |
| 13 | console.log(err); |
| 14 | } |
| 15 | return { dir: target, type }; |
| 16 | } |
| 17 | |
| 18 | async function getAddonPackagePath({ addon, git }) { |
| 19 | if (git) { |
no outgoing calls
no test coverage detected