From 23bb9d9f75f45e253b92c5204a1a6129eb3ac342 Mon Sep 17 00:00:00 2001 From: Developers Digest <124798203+developersdigest@users.noreply.github.com> Date: Fri, 25 Sep 2026 19:04:39 -0400 Subject: [PATCH] Add top-level sql command and bump to 1.24.6 --- package.json | 2 +- src/__tests__/cli-aliases.test.ts | 28 ++++++++++++++++++++++++++++ src/index.ts | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8a1d906ce1..a0d7afd03e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firecrawl-cli", - "version": "1.24.5", + "version": "1.24.6", "publishConfig": { "tag": "latest" }, diff --git a/src/__tests__/cli-aliases.test.ts b/src/__tests__/cli-aliases.test.ts index 019849cc14..d39949cea2 100644 --- a/src/__tests__/cli-aliases.test.ts +++ b/src/__tests__/cli-aliases.test.ts @@ -16,6 +16,7 @@ describe('CLI compatibility aliases', { timeout: 30000 }, () => { global.fetch = () => { throw new Error('Unexpected network request'); }; const print = (value) => console.log(JSON.stringify(value)); require('./dist/commands/credit-usage').handleCreditUsageCommand = print; + require('./dist/commands/alexandria').handleAlexandria = (calls, options) => print({ calls, options }); const scrape = require('./dist/commands/scrape'); scrape.handleScrapeCommand = print; scrape.handleAllScrapeCommand = (_url, options) => print(options); @@ -37,6 +38,33 @@ describe('CLI compatibility aliases', { timeout: 30000 }, () => { }); } + testWithBuiltCli( + 'sql preserves experimental aliases and execution options', + () => { + const flags = ['SHOW CATEGORIES', '--execute', '--pretty']; + const canonical = run(['sql', ...flags]); + expect(canonical.status, canonical.stderr).toBe(0); + expect(JSON.parse(canonical.stdout)).toMatchObject({ + calls: [ + { + provider: 'firecrawl', + capability: 'sql', + options: { query: 'SHOW CATEGORIES', execute: true }, + }, + ], + options: { pretty: true }, + }); + for (const prefix of [ + ['x', 'sql'], + ['experimental', 'sql'], + ]) { + const alias = run([...prefix, ...flags]); + expect(alias.status, alias.stderr).toBe(0); + expect(alias.stdout).toBe(canonical.stdout); + } + } + ); + testWithBuiltCli( 'credits preserves credit-usage options and authentication', () => { diff --git a/src/index.ts b/src/index.ts index b2671309e5..99801e2f76 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2253,6 +2253,7 @@ Shorthand: "firecrawl x" is an alias for "firecrawl experimental". ` ); experimental.addCommand(createDownloadCommand()); +program.addCommand(createSqlCommand(), { hidden: true }); experimental.addCommand(createSqlCommand(), { hidden: true }); program.addCommand(experimental);