bits-to-dead-trees 2.12.1 → 2.13.1

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.
@@ -6,7 +6,7 @@ PATH_TO_SCRIPT=$(dirname $(realpath $0))
6
6
 
7
7
  cd "${PATH_TO_SCRIPT}/../.." || exit 1
8
8
 
9
- if [[ $(git status --porcelain | grep pdf_request-body-json) ]]; then
9
+ if [[ $(git status --porcelain | grep pdf_request_body.json) ]]; then
10
10
  echo "🚨 Detected schema changes that haven't been committed, please run 'npm run update-schemas' and commit the changes."
11
11
  exit 2
12
12
  else
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -o nounset
4
+
5
+ PATH_TO_SCRIPT=$(dirname $(realpath $0))
6
+
7
+ cd "${PATH_TO_SCRIPT}/../.." || exit 1
8
+
9
+ PLAYWRIGHT_VERSION=$(cat package-lock.json | jq -r '.dependencies."playwright-core".version')
10
+ sed -i "s|FROM mcr.microsoft.com/playwright:v[^ ]*|FROM mcr.microsoft.com/playwright:v${PLAYWRIGHT_VERSION}|" Dockerfile
@@ -3,17 +3,29 @@ name: Build and Push Docker Image
3
3
  on:
4
4
  release:
5
5
  types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ ref_name:
9
+ description: "The ref the image should be built for. This is usually the tag of the release."
10
+ required: true
11
+ type: string
6
12
 
7
13
  concurrency: ${{ github.workflow }}-${{ github.ref }}
8
14
 
9
15
  jobs:
10
16
  build:
11
17
  runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: write
20
+ packages: write
21
+ pull-requests: write
12
22
  steps:
23
+ - name: Set tag name
24
+ run: echo "TAG_NAME=${{ inputs.ref_name || github.ref_name }}" >> $GITHUB_ENV
13
25
  - name: Checkout Repo
14
26
  uses: actions/checkout@v4
15
27
  with:
16
- ref: ${{ github.ref_name }}
28
+ ref: ${{ env.TAG_NAME }}
17
29
 
18
30
  - name: Login to GitHub Container Registry
19
31
  uses: docker/login-action@v3
@@ -28,4 +40,17 @@ jobs:
28
40
  file: Dockerfile
29
41
  push: true
30
42
  tags: |
31
- ghcr.io/${{ github.repository }}:${{ github.ref_name }}
43
+ ghcr.io/${{ github.repository }}:${{ env.TAG_NAME }}
44
+
45
+ - name: Update version in README
46
+ run: |
47
+ sed -i 's|image: ghcr.io/rmehner/bits-to-dead-trees:v.*|image: ghcr.io/rmehner/bits-to-dead-trees:${{ env.TAG_NAME }}|' README.md
48
+
49
+ - name: Create Pull Request
50
+ uses: peter-evans/create-pull-request@v6
51
+ with:
52
+ commit-message: "🤖 Update version of docker image in README to ${{ env.TAG_NAME }}"
53
+ title: "🤖 Update version in README after release"
54
+ base: main
55
+ body: |
56
+ Updates the referenced docker image version in the README to ${{ env.TAG_NAME }}
@@ -25,5 +25,5 @@ jobs:
25
25
  - name: Update schemas
26
26
  run: npm run update-schemas
27
27
 
28
- - name: Run prettier
28
+ - name: Commit schema changes
29
29
  run: .github/bin/check-for-schema-changes
@@ -0,0 +1,25 @@
1
+ name: Keep dockerfile in sync
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "depfu/update/npm/playwright-core-**"
7
+
8
+ jobs:
9
+ run-prettier:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ steps:
14
+ - name: Checkout Repo
15
+ uses: actions/checkout@v4
16
+ with:
17
+ ref: ${{ github.head_ref }}
18
+
19
+ - name: Update Dockerfile
20
+ run: .github/bin/sync-playwright-version-to-dockerfile
21
+
22
+ - name: Commit changes
23
+ uses: stefanzweifel/git-auto-commit-action@v5
24
+ with:
25
+ commit_message: "🤖 Update playwright-core in Dockerfile after depfu update"
@@ -0,0 +1,34 @@
1
+ name: Prettier
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "depfu/update/npm/prettier-**"
7
+
8
+ jobs:
9
+ run-prettier:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ steps:
14
+ - name: Checkout Repo
15
+ uses: actions/checkout@v4
16
+ with:
17
+ ref: ${{ github.head_ref }}
18
+
19
+ - name: Set up Node
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version-file: .tool-versions
23
+ cache: npm
24
+
25
+ - name: Install npm dependencies
26
+ run: npm ci
27
+
28
+ - name: Run prettier format
29
+ run: npm run format
30
+
31
+ - name: Commit changes
32
+ uses: stefanzweifel/git-auto-commit-action@v5
33
+ with:
34
+ commit_message: "🤖 Ran prettier after prettier update"
package/.tool-versions CHANGED
@@ -1 +1 @@
1
- nodejs 20.11.0
1
+ nodejs 20.11.1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # bits-to-dead-trees
2
2
 
