Skip to content

Commit eb27f0b

Browse files
chore(api): remove the data-layer scrape path (firecrawl#4029)
First step of moving routed data sources to a standalone service: drop the data-layer pilot path (eligibility, capabilities cache, engine, success-credits billing branch, and the blocklist bypass + terms gate in blocklistMiddleware). The professionalProfileCompanyDataBeta flag, the dashboard terms acceptance, and organization_data_source_access are untouched - the replacement path will reuse them. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent c9aa141 commit eb27f0b

10 files changed

Lines changed: 0 additions & 1206 deletions

File tree

apps/api/src/__tests__/snips/v2/audio-routing.test.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
describe("Audio format engine routing (buildFallbackList)", () => {
88
let buildFallbackList: typeof import("../../../scraper/scrapeURL/engines/index.js").buildFallbackList;
9-
let clearDataLayerCapabilitiesForTest: typeof import("../../../lib/data-layer.js").clearDataLayerCapabilitiesForTest;
10-
let setDataLayerCapabilitiesForTest: typeof import("../../../lib/data-layer.js").setDataLayerCapabilitiesForTest;
119

1210
const originalFireEngineUrl = process.env.FIRE_ENGINE_BETA_URL;
1311
const originalIndexUrl = process.env.INDEX_DATABASE_URL;
@@ -22,14 +20,6 @@ describe("Audio format engine routing (buildFallbackList)", () => {
2220
({ buildFallbackList } = await import(
2321
"../../../scraper/scrapeURL/engines/index.js"
2422
));
25-
({
26-
clearDataLayerCapabilitiesForTest,
27-
setDataLayerCapabilitiesForTest,
28-
} = await import("../../../lib/data-layer.js"));
29-
});
30-
31-
afterEach(() => {
32-
clearDataLayerCapabilitiesForTest();
3323
});
3424

3525
afterAll(() => {
@@ -120,20 +110,4 @@ describe("Audio format engine routing (buildFallbackList)", () => {
120110
expect(engines).toContain("fire-engine;chrome-cdp");
121111
});
122112

123-
it("does not route agent index-only requests through the data layer", async () => {
124-
setDataLayerCapabilitiesForTest({
125-
domains: ["profiles.example"],
126-
});
127-
128-
const meta = buildStubMeta([]);
129-
meta.url = "https://profiles.example/person/example-person";
130-
meta.options.formats = [{ type: "markdown" }];
131-
meta.internalOptions.agentIndexOnly = true;
132-
meta.internalOptions.teamFlags = { enrichBeta: true };
133-
134-
const fallback = await buildFallbackList(meta);
135-
const engines = fallback.map(f => f.engine);
136-
137-
expect(engines).toEqual(["index", "index;documents"]);
138-
});
139113
});

apps/api/src/lib/data-layer.test.ts

Lines changed: 0 additions & 325 deletions
This file was deleted.

0 commit comments

Comments
 (0)