@browserless.io/cli 0.5.1 → 0.5.2
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 +8 -0
- package/build/api/client.js +1 -1
- package/build/version.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.2](https://github.com/browserless/browserless-cli/compare/v0.5.1...v0.5.2) (2026-10-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* PLT-1989 reject authenticated API redirects ([#142](https://github.com/browserless/browserless-cli/issues/142)) ([211decc](https://github.com/browserless/browserless-cli/commit/211decc03f01896a8881c031f14a3ed56e4b6279))
|
|
9
|
+
* PLT-1990 isolate capture smoke state and replay ([#143](https://github.com/browserless/browserless-cli/issues/143)) ([6c4f352](https://github.com/browserless/browserless-cli/commit/6c4f3520ee46213159001a528b5126fd12d88ccc))
|
|
10
|
+
|
|
3
11
|
## [0.5.1](https://github.com/browserless/browserless-cli/compare/v0.5.0...v0.5.1) (2026-10-22)
|
|
4
12
|
|
|
5
13
|
|
package/build/api/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var $=Object.defineProperty;var c=(e,t)=>$(e,"name",{value:t,configurable:!0});import{ApiError as f}from"../errors.js";const w=3e4,l=c(e=>typeof e=="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)?e.toLowerCase():void 0,"profileAttemptId"),y=c((e,t,n,r)=>{const s=e.endsWith("/")?e:`${e}/`,m=t.replace(/^\/+/,""),o=new URL(m,s);if(o.searchParams.set("token",n),r)for(const[h,u]of Object.entries(r))u!==void 0&&o.searchParams.set(h,String(u));return o},"buildUrl"),p=c((e,t,n)=>{if(!n)return`HTTP ${e} ${t}`;try{const s=JSON.parse(n);if(s?.message&&typeof s.message=="string")return s.message}catch{}const r=n.trim();return r.length>200?`HTTP ${e} ${t}: ${r.slice(0,200)}\u2026`:`HTTP ${e} ${t}: ${r}`},"messageFromBody"),T=c(async(e,t)=>{const n=y(e.server,t.path,e.token,t.query),r={method:t.method};let s;t.rawBody!==void 0?s=t.rawBody:t.body!==void 0&&(s=JSON.stringify(t.body)),s!==void 0&&(r.body=s,r.headers={"Content-Type":"application/json"});const m=l(t.attemptId);m&&(r.headers={...r.headers,"x-browserless-attempt-id":m});const o=t.timeoutMs??w,h=new AbortController,u=setTimeout(()=>h.abort(),o);r.signal=h.signal;let a;try{a=await fetch(n,r)}catch(d){throw d?.name==="AbortError"?new f(`Request to ${e.server}${t.path} timed out after ${o}ms`,0):new f(`Failed to reach ${e.server}: ${d?.message??d}`,0)}finally{clearTimeout(u)}let i;try{i=await a.text()}catch(d){throw d?.name==="AbortError"?new f(`Request to ${e.server}${t.path} timed out after ${o}ms`,0):new f(`Failed to read response from ${e.server}${t.path}: ${d?.message??d}`,0)}if(!a.ok)throw new f(p(a.status,a.statusText,i),a.status,i);if(!(a.status===204||!i))try{return JSON.parse(i)}catch{throw new f(`Server returned non-JSON response: ${i}`,a.status,i)}},"apiFetch");export{T as apiFetch,l as profileAttemptId};
|
|
1
|
+
var $=Object.defineProperty;var c=(e,t)=>$(e,"name",{value:t,configurable:!0});import{ApiError as f}from"../errors.js";const w=3e4,l=c(e=>typeof e=="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)?e.toLowerCase():void 0,"profileAttemptId"),y=c((e,t,n,r)=>{const s=e.endsWith("/")?e:`${e}/`,m=t.replace(/^\/+/,""),o=new URL(m,s);if(o.searchParams.set("token",n),r)for(const[h,u]of Object.entries(r))u!==void 0&&o.searchParams.set(h,String(u));return o},"buildUrl"),p=c((e,t,n)=>{if(!n)return`HTTP ${e} ${t}`;try{const s=JSON.parse(n);if(s?.message&&typeof s.message=="string")return s.message}catch{}const r=n.trim();return r.length>200?`HTTP ${e} ${t}: ${r.slice(0,200)}\u2026`:`HTTP ${e} ${t}: ${r}`},"messageFromBody"),T=c(async(e,t)=>{const n=y(e.server,t.path,e.token,t.query),r={method:t.method,redirect:"error"};let s;t.rawBody!==void 0?s=t.rawBody:t.body!==void 0&&(s=JSON.stringify(t.body)),s!==void 0&&(r.body=s,r.headers={"Content-Type":"application/json"});const m=l(t.attemptId);m&&(r.headers={...r.headers,"x-browserless-attempt-id":m});const o=t.timeoutMs??w,h=new AbortController,u=setTimeout(()=>h.abort(),o);r.signal=h.signal;let a;try{a=await fetch(n,r)}catch(d){throw d?.name==="AbortError"?new f(`Request to ${e.server}${t.path} timed out after ${o}ms`,0):new f(`Failed to reach ${e.server}: ${d?.message??d}`,0)}finally{clearTimeout(u)}let i;try{i=await a.text()}catch(d){throw d?.name==="AbortError"?new f(`Request to ${e.server}${t.path} timed out after ${o}ms`,0):new f(`Failed to read response from ${e.server}${t.path}: ${d?.message??d}`,0)}if(!a.ok)throw new f(p(a.status,a.statusText,i),a.status,i);if(!(a.status===204||!i))try{return JSON.parse(i)}catch{throw new f(`Server returned non-JSON response: ${i}`,a.status,i)}},"apiFetch");export{T as apiFetch,l as profileAttemptId};
|
package/build/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="0.5.
|
|
1
|
+
const o="0.5.2";export{o as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browserless.io/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Browserless CLI — manage authentication profiles, sessions, and other Browserless features from your terminal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@types/chrome-remote-interface": "^0.34.0",
|
|
59
59
|
"@types/mocha": "^10.0.10",
|
|
60
60
|
"@types/node": "^26.6.5",
|
|
61
|
-
"@types/sinon": "^22.0.
|
|
61
|
+
"@types/sinon": "^22.0.2",
|
|
62
62
|
"@types/ws": "^8.18.2",
|
|
63
63
|
"chai": "^6.3.0",
|
|
64
64
|
"esbuild": "^0.28.2",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"prettier": "3.9.10",
|
|
71
71
|
"sinon": "^22.1.0",
|
|
72
72
|
"typescript": "^6.0.3",
|
|
73
|
-
"typescript-eslint": "^8.
|
|
73
|
+
"typescript-eslint": "^8.72.1"
|
|
74
74
|
},
|
|
75
75
|
"overrides": {
|
|
76
76
|
"mocha": {
|