@@ -34,17 +34,7 @@ export function registerBookmarksCommand(program: Command, ctx: CliContext): voi
|
||||
process.exit(1);
|
||||
}
|
||||
const maxPages = maxPagesParsed.value;
|
||||
|
||||
const { cookies, warnings } = await ctx.resolveCredentialsFromOptions(opts);
|
||||
|
||||
for (const warning of warnings) {
|
||||
console.error(`${ctx.p('warn')}${warning}`);
|
||||
}
|
||||
|
||||
if (!cookies.authToken || !cookies.ct0) {
|
||||
console.error(`${ctx.p('err')}Missing required credentials`);
|
||||
process.exit(1);
|
||||
}
|
||||
const relayBaseUrl = ctx.resolveRelayBaseUrlFromOptions(opts);
|
||||
|
||||
const usePagination = Boolean(cmdOpts.all || cmdOpts.cursor);
|
||||
if (maxPages !== undefined && !usePagination) {
|
||||
@@ -56,7 +46,7 @@ export function registerBookmarksCommand(program: Command, ctx: CliContext): voi
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const client = new TwitterClient({ cookies, timeoutMs });
|
||||
const client = new TwitterClient({ relayBaseUrl, timeoutMs });
|
||||
const folderId = cmdOpts.folderId ? extractBookmarkFolderId(cmdOpts.folderId) : null;
|
||||
if (cmdOpts.folderId && !folderId) {
|
||||
console.error(`${ctx.p('err')}Invalid --folder-id. Expected numeric ID or https://x.com/i/bookmarks/<id>.`);
|
||||
|
||||
Reference in New Issue
Block a user