( remoteConfigPath: string, )
| 291 | } |
| 292 | |
| 293 | function 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 | |
| 309 | export const disconnectCommand: ClientCommandHandler = async ({ flags, client }) => { |
| 310 | const { session, stateDir, state } = readRequestedConnectionState(flags); |
no test coverage detected