@poncho-ai/browser 0.6.22 → 0.6.23
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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +12 -0
- package/dist/index.js +7 -0
- package/package.json +1 -1
- package/src/session.ts +12 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/browser@0.6.
|
|
2
|
+
> @poncho-ai/browser@0.6.23 build /home/runner/work/poncho-ai/poncho-ai/packages/browser
|
|
3
3
|
> tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
[34mCLI[39m tsup v8.5.1
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
|
-
[32mESM[39m [1mdist/index.js [22m[32m46.
|
|
11
|
-
[32mESM[39m ⚡️ Build success in
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m46.85 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 85ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 5359ms
|
|
14
14
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m13.69 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @poncho-ai/browser
|
|
2
2
|
|
|
3
|
+
## 0.6.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2d518d1`](https://github.com/cesr/poncho-ai/commit/2d518d1666e69d63a94be8a781d11d0569e6af7b) Thanks [@cesr](https://github.com/cesr)! - Force the configured viewport on remote browsers (cloud provider / cdpUrl).
|
|
8
|
+
`launchOpts.viewport` is only honored when launching a local context, so a
|
|
9
|
+
Browserbase/Kernel/CDP session rendered at the provider's large default — the
|
|
10
|
+
page looked huge, content tiny, scrolling appeared broken, and tap coordinates
|
|
11
|
+
mismatched the frame after reconnect. After connecting, call
|
|
12
|
+
`setViewport(width, height)` so the page renders at the intended size and frames
|
|
13
|
+
- input stay consistent.
|
|
14
|
+
|
|
3
15
|
## 0.6.22
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -427,6 +427,13 @@ var BrowserSession = class {
|
|
|
427
427
|
launchOpts.args = baseArgs;
|
|
428
428
|
}
|
|
429
429
|
await mgr.launch(launchOpts);
|
|
430
|
+
if (this.isRemote) {
|
|
431
|
+
try {
|
|
432
|
+
await mgr.setViewport(viewport.width ?? 1280, viewport.height ?? 720);
|
|
433
|
+
} catch (e) {
|
|
434
|
+
console.warn(`[poncho][browser] setViewport failed: ${e?.message ?? e}`);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
430
437
|
this._contextStealthInstalled = false;
|
|
431
438
|
this._uaOverrideApplied.clear();
|
|
432
439
|
if (this.stealthEnabled) {
|
package/package.json
CHANGED
package/src/session.ts
CHANGED
|
@@ -365,6 +365,18 @@ export class BrowserSession {
|
|
|
365
365
|
|
|
366
366
|
await mgr.launch(launchOpts as Parameters<BrowserManagerInstance["launch"]>[0]);
|
|
367
367
|
|
|
368
|
+
// Remote browsers (cloud provider / cdpUrl) ignore launchOpts.viewport —
|
|
369
|
+
// that's only applied when launching a local context — so the page renders
|
|
370
|
+
// at the provider's (often huge) default and the screencast shows it shrunk.
|
|
371
|
+
// Force our configured viewport on the connected page.
|
|
372
|
+
if (this.isRemote) {
|
|
373
|
+
try {
|
|
374
|
+
await mgr.setViewport(viewport.width ?? 1280, viewport.height ?? 720);
|
|
375
|
+
} catch (e) {
|
|
376
|
+
console.warn(`[poncho][browser] setViewport failed: ${(e as Error)?.message ?? e}`);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
368
380
|
// Reset stealth tracking for fresh browser
|
|
369
381
|
this._contextStealthInstalled = false;
|
|
370
382
|
this._uaOverrideApplied.clear();
|