MCPcopy
hub / github.com/faressoft/terminalizer / generateToken

Function generateToken

utility.js:265–275  ·  view source on GitHub ↗

* Generate and save a token to be used for uploading recordings * * @param {String} token * @return {String}

(token)

Source from the content-addressed store, hash-verified

263 * @return {String}
264 */
265function generateToken(token) {
266
267 var token = di.uuid.v4();
268 var globalDirPath = getGlobalDirectory();
269 var tokenPath = di.path.join(globalDirPath, 'token.txt');
270
271 di.fs.writeFileSync(tokenPath, token, 'utf8');
272
273 return token;
274
275}
276
277/**
278 * Get registered token for uploading recordings

Callers

nothing calls this directly

Calls 1

getGlobalDirectoryFunction · 0.85

Tested by

no test coverage detected