MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / getRemoteVersion

Function getRemoteVersion

packages/hydrooj/src/script/checkUpdate.ts:8–15  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

6import system from '../model/system';
7
8async function getRemoteVersion(id: string) {
9 try {
10 const res = await superagent.get(`https://registry.yarnpkg.com/${id}`);
11 return res.body['dist-tags'].latest;
12 } catch (e) {
13 return null;
14 }
15}
16
17export async function run(_: void, report: (data: any) => void) {
18 const current = global.Hydro.version;

Callers 1

runFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected