@browserbasehq/sdk 1.4.4 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,18 +15,14 @@
|
|
|
15
15
|
## Browserbase JS SDK
|
|
16
16
|
|
|
17
17
|
Browserbase is the best developer platform to reliably run, manage, and monitor headless browsers.
|
|
18
|
-
|
|
19
|
-
Get browsers' full control and leverage Browserbase's
|
|
20
|
-
[Infrastructure](https://docs.browserbase.com/under-the-hood), [Stealth Mode](https://docs.browserbase.com/features/stealth-mode), and
|
|
21
|
-
[Session Debugger](https://docs.browserbase.com/features/sessions) to power your automation, test suites,
|
|
22
|
-
and LLM data retrievals.
|
|
18
|
+
Leverage Browserbase to power your automation, test suites, and LLM data retrievals.
|
|
23
19
|
|
|
24
20
|
## Installation and setup
|
|
25
21
|
|
|
26
22
|
### 1. Install the SDK:
|
|
27
23
|
|
|
28
24
|
```bash
|
|
29
|
-
npm install
|
|
25
|
+
npm install @browserbasehq/sdk
|
|
30
26
|
```
|
|
31
27
|
|
|
32
28
|
### 2. Get your Browserbase API Key and Project ID:
|
|
@@ -71,7 +67,7 @@ const result = await browserbase.screenshot('https://www.browserbase.com', {
|
|
|
71
67
|
Install the additional dependencies:
|
|
72
68
|
|
|
73
69
|
```
|
|
74
|
-
npm
|
|
70
|
+
npm install ai openai zod
|
|
75
71
|
```
|
|
76
72
|
|
|
77
73
|
```js
|
|
@@ -106,6 +102,5 @@ const result = await generateText({
|
|
|
106
102
|
|
|
107
103
|
## Further reading
|
|
108
104
|
|
|
109
|
-
- [See how to leverage the Session
|
|
110
|
-
- [
|
|
111
|
-
- [Sessions API Reference](https://docs.browserbase.com/api-reference/list-all-sessions)
|
|
105
|
+
- [See how to leverage the Session Live View for faster development](https://docs.browserbase.com/features/session-live-view)
|
|
106
|
+
- [Sessions API Reference](https://docs.browserbase.com/reference/api/create-a-session)
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export type CreateSessionOptions = {
|
|
|
49
49
|
};
|
|
50
50
|
keepAlive?: boolean;
|
|
51
51
|
timeout?: number;
|
|
52
|
-
proxies?: boolean | {
|
|
52
|
+
proxies?: boolean | Array<{
|
|
53
53
|
type: 'browserbase';
|
|
54
54
|
geolocation?: {
|
|
55
55
|
country: string;
|
|
@@ -63,7 +63,7 @@ export type CreateSessionOptions = {
|
|
|
63
63
|
domainPattern?: string;
|
|
64
64
|
username?: string;
|
|
65
65
|
password?: string;
|
|
66
|
-
}
|
|
66
|
+
}>;
|
|
67
67
|
};
|
|
68
68
|
export type Session = {
|
|
69
69
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ class Browserbase {
|
|
|
17
17
|
constructor(options = {}) {
|
|
18
18
|
this.apiKey = options.apiKey || process.env.BROWSERBASE_API_KEY;
|
|
19
19
|
this.projectId = options.projectId || process.env.BROWSERBASE_PROJECT_ID;
|
|
20
|
-
this.baseAPIURL = options.baseURL || 'https://
|
|
20
|
+
this.baseAPIURL = options.baseURL || 'https://api.browserbase.com';
|
|
21
21
|
this.baseConnectURL =
|
|
22
22
|
options.baseConnectURL || 'wss://connect.browserbase.com';
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browserbasehq/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Browserbase JS SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"zod": "^3.22.5"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@changesets/cli": "^2.27.
|
|
33
|
+
"@changesets/cli": "^2.27.9",
|
|
34
34
|
"@types/node": "^20.14.10",
|
|
35
35
|
"browserify": "^17.0.0",
|
|
36
36
|
"chai": "^5.1.0",
|