bits-to-dead-trees 0.0.10 → 0.0.11

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.
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+
8
+ - package-ecosystem: "docker"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # bits-to-dead-trees
2
2
 
3
+ ## 0.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - a3c12a4: Wait for network idle event before creating pdf
8
+
3
9
  ## 0.0.10
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -5,6 +5,8 @@
5
5
  Exposes a web server with a single endpoint to take in a URL and create a PDF out
6
6
  of that. It's using [Playwright](https://playwright.dev) in the background for this.
7
7
 
8
+ [![Depfu](https://badges.depfu.com/badges/74bd86ac2a33c6c6f6817cafc6419e84/overview.svg)](https://depfu.com/github/rmehner/bits-to-dead-trees?project_id=35056)
9
+
8
10
  ## Setup
9
11
 
10
12
  ### Requirements
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": "0.0.10",
4
+ "version": "0.0.11",
5
5
  "description": "Turn HTML into PDF files",
6
6
  "repository": "github:rmehner/bits-to-dead-trees",
7
7
  "license": "Apache-2.0",
package/src/index.ts CHANGED
@@ -22,7 +22,8 @@ const createPDF = async (url: string, options?: PdfOptions) => {
22
22
  const browser = await playwright.chromium.launch();
23
23
  const context = await browser.newContext({ ignoreHTTPSErrors: true });
24
24
  const page = await context.newPage();
25
- await page.goto(url);
25
+ await page.goto(url, { timeout: 60000 });
26
+ await page.waitForLoadState("networkidle");
26
27
 
27
28
  const pdf = await page.pdf(options);
28
29
  await browser.close();