MCPcopy Create free account
hub / github.com/tiann/hapi / getInstalledCliMtimeMs

Function getInstalledCliMtimeMs

cli/src/runner/controlClient.ts:17–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15import { hashRunnerCliApiToken, isRunnerStateCompatibleWithIdentity } from './runnerIdentity';
16
17export function getInstalledCliMtimeMs(): number | undefined {
18 if (isBunCompiled()) {
19 try {
20 return statSync(process.execPath).mtimeMs;
21 } catch {
22 return undefined;
23 }
24 }
25
26 const packageJsonPath = join(projectPath(), 'package.json');
27 if (!existsSync(packageJsonPath)) {
28 return undefined;
29 }
30
31 try {
32 return statSync(packageJsonPath).mtimeMs;
33 } catch {
34 return undefined;
35 }
36}
37
38async function runnerPost(path: string, body?: any): Promise<{ error?: string } | any> {
39 const state = await readRunnerState();

Callers 2

startRunnerFunction · 0.90

Calls 2

isBunCompiledFunction · 0.90
projectPathFunction · 0.90

Tested by

no test coverage detected