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

Function encodeOfflineKey

packages/shared/src/entitlements.test.ts:35–38  ·  view source on GitHub ↗
(payload: object)

Source from the content-addressed store, hash-verified

33} from './entitlements.js';
34
35const encodeOfflineKey = (payload: object): string => {
36 const encoded = Buffer.from(JSON.stringify(payload)).toString('base64url');
37 return `sourcebot_ee_${encoded}`;
38};
39
40const futureDate = new Date(Date.now() + 1000 * 60 * 60 * 24 * 365).toISOString();
41const pastDate = new Date(Date.now() - 1000 * 60 * 60 * 24).toISOString();

Callers 1

validOfflineKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected