MCPcopy Create free account
hub / github.com/ccxt/ccxt / printSavedCommand

Function printSavedCommand

cli/ts/helpers.ts:264–274  ·  view source on GitHub ↗

* * @param cliOptions

(cliOptions)

Source from the content-addressed store, hash-verified

262 * @param cliOptions
263 */
264function printSavedCommand (cliOptions) {
265 const cachePath = getCacheDirectory ();
266 const historyPath = path.join (cachePath, 'history');
267 const historyFile = path.join (historyPath, 'commands.json');
268 const list = JSON.parse (fs.readFileSync (historyFile).toString ()) || [];
269 const listWithIds = [];
270 for (let i = 0; i < list.length; i++) {
271 listWithIds.push ({ 'index': i + 1, 'command': list[i] });
272 }
273 printHumanReadable ('', listWithIds, cliOptions, true);
274}
275
276//-----------------------------------------------------------------------------
277

Callers 1

cli.tsFile · 0.85

Calls 5

getCacheDirectoryFunction · 0.85
printHumanReadableFunction · 0.85
pushMethod · 0.80
parseMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…