bits-to-dead-trees 2.29.0 → 2.31.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/.github/workflows/build-docker-image-of-release.yml +5 -0
- package/.github/workflows/release.yml +4 -0
- package/.node-version +1 -1
- package/CHANGELOG.md +18 -0
- package/Dockerfile +1 -1
- package/README.md +2 -2
- package/package.json +18 -18
- package/pdf_request_body.json +37 -165
- package/tsconfig.json +1 -1
|
@@ -34,6 +34,9 @@ jobs:
|
|
|
34
34
|
username: ${{ github.repository_owner }}
|
|
35
35
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
36
36
|
|
|
37
|
+
- name: Set up Docker Buildx
|
|
38
|
+
uses: docker/setup-buildx-action@v3
|
|
39
|
+
|
|
37
40
|
- name: Build and push builder image
|
|
38
41
|
uses: docker/build-push-action@v6
|
|
39
42
|
with:
|
|
@@ -41,6 +44,8 @@ jobs:
|
|
|
41
44
|
push: true
|
|
42
45
|
tags: |
|
|
43
46
|
ghcr.io/${{ github.repository }}:${{ env.TAG_NAME }}
|
|
47
|
+
cache-from: type=gha
|
|
48
|
+
cache-to: type=gha,mode=max
|
|
44
49
|
|
|
45
50
|
- name: Update version in README
|
|
46
51
|
run: |
|
package/.node-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
24.
|
|
1
|
+
24.15.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# bits-to-dead-trees
|
|
2
2
|
|
|
3
|
+
## 2.31.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`431f4e4`](https://github.com/rmehner/bits-to-dead-trees/commit/431f4e477393b931250c5a11f732dfcb71b6a37a) Thanks [@rmehner](https://github.com/rmehner)! - Update to Playwright 1.60.0
|
|
8
|
+
|
|
9
|
+
## 2.30.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#622](https://github.com/rmehner/bits-to-dead-trees/pull/622) [`9e1af39`](https://github.com/rmehner/bits-to-dead-trees/commit/9e1af39f2f352a9155aeb2e6df207c9686700f48) Thanks [@depfu](https://github.com/apps/depfu)! - Upgrade to Playwright 1.58.2
|
|
14
|
+
|
|
15
|
+
## 2.30.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#618](https://github.com/rmehner/bits-to-dead-trees/pull/618) [`17c0f16`](https://github.com/rmehner/bits-to-dead-trees/commit/17c0f16038bf0149e883beb742fd2c3e57599f9a) Thanks [@depfu](https://github.com/apps/depfu)! - Upgrade Playwright to 1.58.0
|
|
20
|
+
|
|
3
21
|
## 2.29.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/Dockerfile
CHANGED
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ of that. It's using [Playwright](https://playwright.dev) in the background for t
|
|
|
11
11
|
|
|
12
12
|
### Requirements
|
|
13
13
|
|
|
14
|
-
1. Node
|
|
14
|
+
1. Node 24+ (see [`.node-version`](./.node-version))
|
|
15
15
|
2. npm
|
|
16
16
|
|
|
17
17
|
### Installation
|
|
@@ -57,7 +57,7 @@ If you want to use it internally with docker-compose, this should give you a goo
|
|
|
57
57
|
```yml
|
|
58
58
|
services:
|
|
59
59
|
pdf:
|
|
60
|
-
image: ghcr.io/rmehner/bits-to-dead-trees:v2.
|
|
60
|
+
image: ghcr.io/rmehner/bits-to-dead-trees:v2.30.1
|
|
61
61
|
ports:
|
|
62
62
|
- 8000:8000
|
|
63
63
|
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bits-to-dead-trees",
|
|
3
3
|
"author": "Robin Mehner <robin@coding-robin.de>",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.31.0",
|
|
5
5
|
"description": "Turn HTML into PDF files",
|
|
6
6
|
"repository": "github:rmehner/bits-to-dead-trees",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"playwright"
|
|
12
12
|
],
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": ">=
|
|
14
|
+
"node": ">= 24"
|
|
15
15
|
},
|
|
16
16
|
"main": "server.js",
|
|
17
17
|
"type": "module",
|
|
@@ -30,24 +30,24 @@
|
|
|
30
30
|
"ts-check": "npx tsc --noEmit"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"fastify": "^5.
|
|
34
|
-
"playwright-core": "^1.
|
|
33
|
+
"fastify": "^5.8.5",
|
|
34
|
+
"playwright-core": "^1.60.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@changesets/changelog-github": "^0.
|
|
38
|
-
"@changesets/cli": "^2.
|
|
39
|
-
"@eslint/js": "^9.39.
|
|
40
|
-
"@tsconfig/
|
|
41
|
-
"@types/lodash": "^4.17.
|
|
42
|
-
"@types/node": "
|
|
43
|
-
"eslint": "^9.39.
|
|
37
|
+
"@changesets/changelog-github": "^0.6.0",
|
|
38
|
+
"@changesets/cli": "^2.31.0",
|
|
39
|
+
"@eslint/js": "^9.39.4",
|
|
40
|
+
"@tsconfig/node24": "^24.0.4",
|
|
41
|
+
"@types/lodash": "^4.17.24",
|
|
42
|
+
"@types/node": "24.12.0",
|
|
43
|
+
"eslint": "^9.39.4",
|
|
44
44
|
"eslint-config-prettier": "^10.1.8",
|
|
45
|
-
"eslint-plugin-n": "^17.
|
|
46
|
-
"eslint-plugin-promise": "^7.
|
|
47
|
-
"globals": "^
|
|
48
|
-
"pino-pretty": "^13.1.
|
|
49
|
-
"prettier": "^3.
|
|
50
|
-
"typescript-json-schema": "^0.
|
|
51
|
-
"vitest": "^4.
|
|
45
|
+
"eslint-plugin-n": "^17.24.0",
|
|
46
|
+
"eslint-plugin-promise": "^7.3.0",
|
|
47
|
+
"globals": "^17.6.0",
|
|
48
|
+
"pino-pretty": "^13.1.3",
|
|
49
|
+
"prettier": "^3.8.3",
|
|
50
|
+
"typescript-json-schema": "^0.67.4",
|
|
51
|
+
"vitest": "^4.1.5"
|
|
52
52
|
}
|
|
53
53
|
}
|
package/pdf_request_body.json
CHANGED
|
@@ -2,29 +2,6 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"additionalProperties": false,
|
|
4
4
|
"definitions": {
|
|
5
|
-
"ArrayBuffer": {
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"properties": {
|
|
8
|
-
"__@toStringTag@25": {
|
|
9
|
-
"type": "string"
|
|
10
|
-
},
|
|
11
|
-
"byteLength": {
|
|
12
|
-
"type": "number"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"required": ["__@toStringTag@25", "byteLength"],
|
|
16
|
-
"type": "object"
|
|
17
|
-
},
|
|
18
|
-
"ArrayBufferLike": {
|
|
19
|
-
"anyOf": [
|
|
20
|
-
{
|
|
21
|
-
"$ref": "#/definitions/ArrayBuffer"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"$ref": "#/definitions/SharedArrayBuffer"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
5
|
"BrowserContextOptions": {
|
|
29
6
|
"additionalProperties": false,
|
|
30
7
|
"properties": {
|
|
@@ -46,86 +23,22 @@
|
|
|
46
23
|
"additionalProperties": false,
|
|
47
24
|
"properties": {
|
|
48
25
|
"cert": {
|
|
49
|
-
"additionalProperties": false,
|
|
50
26
|
"description": "Direct value of the certificate in PEM format.",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"type": "number"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"properties": {
|
|
57
|
-
"BYTES_PER_ELEMENT": {
|
|
58
|
-
"type": "number"
|
|
59
|
-
},
|
|
60
|
-
"__@toStringTag@25": {
|
|
61
|
-
"const": "Uint8Array",
|
|
62
|
-
"type": "string"
|
|
63
|
-
},
|
|
64
|
-
"buffer": {
|
|
65
|
-
"$ref": "#/definitions/ArrayBufferLike"
|
|
66
|
-
},
|
|
67
|
-
"byteLength": {
|
|
68
|
-
"type": "number"
|
|
69
|
-
},
|
|
70
|
-
"byteOffset": {
|
|
71
|
-
"type": "number"
|
|
72
|
-
},
|
|
73
|
-
"length": {
|
|
74
|
-
"type": "number"
|
|
75
|
-
}
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "number"
|
|
76
29
|
},
|
|
77
|
-
"
|
|
78
|
-
"BYTES_PER_ELEMENT",
|
|
79
|
-
"__@toStringTag@25",
|
|
80
|
-
"buffer",
|
|
81
|
-
"byteLength",
|
|
82
|
-
"byteOffset",
|
|
83
|
-
"length"
|
|
84
|
-
],
|
|
85
|
-
"type": "object"
|
|
30
|
+
"type": "array"
|
|
86
31
|
},
|
|
87
32
|
"certPath": {
|
|
88
33
|
"description": "Path to the file with the certificate in PEM format.",
|
|
89
34
|
"type": "string"
|
|
90
35
|
},
|
|
91
36
|
"key": {
|
|
92
|
-
"additionalProperties": false,
|
|
93
37
|
"description": "Direct value of the private key in PEM format.",
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"type": "number"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"properties": {
|
|
100
|
-
"BYTES_PER_ELEMENT": {
|
|
101
|
-
"type": "number"
|
|
102
|
-
},
|
|
103
|
-
"__@toStringTag@25": {
|
|
104
|
-
"const": "Uint8Array",
|
|
105
|
-
"type": "string"
|
|
106
|
-
},
|
|
107
|
-
"buffer": {
|
|
108
|
-
"$ref": "#/definitions/ArrayBufferLike"
|
|
109
|
-
},
|
|
110
|
-
"byteLength": {
|
|
111
|
-
"type": "number"
|
|
112
|
-
},
|
|
113
|
-
"byteOffset": {
|
|
114
|
-
"type": "number"
|
|
115
|
-
},
|
|
116
|
-
"length": {
|
|
117
|
-
"type": "number"
|
|
118
|
-
}
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "number"
|
|
119
40
|
},
|
|
120
|
-
"
|
|
121
|
-
"BYTES_PER_ELEMENT",
|
|
122
|
-
"__@toStringTag@25",
|
|
123
|
-
"buffer",
|
|
124
|
-
"byteLength",
|
|
125
|
-
"byteOffset",
|
|
126
|
-
"length"
|
|
127
|
-
],
|
|
128
|
-
"type": "object"
|
|
41
|
+
"type": "array"
|
|
129
42
|
},
|
|
130
43
|
"keyPath": {
|
|
131
44
|
"description": "Path to the file with the private key in PEM format.",
|
|
@@ -140,43 +53,11 @@
|
|
|
140
53
|
"type": "string"
|
|
141
54
|
},
|
|
142
55
|
"pfx": {
|
|
143
|
-
"additionalProperties": false,
|
|
144
56
|
"description": "Direct value of the PFX or PKCS12 encoded private key and certificate chain.",
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"type": "number"
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
"properties": {
|
|
151
|
-
"BYTES_PER_ELEMENT": {
|
|
152
|
-
"type": "number"
|
|
153
|
-
},
|
|
154
|
-
"__@toStringTag@25": {
|
|
155
|
-
"const": "Uint8Array",
|
|
156
|
-
"type": "string"
|
|
157
|
-
},
|
|
158
|
-
"buffer": {
|
|
159
|
-
"$ref": "#/definitions/ArrayBufferLike"
|
|
160
|
-
},
|
|
161
|
-
"byteLength": {
|
|
162
|
-
"type": "number"
|
|
163
|
-
},
|
|
164
|
-
"byteOffset": {
|
|
165
|
-
"type": "number"
|
|
166
|
-
},
|
|
167
|
-
"length": {
|
|
168
|
-
"type": "number"
|
|
169
|
-
}
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "number"
|
|
170
59
|
},
|
|
171
|
-
"
|
|
172
|
-
"BYTES_PER_ELEMENT",
|
|
173
|
-
"__@toStringTag@25",
|
|
174
|
-
"buffer",
|
|
175
|
-
"byteLength",
|
|
176
|
-
"byteOffset",
|
|
177
|
-
"length"
|
|
178
|
-
],
|
|
179
|
-
"type": "object"
|
|
60
|
+
"type": "array"
|
|
180
61
|
},
|
|
181
62
|
"pfxPath": {
|
|
182
63
|
"description": "Path to the PFX or PKCS12 encoded private key and certificate chain.",
|
|
@@ -343,9 +224,36 @@
|
|
|
343
224
|
"description": "Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.\nMake sure to await\n[browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for\nvideos to be saved.",
|
|
344
225
|
"properties": {
|
|
345
226
|
"dir": {
|
|
346
|
-
"description": "Path to the directory to put videos into.",
|
|
227
|
+
"description": "Path to the directory to put videos into. If not specified, the videos will be stored in `artifactsDir` (see\n[browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch) options).",
|
|
347
228
|
"type": "string"
|
|
348
229
|
},
|
|
230
|
+
"showActions": {
|
|
231
|
+
"additionalProperties": false,
|
|
232
|
+
"description": "If specified, enables visual annotations on interacted elements during video recording.",
|
|
233
|
+
"properties": {
|
|
234
|
+
"duration": {
|
|
235
|
+
"description": "How long each annotation is displayed in milliseconds. Defaults to `500`.",
|
|
236
|
+
"type": "number"
|
|
237
|
+
},
|
|
238
|
+
"fontSize": {
|
|
239
|
+
"description": "Font size of the action title in pixels. Defaults to `24`.",
|
|
240
|
+
"type": "number"
|
|
241
|
+
},
|
|
242
|
+
"position": {
|
|
243
|
+
"description": "Position of the action title overlay. Defaults to `\"top-right\"`.",
|
|
244
|
+
"enum": [
|
|
245
|
+
"bottom",
|
|
246
|
+
"bottom-left",
|
|
247
|
+
"bottom-right",
|
|
248
|
+
"top",
|
|
249
|
+
"top-left",
|
|
250
|
+
"top-right"
|
|
251
|
+
],
|
|
252
|
+
"type": "string"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"type": "object"
|
|
256
|
+
},
|
|
349
257
|
"size": {
|
|
350
258
|
"additionalProperties": false,
|
|
351
259
|
"description": "Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to\nfit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of\neach page will be scaled down if necessary to fit the specified size.",
|
|
@@ -363,7 +271,6 @@
|
|
|
363
271
|
"type": "object"
|
|
364
272
|
}
|
|
365
273
|
},
|
|
366
|
-
"required": ["dir"],
|
|
367
274
|
"type": "object"
|
|
368
275
|
},
|
|
369
276
|
"reducedMotion": {
|
|
@@ -505,24 +412,6 @@
|
|
|
505
412
|
"description": "Specific user agent to use in this context.",
|
|
506
413
|
"type": "string"
|
|
507
414
|
},
|
|
508
|
-
"videoSize": {
|
|
509
|
-
"additionalProperties": false,
|
|
510
|
-
"properties": {
|
|
511
|
-
"height": {
|
|
512
|
-
"description": "Video frame height.",
|
|
513
|
-
"type": "number"
|
|
514
|
-
},
|
|
515
|
-
"width": {
|
|
516
|
-
"description": "Video frame width.",
|
|
517
|
-
"type": "number"
|
|
518
|
-
}
|
|
519
|
-
},
|
|
520
|
-
"required": ["height", "width"],
|
|
521
|
-
"type": "object"
|
|
522
|
-
},
|
|
523
|
-
"videosPath": {
|
|
524
|
-
"type": "string"
|
|
525
|
-
},
|
|
526
415
|
"viewport": {
|
|
527
416
|
"anyOf": [
|
|
528
417
|
{
|
|
@@ -627,23 +516,6 @@
|
|
|
627
516
|
],
|
|
628
517
|
"type": "object"
|
|
629
518
|
},
|
|
630
|
-
"SharedArrayBuffer": {
|
|
631
|
-
"additionalProperties": false,
|
|
632
|
-
"properties": {
|
|
633
|
-
"__@species@472": {
|
|
634
|
-
"$ref": "#/definitions/SharedArrayBuffer"
|
|
635
|
-
},
|
|
636
|
-
"__@toStringTag@25": {
|
|
637
|
-
"const": "SharedArrayBuffer",
|
|
638
|
-
"type": "string"
|
|
639
|
-
},
|
|
640
|
-
"byteLength": {
|
|
641
|
-
"type": "number"
|
|
642
|
-
}
|
|
643
|
-
},
|
|
644
|
-
"required": ["__@species@472", "__@toStringTag@25", "byteLength"],
|
|
645
|
-
"type": "object"
|
|
646
|
-
},
|
|
647
519
|
"ViewportSize": {
|
|
648
520
|
"additionalProperties": false,
|
|
649
521
|
"properties": {
|
package/tsconfig.json
CHANGED