venetian 0.3.1-aarch64-linux → 0.4.0-aarch64-linux

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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +151 -0
  3. data/CLAUDE.md +1 -0
  4. data/README.md +11 -0
  5. data/Rakefile +1 -0
  6. data/exe/aarch64-linux/node +2 -2
  7. data/exe/aarch64-linux/package/browsers.json +9 -9
  8. data/exe/aarch64-linux/package/cli.js +1 -0
  9. data/exe/aarch64-linux/package/lib/bootstrap.js +61 -0
  10. data/exe/aarch64-linux/package/lib/coreBundle.js +6393 -4170
  11. data/exe/aarch64-linux/package/lib/server/electron/loader.js +4 -0
  12. data/exe/aarch64-linux/package/lib/tools/cli-client/cli.js +2 -1
  13. data/exe/aarch64-linux/package/lib/tools/cli-client/help.json +99 -12
  14. data/exe/aarch64-linux/package/lib/tools/cli-client/output.js +17 -16
  15. data/exe/aarch64-linux/package/lib/tools/cli-client/program.js +8 -4
  16. data/exe/aarch64-linux/package/lib/tools/cli-client/session.js +2 -0
  17. data/exe/aarch64-linux/package/lib/tools/skills/playwright-cli/SKILL.md +71 -3
  18. data/exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
  19. data/exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/running-code.md +4 -0
  20. data/exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/session-management.md +2 -0
  21. data/exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/test-generation.md +1 -1
  22. data/exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/video-recording.md +76 -3
  23. data/exe/aarch64-linux/package/lib/tools/skills/playwright-trace/SKILL.md +1 -1
  24. data/exe/aarch64-linux/package/lib/utilsBundle.js +948 -227
  25. data/exe/aarch64-linux/package/lib/utilsBundle.js.LICENSE +6 -6
  26. data/exe/aarch64-linux/package/lib/vite/htmlReport/report.js +1 -1
  27. data/exe/aarch64-linux/package/lib/vite/recorder/assets/{codeMirrorModule-CVQWJZAA.js → codeMirrorModule-DK72OMRi.js} +1 -1
  28. data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
  29. data/exe/aarch64-linux/package/lib/vite/recorder/index.html +1 -1
  30. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/{codeMirrorModule-BbkfBe3n.js → codeMirrorModule-BEB2e8M3.js} +1 -1
  31. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
  32. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/{xtermModule-DywYcAf8.js → xtermModule-B794rD2Z.js} +1 -1
  33. data/exe/aarch64-linux/package/lib/vite/traceViewer/{defaultSettingsView.Bqk9acqE.css → defaultSettingsView.C8BeHuxd.css} +1 -1
  34. data/exe/aarch64-linux/package/lib/vite/traceViewer/{index.B4cLoZK3.js → index.7-c5LSTW.js} +1 -1
  35. data/exe/aarch64-linux/package/lib/vite/traceViewer/index.html +3 -3
  36. data/exe/aarch64-linux/package/lib/vite/traceViewer/sw.bundle.js +3 -3
  37. data/exe/aarch64-linux/package/lib/vite/traceViewer/{uiMode.CU5KtEkS.js → uiMode.CYwC_gH1.js} +4 -4
  38. data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.html +3 -3
  39. data/exe/aarch64-linux/package/package.json +1 -1
  40. data/exe/aarch64-linux/package/types/protocol.d.ts +468 -337
  41. data/exe/aarch64-linux/package/types/types.d.ts +572 -37
  42. data/lib/venetian/core.rb +1 -0
  43. data/lib/venetian/executable.rb +24 -5
  44. data/lib/venetian/playwright.rb +1 -0
  45. data/lib/venetian/transport_extensions.rb +17 -0
  46. data/lib/venetian/trust_store.rb +67 -0
  47. data/lib/venetian/upstream.rb +36 -1
  48. data/lib/venetian/version.rb +3 -2
  49. metadata +17 -12
  50. data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-hrlLqLtq.js +0 -129
  51. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +0 -182
data/lib/venetian/core.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "venetian/version"
4
4
  require "venetian/upstream"
5
+ require "venetian/trust_store"
5
6
  require "venetian/executable"
6
7
  require "venetian/browser_installer"
7
8
  require "venetian/gemspec"
@@ -9,14 +9,17 @@ module Venetian
9
9
  # Provides methods for locating the Playwright executable.
10
10
  module Executable
11
11
  class Executor # :nodoc:
12
+ include Open3
13
+ include TrustStore
14
+
12
15
  public :system, :exec
13
16
 
14
17
  def capture(*command, merge_stderr: true, **)
