MCPcopy Index your code
hub / github.com/callstack/agent-device / readRemoteConfigConnectionMetadata

Function readRemoteConfigConnectionMetadata

src/cli/commands/connection.ts:293–307  ·  view source on GitHub ↗
(
  remoteConfigPath: string,
)

Source from the content-addressed store, hash-verified

291}
292
293function readRemoteConfigConnectionMetadata(
294 remoteConfigPath: string,
295): RemoteConnectionRequestMetadata | undefined {
296 const profile = resolveRemoteConfigProfile({
297 configPath: remoteConfigPath,
298 cwd: process.cwd(),
299 env: process.env,
300 }).profile;
301 const metadata = {
302 leaseProvider: profile.leaseProvider,
303 clientId: profile.clientId,
304 deviceKey: profile.deviceKey,
305 };
306 return Object.values(metadata).some((value) => value !== undefined) ? metadata : undefined;
307}
308
309export const disconnectCommand: ClientCommandHandler = async ({ flags, client }) => {
310 const { session, stateDir, state } = readRequestedConnectionState(flags);

Callers 1

connectCommandFunction · 0.85

Calls 2

valuesMethod · 0.80

Tested by

no test coverage detected