MCPcopy
hub / github.com/foambubble/foam / readUpdateCheck

Method readUpdateCheck

packages/foam-cli/src/support/state.ts:87–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 }
86
87 readUpdateCheck(): UpdateCheckCache | null {
88 try {
89 const data = this.read().updateCheck;
90 if (
91 data &&
92 typeof data.lastChecked === 'string' &&
93 typeof data.latestVersion === 'string' &&
94 (data.lastNotified === undefined || typeof data.lastNotified === 'string')
95 ) {
96 return data;
97 }
98 return null;
99 } catch {
100 return null;
101 }
102 }
103
104 /** Failures are swallowed — the update-check feature must never fail the CLI. */
105 writeUpdateCheck(cache: UpdateCheckCache): void {

Callers 2

version.test.tsFile · 0.80
checkForUpdateNoticeFunction · 0.80

Calls 1

readMethod · 0.95

Tested by

no test coverage detected