MCPcopy
hub / github.com/callstack/agent-device / runVersionFastPath

Function runVersionFastPath

src/bin.ts:19–31  ·  view source on GitHub ↗
(argv: string[])

Source from the content-addressed store, hash-verified

17}
18
19function runVersionFastPath(argv: string[]): boolean {
20 if (argv.length !== 1 || !isVersionFlag(argv[0])) return false;
21 if (typeof __AGENT_DEVICE_VERSION__ === 'string') {
22 process.stdout.write(`${__AGENT_DEVICE_VERSION__}\n`);
23 return true;
24 }
25 import('./utils/version.ts')
26 .then(({ readVersion }) => {
27 process.stdout.write(`${readVersion()}\n`);
28 })
29 .catch(handleStartupError);
30 return true;
31}
32
33function runNoCommandFastPath(argv: string[]): boolean {
34 if (argv.length !== 0) return false;

Callers 1

runFastPathFunction · 0.85

Calls 3

isVersionFlagFunction · 0.85
writeMethod · 0.80
readVersionFunction · 0.50

Tested by

no test coverage detected