bits-to-dead-trees 2.4.2 → 2.5.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.
- package/.dockerignore +9 -0
- package/.github/bin/check-for-schema-changes +14 -0
- package/.github/workflows/check-json-schema.yml +29 -0
- package/CHANGELOG.md +12 -0
- package/Dockerfile +1 -1
- package/package.json +7 -8
- package/pdf_request_body.json +9 -9
package/.dockerignore
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
if [[ $(git status --porcelain | grep pdf_request-body-json) ]]; then
|
|
10
|
+
echo "🚨 Detected schema changes that haven't been committed, please run 'npm run update-schemas' and commit the changes."
|
|
11
|
+
exit 2
|
|
12
|
+
else
|
|
13
|
+
echo "All good, no schema changes detected. 🏝"
|
|
14
|
+
fi
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Check JSON schema
|
|
2
|
+
|
|
3
|
+
on: push
|
|
4
|
+
|
|
5
|
+
concurrency:
|
|
6
|
+
group: ${{ github.ref }}
|
|
7
|
+
cancel-in-progress: true
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout Repo
|
|
14
|
+
uses: actions/checkout@v3
|
|
15
|
+
|
|
16
|
+
- name: Set up Node
|
|
17
|
+
uses: actions/setup-node@v3
|
|
18
|
+
with:
|
|
19
|
+
node-version-file: .tool-versions
|
|
20
|
+
cache: npm
|
|
21
|
+
|
|
22
|
+
- name: Install npm dependencies
|
|
23
|
+
run: npm ci
|
|
24
|
+
|
|
25
|
+
- name: Update schemas
|
|
26
|
+
run: npm run update-schemas
|
|
27
|
+
|
|
28
|
+
- name: Run prettier
|
|
29
|
+
run: .github/bin/check-for-schema-changes
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# bits-to-dead-trees
|
|
2
2
|
|
|
3
|
+
## 2.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#205](https://github.com/rmehner/bits-to-dead-trees/pull/205) [`7798151`](https://github.com/rmehner/bits-to-dead-trees/commit/7798151d59091936735942509e7241fb04464ba0) Thanks [@depfu](https://github.com/apps/depfu)! - Update to Playwright 1.35.1
|
|
8
|
+
|
|
9
|
+
## 2.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`3c6ef83`](https://github.com/rmehner/bits-to-dead-trees/commit/3c6ef832b1227f6bca40a87102972a54ae913da5) Thanks [@rmehner](https://github.com/rmehner)! - Upgrade to Playwright 1.35.0
|
|
14
|
+
|
|
3
15
|
## 2.4.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/Dockerfile
CHANGED
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.5.1",
|
|
5
5
|
"description": "Turn HTML into PDF files",
|
|
6
6
|
"repository": "github:rmehner/bits-to-dead-trees",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -23,27 +23,26 @@
|
|
|
23
23
|
"start:dev": "nodemon --inspect server.js",
|
|
24
24
|
"dump-schemas": "typescript-json-schema --noExtraProps --required --strictNullChecks types/schemas.ts PdfRequestBody --out pdf_request_body.json",
|
|
25
25
|
"update-schemas": "npm run dump-schemas && npm run format",
|
|
26
|
-
"postinstall": "npx playwright install chromium",
|
|
26
|
+
"postinstall": "npx playwright-core install chromium",
|
|
27
27
|
"add-changeset": "changeset",
|
|
28
28
|
"release": "changeset publish",
|
|
29
29
|
"test": "vitest --reporter verbose",
|
|
30
30
|
"ts-check": "npx tsc --noEmit"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"fastify": "^4.
|
|
34
|
-
"playwright-core": "^1.
|
|
33
|
+
"fastify": "^4.18.0",
|
|
34
|
+
"playwright-core": "^1.35.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@changesets/changelog-github": "^0.4.8",
|
|
38
38
|
"@changesets/cli": "^2.26.1",
|
|
39
39
|
"@types/lodash": "^4.14.195",
|
|
40
|
-
"eslint": "^8.
|
|
40
|
+
"eslint": "^8.42.0",
|
|
41
41
|
"eslint-config-prettier": "^8.8.0",
|
|
42
42
|
"nodemon": "^2.0.22",
|
|
43
43
|
"pino-pretty": "^10.0.0",
|
|
44
44
|
"prettier": "^2.8.8",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"vitest": "^0.31.1"
|
|
45
|
+
"typescript-json-schema": "^0.57.0",
|
|
46
|
+
"vitest": "^0.32.0"
|
|
48
47
|
}
|
|
49
48
|
}
|
package/pdf_request_body.json
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"type": "boolean"
|
|
11
11
|
},
|
|
12
12
|
"baseURL": {
|
|
13
|
-
"description": "When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),\n[page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),\n[page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),\n[page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),\nor\n[page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)\nit takes the base URL in consideration by using the\n[`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.\
|
|
13
|
+
"description": "When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),\n[page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),\n[page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),\n[page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),\nor\n[page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)\nit takes the base URL in consideration by using the\n[`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.\nUnset by default. Examples:\n- baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`\n- baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in\n `http://localhost:3000/foo/bar.html`\n- baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in\n `http://localhost:3000/bar.html`",
|
|
14
14
|
"type": "string"
|
|
15
15
|
},
|
|
16
16
|
"bypassCSP": {
|
|
17
|
-
"description": "Toggles bypassing page's Content-Security-Policy.",
|
|
17
|
+
"description": "Toggles bypassing page's Content-Security-Policy. Defaults to `false`.",
|
|
18
18
|
"type": "boolean"
|
|
19
19
|
},
|
|
20
20
|
"colorScheme": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"additionalProperties": {
|
|
38
38
|
"type": "string"
|
|
39
39
|
},
|
|
40
|
-
"description": "An object containing additional HTTP headers to be sent with every request.",
|
|
40
|
+
"description": "An object containing additional HTTP headers to be sent with every request. Defaults to none.",
|
|
41
41
|
"type": "object"
|
|
42
42
|
},
|
|
43
43
|
"forcedColors": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"type": "boolean"
|
|
77
77
|
},
|
|
78
78
|
"locale": {
|
|
79
|
-
"description": "Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,\n`Accept-Language` request header value as well as number and date formatting rules. Learn more about emulation in
|
|
79
|
+
"description": "Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,\n`Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default\nlocale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).",
|
|
80
80
|
"type": "string"
|
|
81
81
|
},
|
|
82
82
|
"logger": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"type": "boolean"
|
|
89
89
|
},
|
|
90
90
|
"permissions": {
|
|
91
|
-
"description": "A list of permissions to grant to all pages in this context. See\n[browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)\nfor more details.",
|
|
91
|
+
"description": "A list of permissions to grant to all pages in this context. See\n[browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)\nfor more details. Defaults to none.",
|
|
92
92
|
"items": {
|
|
93
93
|
"type": "string"
|
|
94
94
|
},
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
},
|
|
97
97
|
"proxy": {
|
|
98
98
|
"additionalProperties": false,
|
|
99
|
-
"description": "Network proxy settings to use with this context.\n\n**NOTE** For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If\nall contexts override the proxy, global proxy will be never used and can be any string, for example `launch({\nproxy: { server: 'http://per-context' } })`.",
|
|
99
|
+
"description": "Network proxy settings to use with this context. Defaults to none.\n\n**NOTE** For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If\nall contexts override the proxy, global proxy will be never used and can be any string, for example `launch({\nproxy: { server: 'http://per-context' } })`.",
|
|
100
100
|
"properties": {
|
|
101
101
|
"bypass": {
|
|
102
102
|
"description": "Optional comma-separated domains to bypass proxy, for example `\".com, chromium.org, .domain.com\"`.",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"type": "string"
|
|
150
150
|
}
|
|
151
151
|
],
|
|
152
|
-
"description": "A glob or regex pattern to filter requests that are stored in the HAR. When a `baseURL` via the context options was\nprovided and the passed URL is a path, it gets merged via the\n[`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor."
|
|
152
|
+
"description": "A glob or regex pattern to filter requests that are stored in the HAR. When a `baseURL` via the context options was\nprovided and the passed URL is a path, it gets merged via the\n[`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none."
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
155
|
"required": ["path"],
|
|
@@ -311,11 +311,11 @@
|
|
|
311
311
|
"description": "Learn more about [storage state and auth](https://playwright.dev/docs/auth).\n\nPopulates context with given storage state. This option can be used to initialize context with logged-in\ninformation obtained via\n[browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state)."
|
|
312
312
|
},
|
|
313
313
|
"strictSelectors": {
|
|
314
|
-
"description": "If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on\nselectors that imply single target DOM element will throw when more than one element matches the selector. This\noption does not affect any Locator APIs (Locators are always strict). See
|
|
314
|
+
"description": "If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on\nselectors that imply single target DOM element will throw when more than one element matches the selector. This\noption does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to\nlearn more about the strict mode.",
|
|
315
315
|
"type": "boolean"
|
|
316
316
|
},
|
|
317
317
|
"timezoneId": {
|
|
318
|
-
"description": "Changes the timezone of the context. See\n[ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)\nfor a list of supported timezone IDs.",
|
|
318
|
+
"description": "Changes the timezone of the context. See\n[ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)\nfor a list of supported timezone IDs. Defaults to the system timezone.",
|
|
319
319
|
"type": "string"
|
|
320
320
|
},
|
|
321
321
|
"userAgent": {
|