@vivliostyle/cli 5.4.0 → 5.5.0

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/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@vivliostyle/cli",
3
3
  "description": "Save the pdf file via headless browser and Vivliostyle.",
4
- "version": "5.4.0",
4
+ "version": "5.5.0",
5
5
  "author": "spring_raining <harusamex.com@gmail.com>",
6
6
  "scripts": {
7
- "postinstall": "patch-package",
8
7
  "build": "yarn clean && run-p build:*",
9
8
  "build:cli": "tsc && shx chmod +x dist/cli.js",
10
9
  "generate:schema": "run-p generate:schema:*",
@@ -42,11 +41,9 @@
42
41
  "mime-types": "^2.1.32",
43
42
  "node-stream-zip": "^1.14.0",
44
43
  "ora": "^5.4.1",
45
- "patch-package": "^6.4.7",
46
44
  "pdf-lib": "^1.16.0",
47
- "playwright-core": "1.23.1",
45
+ "playwright-core": "1.24.2",
48
46
  "portfinder": "^1.0.28",
49
- "postinstall-postinstall": "^2.1.0",
50
47
  "press-ready": "^4.0.3",
51
48
  "prettier": "^2.3.2",
52
49
  "resolve-pkg": "^2.0.0",
@@ -91,8 +88,7 @@
91
88
  "vs": "dist/cli.js"
92
89
  },
93
90
  "files": [
94
- "dist",
95
- "patches"
91
+ "dist"
96
92
  ],
97
93
  "husky": {
98
94
  "hooks": {
@@ -1,52 +0,0 @@
1
- diff --git a/node_modules/playwright-core/lib/client/connection.js b/node_modules/playwright-core/lib/client/connection.js
2
- index 33a9e8c..bb6d158 100644
3
- --- a/node_modules/playwright-core/lib/client/connection.js
4
- +++ b/node_modules/playwright-core/lib/client/connection.js
5
- @@ -235,7 +235,7 @@ class Connection extends _events.EventEmitter {
6
- if (Array.isArray(payload)) return payload.map(p => this._replaceGuidsWithChannels(p));
7
- if (payload.guid && this._objects.has(payload.guid)) return this._objects.get(payload.guid)._channel;
8
-
9
- - if (typeof payload === 'object') {
10
- + if (typeof payload === 'object' && !(payload instanceof Buffer)) {
11
- const result = {};
12
-
13
- for (const key of Object.keys(payload)) result[key] = this._replaceGuidsWithChannels(payload[key]);
14
- diff --git a/node_modules/playwright-core/lib/client/page.js b/node_modules/playwright-core/lib/client/page.js
15
- index d4cf947..a100ebb 100644
16
- --- a/node_modules/playwright-core/lib/client/page.js
17
- +++ b/node_modules/playwright-core/lib/client/page.js
18
- @@ -826,7 +826,7 @@ class Page extends _channelOwner.ChannelOwner {
19
-
20
- const result = await this._channel.pdf(transportOptions);
21
-
22
- - const buffer = _buffer.Buffer.from(result.pdf, 'base64');
23
- + const buffer = result.pdf;
24
-
25
- if (options.path) {
26
- await _fs.default.promises.mkdir(_path.default.dirname(options.path), {
27
- diff --git a/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js b/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js
28
- index 138dcda..ea7bc5c 100644
29
- --- a/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js
30
- +++ b/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js
31
- @@ -377,7 +377,7 @@ class DispatcherConnection {
32
- };
33
- if (Array.isArray(payload)) return payload.map(p => this._replaceDispatchersWithGuids(p));
34
-
35
- - if (typeof payload === 'object') {
36
- + if (typeof payload === 'object' && !(payload instanceof Buffer)) {
37
- const result = {};
38
-
39
- for (const key of Object.keys(payload)) result[key] = this._replaceDispatchersWithGuids(payload[key]);
40
- diff --git a/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js b/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js
41
- index 2d2a3af..db8bbbd 100644
42
- --- a/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js
43
- +++ b/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js
44
- @@ -307,7 +307,7 @@ class PageDispatcher extends _dispatcher.Dispatcher {
45
- if (!this._page.pdf) throw new Error('PDF generation is only supported for Headless Chromium');
46
- const buffer = await this._page.pdf(params);
47
- return {
48
- - pdf: buffer.toString('base64')
49
- + pdf: buffer,
50
- };
51
- }
52
-