15
- merge_stderr ? Open3.capture2e(*command, **) : Open3.capture2(*command, **)
18
+ merge_stderr ? capture2e(*command, **) : capture2(*command, **)
16
19
  end
17
20
 
18
21
  def run(*command, **)
19
- Process.wait2(Process.spawn(*command, **)).last
22
+ Process.wait2(spawn(*command, **)).last
20
23
  end
21
24
  end
22
25
 
@@ -174,7 +177,21 @@ module Venetian
174
177
  end
175
178
  end
176
179
 
180
+ module Invocation # :nodoc:
181
+ def playwright_command(*args)
182
+ [*base_command, *args]
183
+ end
184
+
185
+ def cli_command?(command)
186
+ command == cli_command
187
+ rescue UnsupportedPlatformError, ExecutableNotFoundError, UnsupportedPathError
188
+ false
189
+ end
190
+ end
191
+
177
192
  extend Validations
193
+ extend Invocation
194
+ extend TrustStore::NodeCommand
178
195
 
179
196
  class << self
180
197
  # Returns the path to the Node executable. Raises an error if the executable cannot be found.
@@ -186,8 +203,10 @@ module Venetian
186
203
 
187
204
  # Executes the Playwright executable with the given arguments, replacing the current process.
188
205
  def execute(*args, echo: true, exception: true, **)
189
- [*base_command, *args].then do |command|
206
+ playwright_command(*args).then do |command|
190
207
  puts command.shelljoin if echo
208
+ # Write out the command before Playwright's output, as exec would otherwise discard it
209
+ $stdout.flush
191
210
  # exec misbehaves on Windows (see equivalent in `tailwindcss-ruby`), so run Playwright and exit likewise
192
211
  exit executor.run(*command, **).exitstatus if Gem.win_platform?
193
212
 
@@ -199,7 +218,7 @@ module Venetian
199
218
 
200
219
  # Runs the Playwright executable with the given arguments.
201
220
  def system(*args, echo: true, exception: true, **)
202
- [*base_command, *args].then do |command|
221
+ playwright_command(*args).then do |command|
203
222
  puts command.shelljoin if echo
204
223
  executor.system(*command, exception:, **(echo ? {} : { out: File::NULL, err: File::NULL }), **)
205
224
  end
@@ -207,7 +226,7 @@ module Venetian
207
226
 
208
227
  # Runs the Playwright executable with the given arguments, returning its combined output and status.
209
228
  def capture(*args, echo: true, **)
210
- [*base_command, *args].then do |command|
229
+ playwright_command(*args).then do |command|
211
230
  puts command.shelljoin if echo
212
231
  executor.capture(*command, **).tap do |output, _|
213
232
  puts output if echo
@@ -4,6 +4,7 @@ require "playwright"
4
4
 
5
5
  require "venetian/core"
6
6
  require "venetian/connection_extensions"
7
+ require "venetian/transport_extensions"
7
8
 
8
9
  module Venetian # :nodoc:
