deno.land / x / velociraptor@1.5.0 / src / update_notifier.ts

update_notifier.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { DenoLand, UpdateNotifier } from "../deps.ts";import { UPGRADE_COMMAND, VR_NAME } from "./consts.ts";import { version } from "./version.ts";
export const notifier = new UpdateNotifier({ name: VR_NAME, registry: DenoLand, currentVersion: version,});
export const withUpdateChecks = async (fn: () => unknown) => { const checkForUpdates = notifier.checkForUpdates(); const ret = fn(); if (ret instanceof Promise) { await ret; } await checkForUpdates; notifier.notify(UPGRADE_COMMAND);};
velociraptor

Version Info

Tagged at
2 years ago