@browserbasehq/sdk 2.0.0 → 2.2.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/CHANGELOG.md +213 -0
- package/LICENSE +1 -1
- package/README.md +26 -19
- package/core.d.ts +4 -5
- package/core.d.ts.map +1 -1
- package/core.js +16 -11
- package/core.js.map +1 -1
- package/core.mjs +16 -11
- package/core.mjs.map +1 -1
- package/error.d.ts +18 -24
- package/error.d.ts.map +1 -1
- package/error.js +1 -31
- package/error.js.map +1 -1
- package/error.mjs +1 -31
- package/error.mjs.map +1 -1
- package/index.d.mts +18 -31
- package/index.d.ts +18 -31
- package/index.d.ts.map +1 -1
- package/index.js +27 -11
- package/index.js.map +1 -1
- package/index.mjs +11 -10
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contexts.d.ts +1 -5
- package/resources/contexts.d.ts.map +1 -1
- package/resources/contexts.js +0 -2
- package/resources/contexts.js.map +1 -1
- package/resources/contexts.mjs +0 -2
- package/resources/contexts.mjs.map +1 -1
- package/resources/extensions.d.ts +1 -3
- package/resources/extensions.d.ts.map +1 -1
- package/resources/extensions.js +0 -2
- package/resources/extensions.js.map +1 -1
- package/resources/extensions.mjs +0 -2
- package/resources/extensions.mjs.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/projects.d.ts +2 -5
- package/resources/projects.d.ts.map +1 -1
- package/resources/projects.js +1 -3
- package/resources/projects.js.map +1 -1
- package/resources/projects.mjs +1 -3
- package/resources/projects.mjs.map +1 -1
- package/resources/sessions/downloads.d.ts.map +1 -1
- package/resources/sessions/downloads.js +5 -1
- package/resources/sessions/downloads.js.map +1 -1
- package/resources/sessions/downloads.mjs +5 -1
- package/resources/sessions/downloads.mjs.map +1 -1
- package/resources/sessions/index.d.ts +4 -4
- package/resources/sessions/index.d.ts.map +1 -1
- package/resources/sessions/index.js +3 -3
- package/resources/sessions/index.js.map +1 -1
- package/resources/sessions/index.mjs +1 -1
- package/resources/sessions/index.mjs.map +1 -1
- package/resources/sessions/logs.d.ts +7 -10
- package/resources/sessions/logs.d.ts.map +1 -1
- package/resources/sessions/logs.js +0 -2
- package/resources/sessions/logs.js.map +1 -1
- package/resources/sessions/logs.mjs +0 -2
- package/resources/sessions/logs.mjs.map +1 -1
- package/resources/sessions/recording.d.ts +1 -4
- package/resources/sessions/recording.d.ts.map +1 -1
- package/resources/sessions/recording.js +0 -2
- package/resources/sessions/recording.js.map +1 -1
- package/resources/sessions/recording.mjs +0 -2
- package/resources/sessions/recording.mjs.map +1 -1
- package/resources/sessions/sessions.d.ts +34 -18
- package/resources/sessions/sessions.d.ts.map +1 -1
- package/resources/sessions/sessions.js +8 -6
- package/resources/sessions/sessions.js.map +1 -1
- package/resources/sessions/sessions.mjs +8 -6
- package/resources/sessions/sessions.mjs.map +1 -1
- package/resources/sessions/uploads.d.ts +1 -3
- package/resources/sessions/uploads.d.ts.map +1 -1
- package/resources/sessions/uploads.js +0 -2
- package/resources/sessions/uploads.js.map +1 -1
- package/resources/sessions/uploads.mjs +0 -2
- package/resources/sessions/uploads.mjs.map +1 -1
- package/src/core.ts +23 -19
- package/src/error.ts +25 -41
- package/src/index.ts +69 -40
- package/src/resources/contexts.ts +7 -6
- package/src/resources/extensions.ts +2 -4
- package/src/resources/index.ts +13 -13
- package/src/resources/projects.ts +7 -6
- package/src/resources/sessions/downloads.ts +5 -1
- package/src/resources/sessions/index.ts +10 -10
- package/src/resources/sessions/logs.ts +9 -13
- package/src/resources/sessions/recording.ts +5 -6
- package/src/resources/sessions/sessions.ts +65 -19
- package/src/resources/sessions/uploads.ts +2 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,218 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.0 (2025-01-28)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.1.3...v2.2.0](https://github.com/browserbase/sdk-node/compare/v2.1.3...v2.2.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([#120](https://github.com/browserbase/sdk-node/issues/120)) ([b3315e0](https://github.com/browserbase/sdk-node/commit/b3315e0d03cd446d04f792d9879a862eaf4f7457))
|
|
10
|
+
* **api:** api update ([#123](https://github.com/browserbase/sdk-node/issues/123)) ([5eeaf0f](https://github.com/browserbase/sdk-node/commit/5eeaf0f4e859801eb4facf5cdf21cd4aeaa62088))
|
|
11
|
+
* **api:** api update ([#125](https://github.com/browserbase/sdk-node/issues/125)) ([fa43f83](https://github.com/browserbase/sdk-node/commit/fa43f8345b5980ca505284d707661834c4a63f4d))
|
|
12
|
+
* **api:** api update ([#127](https://github.com/browserbase/sdk-node/issues/127)) ([6ef46ba](https://github.com/browserbase/sdk-node/commit/6ef46ba28bc54a55934ff589e8c428d9a55853b0))
|
|
13
|
+
* **api:** api update ([#128](https://github.com/browserbase/sdk-node/issues/128)) ([57f01ee](https://github.com/browserbase/sdk-node/commit/57f01ee25e486de815c54faefbbd258b304e0b86))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **client:** normalize method ([#114](https://github.com/browserbase/sdk-node/issues/114)) ([d1d66f4](https://github.com/browserbase/sdk-node/commit/d1d66f41bc3240c2cc103e982bead4593984bac8))
|
|
19
|
+
* **client:** normalize method ([#85](https://github.com/browserbase/sdk-node/issues/85)) ([4e2fd4f](https://github.com/browserbase/sdk-node/commit/4e2fd4f97d9199bcd71fa6284523b87c8aff098f))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Chores
|
|
23
|
+
|
|
24
|
+
* **internal:** codegen related update ([#100](https://github.com/browserbase/sdk-node/issues/100)) ([be0fb87](https://github.com/browserbase/sdk-node/commit/be0fb8729648a039633abf9f4f820e1f1371fab1))
|
|
25
|
+
* **internal:** codegen related update ([#101](https://github.com/browserbase/sdk-node/issues/101)) ([cdc0098](https://github.com/browserbase/sdk-node/commit/cdc0098f0fe3e346a6c39a49d146df9718283253))
|
|
26
|
+
* **internal:** codegen related update ([#102](https://github.com/browserbase/sdk-node/issues/102)) ([a205eb3](https://github.com/browserbase/sdk-node/commit/a205eb32749b3de8f155b7095e539f5ecf312288))
|
|
27
|
+
* **internal:** codegen related update ([#103](https://github.com/browserbase/sdk-node/issues/103)) ([8bbb29d](https://github.com/browserbase/sdk-node/commit/8bbb29daf468178558017018bdda99680ffa7192))
|
|
28
|
+
* **internal:** codegen related update ([#104](https://github.com/browserbase/sdk-node/issues/104)) ([aa09378](https://github.com/browserbase/sdk-node/commit/aa093789041fbe3d4ddbc518ae1720492df7b1b4))
|
|
29
|
+
* **internal:** codegen related update ([#105](https://github.com/browserbase/sdk-node/issues/105)) ([f7decdd](https://github.com/browserbase/sdk-node/commit/f7decddf22a6d00e2f07d2249366b2e20ff4d36d))
|
|
30
|
+
* **internal:** codegen related update ([#106](https://github.com/browserbase/sdk-node/issues/106)) ([5f6cf39](https://github.com/browserbase/sdk-node/commit/5f6cf39442ce44cccd8eefb1c590fee5dce14b3b))
|
|
31
|
+
* **internal:** codegen related update ([#107](https://github.com/browserbase/sdk-node/issues/107)) ([65569d9](https://github.com/browserbase/sdk-node/commit/65569d9c6281cc6cb4c52e463047c72728c946e8))
|
|
32
|
+
* **internal:** codegen related update ([#108](https://github.com/browserbase/sdk-node/issues/108)) ([2efdd29](https://github.com/browserbase/sdk-node/commit/2efdd2931bde64ac04c1ead6577a687a06681ca6))
|
|
33
|
+
* **internal:** codegen related update ([#109](https://github.com/browserbase/sdk-node/issues/109)) ([ee7a567](https://github.com/browserbase/sdk-node/commit/ee7a567fe5589ac6efd1ba01644d0f241f753d4a))
|
|
34
|
+
* **internal:** codegen related update ([#110](https://github.com/browserbase/sdk-node/issues/110)) ([147d29c](https://github.com/browserbase/sdk-node/commit/147d29cd2ab04a7a6112d816346dc63a7370fec2))
|
|
35
|
+
* **internal:** codegen related update ([#111](https://github.com/browserbase/sdk-node/issues/111)) ([b506c94](https://github.com/browserbase/sdk-node/commit/b506c940c4a6c609837e4f50986275646e730d90))
|
|
36
|
+
* **internal:** codegen related update ([#112](https://github.com/browserbase/sdk-node/issues/112)) ([c726f9d](https://github.com/browserbase/sdk-node/commit/c726f9d17683e467c06cdbb2de79618177386c19))
|
|
37
|
+
* **internal:** codegen related update ([#113](https://github.com/browserbase/sdk-node/issues/113)) ([00d3797](https://github.com/browserbase/sdk-node/commit/00d3797ddd1a43bb0881ab43efb83efcd649f8b6))
|
|
38
|
+
* **internal:** codegen related update ([#116](https://github.com/browserbase/sdk-node/issues/116)) ([efc7bbf](https://github.com/browserbase/sdk-node/commit/efc7bbf3920fa50b8f51ba32f6a83b04e1ac97ea))
|
|
39
|
+
* **internal:** codegen related update ([#117](https://github.com/browserbase/sdk-node/issues/117)) ([03b5237](https://github.com/browserbase/sdk-node/commit/03b5237346188285df228c2f49d46e22b7ee5786))
|
|
40
|
+
* **internal:** codegen related update ([#122](https://github.com/browserbase/sdk-node/issues/122)) ([58f702b](https://github.com/browserbase/sdk-node/commit/58f702b63d349f2728b917fda106efb66572857a))
|
|
41
|
+
* **internal:** codegen related update ([#126](https://github.com/browserbase/sdk-node/issues/126)) ([3535bba](https://github.com/browserbase/sdk-node/commit/3535bbabe8ef40b0239b9552b1edac8331eee317))
|
|
42
|
+
* **internal:** codegen related update ([#50](https://github.com/browserbase/sdk-node/issues/50)) ([e25fad2](https://github.com/browserbase/sdk-node/commit/e25fad2a55873f45deeb15bc7820e632f5aae3c5))
|
|
43
|
+
* **internal:** codegen related update ([#74](https://github.com/browserbase/sdk-node/issues/74)) ([ac7c39c](https://github.com/browserbase/sdk-node/commit/ac7c39c82bc6f9814cc259b7d8774c222ae70fb5))
|
|
44
|
+
* **internal:** codegen related update ([#75](https://github.com/browserbase/sdk-node/issues/75)) ([e515faa](https://github.com/browserbase/sdk-node/commit/e515faa3f6d4c6731bec6bc318ba052a02ea2efd))
|
|
45
|
+
* **internal:** codegen related update ([#76](https://github.com/browserbase/sdk-node/issues/76)) ([b0ba40b](https://github.com/browserbase/sdk-node/commit/b0ba40b4c439e75bb755e6e8d103a6c1a913bad6))
|
|
46
|
+
* **internal:** codegen related update ([#77](https://github.com/browserbase/sdk-node/issues/77)) ([5844462](https://github.com/browserbase/sdk-node/commit/58444621fe47d62d4ec42e7f217e87c3399dab67))
|
|
47
|
+
* **internal:** codegen related update ([#78](https://github.com/browserbase/sdk-node/issues/78)) ([ba95d78](https://github.com/browserbase/sdk-node/commit/ba95d78eb013d9e7ed2faba452d5dc0e3fb756ae))
|
|
48
|
+
* **internal:** codegen related update ([#79](https://github.com/browserbase/sdk-node/issues/79)) ([b938f98](https://github.com/browserbase/sdk-node/commit/b938f98baffe628484d6a3053c386c3e1dbfe4d5))
|
|
49
|
+
* **internal:** codegen related update ([#80](https://github.com/browserbase/sdk-node/issues/80)) ([e6c215a](https://github.com/browserbase/sdk-node/commit/e6c215a1ba0ad7daa91c6f520cf7d64f0f4b6c7f))
|
|
50
|
+
* **internal:** codegen related update ([#81](https://github.com/browserbase/sdk-node/issues/81)) ([aa5fc7e](https://github.com/browserbase/sdk-node/commit/aa5fc7ecbb097e5a6dfafea5e7a9fb64232326a1))
|
|
51
|
+
* **internal:** codegen related update ([#83](https://github.com/browserbase/sdk-node/issues/83)) ([7b7d276](https://github.com/browserbase/sdk-node/commit/7b7d276cce847a084d2682be06c92ee3a58f80dd))
|
|
52
|
+
* **internal:** codegen related update ([#84](https://github.com/browserbase/sdk-node/issues/84)) ([ee770ed](https://github.com/browserbase/sdk-node/commit/ee770ed39d3277f03c73144b56811eadc25efe54))
|
|
53
|
+
* **internal:** codegen related update ([#86](https://github.com/browserbase/sdk-node/issues/86)) ([838f955](https://github.com/browserbase/sdk-node/commit/838f9551bf71c4274a591a8efa15a423f326a6b5))
|
|
54
|
+
* **internal:** codegen related update ([#87](https://github.com/browserbase/sdk-node/issues/87)) ([95a1664](https://github.com/browserbase/sdk-node/commit/95a16646e3396982aeaa966ca0db290709fe9132))
|
|
55
|
+
* **internal:** codegen related update ([#88](https://github.com/browserbase/sdk-node/issues/88)) ([aed6281](https://github.com/browserbase/sdk-node/commit/aed6281d8c51c865e326335bff8280ae1d6e184b))
|
|
56
|
+
* **internal:** codegen related update ([#89](https://github.com/browserbase/sdk-node/issues/89)) ([351f322](https://github.com/browserbase/sdk-node/commit/351f322384882660e62bede689ad71d5eb4d0eb8))
|
|
57
|
+
* **internal:** codegen related update ([#90](https://github.com/browserbase/sdk-node/issues/90)) ([98fd97d](https://github.com/browserbase/sdk-node/commit/98fd97d3040a15b531744ed37304e8636a222f66))
|
|
58
|
+
* **internal:** codegen related update ([#92](https://github.com/browserbase/sdk-node/issues/92)) ([f47ac33](https://github.com/browserbase/sdk-node/commit/f47ac3381405e0d95b8719314f64abe07219497a))
|
|
59
|
+
* **internal:** codegen related update ([#93](https://github.com/browserbase/sdk-node/issues/93)) ([d928cb6](https://github.com/browserbase/sdk-node/commit/d928cb64e9f2e9ac250b221041ff46f0c70d7004))
|
|
60
|
+
* **internal:** codegen related update ([#94](https://github.com/browserbase/sdk-node/issues/94)) ([2a1800b](https://github.com/browserbase/sdk-node/commit/2a1800b04f7cf1a2750bf53dbf9a123b76574b69))
|
|
61
|
+
* **internal:** codegen related update ([#95](https://github.com/browserbase/sdk-node/issues/95)) ([869bc76](https://github.com/browserbase/sdk-node/commit/869bc76f86bdb092d2dae762ba8ac32604ee2148))
|
|
62
|
+
* **internal:** codegen related update ([#96](https://github.com/browserbase/sdk-node/issues/96)) ([6395c53](https://github.com/browserbase/sdk-node/commit/6395c538eb71082dee21b3066cf8f9cd99ea7f31))
|
|
63
|
+
* **internal:** codegen related update ([#97](https://github.com/browserbase/sdk-node/issues/97)) ([e112f24](https://github.com/browserbase/sdk-node/commit/e112f2455725494257254d73f41e51c5358f80f0))
|
|
64
|
+
* **internal:** codegen related update ([#98](https://github.com/browserbase/sdk-node/issues/98)) ([65ae889](https://github.com/browserbase/sdk-node/commit/65ae889d6759e8ede4d5df568809c189589d4d6a))
|
|
65
|
+
* **internal:** codegen related update ([#99](https://github.com/browserbase/sdk-node/issues/99)) ([72be8df](https://github.com/browserbase/sdk-node/commit/72be8dfd796d2d4965b901473bd1cb1e1b71acf4))
|
|
66
|
+
* **internal:** version bump ([#56](https://github.com/browserbase/sdk-node/issues/56)) ([ddaf4f3](https://github.com/browserbase/sdk-node/commit/ddaf4f3c3fdadcdf0cfd6c998fdd7d811b4d1286))
|
|
67
|
+
* **internal:** version bump ([#60](https://github.com/browserbase/sdk-node/issues/60)) ([0f373a9](https://github.com/browserbase/sdk-node/commit/0f373a9bac3674b5e33708ab9866096a25366e8f))
|
|
68
|
+
* **internal:** version bump ([#70](https://github.com/browserbase/sdk-node/issues/70)) ([366b99b](https://github.com/browserbase/sdk-node/commit/366b99bbcf8acc3bf0ec9abae2b7b8f944656280))
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Documentation
|
|
72
|
+
|
|
73
|
+
* minor formatting changes ([#115](https://github.com/browserbase/sdk-node/issues/115)) ([815478e](https://github.com/browserbase/sdk-node/commit/815478e0443d9405263bdd49cc300c19aca10452))
|
|
74
|
+
* minor formatting changes ([#82](https://github.com/browserbase/sdk-node/issues/82)) ([f2f77f8](https://github.com/browserbase/sdk-node/commit/f2f77f8a47b3422d422b9eaf1d8ddbaebb817031))
|
|
75
|
+
* minor formatting changes ([#91](https://github.com/browserbase/sdk-node/issues/91)) ([16cda6f](https://github.com/browserbase/sdk-node/commit/16cda6fe2ca0e68ceed0f34d354355e85d8441fb))
|
|
76
|
+
|
|
77
|
+
## 2.1.3 (2025-01-10)
|
|
78
|
+
|
|
79
|
+
Full Changelog: [v2.1.2...v2.1.3](https://github.com/browserbase/sdk-node/compare/v2.1.2...v2.1.3)
|
|
80
|
+
|
|
81
|
+
### Bug Fixes
|
|
82
|
+
|
|
83
|
+
* **client:** normalize method ([#114](https://github.com/browserbase/sdk-node/issues/114)) ([cffc41f](https://github.com/browserbase/sdk-node/commit/cffc41f7baae3bc4fa18eaaa345daaf97077f69b))
|
|
84
|
+
* **client:** normalize method ([#73](https://github.com/browserbase/sdk-node/issues/73)) ([d18d217](https://github.com/browserbase/sdk-node/commit/d18d217242c61280c58c2ea63868a5e854d87c54))
|
|
85
|
+
* **client:** normalize method ([#85](https://github.com/browserbase/sdk-node/issues/85)) ([4a0a13a](https://github.com/browserbase/sdk-node/commit/4a0a13a486b1b19d86ef8fea3977a6f18e266401))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Chores
|
|
89
|
+
|
|
90
|
+
* **internal:** codegen related update ([#100](https://github.com/browserbase/sdk-node/issues/100)) ([01c6b28](https://github.com/browserbase/sdk-node/commit/01c6b28a6c345865d0789523bcccae1bd4990eb8))
|
|
91
|
+
* **internal:** codegen related update ([#101](https://github.com/browserbase/sdk-node/issues/101)) ([241e0fd](https://github.com/browserbase/sdk-node/commit/241e0fdd3fb85cc60d206ff40220741b636eaf29))
|
|
92
|
+
* **internal:** codegen related update ([#102](https://github.com/browserbase/sdk-node/issues/102)) ([adbf0ac](https://github.com/browserbase/sdk-node/commit/adbf0acd4341416a540d4c81f0536f964e33db6b))
|
|
93
|
+
* **internal:** codegen related update ([#103](https://github.com/browserbase/sdk-node/issues/103)) ([a04e944](https://github.com/browserbase/sdk-node/commit/a04e9444a5cc4940418e82b81a0dd6bc68614497))
|
|
94
|
+
* **internal:** codegen related update ([#104](https://github.com/browserbase/sdk-node/issues/104)) ([2d639f9](https://github.com/browserbase/sdk-node/commit/2d639f936d5b4f8dad5d1a300701ac27f4efe702))
|
|
95
|
+
* **internal:** codegen related update ([#105](https://github.com/browserbase/sdk-node/issues/105)) ([0d61709](https://github.com/browserbase/sdk-node/commit/0d61709a981e4d56e6b5b4693dcc4a87fa87a4c6))
|
|
96
|
+
* **internal:** codegen related update ([#106](https://github.com/browserbase/sdk-node/issues/106)) ([3d19415](https://github.com/browserbase/sdk-node/commit/3d194156db3f8a1c98c933367a1d7aa48ad41e5d))
|
|
97
|
+
* **internal:** codegen related update ([#107](https://github.com/browserbase/sdk-node/issues/107)) ([f21383a](https://github.com/browserbase/sdk-node/commit/f21383a99ce073953deac289f9d94e4d59308e6f))
|
|
98
|
+
* **internal:** codegen related update ([#108](https://github.com/browserbase/sdk-node/issues/108)) ([47b9c65](https://github.com/browserbase/sdk-node/commit/47b9c65e487011900f1996e4f35ceb867a5f5045))
|
|
99
|
+
* **internal:** codegen related update ([#109](https://github.com/browserbase/sdk-node/issues/109)) ([63a2c0d](https://github.com/browserbase/sdk-node/commit/63a2c0df0a552721d77b59e8f1ac1a0540cab7d3))
|
|
100
|
+
* **internal:** codegen related update ([#110](https://github.com/browserbase/sdk-node/issues/110)) ([d17c241](https://github.com/browserbase/sdk-node/commit/d17c241b712cc5325ed8de918906890ecd1ab856))
|
|
101
|
+
* **internal:** codegen related update ([#111](https://github.com/browserbase/sdk-node/issues/111)) ([85ae78d](https://github.com/browserbase/sdk-node/commit/85ae78d8ebd917b7a37a871c803122786889761e))
|
|
102
|
+
* **internal:** codegen related update ([#112](https://github.com/browserbase/sdk-node/issues/112)) ([ef21c4a](https://github.com/browserbase/sdk-node/commit/ef21c4a382a4b4485c68504ca7db396ee221df1a))
|
|
103
|
+
* **internal:** codegen related update ([#113](https://github.com/browserbase/sdk-node/issues/113)) ([bb69228](https://github.com/browserbase/sdk-node/commit/bb6922817abf6f6167f411e13961d346435549b4))
|
|
104
|
+
* **internal:** codegen related update ([#50](https://github.com/browserbase/sdk-node/issues/50)) ([bb9da1d](https://github.com/browserbase/sdk-node/commit/bb9da1dcc8336d0e33fc8dd40519ea8db1738223))
|
|
105
|
+
* **internal:** codegen related update ([#72](https://github.com/browserbase/sdk-node/issues/72)) ([415c0c3](https://github.com/browserbase/sdk-node/commit/415c0c3ba38437c2b4235fdb689f096cc062345e))
|
|
106
|
+
* **internal:** codegen related update ([#74](https://github.com/browserbase/sdk-node/issues/74)) ([4e54df4](https://github.com/browserbase/sdk-node/commit/4e54df4bf0147ca39f66a39cd213336db457a415))
|
|
107
|
+
* **internal:** codegen related update ([#75](https://github.com/browserbase/sdk-node/issues/75)) ([d344d5e](https://github.com/browserbase/sdk-node/commit/d344d5e923d0aa58ea8c7a1de5d16e49e24b8a26))
|
|
108
|
+
* **internal:** codegen related update ([#76](https://github.com/browserbase/sdk-node/issues/76)) ([2233aa2](https://github.com/browserbase/sdk-node/commit/2233aa277ba33ede0ef04c2df2ae89b204f2251e))
|
|
109
|
+
* **internal:** codegen related update ([#77](https://github.com/browserbase/sdk-node/issues/77)) ([16b27b4](https://github.com/browserbase/sdk-node/commit/16b27b41e10e2ca536488ee5b642609a18f54ba3))
|
|
110
|
+
* **internal:** codegen related update ([#78](https://github.com/browserbase/sdk-node/issues/78)) ([af2d145](https://github.com/browserbase/sdk-node/commit/af2d14584d893bc5fadb35fea91522fb384f093d))
|
|
111
|
+
* **internal:** codegen related update ([#79](https://github.com/browserbase/sdk-node/issues/79)) ([b7e4a89](https://github.com/browserbase/sdk-node/commit/b7e4a89a5ac5cc81c1a1e4d3383fe3618336e169))
|
|
112
|
+
* **internal:** codegen related update ([#80](https://github.com/browserbase/sdk-node/issues/80)) ([85a35bf](https://github.com/browserbase/sdk-node/commit/85a35bfd6b35fd8dec0e0337c3a3d7ba5c2de2dc))
|
|
113
|
+
* **internal:** codegen related update ([#81](https://github.com/browserbase/sdk-node/issues/81)) ([2b037d2](https://github.com/browserbase/sdk-node/commit/2b037d292891181f8e8184318c0e9e66ef3205ab))
|
|
114
|
+
* **internal:** codegen related update ([#83](https://github.com/browserbase/sdk-node/issues/83)) ([b1feede](https://github.com/browserbase/sdk-node/commit/b1feedee3363c361a9494344db4f70bdfb7bfc45))
|
|
115
|
+
* **internal:** codegen related update ([#84](https://github.com/browserbase/sdk-node/issues/84)) ([eaf66e0](https://github.com/browserbase/sdk-node/commit/eaf66e050f77f83b8c49ff48929298c185ccd2da))
|
|
116
|
+
* **internal:** codegen related update ([#86](https://github.com/browserbase/sdk-node/issues/86)) ([f9b16d1](https://github.com/browserbase/sdk-node/commit/f9b16d1ebfcf83a6bfabd962629dad5b842a6d75))
|
|
117
|
+
* **internal:** codegen related update ([#87](https://github.com/browserbase/sdk-node/issues/87)) ([62821e0](https://github.com/browserbase/sdk-node/commit/62821e0562b2911918e7b4bd2a6829e56cda77fd))
|
|
118
|
+
* **internal:** codegen related update ([#88](https://github.com/browserbase/sdk-node/issues/88)) ([9ca705d](https://github.com/browserbase/sdk-node/commit/9ca705d9eb8f30d3c2f3b2fb949784ada1bd5432))
|
|
119
|
+
* **internal:** codegen related update ([#89](https://github.com/browserbase/sdk-node/issues/89)) ([2c9ed02](https://github.com/browserbase/sdk-node/commit/2c9ed025f4f456ade76bff1f9431ad8ccb8ba643))
|
|
120
|
+
* **internal:** codegen related update ([#90](https://github.com/browserbase/sdk-node/issues/90)) ([e6e5e10](https://github.com/browserbase/sdk-node/commit/e6e5e1022c331a8a9f8c347dff329831a108316f))
|
|
121
|
+
* **internal:** codegen related update ([#92](https://github.com/browserbase/sdk-node/issues/92)) ([603179e](https://github.com/browserbase/sdk-node/commit/603179e15ff192b48a849a891c37d33daa44a978))
|
|
122
|
+
* **internal:** codegen related update ([#93](https://github.com/browserbase/sdk-node/issues/93)) ([8e16851](https://github.com/browserbase/sdk-node/commit/8e1685118774d324812441d22dda22e5490fbdf9))
|
|
123
|
+
* **internal:** codegen related update ([#94](https://github.com/browserbase/sdk-node/issues/94)) ([763fff0](https://github.com/browserbase/sdk-node/commit/763fff0013483ef8f0dd451a67396043b0a9c5e7))
|
|
124
|
+
* **internal:** codegen related update ([#95](https://github.com/browserbase/sdk-node/issues/95)) ([3e6a5b4](https://github.com/browserbase/sdk-node/commit/3e6a5b430b60ba3e4f70ca84f77286f6d30a455a))
|
|
125
|
+
* **internal:** codegen related update ([#96](https://github.com/browserbase/sdk-node/issues/96)) ([925575c](https://github.com/browserbase/sdk-node/commit/925575c15dcee8bcb8e84182e858bc188ed64163))
|
|
126
|
+
* **internal:** codegen related update ([#97](https://github.com/browserbase/sdk-node/issues/97)) ([66c0b51](https://github.com/browserbase/sdk-node/commit/66c0b517f16827b4787c8770f2dca5a81c514873))
|
|
127
|
+
* **internal:** codegen related update ([#98](https://github.com/browserbase/sdk-node/issues/98)) ([1533ff8](https://github.com/browserbase/sdk-node/commit/1533ff8b958470fc99c6c15a7c04c918f428916e))
|
|
128
|
+
* **internal:** codegen related update ([#99](https://github.com/browserbase/sdk-node/issues/99)) ([668a9d1](https://github.com/browserbase/sdk-node/commit/668a9d105602b36c3cb6295cb6491fd9ffe20c80))
|
|
129
|
+
* **internal:** version bump ([#56](https://github.com/browserbase/sdk-node/issues/56)) ([afafa41](https://github.com/browserbase/sdk-node/commit/afafa41deebd9c03518a8a57c4492d612f3f73ee))
|
|
130
|
+
* **internal:** version bump ([#60](https://github.com/browserbase/sdk-node/issues/60)) ([1734b28](https://github.com/browserbase/sdk-node/commit/1734b28c1d1f2e13bf368feb7f910d060aa646fd))
|
|
131
|
+
* **internal:** version bump ([#70](https://github.com/browserbase/sdk-node/issues/70)) ([40771ce](https://github.com/browserbase/sdk-node/commit/40771ceb4bbf4cee6fc98b8fef4f39cd096fdecd))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Documentation
|
|
135
|
+
|
|
136
|
+
* minor formatting changes ([#115](https://github.com/browserbase/sdk-node/issues/115)) ([6a71bb3](https://github.com/browserbase/sdk-node/commit/6a71bb30e5206d2d9c77e605a712185eecee7f34))
|
|
137
|
+
* minor formatting changes ([#82](https://github.com/browserbase/sdk-node/issues/82)) ([414b9b0](https://github.com/browserbase/sdk-node/commit/414b9b0efb0e3b3e1db5a2bd9250fbce85569f2c))
|
|
138
|
+
* minor formatting changes ([#91](https://github.com/browserbase/sdk-node/issues/91)) ([baa864c](https://github.com/browserbase/sdk-node/commit/baa864cb2b3c8da5fffe2f3634bb293f4f0afbac))
|
|
139
|
+
|
|
140
|
+
## 2.1.2 (2024-12-29)
|
|
141
|
+
|
|
142
|
+
Full Changelog: [v2.1.1...v2.1.2](https://github.com/browserbase/sdk-node/compare/v2.1.1...v2.1.2)
|
|
143
|
+
|
|
144
|
+
### Chores
|
|
145
|
+
|
|
146
|
+
* **internal:** codegen related update ([#50](https://github.com/browserbase/sdk-node/issues/50)) ([fa3fa06](https://github.com/browserbase/sdk-node/commit/fa3fa06b0c5b44e60dccd45a7d262341d7d4431c))
|
|
147
|
+
* **internal:** version bump ([#56](https://github.com/browserbase/sdk-node/issues/56)) ([fc0e9aa](https://github.com/browserbase/sdk-node/commit/fc0e9aa25f78e3136ceab807eb2df592b7a83e46))
|
|
148
|
+
* **internal:** version bump ([#60](https://github.com/browserbase/sdk-node/issues/60)) ([702abb2](https://github.com/browserbase/sdk-node/commit/702abb2c4e7d85100ea110528e70850d4a4f2c52))
|
|
149
|
+
* **internal:** version bump ([#67](https://github.com/browserbase/sdk-node/issues/67)) ([93995d5](https://github.com/browserbase/sdk-node/commit/93995d5e6b9d833a428ae0501d6d4700c3a2d67d))
|
|
150
|
+
|
|
151
|
+
## 2.1.1 (2024-12-12)
|
|
152
|
+
|
|
153
|
+
Full Changelog: [v2.1.0...v2.1.1](https://github.com/browserbase/sdk-node/compare/v2.1.0...v2.1.1)
|
|
154
|
+
|
|
155
|
+
### Chores
|
|
156
|
+
|
|
157
|
+
* **internal:** bump cross-spawn to v7.0.6 ([#63](https://github.com/browserbase/sdk-node/issues/63)) ([43a8303](https://github.com/browserbase/sdk-node/commit/43a83039ad2c853410f4918e637597f637edaac0))
|
|
158
|
+
* **internal:** codegen related update ([#50](https://github.com/browserbase/sdk-node/issues/50)) ([bb1dfba](https://github.com/browserbase/sdk-node/commit/bb1dfba218c17fc31ec1c5a51d7d0cc85fe1e81a))
|
|
159
|
+
* **internal:** codegen related update ([#65](https://github.com/browserbase/sdk-node/issues/65)) ([03b26a2](https://github.com/browserbase/sdk-node/commit/03b26a2b9205acf68ad254ec8be20d65e9212ef3))
|
|
160
|
+
* **internal:** remove unnecessary getRequestClient function ([#62](https://github.com/browserbase/sdk-node/issues/62)) ([ad17e82](https://github.com/browserbase/sdk-node/commit/ad17e821be22d01ee1521fd5d1fdb6a3a95865e2))
|
|
161
|
+
* **internal:** version bump ([#56](https://github.com/browserbase/sdk-node/issues/56)) ([1434357](https://github.com/browserbase/sdk-node/commit/1434357ce1efc7895b717c18593461a6d3ea8dc0))
|
|
162
|
+
* **internal:** version bump ([#60](https://github.com/browserbase/sdk-node/issues/60)) ([535d652](https://github.com/browserbase/sdk-node/commit/535d652bb074cd9a7a37ee647e670c716fca3b1b))
|
|
163
|
+
* **types:** nicer error class types + jsdocs ([#64](https://github.com/browserbase/sdk-node/issues/64)) ([7bf7d7b](https://github.com/browserbase/sdk-node/commit/7bf7d7b7058accc456b51928495b8b21b0ace08c))
|
|
164
|
+
|
|
165
|
+
## 2.1.0 (2024-11-29)
|
|
166
|
+
|
|
167
|
+
Full Changelog: [v2.0.2...v2.1.0](https://github.com/browserbase/sdk-node/compare/v2.0.2...v2.1.0)
|
|
168
|
+
|
|
169
|
+
### Features
|
|
170
|
+
|
|
171
|
+
* **internal:** make git install file structure match npm ([#58](https://github.com/browserbase/sdk-node/issues/58)) ([f7ea01e](https://github.com/browserbase/sdk-node/commit/f7ea01e8f1b5261dc0fb3db028ff3fc1bea004ed))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
### Chores
|
|
175
|
+
|
|
176
|
+
* **internal:** codegen related update ([#50](https://github.com/browserbase/sdk-node/issues/50)) ([101931a](https://github.com/browserbase/sdk-node/commit/101931aed3555b911b5e96ba6cc7cab33f22c163))
|
|
177
|
+
* **internal:** version bump ([#56](https://github.com/browserbase/sdk-node/issues/56)) ([0f0b97a](https://github.com/browserbase/sdk-node/commit/0f0b97aab53c566075dadb8c91bd4ff1014dd54b))
|
|
178
|
+
|
|
179
|
+
## 2.0.2 (2024-11-20)
|
|
180
|
+
|
|
181
|
+
Full Changelog: [v2.0.1...v2.0.2](https://github.com/browserbase/sdk-node/compare/v2.0.1...v2.0.2)
|
|
182
|
+
|
|
183
|
+
### Chores
|
|
184
|
+
|
|
185
|
+
* **internal:** codegen related update ([#50](https://github.com/browserbase/sdk-node/issues/50)) ([3ae78b0](https://github.com/browserbase/sdk-node/commit/3ae78b0477cb19382fb37f66c36c8dfdd5c2c4ec))
|
|
186
|
+
* remove redundant word in comment ([#53](https://github.com/browserbase/sdk-node/issues/53)) ([93f75da](https://github.com/browserbase/sdk-node/commit/93f75da8176b3756133682ef622bd359f011832d))
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Documentation
|
|
190
|
+
|
|
191
|
+
* remove suggestion to use `npm` call out ([#52](https://github.com/browserbase/sdk-node/issues/52)) ([41832d5](https://github.com/browserbase/sdk-node/commit/41832d5220e500837950cfc565a6d40d03ff695a))
|
|
192
|
+
|
|
193
|
+
## 2.0.1 (2024-11-19)
|
|
194
|
+
|
|
195
|
+
Full Changelog: [v2.0.0...v2.0.1](https://github.com/browserbase/sdk-node/compare/v2.0.0...v2.0.1)
|
|
196
|
+
|
|
197
|
+
### Features
|
|
198
|
+
|
|
199
|
+
* **api:** api update ([#40](https://github.com/browserbase/sdk-node/issues/40)) ([97dddaa](https://github.com/browserbase/sdk-node/commit/97dddaa2729f64c4d1dbf20bebf7c243e3fb723b))
|
|
200
|
+
* **api:** api update ([#42](https://github.com/browserbase/sdk-node/issues/42)) ([2ad71d8](https://github.com/browserbase/sdk-node/commit/2ad71d8e96157370ec64619568d185805dcc97a2))
|
|
201
|
+
* various codegen changes ([7615211](https://github.com/browserbase/sdk-node/commit/7615211d48d953fe0833d35a3986f24673659840))
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### Bug Fixes
|
|
205
|
+
|
|
206
|
+
* update example ([#38](https://github.com/browserbase/sdk-node/issues/38)) ([242167d](https://github.com/browserbase/sdk-node/commit/242167d2a82a6239fda100ad014436c9ee77a1de))
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Chores
|
|
210
|
+
|
|
211
|
+
* rebuild project due to codegen change ([#44](https://github.com/browserbase/sdk-node/issues/44)) ([804a9ec](https://github.com/browserbase/sdk-node/commit/804a9ec93ae35b48c6c7d89948a4146abf5ab8cc))
|
|
212
|
+
* rebuild project due to codegen change ([#45](https://github.com/browserbase/sdk-node/issues/45)) ([889bd8d](https://github.com/browserbase/sdk-node/commit/889bd8d94a245a1f9e26dc6877b045fc5bcbae0a))
|
|
213
|
+
* rebuild project due to codegen change ([#47](https://github.com/browserbase/sdk-node/issues/47)) ([4d08a25](https://github.com/browserbase/sdk-node/commit/4d08a25596cf991be1576d10fa9801cb057b157b))
|
|
214
|
+
* rebuild project due to codegen change ([#48](https://github.com/browserbase/sdk-node/issues/48)) ([189b64f](https://github.com/browserbase/sdk-node/commit/189b64fca8fe9ee76ff0b888108cd276f0387ad3))
|
|
215
|
+
|
|
3
216
|
## 2.0.0 (2024-10-29)
|
|
4
217
|
|
|
5
218
|
🆕 fully-featured SDK for Browserbase's API
|
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2025 Browserbase
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ const client = new Browserbase({
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
async function main() {
|
|
30
|
-
const session = await client.sessions.create({ projectId: 'your_project_id'
|
|
30
|
+
const session = await client.sessions.create({ projectId: 'your_project_id' });
|
|
31
31
|
|
|
32
32
|
console.log(session.id);
|
|
33
33
|
}
|
|
@@ -48,7 +48,7 @@ const client = new Browserbase({
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
async function main() {
|
|
51
|
-
const params: Browserbase.SessionCreateParams = { projectId: 'your_project_id'
|
|
51
|
+
const params: Browserbase.SessionCreateParams = { projectId: 'your_project_id' };
|
|
52
52
|
const session: Browserbase.SessionCreateResponse = await client.sessions.create(params);
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -66,17 +66,15 @@ a subclass of `APIError` will be thrown:
|
|
|
66
66
|
<!-- prettier-ignore -->
|
|
67
67
|
```ts
|
|
68
68
|
async function main() {
|
|
69
|
-
const session = await client.sessions
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
});
|
|
69
|
+
const session = await client.sessions.create({ projectId: 'your_project_id' }).catch(async (err) => {
|
|
70
|
+
if (err instanceof Browserbase.APIError) {
|
|
71
|
+
console.log(err.status); // 400
|
|
72
|
+
console.log(err.name); // BadRequestError
|
|
73
|
+
console.log(err.headers); // {server: 'nginx', ...}
|
|
74
|
+
} else {
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
80
78
|
}
|
|
81
79
|
|
|
82
80
|
main();
|
|
@@ -111,7 +109,7 @@ const client = new Browserbase({
|
|
|
111
109
|
});
|
|
112
110
|
|
|
113
111
|
// Or, configure per-request:
|
|
114
|
-
await client.sessions.create({ projectId: 'your_project_id'
|
|
112
|
+
await client.sessions.create({ projectId: 'your_project_id' }, {
|
|
115
113
|
maxRetries: 5,
|
|
116
114
|
});
|
|
117
115
|
```
|
|
@@ -128,7 +126,7 @@ const client = new Browserbase({
|
|
|
128
126
|
});
|
|
129
127
|
|
|
130
128
|
// Override per-request:
|
|
131
|
-
await client.sessions.create({ projectId: 'your_project_id'
|
|
129
|
+
await client.sessions.create({ projectId: 'your_project_id' }, {
|
|
132
130
|
timeout: 5 * 1000,
|
|
133
131
|
});
|
|
134
132
|
```
|
|
@@ -149,12 +147,12 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
|
|
|
149
147
|
```ts
|
|
150
148
|
const client = new Browserbase();
|
|
151
149
|
|
|
152
|
-
const response = await client.sessions.create({ projectId: 'your_project_id'
|
|
150
|
+
const response = await client.sessions.create({ projectId: 'your_project_id' }).asResponse();
|
|
153
151
|
console.log(response.headers.get('X-My-Header'));
|
|
154
152
|
console.log(response.statusText); // access the underlying Response object
|
|
155
153
|
|
|
156
154
|
const { data: session, response: raw } = await client.sessions
|
|
157
|
-
.create({ projectId: 'your_project_id'
|
|
155
|
+
.create({ projectId: 'your_project_id' })
|
|
158
156
|
.withResponse();
|
|
159
157
|
console.log(raw.headers.get('X-My-Header'));
|
|
160
158
|
console.log(session.id);
|
|
@@ -262,7 +260,7 @@ const client = new Browserbase({
|
|
|
262
260
|
|
|
263
261
|
// Override per-request:
|
|
264
262
|
await client.sessions.create(
|
|
265
|
-
{ projectId: 'your_project_id'
|
|
263
|
+
{ projectId: 'your_project_id' },
|
|
266
264
|
{
|
|
267
265
|
httpAgent: new http.Agent({ keepAlive: false }),
|
|
268
266
|
},
|
|
@@ -274,7 +272,7 @@ await client.sessions.create(
|
|
|
274
272
|
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
275
273
|
|
|
276
274
|
1. Changes that only affect static types, without breaking runtime behavior.
|
|
277
|
-
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_
|
|
275
|
+
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
|
|
278
276
|
3. Changes that we do not expect to impact the vast majority of users in practice.
|
|
279
277
|
|
|
280
278
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
@@ -287,6 +285,15 @@ TypeScript >= 4.5 is supported.
|
|
|
287
285
|
|
|
288
286
|
The following runtimes are supported:
|
|
289
287
|
|
|
288
|
+
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
|
|
289
|
+
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
290
|
+
- Deno v1.28.0 or higher.
|
|
291
|
+
- Bun 1.0 or later.
|
|
292
|
+
- Cloudflare Workers.
|
|
293
|
+
- Vercel Edge Runtime.
|
|
294
|
+
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
|
|
295
|
+
- Nitro v2.6 or greater.
|
|
296
|
+
|
|
290
297
|
Note that React Native is not supported at this time.
|
|
291
298
|
|
|
292
299
|
If you are interested in other runtime environments, please open or upvote an issue on GitHub.
|
package/core.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare abstract class APIClient {
|
|
|
64
64
|
private fetch;
|
|
65
65
|
protected idempotencyHeader?: string;
|
|
66
66
|
constructor({ baseURL, maxRetries, timeout, // 1 minute
|
|
67
|
-
httpAgent, fetch:
|
|
67
|
+
httpAgent, fetch: overriddenFetch, }: {
|
|
68
68
|
baseURL: string;
|
|
69
69
|
maxRetries?: number | undefined;
|
|
70
70
|
timeout: number | undefined;
|
|
@@ -125,7 +125,6 @@ export declare abstract class APIClient {
|
|
|
125
125
|
buildURL<Req>(path: string, query: Req | null | undefined): string;
|
|
126
126
|
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
127
127
|
fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
|
|
128
|
-
protected getRequestClient(): RequestClient;
|
|
129
128
|
private shouldRetry;
|
|
130
129
|
private retryRequest;
|
|
131
130
|
private calculateDefaultRetryTimeoutMillis;
|
|
@@ -150,8 +149,8 @@ export declare abstract class AbstractPage<Item> implements AsyncIterable<Item>
|
|
|
150
149
|
abstract getPaginatedItems(): Item[];
|
|
151
150
|
hasNextPage(): boolean;
|
|
152
151
|
getNextPage(): Promise<this>;
|
|
153
|
-
iterPages(): AsyncGenerator<
|
|
154
|
-
[Symbol.asyncIterator](): AsyncGenerator<
|
|
152
|
+
iterPages(): AsyncGenerator<this>;
|
|
153
|
+
[Symbol.asyncIterator](): AsyncGenerator<Item>;
|
|
155
154
|
}
|
|
156
155
|
/**
|
|
157
156
|
* This subclass of Promise will resolve to an instantiated Page once the request completes.
|
|
@@ -171,7 +170,7 @@ export declare class PagePromise<PageClass extends AbstractPage<Item>, Item = Re
|
|
|
171
170
|
* console.log(item)
|
|
172
171
|
* }
|
|
173
172
|
*/
|
|
174
|
-
[Symbol.asyncIterator](): AsyncGenerator<
|
|
173
|
+
[Symbol.asyncIterator](): AsyncGenerator<Item>;
|
|
175
174
|
}
|
|
176
175
|
export declare const createResponseHeaders: (headers: Awaited<ReturnType<Fetch>>["headers"]) => Record<string, string>;
|
|
177
176
|
type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
package/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,QAAQ,EAIT,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,KAAK,EAEV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;AACzB,OAAO,EAAE,QAAQ,EAA+B,MAAM,WAAW,CAAC;AAClE,OAAO,EACL,gCAAgC,EAChC,2BAA2B,EAC3B,UAAU,EACV,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEhF,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAExC,KAAK,gBAAgB,GAAG;I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AAC,CAElE"}
|
package/core.js
CHANGED
|
@@ -116,12 +116,12 @@ class APIPromise extends Promise {
|
|
|
116
116
|
exports.APIPromise = APIPromise;
|
|
117
117
|
class APIClient {
|
|
118
118
|
constructor({ baseURL, maxRetries = 2, timeout = 60000, // 1 minute
|
|
119
|
-
httpAgent, fetch:
|
|
119
|
+
httpAgent, fetch: overriddenFetch, }) {
|
|
120
120
|
this.baseURL = baseURL;
|
|
121
121
|
this.maxRetries = validatePositiveInteger('maxRetries', maxRetries);
|
|
122
122
|
this.timeout = validatePositiveInteger('timeout', timeout);
|
|
123
123
|
this.httpAgent = httpAgent;
|
|
124
|
-
this.fetch =
|
|
124
|
+
this.fetch = overriddenFetch ?? index_1.fetch;
|
|
125
125
|
}
|
|
126
126
|
authHeaders(opts) {
|
|
127
127
|
return {};
|
|
@@ -358,16 +358,21 @@ class APIClient {
|
|
|
358
358
|
if (signal)
|
|
359
359
|
signal.addEventListener('abort', () => controller.abort());
|
|
360
360
|
const timeout = setTimeout(() => controller.abort(), ms);
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
361
|
+
const fetchOptions = {
|
|
362
|
+
signal: controller.signal,
|
|
363
|
+
...options,
|
|
364
|
+
};
|
|
365
|
+
if (fetchOptions.method) {
|
|
366
|
+
// Custom methods like 'patch' need to be uppercased
|
|
367
|
+
// See https://github.com/nodejs/undici/issues/2294
|
|
368
|
+
fetchOptions.method = fetchOptions.method.toUpperCase();
|
|
369
|
+
}
|
|
370
|
+
return (
|
|
371
|
+
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
|
|
372
|
+
this.fetch.call(undefined, url, fetchOptions).finally(() => {
|
|
365
373
|
clearTimeout(timeout);
|
|
366
374
|
}));
|
|
367
375
|
}
|
|
368
|
-
getRequestClient() {
|
|
369
|
-
return { fetch: this.fetch };
|
|
370
|
-
}
|
|
371
376
|
shouldRetry(response) {
|
|
372
377
|
// Note this is not a standard header.
|
|
373
378
|
const shouldRetryHeader = response.headers.get('x-should-retry');
|
|
@@ -688,8 +693,8 @@ const safeJSON = (text) => {
|
|
|
688
693
|
}
|
|
689
694
|
};
|
|
690
695
|
exports.safeJSON = safeJSON;
|
|
691
|
-
// https://
|
|
692
|
-
const startsWithSchemeRegexp =
|
|
696
|
+
// https://url.spec.whatwg.org/#url-scheme-string
|
|
697
|
+
const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
693
698
|
const isAbsoluteURL = (url) => {
|
|
694
699
|
return startsWithSchemeRegexp.test(url);
|
|
695
700
|
};
|