Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions packages/browser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @lightpanda/browser

## 1.3.0

### Minor Changes

- [#16](https://github.com/lightpanda-io/node-packages/pull/16) [`2d43701`](https://github.com/lightpanda-io/node-packages/commit/2d437016575d9322ffd58cc98d0c67a00177cee5) Thanks [@krichprollsch](https://github.com/krichprollsch)! - - prefer dash for binary options (#14)
- --timeout is deprecated (#16)

## 1.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightpanda/browser",
"version": "1.2.0",
"version": "1.3.0",
"description": "Lightpanda for Node.js",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
5 changes: 1 addition & 4 deletions packages/browser/src/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ import { getExecutablePath, validatePort, validateUrl } from './utils.js'
* @type {object}
* @property {string} host - Host of the CDP server
* @property {string} port - Port of the CDP server
* @property {number} timeout - Inactivity timeout in seconds before disconnecting clients
* @property {boolean} disableHostVerification - Disables host verification on all HTTP requests
* @property {boolean} obeyRobots - Fetches and obeys the robots.txt (if available) of the web pages we make requests towards.
* @property {string} httpProxy - The HTTP proxy to use for all HTTP requests
*/
export type LightpandaServeOptions = {
host?: string
port?: number
timeout?: number
disableHostVerification?: boolean
obeyRobots?: boolean
httpProxy?: string
Expand All @@ -46,7 +44,7 @@ const defaultOptions: LightpandaServeOptions = {
* @returns {Promise<ChildProcessWithoutNullStreams>}
*/
export const serve = (options: LightpandaServeOptions = defaultOptions) => {
const { host, port, timeout, disableHostVerification, obeyRobots, httpProxy } = options
const { host, port, disableHostVerification, obeyRobots, httpProxy } = options

if (port) {
validatePort(port)
Expand All @@ -60,7 +58,6 @@ export const serve = (options: LightpandaServeOptions = defaultOptions) => {
const flags = [
{ flag: '--host', value: host },
{ flag: '--port', value: port },
{ flag: '--timeout', value: timeout },
{
flag: '--insecure-disable-tls-host-verification',
value: disableHostVerification,
Expand Down