MCPcopy
hub / github.com/GooseMod/OpenAsar / checkModules

Function checkModules

src/updater/moduleUpdater.js:114–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112};
113
114const checkModules = async () => {
115 remote = JSON.parse((await req(baseUrl + '/versions.json' + qs))[1]);
116
117 for (const name in installed) {
118 const inst = installed[name].installedVersion;
119 const rem = remote[name];
120
121 if (inst !== rem) {
122 log('Modules', 'Update:', name, inst, '->', rem);
123
124 downloadModule(name, rem);
125 }
126 }
127
128 return downloading.total;
129};
130
131const downloadModule = async (name, ver) => {
132 downloading.total++;

Callers 1

moduleUpdater.jsFile · 0.85

Calls 2

reqFunction · 0.85
downloadModuleFunction · 0.85

Tested by

no test coverage detected