feat: support relay profile selection
CI / test (push) Successful in 10m2s

This commit is contained in:
2026-06-24 18:30:24 +09:00
parent 7a036e244d
commit 3f370cc4b6
24 changed files with 160 additions and 25 deletions
+4 -2
View File
@@ -32,6 +32,7 @@ export function registerSearchCommands(program: Command, ctx: CliContext): void
const count = Number.parseInt(cmdOpts.count || '10', 10);
const maxPages = cmdOpts.maxPages ? Number.parseInt(cmdOpts.maxPages, 10) : undefined;
const relayBaseUrl = ctx.resolveRelayBaseUrlFromOptions(opts);
const profileName = ctx.resolveProfileNameFromOptions(opts);
const usePagination = cmdOpts.all || cmdOpts.cursor;
if (maxPages !== undefined && !usePagination) {
@@ -47,7 +48,7 @@ export function registerSearchCommands(program: Command, ctx: CliContext): void
process.exit(1);
}
const client = new TwitterClient({ relayBaseUrl, timeoutMs, quoteDepth });
const client = new TwitterClient({ relayBaseUrl, profileName, timeoutMs, quoteDepth });
const includeRaw = cmdOpts.jsonFull ?? false;
const searchOptions = { includeRaw };
const paginationOptions = { includeRaw, maxPages, cursor: cmdOpts.cursor };
@@ -90,8 +91,9 @@ export function registerSearchCommands(program: Command, ctx: CliContext): void
let query: string | null = fromUserOpt.query;
const relayBaseUrl = ctx.resolveRelayBaseUrlFromOptions(opts);
const profileName = ctx.resolveProfileNameFromOptions(opts);
const client = new TwitterClient({ relayBaseUrl, timeoutMs, quoteDepth });
const client = new TwitterClient({ relayBaseUrl, profileName, timeoutMs, quoteDepth });
if (!query) {
const who = await client.getCurrentUser();