puppeteer-bidi 0.0.1.beta3 → 0.0.1.beta4
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.
- checksums.yaml +4 -4
- data/CLAUDE.md +4 -0
- data/lib/puppeteer/bidi/browser.rb +11 -11
- data/lib/puppeteer/bidi/version.rb +1 -1
- data/lib/puppeteer/bidi.rb +13 -7
- data/sig/puppeteer/bidi/browser.rbs +6 -6
- data/sig/puppeteer/bidi.rbs +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d3afdcd6aeda92482fb530cab98075505ae8e6d9b76da6a8f65dc01d3f76ee6
|
|
4
|
+
data.tar.gz: 2c74ca2d812a27ad8051911cb213d008a6d4077781ca5ecf0b782a2a0f62d72e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e900fd975d92973786eea9546f22f8b71afb2a856575c6ef15bba023285322abe888887c1b92458fa736d887cfff8192c0951738d75c91445d69cda46944740
|
|
7
|
+
data.tar.gz: 070afa10326ae5a789b70b40a55c5b5462dbb5599fc5b8e30b83cf8522752fe65d1c7959cc0e42d937d244a2e0fc23c050f0a48b89eb99f0c8fa5223bb924129
|
data/CLAUDE.md
CHANGED
|
@@ -108,6 +108,10 @@ end
|
|
|
108
108
|
- Public methods should have type annotations
|
|
109
109
|
- **Do NOT use `@rbs!` blocks** - RubyMine IDE doesn't recognize them
|
|
110
110
|
- **Use direct union types** instead of type aliases: `BrowserTarget | PageTarget | FrameTarget` not `target`
|
|
111
|
+
- **Do NOT use `**options` in public APIs** - RubyMine shows as `untyped`. Use explicit keyword arguments:
|
|
112
|
+
- Optional params: `param: nil`
|
|
113
|
+
- Boolean params with default: `headless: true` or `enabled: false`
|
|
114
|
+
- Internal/Core layer methods may still use `**options` for flexibility
|
|
111
115
|
|
|
112
116
|
**Generate RBS files:**
|
|
113
117
|
```bash
|
|
@@ -69,18 +69,18 @@ module Puppeteer
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
# Launch a new Firefox browser instance
|
|
72
|
-
# @rbs executable_path: String
|
|
73
|
-
# @rbs user_data_dir: String
|
|
74
|
-
# @rbs headless: bool
|
|
75
|
-
# @rbs args: Array[String]
|
|
76
|
-
# @rbs timeout: Numeric
|
|
72
|
+
# @rbs executable_path: String? -- Path to browser executable
|
|
73
|
+
# @rbs user_data_dir: String? -- Path to user data directory
|
|
74
|
+
# @rbs headless: bool -- Run browser in headless mode
|
|
75
|
+
# @rbs args: Array[String]? -- Additional browser arguments
|
|
76
|
+
# @rbs timeout: Numeric? -- Launch timeout in seconds
|
|
77
77
|
# @rbs return: Browser -- Browser instance
|
|
78
|
-
def self.launch(
|
|
78
|
+
def self.launch(executable_path: nil, user_data_dir: nil, headless: true, args: nil, timeout: nil)
|
|
79
79
|
launcher = BrowserLauncher.new(
|
|
80
|
-
executable_path:
|
|
81
|
-
user_data_dir:
|
|
82
|
-
headless:
|
|
83
|
-
args:
|
|
80
|
+
executable_path: executable_path,
|
|
81
|
+
user_data_dir: user_data_dir,
|
|
82
|
+
headless: headless,
|
|
83
|
+
args: args || []
|
|
84
84
|
)
|
|
85
85
|
|
|
86
86
|
ws_endpoint = launcher.launch
|
|
@@ -90,7 +90,7 @@ module Puppeteer
|
|
|
90
90
|
|
|
91
91
|
# Start transport connection in background thread with Sync reactor
|
|
92
92
|
# Sync is the preferred way to run async code at the top level
|
|
93
|
-
AsyncUtils.async_timeout(
|
|
93
|
+
AsyncUtils.async_timeout((timeout || 30) * 1000, transport.connect).wait
|
|
94
94
|
|
|
95
95
|
connection = Connection.new(transport)
|
|
96
96
|
|
data/lib/puppeteer/bidi.rb
CHANGED
|
@@ -33,14 +33,20 @@ require "puppeteer/bidi/browser"
|
|
|
33
33
|
module Puppeteer
|
|
34
34
|
module Bidi
|
|
35
35
|
# Launch a new browser instance
|
|
36
|
-
# @rbs executable_path: String
|
|
37
|
-
# @rbs user_data_dir: String
|
|
38
|
-
# @rbs headless: bool
|
|
39
|
-
# @rbs args: Array[String]
|
|
40
|
-
# @rbs timeout: Numeric
|
|
36
|
+
# @rbs executable_path: String? -- Path to browser executable
|
|
37
|
+
# @rbs user_data_dir: String? -- Path to user data directory
|
|
38
|
+
# @rbs headless: bool -- Run browser in headless mode
|
|
39
|
+
# @rbs args: Array[String]? -- Additional browser arguments
|
|
40
|
+
# @rbs timeout: Numeric? -- Launch timeout in seconds
|
|
41
41
|
# @rbs return: Browser -- Browser instance
|
|
42
|
-
def self.launch(
|
|
43
|
-
Browser.launch(
|
|
42
|
+
def self.launch(executable_path: nil, user_data_dir: nil, headless: true, args: nil, timeout: nil)
|
|
43
|
+
Browser.launch(
|
|
44
|
+
executable_path: executable_path,
|
|
45
|
+
user_data_dir: user_data_dir,
|
|
46
|
+
headless: headless,
|
|
47
|
+
args: args,
|
|
48
|
+
timeout: timeout
|
|
49
|
+
)
|
|
44
50
|
end
|
|
45
51
|
|
|
46
52
|
# Connect to an existing browser instance
|
|
@@ -23,13 +23,13 @@ module Puppeteer
|
|
|
23
23
|
def initialize: (connection: Connection, launcher: BrowserLauncher?, core_browser: Core::Browser, session: Core::Session) -> void
|
|
24
24
|
|
|
25
25
|
# Launch a new Firefox browser instance
|
|
26
|
-
# @rbs executable_path: String
|
|
27
|
-
# @rbs user_data_dir: String
|
|
28
|
-
# @rbs headless: bool
|
|
29
|
-
# @rbs args: Array[String]
|
|
30
|
-
# @rbs timeout: Numeric
|
|
26
|
+
# @rbs executable_path: String? -- Path to browser executable
|
|
27
|
+
# @rbs user_data_dir: String? -- Path to user data directory
|
|
28
|
+
# @rbs headless: bool -- Run browser in headless mode
|
|
29
|
+
# @rbs args: Array[String]? -- Additional browser arguments
|
|
30
|
+
# @rbs timeout: Numeric? -- Launch timeout in seconds
|
|
31
31
|
# @rbs return: Browser -- Browser instance
|
|
32
|
-
def self.launch: (
|
|
32
|
+
def self.launch: (?executable_path: String?, ?user_data_dir: String?, ?headless: bool, ?args: Array[String]?, ?timeout: Numeric?) -> Browser
|
|
33
33
|
|
|
34
34
|
# Connect to an existing Firefox browser instance
|
|
35
35
|
# @rbs ws_endpoint: String -- WebSocket endpoint URL
|
data/sig/puppeteer/bidi.rbs
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
module Puppeteer
|
|
4
4
|
module Bidi
|
|
5
5
|
# Launch a new browser instance
|
|
6
|
-
# @rbs executable_path: String
|
|
7
|
-
# @rbs user_data_dir: String
|
|
8
|
-
# @rbs headless: bool
|
|
9
|
-
# @rbs args: Array[String]
|
|
10
|
-
# @rbs timeout: Numeric
|
|
6
|
+
# @rbs executable_path: String? -- Path to browser executable
|
|
7
|
+
# @rbs user_data_dir: String? -- Path to user data directory
|
|
8
|
+
# @rbs headless: bool -- Run browser in headless mode
|
|
9
|
+
# @rbs args: Array[String]? -- Additional browser arguments
|
|
10
|
+
# @rbs timeout: Numeric? -- Launch timeout in seconds
|
|
11
11
|
# @rbs return: Browser -- Browser instance
|
|
12
|
-
def self.launch: (
|
|
12
|
+
def self.launch: (?executable_path: String?, ?user_data_dir: String?, ?headless: bool, ?args: Array[String]?, ?timeout: Numeric?) -> Browser
|
|
13
13
|
|
|
14
14
|
# Connect to an existing browser instance
|
|
15
15
|
# @rbs ws_endpoint: String -- WebSocket endpoint URL
|