9
10
  # Starts Playwright using the bundled executable. Accepts the same arguments as +Playwright.create+,
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Venetian
4
+ module TransportExtensions # :nodoc:
5
+ private
6
+
7
+ def run_driver_with_open3
8
+ return super unless Executable.cli_command?(@driver_executable_path)
9
+
10
+ # Windows doesn't accept the pgroup option
11
+ Open3.popen3(TrustStore.environment, *Executable.playwright_command("run-driver"),
12
+ **({ pgroup: true } unless Gem.win_platform?).to_h)
13
+ end
14
+ end
15
+ end
16
+
17
+ Playwright::Transport.prepend(Venetian::TransportExtensions)
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "openssl"
4
+
5
+ module Venetian
6
+ # # Trust Store
7
+ #
8
+ # Points the bundled Node at the certificate authorities Ruby's OpenSSL trusts.
9
+ module TrustStore
10
+ CERT_FILE_ENV_VAR = OpenSSL::X509::DEFAULT_CERT_FILE_ENV # :nodoc:
11
+ CERT_DIR_ENV_VAR = OpenSSL::X509::DEFAULT_CERT_DIR_ENV # :nodoc:
12
+ USE_OPENSSL_CA = "--use-openssl-ca" # :nodoc:
13
+ USE_BUNDLED_CA = "--use-bundled-ca" # :nodoc:
14
+ USE_SYSTEM_CA = "--use-system-ca" # :nodoc:
15
+ SYSTEM_CA_ENV_VAR = "NODE_USE_SYSTEM_CA" # :nodoc:
16
+ BUNDLED_CA_ENV_VAR = "VENETIAN_BUNDLED_CA" # :nodoc:
17
+
18
+ class << self
19
+ # Returns whether to run Node with the certificate authorities Ruby's OpenSSL trusts, which it does unless
20
+ # +VENETIAN_BUNDLED_CA+ is set or Node is told to use other certificate authorities, with +--use-bundled-ca+ or
21
+ # +--use-system-ca+ in +NODE_OPTIONS+ or with +NODE_USE_SYSTEM_CA=1+.
22
+ def enabled?
23
+ !ENV.key?(BUNDLED_CA_ENV_VAR) && !other_certificate_authorities?
24
+ end
25
+
26
+ # Returns the environment variables pointing Node at the certificates Ruby's OpenSSL trusts, if #enabled?.
27
+ def environment
28
+ return {} unless enabled?
29
+
30
+ { CERT_FILE_ENV_VAR => ENV.fetch(CERT_FILE_ENV_VAR, OpenSSL::X509::DEFAULT_CERT_FILE),
31
+ CERT_DIR_ENV_VAR => ENV.fetch(CERT_DIR_ENV_VAR, OpenSSL::X509::DEFAULT_CERT_DIR) }
32
+ end
33
+
34
+ # Returns the Node command with the given arguments, having Node use those certificates instead of its bundled
35
+ # ones if #enabled?.
36
+ def node_command(node, *)
37
+ [node, *(USE_OPENSSL_CA if enabled?), *]
38
+ end
39
+
40
+ private
41
+
42
+ def other_certificate_authorities?
43
+ ENV[SYSTEM_CA_ENV_VAR] == "1" || ENV.fetch("NODE_OPTIONS", "").split.intersect?([USE_BUNDLED_CA, USE_SYSTEM_CA])
44
+ end
45
+ end
46
+
47
+ module NodeCommand # :nodoc:
48
+ def playwright_command(...)
49
+ TrustStore.node_command(*super)
50
+ end
51
+ end
52
+
53
+ private
54
+
55
+ def system(*, **)
56
+ super(TrustStore.environment, *, **)
57
+ end
58
+
59
+ def exec(*, **)
60
+ super(TrustStore.environment, *, **)
61
+ end
62
+
63
+ def spawn(*, **)
64
+ super(TrustStore.environment, *, **)
65
+ end
66
+ end
67
+ end
@@ -22,9 +22,29 @@ module Venetian
22
22
  windows ? "zip" : "tar.gz"
23
23
  end
24
24
 
25
+ # Returns the basename of the Node.js release archive for the given version, also its top-level directory.
26
+ def node_archive_basename_for(version)
27
+ "node-v#{version}-#{node_dir}"
28
+ end
29
+
30
+ # Returns the filename of the Node.js release archive for the given version.
31
+ def node_archive_name_for(version)
32
+ "#{node_archive_basename_for(version)}.#{node_archive_extension}"
33
+ end
34
+
35
+ # Returns a pattern capturing the archive's SHA-256 checksum from the given version's SHASUMS256.txt.
36
+ def node_checksum_pattern_for(version)
37
+ /^(\h{64}) +#{Regexp.escape(node_archive_name_for(version))}$/
38
+ end
39
+
25
40
  # Returns the URL to download the Node.js release archive for the given version.
26
41
  def node_url_for(version)
27
- "#{NODE_DIST_URL}/v#{version}/node-v#{version}-#{node_dir}.#{node_archive_extension}"
42
+ "#{NODE_DIST_URL}/v#{version}/#{node_archive_name_for(version)}"
43
+ end
44
+
45
+ # Returns the URL of the signed SHA-256 checksums for the Node.js release archives of the given version.
46
+ def node_signed_checksums_url_for(version)
47
+ "#{NODE_DIST_URL}/v#{version}/SHASUMS256.txt.asc"
28
48
  end
29
49
  end
30
50
 
@@ -46,6 +66,21 @@ module Venetian
46
66
  "#{NPM_REGISTRY_URL}/playwright-core/-/playwright-core-#{COMPATIBLE_PLAYWRIGHT_VERSION}.tgz"
47
67
  end
48
68
 
69
+ # Returns the URL of the npm registry metadata for the playwright-core package, which includes its integrity hash.
70
+ def self.playwright_core_metadata_url
71
+ npm_metadata_url("playwright-core", COMPATIBLE_PLAYWRIGHT_VERSION)
72
+ end
73
+
74
+ # Returns the URL of the npm registry metadata for the given package version.
75
+ def self.npm_metadata_url(name, version)
76
+ "#{npm_packument_url(name)}/#{version}"
77
+ end
78
+
79
+ # Returns the URL of the npm registry metadata for every version of the given package, including publish times.
80
+ def self.npm_packument_url(name)
81
+ "#{NPM_REGISTRY_URL}/#{name}"
82
+ end
83
+
49
84
  # Returns the gemspec files for the base gem.
50
85
  def self.base_files
