MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / withCliServerAuthFallback

Function withCliServerAuthFallback

apps/cli/src/server-connection.ts:33–42  ·  view source on GitHub ↗
(
  connection: ExecutorServerConnection,
  env: Record<string, string | undefined> = process.env,
)

Source from the content-addressed store, hash-verified

31};
32
33export const withCliServerAuthFallback = (
34 connection: ExecutorServerConnection,
35 env: Record<string, string | undefined> = process.env,
36): ExecutorServerConnection =>
37 connection.auth
38 ? connection
39 : normalizeExecutorServerConnection({
40 ...connection,
41 auth: readCliServerAuth(env),
42 });
43
44export const canAutoStartCliServerConnection = (connection: ExecutorServerConnection): boolean => {
45 if (connection.kind !== "http") return false;

Calls 2

readCliServerAuthFunction · 0.85

Tested by

no test coverage detected