grover 1.2.9 → 1.2.10
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/lib/grover/js/processor.cjs +8 -3
- data/lib/grover/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6975e57956621f04557b7b9634611de621cfbca81f067dec8f0f302adb861cdc
|
|
4
|
+
data.tar.gz: 922fb8f8df08bbbe4870fa013e543ca332703bcf888308d894047689824a9ee5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc2c71aa2cd450e562425f9f14df68c3e1fa4dfd3281a71a6d830a1acecf574c629d52c3d0b033414a6d1d9e675533f38d0300e2a97413845db2b354e559efb5
|
|
7
|
+
data.tar.gz: cc6ff7f47a9e34b7dc01d8a2a15c09482e90e7af414720eb05b64b1616829fddb10f738de696cac215cf8db5c079960cf55817ed5ff6ce8350b4762e141cb1de
|
data/lib/grover/js/processor.cjs
CHANGED
|
@@ -34,7 +34,7 @@ function GroverError(name, errors) {
|
|
|
34
34
|
GroverError.prototype = Error.prototype;
|
|
35
35
|
|
|
36
36
|
const _processPage = (async (convertAction, uriOrHtml, options) => {
|
|
37
|
-
let browser, page, tmpDir, wsConnection = false;
|
|
37
|
+
let browser, context, page, tmpDir, wsConnection = false;
|
|
38
38
|
const requestErrors = [], pageErrors = [];
|
|
39
39
|
|
|
40
40
|
const captureRequestError = (request) => {
|
|
@@ -114,7 +114,12 @@ const _processPage = (async (convertAction, uriOrHtml, options) => {
|
|
|
114
114
|
browser = await puppeteer.launch(launchParams);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
if (wsConnection) {
|
|
118
|
+
context = await browser.createBrowserContext();
|
|
119
|
+
page = await context.newPage();
|
|
120
|
+
} else {
|
|
121
|
+
page = await browser.newPage();
|
|
122
|
+
}
|
|
118
123
|
|
|
119
124
|
// Basic auth
|
|
120
125
|
const username = options.username; delete options.username
|
|
@@ -349,7 +354,7 @@ const _processPage = (async (convertAction, uriOrHtml, options) => {
|
|
|
349
354
|
} finally {
|
|
350
355
|
if (browser) {
|
|
351
356
|
if (wsConnection) {
|
|
352
|
-
if (
|
|
357
|
+
if (context) await context.close();
|
|
353
358
|
await browser.disconnect();
|
|
354
359
|
} else {
|
|
355
360
|
await browser.close();
|
data/lib/grover/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: grover
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Bromwich
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-04-02 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: nokogiri
|
|
@@ -51,6 +52,7 @@ licenses:
|
|
|
51
52
|
metadata:
|
|
52
53
|
allowed_push_host: https://rubygems.org
|
|
53
54
|
rubygems_mfa_required: 'true'
|
|
55
|
+
post_install_message:
|
|
54
56
|
rdoc_options: []
|
|
55
57
|
require_paths:
|
|
56
58
|
- lib
|
|
@@ -68,7 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
68
70
|
- !ruby/object:Gem::Version
|
|
69
71
|
version: '0'
|
|
70
72
|
requirements: []
|
|
71
|
-
rubygems_version: 3.
|
|
73
|
+
rubygems_version: 3.3.7
|
|
74
|
+
signing_key:
|
|
72
75
|
specification_version: 4
|
|
73
76
|
summary: A Ruby gem to transform HTML into PDF, PNG or JPEG by wrapping the NodeJS
|
|
74
77
|
Google Puppeteer driver for Chromium
|