From c2774e43fea03ef99ef54c7c2a1266b6b6466206 Mon Sep 17 00:00:00 2001 From: Developers Digest <124798203+developersdigest@users.noreply.github.com> Date: Wed, 16 Sep 2026 22:17:44 -0400 Subject: [PATCH] Fix Alexandria terms version flag collision --- README.md | 2 +- src/commands/alexandria.ts | 2 +- src/commands/terms.test.ts | 2 +- src/commands/terms.ts | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 975b3c3280..2b887933df 100644 --- a/README.md +++ b/README.md @@ -1027,7 +1027,7 @@ associated with your Firecrawl API key: ```bash npx firecrawl-cli@alexandria alexandria terms accept benzinga \ - --version '' --digest '' --confirm + --terms-version '' --digest '' --confirm ``` This posts to `/exchange/provider-terms/accept`. No automatic acceptance or retry diff --git a/src/commands/alexandria.ts b/src/commands/alexandria.ts index df82edb57f..3566590c59 100644 --- a/src/commands/alexandria.ts +++ b/src/commands/alexandria.ts @@ -121,7 +121,7 @@ export async function handleAlexandria( if (failed) process.exitCode = 1; if (envelope.code === 'THIRD_PARTY_DATA_TERMS_REQUIRED') { console.error( - 'Review the provider terms with firecrawl alexandria terms show . After review, accept with firecrawl alexandria terms accept --version --digest --confirm.' + 'Review the provider terms with firecrawl alexandria terms show . After review, accept with firecrawl alexandria terms accept --terms-version --digest --confirm.' ); } writeOutput( diff --git a/src/commands/terms.test.ts b/src/commands/terms.test.ts index d567e86d1a..4a64eca630 100644 --- a/src/commands/terms.test.ts +++ b/src/commands/terms.test.ts @@ -5,7 +5,7 @@ vi.mock('../utils/config', () => ({ getConfig: () => ({}), })); afterEach(() => vi.unstubAllGlobals()); -const options = { version: 'v1', digest: 'a'.repeat(64), confirm: true }; +const options = { termsVersion: 'v1', digest: 'a'.repeat(64), confirm: true }; it('requires explicit confirmation without making any request', async () => { const fetcher = vi.fn(); vi.stubGlobal('fetch', fetcher); diff --git a/src/commands/terms.ts b/src/commands/terms.ts index 1f0140261d..1adddcb43d 100644 --- a/src/commands/terms.ts +++ b/src/commands/terms.ts @@ -5,7 +5,7 @@ import { writeOutput } from '../utils/output'; type TermsOptions = { apiKey?: string; apiUrl?: string; - version?: string; + termsVersion?: string; digest?: string; confirm?: boolean; json?: boolean; @@ -22,12 +22,12 @@ export async function requestTerms( if ( accept && (!options.confirm || - !options.version?.trim() || - options.version.length > 200 || + !options.termsVersion?.trim() || + options.termsVersion.length > 200 || !/^[a-f0-9]{64}$/.test(options.digest ?? '')) ) { throw new Error( - 'Review the terms, then supply --version, --digest (64 lowercase hex characters), and --confirm.' + 'Review the terms, then supply --terms-version, --digest (64 lowercase hex characters), and --confirm.' ); } const key = getApiKey(options.apiKey); @@ -50,7 +50,7 @@ export async function requestTerms( ? { body: JSON.stringify({ provider, - version: options.version, + version: options.termsVersion, digest: options.digest, confirmed: true, }), @@ -116,7 +116,7 @@ export function createTermsCommand(): Command { if (name === 'accept') command .requiredOption( - '--version ', + '--terms-version ', 'Exact version of the terms you reviewed' ) .requiredOption(