3
+ ## 2.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e6cea9c`](https://github.com/rmehner/bits-to-dead-trees/commit/e6cea9c5d43028e588c31dc97e8f1435b5ae3381) Thanks [@rmehner](https://github.com/rmehner)! - Upgrade to Playwright 1.42.1
8
+
9
+ ## 2.13.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#316](https://github.com/rmehner/bits-to-dead-trees/pull/316) [`b70bf78`](https://github.com/rmehner/bits-to-dead-trees/commit/b70bf7890426df0e4f32df13496322c60abfc5d5) Thanks [@depfu](https://github.com/apps/depfu)! - Upgrade to playwright 1.42.0
14
+
3
15
  ## 2.12.1
4
16
 
5
17
  ### Patch Changes
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM mcr.microsoft.com/playwright:v1.41.2
1
+ FROM mcr.microsoft.com/playwright:v1.42.1
2
2
 
3
3
  ENV NODE_ENV=production
4
4
  ENV PORT=8000
package/README.md CHANGED
@@ -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.6.1
60
+ image: ghcr.io/rmehner/bits-to-dead-trees:v2.13.0
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.12.1",
4
+ "version": "2.13.1",
5
5
  "description": "Turn HTML into PDF files",
6
6
  "repository": "github:rmehner/bits-to-dead-trees",
7
7
  "license": "Apache-2.0",
@@ -30,20 +30,20 @@
30
30
  "ts-check": "npx tsc --noEmit"
31
31
  },
32
32
  "dependencies": {
33
- "fastify": "^4.26.0",
34
- "playwright-core": "^1.41.2"
33
+ "fastify": "^4.26.1",
34
+ "playwright-core": "^1.42.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@changesets/changelog-github": "^0.5.0",
38
38
  "@changesets/cli": "^2.27.1",
39
39
  "@types/lodash": "^4.14.202",
40
- "@types/node": "20.10.4",
41
- "eslint": "^8.56.0",
40
+ "@types/node": "20.11.22",
41
+ "eslint": "^8.57.0",
42
42
  "eslint-config-prettier": "^9.1.0",
43
- "nodemon": "^3.0.3",
43
+ "nodemon": "^3.1.0",
44
44
  "pino-pretty": "^10.3.1",
45
- "prettier": "^3.2.4",
46
- "typescript-json-schema": "^0.62.0",
47
- "vitest": "^1.2.2"
45
+ "prettier": "^3.2.5",
46
+ "typescript-json-schema": "^0.63.0",
47
+ "vitest": "^1.3.1"
48
48
  }
49
49
  }
@@ -544,6 +544,10 @@
544
544
  },
545
545
  "type": "object"
546
546
  },
547
+ "outline": {
548
+ "description": "Whether or not to embed the document outline into the PDF. Defaults to `false`.",
549
+ "type": "boolean"
550
+ },
547
551
  "pageRanges": {
548
552
  "description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.",
549
553
  "type": "string"
@@ -564,6 +568,10 @@
564
568
  "description": "Scale of the webpage rendering. Defaults to `1`. Scale amount must be between 0.1 and 2.",
565
569
  "type": "number"
566
570
  },
571
+ "tagged": {
572
+ "description": "Whether or not to generate tagged (accessible) PDF. Defaults to `false`.",
573
+ "type": "boolean"
574
+ },
567
575
  "width": {
568
576
  "description": "Paper width, accepts values labeled with units.",
569
577
  "type": ["string", "number"]
package/tsconfig.json CHANGED
@@ -10,6 +10,6 @@
10
10
  "esModuleInterop": true,
11
11
  "module": "ESNext",
12
12
 
13
- "checkJs": true,
14
- },
13
+ "checkJs": true
14
+ }
15
15
  }