MCPcopy Index your code
hub / github.com/vercel/hyper / init

Function init

app/updater.ts:45–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43const isCanary = (updateChannel: string) => updateChannel === 'canary';
44
45async function init() {
46 autoUpdater.on('error', (err) => {
47 console.error('Error fetching updates', `${err.message} (${err.stack})`);
48 });
49
50 const config = await getDecoratedConfigWithRetry();
51
52 // If defined in the config, switch to the "canary" channel
53 if (config.updateChannel && isCanary(config.updateChannel)) {
54 canaryUpdates = true;
55 }
56
57 const feedURL = buildFeedUrl(canaryUpdates, version);
58
59 autoUpdater.setFeedURL({url: feedURL});
60
61 setTimeout(() => {
62 void checkForUpdates();
63 }, ms('10s'));
64
65 setInterval(() => {
66 void checkForUpdates();
67 }, ms('30m'));
68
69 isInit = true;
70}
71
72export default (win: BrowserWindow) => {
73 if (!isInit) {

Callers 1

updater.tsFile · 0.70

Calls 7

isCanaryFunction · 0.85
buildFeedUrlFunction · 0.85
checkForUpdatesFunction · 0.85
onMethod · 0.80
setFeedURLMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected