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

Function readConnectProvider

src/cli/commands/connection.ts:423–436  ·  view source on GitHub ↗
(positionals: string[])

Source from the content-addressed store, hash-verified

421}
422
423function readConnectProvider(positionals: string[]): ConnectProvider | undefined {
424 const provider = positionals[0];
425 if (provider === undefined) return undefined;
426 if (positionals.length > 1) {
427 throw new AppError('INVALID_ARGS', 'connect accepts at most one provider positional.');
428 }
429 if (isConnectProviderName(provider)) {
430 return provider;
431 }
432 throw new AppError(
433 'INVALID_ARGS',
434 `Unknown connect provider: ${provider}. Supported providers: ${connectProviderNamesForError()}.`,
435 );
436}
437
438function shouldUseProxyConnectShortcut(flags: CliFlags): boolean {
439 if (!flags.daemonBaseUrl || flags.tenant || flags.runId || flags.leaseId || flags.leaseBackend) {

Callers 1

connectCommandFunction · 0.85

Calls 2

isConnectProviderNameFunction · 0.90

Tested by

no test coverage detected