MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / getValidOfflineLicense

Function getValidOfflineLicense

packages/shared/src/entitlements.ts:89–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87}
88
89const getValidOfflineLicense = (): getValidOfflineLicense | null => {
90 const payload = getDecodedOfflineLicense();
91 if (!payload) {
92 return null;
93 }
94
95 const expiryDate = new Date(payload.expiryDate);
96 if (expiryDate.getTime() < new Date().getTime()) {
97 return null;
98 }
99
100 return payload;
101}
102
103// If the license hasn't successfully synced with Lighthouse for this long,
104// the locally-cached state is no longer trusted. This guards against an

Callers 4

getEntitlementsFunction · 0.85
getSeatCapFunction · 0.85

Calls 1

getDecodedOfflineLicenseFunction · 0.85

Tested by

no test coverage detected