Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"packageManager": "pnpm@10.33.3",
"dependencies": {
"@decodo/sdk-ts": "^2.1.1",
"@decodo/sdk-ts": "^2.1.2",
"commander": "^14.0.0",
"env-paths": "^3.0.0"
},
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/scrape/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// TODO(SCR-3150): switch to cli when sdk task lands
export const INTEGRATION_HEADER = "cli";

export const SCHEMA_TTL_MS = 3_600_000;
Expand Down
6 changes: 5 additions & 1 deletion src/scrape/services/client.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { DecodoClient, type DecodoSchema } from "@decodo/sdk-ts";
import { INTEGRATION_HEADER } from "../constants.js";

export function createDecodoClient(
token: string,
schema?: DecodoSchema
): DecodoClient {
return new DecodoClient({
webScrapingApi: { token },
webScrapingApi: {
token,
integrationHeader: INTEGRATION_HEADER,
},
schema,
});
}
2 changes: 1 addition & 1 deletion tests/scrape/services/auth-validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("validateAuthToken", () => {
});
expect(init.headers).toMatchObject({
Authorization: "Basic test-token",
"x-integration": "sdk-ts", // TODO: switch to cli when sdk task lands
"x-integration": "cli",
});
});
});
Loading