51
86
  GEMSPEC.files
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Venetian
4
- VERSION = "0.3.1"
5
- COMPATIBLE_PLAYWRIGHT_VERSION = "1.63.0"
4
+ VERSION = "0.4.0"
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = "1.64.0"
6
+ NODE_VERSION = "24.22.0"
6
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: venetian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Justin Malčić
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 1.63.0
32
+ version: 1.64.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 1.63.0
39
+ version: 1.64.0
40
40
  description: Bundles the Playwright driver binary in platform-specific gem variants
41
41
  and integrates with `capybara-playwright-driver`.
42
42
  email:
@@ -46,6 +46,8 @@ executables:
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
+ - AGENTS.md
50
+ - CLAUDE.md
49
51
  - CODE_OF_CONDUCT.md
50
52
  - LICENSE.txt
51
53
  - README.md
@@ -101,6 +103,7 @@ files:
101
103
  - exe/aarch64-linux/package/lib/tools/skills/playwright-cli/SKILL.md
102
104
  - exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/element-attributes.md
103
105
  - exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/playwright-tests.md
106
+ - exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/pr-attachments.md
104
107
  - exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/request-mocking.md
105
108
  - exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/running-code.md
106
109
  - exe/aarch64-linux/package/lib/tools/skills/playwright-cli/references/session-management.md
@@ -134,20 +137,20 @@ files:
134
137
  - exe/aarch64-linux/package/lib/vite/htmlReport/report.css
135
138
  - exe/aarch64-linux/package/lib/vite/htmlReport/report.js
136
139
  - exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css
137
- - exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js
140
+ - exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js
138
141
  - exe/aarch64-linux/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf
139
142
  - exe/aarch64-linux/package/lib/vite/recorder/assets/index-BZpYJZ-P.css
140
- - exe/aarch64-linux/package/lib/vite/recorder/assets/index-hrlLqLtq.js
143
+ - exe/aarch64-linux/package/lib/vite/recorder/assets/index-Cn0mmDuv.js
141
144
  - exe/aarch64-linux/package/lib/vite/recorder/index.html
142
145
  - exe/aarch64-linux/package/lib/vite/recorder/playwright-logo.svg
143
- - exe/aarch64-linux/package/lib/vite/traceViewer/assets/codeMirrorModule-BbkfBe3n.js
144
- - exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js
146
+ - exe/aarch64-linux/package/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js
147
+ - exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js
145
148
  - exe/aarch64-linux/package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js
146
- - exe/aarch64-linux/package/lib/vite/traceViewer/assets/xtermModule-DywYcAf8.js
149
+ - exe/aarch64-linux/package/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js
147
150
  - exe/aarch64-linux/package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css
148
151
  - exe/aarch64-linux/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf
149
- - exe/aarch64-linux/package/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css
150
- - exe/aarch64-linux/package/lib/vite/traceViewer/index.B4cLoZK3.js
152
+ - exe/aarch64-linux/package/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css
153
+ - exe/aarch64-linux/package/lib/vite/traceViewer/index.7-c5LSTW.js
151
154
  - exe/aarch64-linux/package/lib/vite/traceViewer/index.B_TqY17P.css
152
155
  - exe/aarch64-linux/package/lib/vite/traceViewer/index.html
153
156
  - exe/aarch64-linux/package/lib/vite/traceViewer/manifest.webmanifest
@@ -155,7 +158,7 @@ files:
155
158
  - exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js
156
159
  - exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.html
157
160
  - exe/aarch64-linux/package/lib/vite/traceViewer/sw.bundle.js
158
- - exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.CU5KtEkS.js
161
+ - exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.CYwC_gH1.js
159
162
  - exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.CyMfwkXJ.css
160
163
  - exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.html
161
164
  - exe/aarch64-linux/package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css
@@ -180,6 +183,8 @@ files:
180
183
  - lib/venetian/railtie.rb
181
184
  - lib/venetian/system_test_case_extension.rb
182
185
  - lib/venetian/tasks.rb
186
+ - lib/venetian/transport_extensions.rb
187
+ - lib/venetian/trust_store.rb
183
188
  - lib/venetian/upstream.rb
184
189
  - lib/venetian/version.rb
185
190
  homepage: https://github.com/jmalcic/venetian
@@ -187,7 +192,7 @@ licenses:
187
192
  - MIT
188
193
  metadata:
189
194
  homepage_uri: https://malcic.codes/projects/software/venetian
190
- playwright_version: 1.63.0
195
+ playwright_version: 1.64.0
191
196
  rubygems_mfa_required: 'true'
192
197
  source_code_uri: https://github.com/jmalcic/venetian
193
198
  rdoc_options: []