MCPcopy Create free account
hub / github.com/play-co/devkit / getCachedModuleInfo

Function getCachedModuleInfo

src/install/cache.js:75–93  ·  view source on GitHub ↗
(cachePath, skipFetch)

Source from the content-addressed store, hash-verified

73 };
74
75 function getCachedModuleInfo (cachePath, skipFetch) {
76 var git = gitClient.get(cachePath, {extraSilent: true});
77
78 return Promise.all([
79 git.getLatestLocalTag({skipFetch: !!skipFetch}),
80 git.getCurrentHead(),
81 git('show', 'HEAD:package.json'),
82 Module.getURL(cachePath)
83 ]).all().spread(function (tag, head, pkg, url) {
84 var version = tag || head;
85 var data = JSON.parse(pkg);
86 return {
87 url: url,
88 name: data.name,
89 version: version,
90 cachePath: cachePath
91 };
92 });
93 }
94
95 this.convertTempModulePath = function (cachePath, moduleName) {
96 var targetPath = this.getPath(moduleName);

Callers 1

cache.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…